PageSourceSearch

https://bureau.rocks/assets/scripts/main-b7c6741452.js

js bureau.rocks collected 2026-09-26 14:02:39 UTC 856,446 bytes, 2 lines download raw bytes

1/*! For license information please see main.js.LICENSE.txt */
2!function(){var e,t={13576:function(e,t,s){var i={"./alternating/alternating.onload.js":5502,"./anchors/anchors.onload.js":95050,"./animatedCover/animatedCover.onload.js":49026,"./animatedCover/lazyCoverLoader.onload.js":61612,"./applicationForm/applicationForm.onload.js":18270,"./assetsNavigation/assetsNavigation.onload.js":59162,"./backTitleLink/backTitleLink.onload.js":12942,"./bookDiscountBanner/bookDiscountBanner.onload.js":62488,"./bookPresentation/bookPresentation.onload.js":8846,"./bookSpacer/bookSpacer.onload.js":37662,"./bookSystemRequirements/bookSystemRequirements.onload.js":87544,"./bookshelfPricing/bookshelfPricing.onload.js":67834,"./bookshelfPricing/bookshelfPricingFooter.onload.js":20983,"./bottomStickyModule/bottomStickyModule.onload.js":23328,"./burosferaVacancyForm/burosferaVacancyForm.onload.js":65284,"./challengeBanner/challengeBanner.onload.js":59478,"./chatButton/chatButton.onload.js":92632,"./code/code.onload.js":6526,"./collecturePricing/collecturePricing.onload.js":35494,"./collecturePricing/collecturePricingFooter.onload.js":80827,"./collectureSpacer/collectureSpacer.onload.js":70500,"./commentForm/commentForm.onload.js":77126,"./comments/comments.onload.js":18816,"./contestsTable/horizontalScrollableTable.onload.js":32494,"./courseNavigation/courseNavigation.onload.js":69894,"./courses/courseSkinCover.onload.js":63797,"./curtain/curtain.onload.js":20562,"./discountBanner/discountBanner.onload.js":1366,"./doubleStickyButton/doubleStickyButton.onload.js":94660,"./educenterCoursesSpacer/educenterCoursesSpacer.onload.js":28350,"./emailSubscriptionNotification/emailSubscriptionNotification.onload.js":40458,"./embeddedVideo/embeddedVideo.onload.js":80474,"./embeddedVideo/embeddedVideoCover.onload.js":19115,"./eventSpacer/eventSpacer.onload.js":56766,"./fader/fader.onload.js":89830,"./fontTester/fontTester.onload.js":91120,"./form/formInput.onload.js":71472,"./fotorama/fotorama.onload.js":89934,"./getGift/getGift.onload.js":72002,"./headerSearch/headerSearch.onload.js":26502,"./imagePreloader/imagePreloader.onload.js":48446,"./impressions/impressions.onload.js":69774,"./leadMagnet/leadMagnet.onload.js":98912,"./leadMagnet/leadbar.onload.js":31417,"./leadMagnetWall/leadMagnetWall.onload.js":15960,"./lectureNavigation/lectureNavigation.onload.js":60774,"./lectureSpacer/lectureSpacer.onload.js":70586,"./lecturesByTag/lecturesByTag.onload.js":71570,"./lecturesPreview/lecturesPreview.onload.js":94022,"./linedTextarea/linedTextarea.onload.js":15254,"./loginBar/loginBar.onload.js":69492,"./loginCardPage/loginCardPage.onload.js":24030,"./loginPage/loginPage.onload.js":49282,"./maxSpacer/maxSpacer.onload.js":39598,"./mediaTextarea/mediaTextarea.onload.js":86538,"./newForm/newForm.onload.js":37682,"./notification/notification.onload.js":97266,"./parallaxFrame/parallaxFrame.onload.js":74350,"./paywallFooter/paywallFooter.onload.js":71914,"./prepNavigation/prepNavigation.onload.js":16382,"./price/price.onload.js":26478,"./realtimeCountdown/realtimeCountdown.onload.js":43982,"./schoolFeedbackList/schoolFeedbackList.onload.js":36454,"./schoolRatings/schoolRatings.onload.js":49022,"./schoolSpacers/schoolEnrollDeadlineScoreSpacer.onload.js":69619,"./schoolSpacers/schoolEnrollEndedSpacer.onload.js":2829,"./schoolSpacers/schoolEnrollEndingSpacer.onload.js":63538,"./schoolSpacers/schoolEnrollMarksSpacer.onload.js":24847,"./schoolSpacers/schoolEnrollOpenSpacer/schoolEnrollOpenSpacer.onload.js":25490,"./schoolSpacers/schoolEnrollSoonSpacer.onload.js":63398,"./schoolSpacers/schoolGraduatedSpacer.onload.js":41584,"./schoolSpacers/schoolPrepsDeadlineDaysSpacer.onload.js":49064,"./schoolSpacers/schoolPrepsDeadlineScoreSpacer/schoolPrepsDeadlineScoreSpacer.onload.js":17537,"./schoolSpacers/schoolStartedSpacer.onload.js":56922,"./schoolSpacers/schoolStudentFeedbackSpacer/schoolStudentFeedbackSpacer.onload.js":35672,"./schoolTaskResultsReview/schoolTaskResultsReview.onload.js":46694,"./schoolTest/locale.onload.js":36414,"./schoolTest/schoolTest.onload.js":60508,"./schoolTest/schoolTrainingTest.onload.js":34385,"./selector/selector.onload.js":36190,"./soviet/soviet.onload.js":37172,"./sovietAskForm/sovietAskFormPage.onload.js":28879,"./sovietCommentForm/sovietCommentForm.onload.js":25810,"./sovietComments/sovietComments.onload.js":40636,"./sovietCompilation/sovietCompilation.onload.js":76042,"./sovietInvite/sovietInvite.onload.js":62118,"./sovietSubscriptionSpacer/sovietSubscriptionSpacer.onload.js":54126,"./sovietsSwitcher/sovietsSwitcher.onload.js":33186,"./sovietsUnanswered/sovietsUnanswered.onload.js":1566,"./sovietsWithNewComments/sovietsWithNewComments.onload.js":80222,"./spacers/booksDiscount.onload.js":52950,"./spread/spread.onload.js":99834,"./stickyBlackFridayBadge/stickyBlackFridayBadge.onload.js":36628,"./stickyButton/stickyButton.onload.js":88114,"./stickyHeader/stickyHeader.onload.js":78252,"./subscriptionButton/subscriptionButton.onload.js":68862,"./subscriptionForm/subscriptionForm.onload.js":14042,"./subscriptionMark/subscriptionMark.onload.js":34244,"./subscriptionNotification/subscriptionNotification.onload.js":23716,"./subscriptionPricing/subscriptionPricing.onload.js":39178,"./superLecture/superLecture.onload.js":49442,"./task/commentField.onload.js":61364,"./task/taskResultHeader.onload.js":46806,"./task/taskResultMark.onload.js":63050,"./task/taskResultMarkPartsTable.onload.js":47420,"./task/taskResults.onload.js":66148,"./telegramSpacer/telegramSpacer.onload.js":76438,"./thumbnail/alignCaptions.onload.js":44280,"./thumbnail/alignThumbnails.onload.js":71990,"./thumbnail/thumbnail.onload.js":14026,"./thumbnail/updThumbnailImages.onload.js":44499,"./topStickyBanner/topStickyBanner.onload.js":36662,"./tracking/tracking.onload.js":14366,"./upload/upload.onload.js":45038,"./userPopup/index.onload.js":45031,"./vacanciesBanner/vacanciesBanner.onload.js":74414,"./vacanciesSpacer/vacanciesSpacer.onload.js":34990,"./vacancy/clickTracking.onload.js":37034,"./video/video.onload.js":84542,"./vkSpacer/vkSp
2acer.onload.js":65422,"./warnings/warnings.onload.js":26646,"./webpage/forbiddenWords.onload.js":56217,"./youtubeSpacer/youtubeSpacer.onload.js":49642,"./zenSpacer/zenSpacer.onload.js":62402,"app/modules/alternating/alternating.onload.js":5502,"app/modules/anchors/anchors.onload.js":95050,"app/modules/animatedCover/animatedCover.onload.js":49026,"app/modules/animatedCover/lazyCoverLoader.onload.js":61612,"app/modules/applicationForm/applicationForm.onload.js":18270,"app/modules/assetsNavigation/assetsNavigation.onload.js":59162,"app/modules/backTitleLink/backTitleLink.onload.js":12942,"app/modules/bookDiscountBanner/bookDiscountBanner.onload.js":62488,"app/modules/bookPresentation/bookPresentation.onload.js":8846,"app/modules/bookSpacer/bookSpacer.onload.js":37662,"app/modules/bookSystemRequirements/bookSystemRequirements.onload.js":87544,"app/modules/bookshelfPricing/bookshelfPricing.onload.js":67834,"app/modules/bookshelfPricing/bookshelfPricingFooter.onload.js":20983,"app/modules/bottomStickyModule/bottomStickyModule.onload.js":23328,"app/modules/burosferaVacancyForm/burosferaVacancyForm.onload.js":65284,"app/modules/challengeBanner/challengeBanner.onload.js":59478,"app/modules/chatButton/chatButton.onload.js":92632,"app/modules/code/code.onload.js":6526,"app/modules/collecturePricing/collecturePricing.onload.js":35494,"app/modules/collecturePricing/collecturePricingFooter.onload.js":80827,"app/modules/collectureSpacer/collectureSpacer.onload.js":70500,"app/modules/commentForm/commentForm.onload.js":77126,"app/modules/comments/comments.onload.js":18816,"app/modules/contestsTable/horizontalScrollableTable.onload.js":32494,"app/modules/courseNavigation/courseNavigation.onload.js":69894,"app/modules/courses/courseSkinCover.onload.js":63797,"app/modules/curtain/curtain.onload.js":20562,"app/modules/discountBanner/discountBanner.onload.js":1366,"app/modules/doubleStickyButton/doubleStickyButton.onload.js":94660,"app/modules/educenterCoursesSpacer/educenterCoursesSpacer.onload.js":28350,"app/modules/emailSubscriptionNotification/emailSubscriptionNotification.onload.js":40458,"app/modules/embeddedVideo/embeddedVideo.onload.js":80474,"app/modules/embeddedVideo/embeddedVideoCover.onload.js":19115,"app/modules/eventSpacer/eventSpacer.onload.js":56766,"app/modules/fader/fader.onload.js":89830,"app/modules/fontTester/fontTester.onload.js":91120,"app/modules/form/formInput.onload.js":71472,"app/modules/fotorama/fotorama.onload.js":89934,"app/modules/getGift/getGift.onload.js":72002,"app/modules/headerSearch/headerSearch.onload.js":26502,"app/modules/imagePreloader/imagePreloader.onload.js":48446,"app/modules/impressions/impressions.onload.js":69774,"app/modules/leadMagnet/leadMagnet.onload.js":98912,"app/modules/leadMagnet/leadbar.onload.js":31417,"app/modules/leadMagnetWall/leadMagnetWall.onload.js":15960,"app/modules/lectureNavigation/lectureNavigation.onload.js":60774,"app/modules/lectureSpacer/lectureSpacer.onload.js":70586,"app/modules/lecturesByTag/lecturesByTag.onload.js":71570,"app/modules/lecturesPreview/lecturesPreview.onload.js":94022,"app/modules/linedTextarea/linedTextarea.onload.js":15254,"app/modules/loginBar/loginBar.onload.js":69492,"app/modules/loginCardPage/loginCardPage.onload.js":24030,"app/modules/loginPage/loginPage.onload.js":49282,"app/modules/maxSpacer/maxSpacer.onload.js":39598,"app/modules/mediaTextarea/mediaTextarea.onload.js":86538,"app/modules/newForm/newForm.onload.js":37682,"app/modules/notification/notification.onload.js":97266,"app/modules/parallaxFrame/parallaxFrame.onload.js":74350,"app/modules/paywallFooter/paywallFooter.onload.js":71914,"app/modules/prepNavigation/prepNavigation.onload.js":16382,"app/modules/price/price.onload.js":26478,"app/modules/realtimeCountdown/realtimeCountdown.onload.js":43982,"app/modules/schoolFeedbackList/schoolFeedbackList.onload.js":36454,"app/modules/schoolRatings/schoolRatings.onload.js":49022,"app/modules/schoolSpacers/schoolEnrollDeadlineScoreSpacer.onload.js":69619,"app/modules/schoolSpacers/schoolEnrollEndedSpacer.onload.js":2829,"app/modules/schoolSpacers/schoolEnrollEndingSpacer.onload.js":63538,"app/modules/schoolSpacers/schoolEnrollMarksSpacer.onload.js":24847,"app/modules/schoolSpacers/schoolEnrollOpenSpacer/schoolEnrollOpenSpacer.onload.js":25490,"app/modules/schoolSpacers/schoolEnrollSoonSpacer.onload.js":63398,"app/modules/schoolSpacers/schoolGraduatedS
2pacer.onload.js":41584,"app/modules/schoolSpacers/schoolPrepsDeadlineDaysSpacer.onload.js":49064,"app/modules/schoolSpacers/schoolPrepsDeadlineScoreSpacer/schoolPrepsDeadlineScoreSpacer.onload.js":17537,"app/modules/schoolSpacers/schoolStartedSpacer.onload.js":56922,"app/modules/schoolSpacers/schoolStudentFeedbackSpacer/schoolStudentFeedbackSpacer.onload.js":35672,"app/modules/schoolTaskResultsReview/schoolTaskResultsReview.onload.js":46694,"app/modules/schoolTest/locale.onload.js":36414,"app/modules/schoolTest/schoolTest.onload.js":60508,"app/modules/schoolTest/schoolTrainingTest.onload.js":34385,"app/modules/selector/selector.onload.js":36190,"app/modules/soviet/soviet.onload.js":37172,"app/modules/sovietAskForm/sovietAskFormPage.onload.js":28879,"app/modules/sovietCommentForm/sovietCommentForm.onload.js":25810,"app/modules/sovietComments/sovietComments.onload.js":40636,"app/modules/sovietCompilation/sovietCompilation.onload.js":76042,"app/modules/sovietInvite/sovietInvite.onload.js":62118,"app/modules/sovietSubscriptionSpacer/sovietSubscriptionSpacer.onload.js":54126,"app/modules/sovietsSwitcher/sovietsSwitcher.onload.js":33186,"app/modules/sovietsUnanswered/sovietsUnanswered.onload.js":1566,"app/modules/sovietsWithNewComments/sovietsWithNewComments.onload.js":80222,"app/modules/spacers/booksDiscount.onload.js":52950,"app/modules/spread/spread.onload.js":99834,"app/modules/stickyBlackFridayBadge/stickyBlackFridayBadge.onload.js":36628,"app/modules/stickyButton/stickyButton.onload.js":88114,"app/modules/stickyHeader/stickyHeader.onload.js":78252,"app/modules/subscriptionButton/subscriptionButton.onload.js":68862,"app/modules/subscriptionForm/subscriptionForm.onload.js":14042,"app/modules/subscriptionMark/subscriptionMark.onload.js":34244,"app/modules/subscriptionNotification/subscriptionNotification.onload.js":23716,"app/modules/subscriptionPricing/subscriptionPricing.onload.js":39178,"app/modules/superLecture/superLecture.onload.js":49442,"app/modules/task/commentField.onload.js":61364,"app/modules/task/taskResultHeader.onload.js":46806,"app/modules/task/taskResultMark.onload.js":63050,"app/modules/task/taskResultMarkPartsTable.onload.js":47420,"app/modules/task/taskResults.onload.js":66148,"app/modules/telegramSpacer/telegramSpacer.onload.js":76438,"app/modules/thumbnail/alignCaptions.onload.js":44280,"app/modules/thumbnail/alignThumbnails.onload.js":71990,"app/modules/thumbnail/thumbnail.onload.js":14026,"app/modules/thumbnail/updThumbnailImages.onload.js":44499,"app/modules/topStickyBanner/topStickyBanner.onload.js":36662,"app/modules/tracking/tracking.onload.js":14366,"app/modules/upload/upload.onload.js":45038,"app/modules/userPopup/index.onload.js":45031,"app/modules/vacanciesBanner/vacanciesBanner.onload.js":74414,"app/modules/vacanciesSpacer/vacanciesSpacer.onload.js":34990,"app/modules/vacancy/clickTracking.onload.js":37034,"app/modules/video/video.onload.js":84542,"app/modules/vkSpacer/vkSpacer.onload.js":65422,"app/modules/warnings/warnings.onload.js":26646,"app/modules/webpage/forbiddenWords.onload.js":56217,"app/modules/youtubeSpacer/youtubeSpacer.onload.js":49642,"app/modules/zenSpacer/zenSpacer.onload.js":62402};function a(e){var t=o(e);return s(t)}function o(e){if(!s.o(i,e)){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}return i[e]}a.keys=function(){return Object.keys(i)},a.resolve=o,e.exports=a,a.id=13576},7124:function(e,t,s){"use strict";var i=s(47943),a=s(24994),o=a(s(75292)),n=a(s(57437));const r=s(60259),l=s(66510);window.throttle=s(18288),window.I18n=s(86019),window.Cookies=s(2733);const c=s(57157);s(2219)($),s(8478)($),s(37229)(),s(34588),s(25999),new(s(91454)),$(function(){const e=$(document),t=s(3818),a=s(35338),d=s(97694),h=s(37481),u=s(39408),p=s(66704),m=s(59582),f=s(84292),v=s(39315),g=s(22046),b=s(45863),_=s(17532),y=s(69059),S=s(26332),w=s(5875),C=s(78813),k=s(29304),T=s(84288),N=s(66349),x=s(91761),P=s(98459),I=s(62515),E=s(53625),M=s(1401);document.body.className.includes("is__embeddable")&&s(32101).bind(),window.application.state=new w,window.application.templates=s(87816),window.application.errors=s(89260),window.application.can=()=>!1,window.application.isProduction=document.body.classList.contains("is__production"),window.application.gridSpacing=9,Object.defineProperty(window.application,"currentScrollPosition",s(71996));const L=document.head.querySelector("[name~=pageId][content]");window.application.pageId=(L||{}).content,window.application.isOnMobileDevice=/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent),window.application.lozad=l(".lozad",{rootMargin:"0px 0px 100px 0px"}),$(".lozad").length&&window.application.lozad.observe(),window.application.supports={halfPixel:s(90943)(),retina:s(2933)()}
2,Object.keys(window.application.supports).forEach(e=>{window.application.supports[e]?$("body").addClass("has__"+e):$("body").addClass("no__"+e)}),E(),$(document).on("appReady",()=>{window.loadAnalytics&&M(window.loadAnalytics),window.deferredComponents&&window.deferredComponents.loadAll()});const O=[960,1400];var A;s(98693),s(21834),s(42593),s(58212),s(63138),s(40571),s(18482),s(69506),s(99934),s(99235),s(15499),s(37594),s(19112),s(69960),s(47486),s(62893),s(83712),s(4043),s(62627),s(6369),s(15282),s(66713),s(71407),s(83916),s(94583),s(42135),s(71385),s(17462),s(62721),s(72407),s(59941),s(51039),(A=s(13576)).keys().forEach(A),setTimeout(()=>t(function(){window.application.webpage=new a($(".js__webpage")),new h,new u,new b,new _,new C,new k,new T,new N,new x,new n.default,P(),window.ab&&new o.default(window.ab).start(),$("[data-toggle-class]").each(function(){const e=$(this),t=e.attr("data-toggle-class");e.on("click",".js__toggle",()=>e.toggleClass(t))}),$(".js__schoolEnrollSwitcher").each(function(){new S($(this))});const t=new p($("body"),{rotations:{soviet:window.application.alternatingSoviets,course:window.application.alternatingCourses,category:window.application.promotedCategories},templates:window.application.templates}),s=()=>{for(let e=0;e<O.length;e+=1)if(window.innerWidth<O[e])return e;return O.length};let l=s();e.on("appResize",()=>{const t=s();l!==t&&(l=t,e.trigger("appLayoutChange"))}),t.fill(),e.on("appLayoutChange",t.fill.bind(t)),$(".js__header").each(function(){new m($(this))}),$(".js__coworkafeLive").each(function(){new d($(this))}),$(".js__menu").each(function(){new f($(this))}),$(".js__pageMenu").each(function(){new v($(this))}),$("[data-subscription-stats-for]").each(function(){new y($(this))}),$(document).on("click submit","[data-goal]",function(){I($(this).attr("data-goal"))}),e.trigger("appSetUser",window.application.user);const w=()=>{try{iNoBounce.disable()}catch{setTimeout(w,50)}};w();let E=$("<div>"),L=!1,A=!1;$(document).on("keydown",e=>{if(71===e.keyCode&&e.ctrlKey&&(A||($("body").append('\n        <div class="debugger">\n          <div class="debugger-cols">\n            <div></div><div></div><div></div><div></div><div></div><div></div><div></div><div></div><div></div><div></div><div></div><div></div><div></div><div></div><div></div><div></div>\n          </div>\n        </div>\n      '),A=!0,E=$(".debugger")),E.toggleClass("is__active").css({height:document.body.clientHeight}),L=!L),66===e.keyCode&&e.ctrlKey&&$(".banner-debug").toggleClass("is__active"),L&&(38===e.keyCode||40===e.keyCode)){e.preventDefault();const t=parseInt(E.css("top"),10),s=38===e.keyCode?t-1:t+1;E.css("top",s+"px")}}),$(document).on("appResize",()=>E.css({height:document.body.clientHeight})),$(".preload").each(function(){const e=$(this),t=$(this).find(".image").map((e,t)=>{const s=new Image;return s.src=$(t).data("src"),s});i(t,function(){e.addClass("is__loaded")})});const D=()=>{$(".js__inlineSVG").each(function(){const e=$(this),t=e.attr("id"),s=e.attr("class"),i=e.attr("src");$.get(i,function(i){let a=$(i).find("svg");void 0!==t&&(a=a.attr("id",t)),void 0!==s&&(a=a.attr("class",s+" replaced-svg")),a=a.removeAttr("xmlns:a"),e.replaceWith(a)},"xml")})};e.on("appLayoutChange",D),D(),e.on("imagesLoaded",()=>{$("body").addClass("imagesLoaded")}),c.initiate(),M(()=>r.initiate()),$(".doubleHover").each(function(){new g($(this))})}),1)})},72013:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;const s={1:"full",2:"half"};t.default=class{constructor(e){this.$el=e,this.$wrapper=this.$el.parent(".bannerWrapper"),this.ids=String(this.$el.data("ids")).split(",").map(e=>e.trim()),this.width=s[this.ids.length]}get id(){return this.ids[0]}asJson(){return this.ids.map(e=>({id:e,width:this.width}))}}},84288:function(e,t,s){"use strict";var i=s(24994),a=i(s(98999)),o=i(s(72013));const n=e=>(e||"").split(";").map(e=>e.trim()).filter(e=>e);e.exports=class{constructor(){this.collectBannerCells(),this.bannerCells.length&&(this.placements=n($("meta[name=placement]").attr("content")),this.tags=n($("meta[name=tags]").attr("content")),this.collectPageStyles(),this.addUtmInfo(),this.fetchBanners())}collectBannerCells(){this.bannerCells=$(".js__banner").map((e,t)=>new o.default($(t))).get().sort((e,t)=>
2e.id-t.id)}collectPageStyles(){this.styles=$(":not(iframe) style").get().map(e=>{const t=$(e).text().match(/:root[\s]*{([\s\w-:;.,()#]+)}/i);return t&&t[1]?t[1]:""}).join("")}addUtmInfo(){this.meta=(window.location.search+"").replace(/^\?/,"")}fillFullCell(e,t,s){s[t].banner?(e.$el.attr("data-src",`/embedded/banners/${s[t].banner}?styles=${encodeURIComponent(this.styles)}&${this.meta}`),e.$el.addClass("lozad")):e.$wrapper.remove()}fillHalfCells(e,t,s){e.$el.attr("data-src",`/embedded/banners/double/${s[t].banner},${s[t+1].banner}?styles=${encodeURIComponent(this.styles)}&${this.meta}`),e.$el.addClass("lozad")}fillCells(e){const t=[...e];this.bannerCells.forEach((e,s)=>{switch(e.width){case"full":this.fillFullCell(e,s,t);break;case"half":this.fillHalfCells(e,s,t),t.splice(s+1,1)}})}fetchBanners(){fetch("/embedded/banners/collect/",{method:"POST",headers:a.default,body:JSON.stringify({placements:this.placements,tags:this.tags,cells:this.bannerCells.map(e=>e.asJson())}),credentials:"include"}).then(e=>e.json()).then(e=>this.fillCells(e)).then(()=>window.application.lozad.observe())}}},97694:function(e){"use strict";e.exports=class{constructor(e){this.$el=e,this.image=new Image,this.image.onload=()=>{this.$el[0].src=this.image.src,this._scheduleNext()},this.image.onerror=this._scheduleNext.bind(this),this.reloadCam()}reloadCam(){this.image.src="https://platform.bureau.ru/webcam/webcam_frame.jpg?v="+Math.random()}_scheduleNext(){clearTimeout(this.refreshTimeout),this.refreshTimeout=setTimeout(this.reloadCam.bind(this),3e3)}}},29304:function(e){"use strict";e.exports=class{constructor(){this.bindEvents()}preventUnloadWhenHasUnsavedChanges(e){if($(".has__unsavedChanges").length){const t="У вас есть несохранённые изменения";return e.returnValue=t,t}}bindEvents(){$(window).on("beforeunload",this.preventUnloadWhenHasUnsavedChanges.bind(this))}}},78813:function(e){"use strict";e.exports=class{constructor(){this.$document=$(document),this.level=0,this._bindEvents()}_bindEvents(){this.$document.on("dragenter dragover",e=>{e.stopPropagation(),e.preventDefault()}),this.$document.on("dragenter",()=>{this.level+=1,this.$document.trigger("appDragStart"),document.dispatchEvent(new CustomEvent("documentDragStart"))}),this.$document.on("dragleave",()=>{this.level-=1,0===this.level&&(this.$document.trigger("appDragEnd"),document.dispatchEvent(new CustomEvent("documentDragEnd")))}),this.$document.on("drop",e=>{if(e.stopPropagation(),e.preventDefault(),this.$document.trigger("appDragEnd"),document.dispatchEvent(new CustomEvent("documentDragEnd")),!this._isDropEventApplicable(e))return;const t={files:Array.from(e.originalEvent.dataTransfer.files)};this.$document.trigger("appDrop",t),document.dispatchEvent(new CustomEvent("documentDrop",{detail:t}))})}_isDropEventApplicable(e){const t=e.originalEvent;return t.dataTransfer&&t.dataTransfer.files&&t.dataTransfer.files.length}}},91761:function(e,t,s){"use strict";var i=s(24994),a=i(s(98999)),o=i(s(18288));const n=JSON.stringify,r=e=>({body:n(e)});e.exports=class{constructor(){this.isTrackable&&this.track()}get isTrackable(){return!!$('meta[name="documentProgress"]').length&&!!window.application.user}get pageId(){return window.application.pageId}get trackingParams(){return{method:"POST",credentials:"include",headers:a.default}}get initialPayload(){return{subject:this.pageId,unit:"percent",value:0,max_value:100}}get readPayload(){return{subject:this.pageId,unit:"percent",value:100,max_value:100}}trackOpen(){fetch("/document_progresses/",Object.assign({},this.trackingParams,r(this.initialPayload)))}trackVideos(){document.addEventListener("videoProgressUpdate",(0,o.default)(15e3,this.trackVideoProgress.bind(this)))}trackVideoProgress(e){const{seconds:t,duration:s,id:i}=e.detail,a={subject:`${this.pageId}#${i}`,unit:"seconds",value:t,max_value:s};fetch("/document_progresses/",Object.assign({},this.trackingParams,r(a)))}trackRead(){fetch("/document_progresses/",Object.assign({},this.trackingParams,r(this.readPayload)))}track(){this.trackOpen(),this.trackVideos(),setTimeout(this.trackRead.bind(this),6e4)}}},66704:function(e){"use strict";e.exports=class{constructor(e,t={}){this.$el=e,this.rotations=t.rotations,this.templates=t.templates,this.lastPromotedCategory=null}fill(){this.rotationIndices=this._rebuildRotationIndices(),this.$el.find("[data-auto-fill]").filter((e,t)=>
2t.offsetParent).each(this._replaceWithAppropriateContent.bind(this))}_rebuildRotationIndices(){return Object.keys(this.rotations).reduce((e,t)=>(e[t]=1,e),{})}_replaceWithAppropriateContent(e,t){const s=$(t),i=s.data("auto-fill");this._replace(i,s)}_replace(e,t){const s=this.rotations[e],i=s[(this.rotationIndices[e]-1)%s.length],a=t.data("auto-fill-params"),o=this[`_render${e.charAt(0).toUpperCase()+e.slice(1)}`](i,a),n=$(o).addClass(t.attr("class"));"category"!==e&&n.attr("data-auto-fill",t.data("auto-fill")).attr("data-auto-fill-params",JSON.stringify(t.data("auto-fill-params"))),t.replaceWith(n),this.rotationIndices[e]+=1}_renderSoviet(e,t={}){const s=Object.assign({},{soviet:e},t);return this.templates.soviet(s)}_renderCourse(e,t={}){const s=Object.assign({},{course:e},t);return this.templates.course(s)}_renderCategory(e,t){const s=this._findNextPromotedCategory(t);return this.lastPromotedCategory=s,this.templates.promotedCategory({category:s})}_findNextPromotedCategory(e){const t=this.rotations.category.filter(t=>t!==this.lastPromotedCategory&&!(e.hasSmallArea&&t.hasLongTitle));let s=t[Math.floor(Math.random()*t.length)];for(var i=0;i<e.categories.length;i+=1){const a=e.categories[i],o=t.filter(e=>e.normalizedTitle===a).pop();if(o){s=o;break}}return s}}},45863:function(e,t,s){"use strict";var i=s(86019);e.exports=class{constructor(){$(document).on("appSetUser",this.handleCurrentUser.bind(this))}handleCurrentUser(e,t){t&&this.hasEditAccess(t)&&this.address&&(this.$link=this.buildLink(),$(".js__header").append(this.$link),this.bindEvents())}get address(){const e=$('meta[name="readOnly"]'),t=$('meta[name="pageId"]'),s=$('meta[name="pageEditLink"]'),i=t.attr("content");return e.length||!t.length?null:s.length?s.attr("content"):(i+"/edit").replace("//","/")}bindEvents(){$(document).on("keydown",e=>{69===e.keyCode&&e.altKey&&(e.preventDefault(),window.open(this.$link.attr("href")))})}buildLink(){const e=this.address.replace(/\//,".");return $("<a></a>").attr("class","js__edit header-edit").attr("aria-label",i.t("site.editLinkLabel")).attr("target",e).attr("href",this.address)}hasEditAccess(e){return e.isStaff}}},37481:function(e,t,s){"use strict";const i=s(18288),a=s(67542),o=s(92797),n=/Bin\/Previews$/.test(navigator.userAgent),r=()=>$(".image[data-src]").map((e,t)=>new a($(t))).get();e.exports=class{constructor(){this.images=r(),this.$document=$(document),this._bindEvents(),this._calculate(),this._load()}_bindEvents(){$(window).on("scroll",i(400,this._load.bind(this))),this.$document.on("appResize",()=>{this._calculate(),this._load()}),this.$document.on("appLoadImagesIn",(e,t)=>this._forceLoadImagesIn($(t))),this.$document.on("loadImages",this._loadAll.bind(this)),this.$document.on("imageLoaded",this._updateLoadingProgress.bind(this)),this.$document.on("newImagesAppeared",this.rescanImages.bind(this))}rescanImages(){this.images=r(),this._calculate(),this._load()}_calculate(){this.loadableImages=[],this.loadRadius=n?9999999:4*window.innerHeight,this.images.filter(e=>!e.isLoaded).forEach(e=>{e.calculate(),e.isLoadable&&this.loadableImages.push(e)})}_load(){let e=window.application.currentScrollPosition;this._buildQueueForPosition(e),this._handleQueue()}_forceLoadImagesIn(e){e.find(".image:not(.is__loaded)[data-src]").map((e,t)=>new a($(t),{src:$(t).data("src")})).get().forEach(e=>e.load())}_buildQueueForPosition(e){this.imagesQueue=new o(this.loadableImages).within({radius:this.loadRadius,position:e})}_loadAll(){this.loadableImages.forEach(e=>{e.load()})}_updateLoadingProgress(e,t){const s=this.loadableImages.indexOf(t),i=this.imagesQueue.indexOf(t);s>=0&&this.loadableImages.splice(s,1),i>=0&&this.imagesQueue.splice(i,1),0===this.loadableImages.length&&this.$document.trigger("imagesLoaded",this),this._handleQueue()}_handleQueue(){this.imagesQueue.slice(0,4).forEach(e=>{e.load()}),0===this.imagesQueue.length&&this.$document.trigger("imagesQueueFree")}}},92797:function(e){"use strict";e.exports=class{constructor(e){this.images=e}within({position:e,radius:t}){const s={top:e,bottom:e+window.innerHeight};return this.images.filter(e=>e.distanceFrom(s)<t||(e.cancel(),!1)).sort((e,t)=>
2e.distanceFrom(s)-t.distanceFrom(s))}}},67542:function(e){"use strict";e.exports=class{constructor(e,t={}){this.$el=e,this.$document=$(document),this.src=t.src||this.$el.data("nonretina-src")||this.$el.data("src"),this.loadEvent=t.loadEvent||"imageLoaded",this.isForcedToLoad=this.$el.is(".is__forcedToLoad"),this.tries=0,this.calculate(),/data:image/.test(this.src)&&this._displayEmbedded()}calculate(){this.isLoadable=this.isForcedToLoad||!!this.$el[0].offsetParent,this.top=this.$el.offset().top,this.bottom=this.top+this.$el.outerHeight(!0)}load(){this.isLoading||this.isLoaded||(this.isLoading=!0,this.xhr=new XMLHttpRequest,this.xhr.open("GET",this.src),this.xhr.responseType="blob",this.xhr.addEventListener("load",this._display.bind(this)),this.xhr.addEventListener("error",this._handleLoadError.bind(this)),this.xhr.send())}cancel(){this.isLoading=!1,this.xhr&&this.xhr.abort()}distanceFrom(e){return this.isForcedToLoad?0:this.bottom<e.top?e.top-this.bottom:this.top>e.bottom?this.top-e.bottom:0}_display(e){this.isLoading=!1,this.isLoaded=!0;const t=e.target;this._displayImage((e=>window.URL.createObjectURL(e.response))(t))}_displayImage(e){clearTimeout(this._displayTimeout),this._displayTimeout=setTimeout(()=>this._displayFullyLoadedImage(e),100);const t=new Image;t.onload=()=>this._displayFullyLoadedImage(e),t.src=e}_displayFullyLoadedImage(e){if(clearTimeout(this._displayTimeout),this.isDisplayed)return;const t=this.$el.data("last-src"),s=this.$el.find("> .image-img");var i;s.length?s.attr("src",e):this.$el.css("background-image",`url(${e})`),this.$el.addClass("is__loaded"),this.isDisplayed=!0,this.$document.trigger(this.loadEvent,this),this.$el.data("last-src",e),i=t,window.URL.revokeObjectURL(i)}_displayEmbedded(){this.isLoaded=!0,this._displayFullyLoadedImage(this.src)}_handleLoadError(){this.tries+=1,this.isLoading=!1,this.isLoaded=this.tries>5,this.isLoaded&&this.$document.trigger(this.loadEvent,this)}}},17532:function(e,t,s){"use strict";var i=s(24994),a=i(s(32485)),o=s(9193),n=s(15011),r=i(s(3452));const l=()=>{var e;const t=null===(e=window.application)||void 0===e?void 0:e.menuBadges;return Array.isArray(t)?t:[]},c=e=>1e3*parseInt(e,10);e.exports=class{constructor(){this.$body=$("body"),this.currentBadge=this.findCurrentBadge(),this.appendBadge()}findCurrentBadge(){return this.badgeFromUrl||this.activeBadge||this.defaultBadge}get activeBadge(){return l().find(e=>{return t=e.start,s=e.end,!(!t||!s)&&Date.now()>=c(t)&&Date.now()<c(s);var t,s})}get defaultBadge(){return l().find(e=>e.permanent)}get $badge(){return $(`<a>${this.currentBadge.innerHtml}</a>`).addClass(this.classes).attr("href",this.href)}get $desktopBadge(){return this.$badge.clone().addClass("device laptop desktop")}get $mobileBadge(){return this.$badge.clone().addClass("device mobile")}get href(){return this.currentBadge.url.replace("%date",(0,n.toDateParam)(new Date))}get classes(){return(0,a.default)("menu-item-badge menuItemBadge is__hiddenOnPreview noprint doubleHover",this.currentBadge.class,`${this.currentBadge.name}Badge`,(this.currentBadge.mod||"").split(" ").filter(Boolean).map(e=>`is__${e}`),{is__defaultTarget:this.target===this.defaultTarget})}get target(){return this.currentBadge.target}get defaultTarget(){return"Новости"}get $targetLink(){return this.target?$(`.header .menu-item-link:contains("${this.target}")`):$(".header .menu-item-link").first()}get hasNoBadge(){var e;const t=!$(".header-menu").length||this.$body.hasClass("is__embeddable"),s=!(null!==(e=this.currentBadge)&&void 0!==e&&e.innerHtml);return"en"===window.I18n.locale||t||s||this.isExcluded}get badgeFromUrl(){return(0,o.urlToParamsArray)(window.location.search).filter(Boolean).map(e=>{var t,s;return(t=e.name,l().find(e=>e.key===t))||(/\w*Badge$/.test(e.name)?(s=e.name.replace(/Badge$/,""),l().find(e=>e.name===s)):void 0)}).find(Boolean)}get isExcluded(){var e;const t=new RegExp(`^/${null===(e=this.currentBadge.excludedPages)||void 0===e?void 0:e.join("|")}/`);return t&&t.test(window.location.pathname)}appendBadge(){if(this.hasNoBadge)return;this.$body.addClass(`has__${this.currentBadge.name}Badge`),$(".bookStage.is__head, .bookCard .hero, .bookSplash, .sovietSplash,\n  .compilations-header, .compilationCover, .fullImageTop-wrapper, .bleedHeader").length&&this.$body.addClass("has__headerBadge");const{$desktopBadge:e,$mobileBadge:t}=this;this.$targetLink.after(e),$(".header").append(t),"live"===this.currentBadge.name&&new r.default(t),$(document).trigger("menuItemBadgeAppended")}}},3452:function(e){"use strict";e.exports=class{constructor(e){this.$el=e,this.$badgeText=this.$el.find(".liveBadge-text"),this.cloneText(),this.setupScrolling(),this.setupListeners()}get badgeText(){return this.$badgeText[0]}get scrollDiff(){return this.badgeText.scrollWidth-this.badgeText.offsetWidth}get requiresScrolling(){return this.scrollDiff>5}cloneText(){this.$badgeText.find("span").clone().attr("aria-hidden",!0).addClass("is__copy").appendTo(this.$badgeText)}setupScrolling(){this.$el.removeClass("is__scrollable"),this.$el.toggleClass("is__scrollable",this.requiresScrolling)}
2setupListeners(){$(document).on("appResize",this.setupScrolling.bind(this))}}},57437:function(e,t,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=s(91978);const a="wheel.recaptchaLoader keydown.recaptchaLoader mousedown.recaptchaLoader touchstart.recaptchaLoader";t.default=class{constructor(){$(document).on(a,this.initAndRelease)}initAndRelease(){(0,i.initRecaptcha)(),$(document).off(a)}}},39408:function(e,t,s){"use strict";const i=s(67542),a=s(92797),o=()=>window.application.supports.retina||window.application.viewWidth>1500;e.exports=class{constructor(){this.images=this._findRetinaImages(),this.$document=$(document),this.loadRadius=2*window.innerHeight,this.imagesQueue=[],this._bindEvents(),this._calculate()}_findRetinaImages(){return $(".image[data-src]").filter((e,t)=>{return(s=t).getAttribute("data-nonretina-src")&&s.getAttribute("data-src")!==s.getAttribute("data-nonretina-src");var s}).map((e,t)=>new i($(t),{src:$(t).data("src"),loadEvent:"retinaImageLoaded"})).get()}_bindEvents(){this.$document.on("imagesQueueFree",()=>{this._calculate(),this._load()}),this.$document.on("retinaImageLoaded",this._updateLoadingProgress.bind(this))}_calculate(){this.loadableImages=[],o()&&this.images.filter(e=>!e.isLoaded).forEach(e=>{e.calculate(),e.isLoadable&&this.loadableImages.push(e)})}_load(){if(!o())return;let e=window.application.currentScrollPosition;this._buildQueueForPosition(e),this._handleQueue()}_buildQueueForPosition(e){this.imagesQueue=new a(this.loadableImages).within({radius:this.loadRadius,position:e})}_updateLoadingProgress(e,t){this.loadableImages.splice(this.loadableImages.indexOf(t),1),this.imagesQueue.splice(this.imagesQueue.indexOf(t),1),this._handleQueue()}_handleQueue(){this.imagesQueue.slice(0,1).forEach(e=>{e.load()})}}},26332:function(e){"use strict";const t="is__full";e.exports=class{constructor(e){this.$el=e,this._bindEvents()}hide(){this.$el.removeClass(t)}toggle(){this.$el.toggleClass(t)}_bindEvents(){$(document).on("keydown",e=>{27===e.keyCode&&this.hide()}),this.$el.on("click",e=>e.stopPropagation()),this.$el.on("click",".js__toggle",this.toggle.bind(this)),$(document).on("click",this.hide.bind(this))}}},69059:function(e){"use strict";e.exports=class{constructor(e){this.$el=e,$(document).on("appSetUser",this.fetchAndDisplayStats.bind(this))}fetchAndDisplayStats(e,t){t&&t.isStaff&&this.fetchStats().then(this.displayStats.bind(this))}get subscriptionTypes(){return this.$el.attr("data-subscription-stats-for")}fetchStats(){return this.subscriptionTypes?$.get({url:`/mailing_lists/${this.subscriptionTypes}/stats/`,contentType:"application/json; charset=utf-8",dataType:"json",xhrFields:{withCredentials:!0}}):null}displayStats({specialSubscribersCount:e,listSubscribersCount:t,clusterSubscribersCount:s,title:i}){const a=[e,t,s].filter(e=>e||0===e).join(" / "),o=$("<a>",{html:a,title:i,href:`https://bureau.ru/school/cp/enroll.php?type=${this.subscriptionTypes}`,class:"subscriptionStats"});this.$el.append(o)}}},35338:function(e){"use strict";const t="is__scrollable",s="is__highlightMark",i="has__activeHighlight",a="wheel.highlight touchmove.highlight",o=["[email protected]","[email protected]"],n=({spreadId:e,anchorId:t})=>window.application.anchorsBySpreadId[e].anchors.find(e=>String(e.id)===String(t));class r{constructor(e){this.$el=e,this.el=e[0],this.$document=$(document),this.$body=$("body"),this.affectingModules=[],this.dependentModules=[],this.reactiveModules=[],this.finalModules=[],this.animatedModules=[],this.triggers={hold:this.$el.offset().top},this._book={cellHeight:window.innerHeight/12},this.documentHeight=this.$document.height(),this.$el.on("moduleInit",(e,t)=>{this.isAffectingHeight?this.affectingModules.push(t):this.isFinal?this.finalModules.push(t):this.dependentModules.push(t)}),this.$el.on("animatedModuleInit",(e,t)=>{e.stopPropagation(),this.animatedModules.push(t)}),this.$el.on("appHighlight",this.highlight.bind(this)),$(window).on("scroll",window.throttle(50,()=>{this.$document.trigger("appScroll",this.currentScrollPosition)})),this.animateChildren=this.animateChildren.bind(this);try{requestAnimationFrame(this.animateChildren)}catch(e){console.error(e)}this.$document.on("appResize",this.init.bind(this)),this.$document.on("appSetUser",this._setUser.bind(this)),this._bindResizeListeners(),this.$el.trigger("spreadCreated",this),this.init(),this.$body.addClass("is__ready"),this.$document.trigger("appReady"),this.$el.trigger("webpageReady").trigger("spreadLoaded").trigger("spreadVisualized"),document.dispatchEvent(new CustomEvent("webpage:ready")),this._checkDocumentHeightChange=this._checkDocumentHeightChange.bind(this),setInterval(this._checkDocumentHeightChange,1500)}init(){this.wasRendered&&this.reset(),this.calculate(),this.render()}resize(){}reset(){r.resetModules(this.affectingModules),r.resetModules(this.dependentModules),r.resetModules(this.finalModules)}calculate(){this.calculateViewDimensions(),r.calculateModules(this.affectingModules),r.renderModules(this.affectingModules),r.calculateModules(this.dependentModules)}render(){r.renderModules(this.dependentModules),r.calculateModules(this.finalModules),r.renderModules(this.finalModules),this.calculateRelativeAnimatedModules(),this.calculateAnchorAnimatedModules(),this.wasRendered=!0}get currentScrollPosition(){return window.application.currentScrollPosition}highlight(){this.unhighlight(),this.$el.one(a,this.toggleHighlightOff.bind(this))}unhighlight(){clearTimeout(this.highlightTimeout),this.$el.off(a).removeClass(i)}removeHighlights(){this.$el.find(`.${s}`).removeClass(s)}toggleHighlightOff(){this.$el.addClass(i),setTimeout(()=>{this.removeHighlights(),this.unhighlight()},6e3)}_bindResizeListeners(){const e=()=>this.$document.trigger("appResize");let t;const s=()=>{clearTimeout(t),t=setTimeout(e,400)},i=()=>{s(),window.removeEventListener("resize",i)};window.application.isOnMobileDevice?(window.addEventListener("orientationchange",()=>window.addEventListener("resize",i)),window.addEventListener("resize",function(){Math.abs(this.viewWidth-window.innerWidth)>5&&s()})):window.addEventListener("resize",s)}animateChildren(){if(!this.animatedModules.length)return;const e=this.currentScrollPosition;e!==this.previouslyAnimatedAt&&this.animateChildrenAt(e),this.previouslyAnimatedAt=e,requestAnimationFrame(this.animateChildren)}
2animateChildrenAt(e){this.animatedModules.forEach(t=>{const{tillPosition:s}=t.animation;let i=e-(t.relativeParentPosition||0);const a=.999*s;i>=a&&(i=a),t.animate(i)})}_setUser(e,t){const s=$("body");t&&s.addClass("is__loggedIn"),t&&t.name&&s.addClass("has__name"),t&&t.honorable&&s.addClass("is__userHonorable"),t&&t.isModerator&&s.addClass("is__userModerator"),t&&o.includes(t.email)&&s.addClass("is__debugged")}_checkDocumentHeightChange(){this.documentHeight!==this.$document.height()&&(this.documentHeight=this.$document.height(),this.$document.trigger("appHeightChanged"))}calculateViewDimensions(){this.viewHeight=window.innerHeight,this.viewWidth=window.innerWidth,window.application.viewHeight=this.viewHeight,window.application.viewWidth=this.viewWidth,document.documentElement.style.setProperty("--viewHeight",this.viewHeight+"px"),document.body.classList.remove(t);const e=document.documentElement.scrollHeight>window.innerHeight;document.body.classList.toggle(t,e)}calculateRelativeAnimatedModules(){this.animatedModules.forEach(e=>{const t=e.$el.closest(".is__animationBase");e.isRelativelyAnimated=!!t.length,e.isRelativelyAnimated&&(e.relativeParentPosition=t.offset().top,e.relativeParentHeight=t.outerHeight(),e.animation.fromposition.includes("%")&&(e.animation.fromPosition=this.percentagePositionOf(e,"fromposition"),e.animation.tillPosition=this.percentagePositionOf(e,"tillposition")))})}calculateAnchorAnimatedModules(){this.animatedModules.filter(e=>!!e.animation.fromanchor&&!!e.animation.tillanchor).forEach(e=>{const{fromAnchorId:t,tillAnchorId:s}=e.animation,i=e.$el.closest(".spread").attr("data-spread-id");e.animation.fromPosition=this.findFromPositionForAnchor({spreadId:i,fromAnchorId:t}),e.animation.tillPosition=this.findTillPositionForAnchor({spreadId:i,tillAnchorId:s})})}percentagePositionOf(e,t){const s=parseFloat(e.animation[t])/100;return e.relativeParentHeight*s}findFromPositionForAnchor({spreadId:e,fromAnchorId:t}){return n({spreadId:e,anchorId:t}).trigger}findTillPositionForAnchor({spreadId:e,tillAnchorId:t}){return n({spreadId:e,anchorId:t}).trigger-1}static resetModules(e){e.forEach(e=>{e.reset()})}static calculateModules(e){e.forEach(e=>{e.calculate()})}static renderModules(e){e.forEach(e=>{e.render()})}}e.exports=r},22046:function(e){"use strict";e.exports=class{constructor(e){this.CLASS_HOVER="hover",this.$el=e;const t=this.$el.attr("href")||this.$el.find("a").attr("href");this.$doubles=$(`.doubleHover[href="${t}"], .doubleHover a[href="${t}"]`),this.setListeners()}setListeners(){this.$el.off("mouseenter.doublehover").on("mouseenter.doublehover",()=>{this.$doubles.addClass("hover")}),this.$el.off("mouseleave.doublehover").on("mouseleave.doublehover",()=>{this.$doubles.removeClass("hover")})}}},89260:function(e){"use strict";e.exports={"school.task_result.something_bad_happened":()=>"Файл не загружен. Попробуйте ещё раз",fileTooBig:()=>"Sorry, mate, tis’ file is too big","school.task_result.requirements_not_met":(e={})=>e.message,"school.task_result.wrong_upload":(e={})=>`Формат ${(e.format||"").toUpperCase()}\n  не принимается. Пожалуйста, загрузите простой файл с изображением,\n  например гиф, джипег, ПНГ или ПДФ`}},59582:function(e){"use strict";e.exports=class{constructor(e){this.$el=e,this.$document=$(document),this.$userAvatar=this.$el.find(".js__user-avatar"),this.setListeners()}setListeners(){this.$document.on("appSetUser",(e,t)=>{t&&this._setAvatarOrInitials(t),this._showClassroomLink(),this._trackUser(t)})}_setAvatarOrInitials({avatarUrl:e,name:t}){if(e)return $("body").addClass("with__avatar"),void this.$userAvatar.css("background-image",`url('${e}')`);const s=t.split(/\s/).map(e=>e[0]||"").map(e=>e.toUpperCase()).join("");this.$userAvatar.text(s)}_showClassroomLink(){const e=window.location.pathname,t=this.$el.find(".header-bell");t.attr("href",this.classroomLink),/^\/school\/(prep\/)?classroom($|\/$|(\/[0-9]+))/i.test(e)&&(t.addClass("is__active"),t.removeAttr("href"))}_trackUser(e){const t=(e||{}).id||0;try{dataLayer.push({event:"User_Init",user_data:{id:t,date_registered:e.date_registered||"",card_connected:e.card_connected||!1,user_pic_exist:e.user_pic_exist||!1,gmail_exists:e.gmail_exists||!1}})}catch{}}get classroomLink(){const{eventId:e}=window.classroom||{};return 44===e?"/school/classroom/demo/":e?`/school/classroom/${e}/`:"/school/classroom/"}}},86019:function(e,t,s){"use strict";const i=s(94112);i.defaultLocale="ru",i.pluralization.ru=function(e){const t=e%10,s=e%100;return 1===t&&11!==s?["one"]:[2,3,4].includes(t)&&![12,13,14].includes(s)?["few"]:0===t||[5,6,7,8,9].includes(t)||[11,12,13,14].includes(s)?["many"]:["other"]},i.translations=Object.assign({},s(84675)),i.locale=$("html").attr("lang")||i.defaultLocale,e.exports=i},45109:function(e,t,s){"use strict";let i;if(window.$&&window.jQuery&&window.$.fn.reactify&&window.imagesLoaded)i=window.$;else{const e=s(33444).A,t=s(47943);i=s(3486),i.fn.reactify=e,t.makeJQueryPlugin(i),window.$=i,window.jQuery=i,window.imagesLoaded=t}e.exports=i},75292:function(e,t,s){"use strict";var i=s(24994);
2Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=i(s(62515));t.default=class{constructor(e){this.id=e.id,this.group=e.group}get goal(){return`AB_TEST_${this.id}_${this.group}`}start(){(0,a.default)(this.goal)}}},1401:function(e){"use strict";e.exports=e=>{const t=()=>(e=>{window.requestIdleCallback?window.requestIdleCallback(e,{timeout:2e3}):setTimeout(e,0)})(e);if(!window.PerformanceObserver||!(window.PerformanceObserver.supportedEntryTypes||[]).includes("paint"))return void window.requestAnimationFrame(()=>window.requestAnimationFrame(t));const s=new window.PerformanceObserver(e=>{e.getEntriesByName("first-contentful-paint").length&&(s.disconnect(),t())});s.observe({type:"paint",buffered:!0})}},2219:function(e){"use strict";const t="data-animation-",s=/^([a-z0-9]+)-/,i=e=>{let s={};return $.each(e,(e,i)=>{if(i.name.indexOf(t)>=0){const e=i.name.replace(t,"");s[e]=i.value}}),s};e.exports=function(e){e.fn.animationsObject=function(){const e=i(this[0].attributes),t=Object.keys(e).map(e=>(e.match(s)||[])[1]);return t.some(e=>!e)?e:t.filter((e,s)=>t.indexOf(e)===s).map(t=>((e,t)=>{let i={};return Object.keys(e).forEach(a=>{if(0===a.indexOf(t)){const t=a.replace(s,"");i[t]=e[a]}}),i})(e,t))}}},13151:function(e,t){"use strict";var s,i,a,o;o=()=>{const e={update:void 0,begin:void 0,run:void 0,complete:void 0,loop:1,direction:"normal",autoplay:!0,offset:0},t={duration:1e3,delay:0,easing:"easeOutElastic",elasticity:500,round:0},s=["translateX","translateY","translateZ","rotate","rotateX","rotateY","rotateZ","scale","scaleX","scaleY","scaleZ","skewX","skewY","perspective"];let i;function a(e,t){return e.indexOf(t)>-1}const o={arr:e=>Array.isArray(e),obj:e=>a(Object.prototype.toString.call(e),"Object"),pth:e=>o.obj(e)&&e.hasOwnProperty("totalLength"),svg:e=>e instanceof SVGElement,dom:e=>e.nodeType||o.svg(e),str:e=>"string"==typeof e,fnc:e=>"function"==typeof e,und:e=>void 0===e,hex:e=>/(^#[0-9A-F]{6}$)|(^#[0-9A-F]{3}$)/i.test(e),rgb:e=>/^rgb/.test(e),hsl:e=>/^hsl/.test(e),col:e=>o.hex(e)||o.rgb(e)||o.hsl(e)},n=(()=>{const e=.1;function t(e,t){return 1-3*t+3*e}function s(e,t){return 3*t-6*e}function i(e){return 3*e}function a(e,a,o){return((t(a,o)*e+s(a,o))*e+i(a))*e}function o(e,a,o){return 3*t(a,o)*e*e+2*s(a,o)*e+i(a)}return function(t,s,i,n){if(!(0<=t&&t<=1&&0<=i&&i<=1))return;let r=new Float32Array(11);if(t!==s||i!==n)for(let s=0;s<11;++s)r[s]=a(s*e,t,i);return l=>t===s&&i===n?l:0===l?0:1===l?1:a(function(s){let n=0,l=1;for(;10!==l&&r[l]<=s;++l)n+=e;--l;const c=n+(s-r[l])/(r[l+1]-r[l])*e,d=o(c,t,i);return d>=.001?function(e,t,s,i){for(let n=0;n<4;++n){const n=o(t,s,i);if(0===n)return t;t-=(a(t,s,i)-e)/n}return t}(s,c,t,i):0===d?c:function(e,t,s,i,o){let n,r,l=0;do{r=t+(s-t)/2,n=a(r,i,o)-e,n>0?s=r:t=r}while(Math.abs(n)>1e-7&&++l<10);return r}(s,n,n+e,t,i)}(l),s,n)}})(),r=(()=>{const e=["Quad","Cubic","Quart","Quint","Sine","Expo","Circ","Back","Elastic"];function t(e,t){return 0===e||1===e?e:-Math.pow(2,10*(e-1))*Math.sin((e-1-t/(2*Math.PI)*Math.asin(1))*(2*Math.PI)/t)}const s={In:[[.55,.085,.68,.53],[.55,.055,.675,.19],[.895,.03,.685,.22],[.755,.05,.855,.06],[.47,0,.745,.715],[.95,.05,.795,.035],[.6,.04,.98,.335],[.6,-.28,.735,.045],t],Out:[[.25,.46,.45,.94],[.215,.61,.355,1],[.165,.84,.44,1],[.23,1,.32,1],[.39,.575,.565,1],[.19,1,.22,1],[.075,.82,.165,1],[.175,.885,.32,1.275],(e,s)=>1-t(1-e,s)],InOut:[[.455,.03,.515,.955],[.645,.045,.355,1],[.77,0,.175,1],[.86,0,.07,1],[.445,.05,.55,.95],[1,0,0,1],[.785,.135,.15,.86],[.68,-.55,.265,1.55],(e,s)=>e<.5?t(2*e,s)/2:1-t(-2*e+2,s)/2]};let i={linear:n(.25,.25,.75,.75)};for(let t in s)s[t].forEach((s,a)=>{i["ease"+t+e[a]]=o.fnc(s)?s:n.apply(void 0,s)});return i})();function l(e){if(!o.col(e))try{return document.querySelectorAll(e)}catch(e){return}}function c(e,t){const s=e.length,i=arguments.length>=2?arguments[1]:void 0;let a=[];for(let o=0;o<s;o++)if(o in e){const s=e[o];t.call(i,s,o,e)&&a.push(s)}return a}function d(e){return e.reduce((e,t)=>e.concat(o.arr(t)?d(t):t),[])}function h(e){return o.arr(e)?e:(o.str(e)&&(e=l(e)||e),e instanceof NodeList||e instanceof HTMLCollection?[].slice.call(e):[e])}function u(e,t){return e.some(e=>e===t)}function p(e){let t={};for(let s in e)t[s]=e[s];return t}function m(e,t){let s=p(e);for(let i in e)s[i]=t.hasOwnProperty(i)?t[i]:e[i];return s}function f(e,t){let s=p(e);for(let i in t)s[i]=o.und(e[i])?t[i]:e[i];return s}function v(e){const t=/([\+\-]?[0-9#\.]+)(%|px|pt|em|rem|in|cm|mm|ex|ch|pc|vw|vh|vmin|vmax|deg|rad|turn)?$/.exec(e);if(t)return t[2]}function g(e,t,s){return Math.min(Math.max(e,t),s)}function b(e,t){return o.fnc(e)?e(t.target,t.id,t.total):e}function _(e,t){if(t in e.style)return getComputedStyle(e).getPropertyValue(t.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase())||"0"}function y(e,t){return o.dom(e)&&u(s,t)?"transform":o.dom(e)&&(e.getAttribute(t)||o.svg(e)&&e[t])?"attribute":o.dom(e)&&"transform"!==t&&_(e,t)?"css":null!=e[t]?"object":void 0}function S(e,t){switch(y(e,t)){case"transform":return function(e,t){const s=function(e){return a(e,"translate")||"perspective"===e?"px":a(e,"rotate")||a(e,"skew")?"deg":void 0}(t),i=a(t,"scale")?1:0+s,o=e.style.transform;if(!o)return i;let n=[],r=[],l=[];const d=/(\w+)\((.+?)\)/g;for(;n=d.exec(o);)r.push(n[1]),l.push(n[2]);const h=c(l,(e,s)=>r[s]===t);return h.length?h[0]:i}(e,t);case"css":return _(e,t);case"attribute":return e.getAttribute(t)}return e[t]||0}function w(e,t){const s=/^(\*=|\+=|-=)/.exec(e);if(!s)return e;const i=v(e)||0,a=parseFloat(t),o=parseFloat(e.replace(s[0],""));switch(s[0][0]){case"+":return a+o+i;case"-":return a-o+i;case"*":return a*o+i}}function C(e,t){return Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2))}function k(e){const t=e.points;let s,i=0;for(let e=0;e<t.numberOfItems;e++){const a=t.getItem(e);e>0&&(i+=C(s,a)),s=a}return i}function T(e){if(e.getTotalLength)return e.getTotalLength();switch(e.tagName.toLowerCase()){case"circle":return function(e){return 2*Math.PI*e.getAttribute("r")}(e);
2case"rect":return function(e){return 2*e.getAttribute("width")+2*e.getAttribute("height")}(e);case"line":return function(e){return C({x:e.getAttribute("x1"),y:e.getAttribute("y1")},{x:e.getAttribute("x2"),y:e.getAttribute("y2")})}(e);case"polyline":return k(e);case"polygon":return function(e){const t=e.points;return k(e)+C(t.getItem(t.numberOfItems-1),t.getItem(0))}(e)}}function N(e,t){function s(s=0){const i=t+s>=1?t+s:0;return e.el.getPointAtLength(i)}const i=s(),a=s(-1),o=s(1);switch(e.property){case"x":return i.x;case"y":return i.y;case"angle":return 180*Math.atan2(o.y-a.y,o.x-a.x)/Math.PI}}function $(e,t){const s=/-?\d*\.?\d+/g,i=function(e,t){if(o.col(e))return function(e){return o.rgb(e)?function(e){const t=/rgb\((\d+,\s*[\d]+,\s*[\d]+)\)/g.exec(e);return t?`rgba(${t[1]},1)`:e}(e):o.hex(e)?function(e){const t=e.replace(/^#?([a-f\d])([a-f\d])([a-f\d])$/i,(e,t,s,i)=>t+t+s+s+i+i),s=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(t);return`rgba(${parseInt(s[1],16)},${parseInt(s[2],16)},${parseInt(s[3],16)},1)`}(e):o.hsl(e)?function(e){const t=/hsl\((\d+),\s*([\d.]+)%,\s*([\d.]+)%\)/g.exec(e)||/hsla\((\d+),\s*([\d.]+)%,\s*([\d.]+)%,\s*([\d.]+)\)/g.exec(e),s=parseInt(t[1])/360,i=parseInt(t[2])/100,a=parseInt(t[3])/100,o=t[4]||1;function n(e,t,s){return s<0&&(s+=1),s>1&&(s-=1),s<1/6?e+6*(t-e)*s:s<.5?t:s<2/3?e+(t-e)*(2/3-s)*6:e}let r,l,c;if(0==i)r=l=c=a;else{const e=a<.5?a*(1+i):a+i-a*i,t=2*a-e;r=n(t,e,s+1/3),l=n(t,e,s),c=n(t,e,s-1/3)}return`rgba(${255*r},${255*l},${255*c},${o})`}(e):void 0}(e);const s=v(e),i=s?e.substr(0,e.length-s.length):e;return t&&!/\s/g.test(e)?i+t:i}(o.pth(e)?e.totalLength:e,t)+"";return{original:i,numbers:i.match(s)?i.match(s).map(Number):[0],strings:o.str(e)||t?i.split(s):[]}}function x(e){return c(e?d(o.arr(e)?e.map(h):h(e)):[],(e,t,s)=>s.indexOf(e)===t)}function P(e,t){let s=p(t);if(o.arr(e)){const i=e.length;2!==i||o.obj(e[0])?o.fnc(t.duration)||(s.duration=t.duration/i):e={value:e}}return h(e).map((e,s)=>{const i=s?0:t.delay;let a=o.obj(e)&&!o.pth(e)?e:{value:e};return o.und(a.delay)&&(a.delay=i),a}).map(e=>f(e,s))}const I={css:(e,t,s)=>e.style[t]=s,attribute:(e,t,s)=>e.setAttribute(t,s?s.trim():s),object:(e,t,s)=>e[t]=s,transform:(e,t,s,i,a)=>{i[a]||(i[a]=[]),i[a].push(`${t}(${s})`)}};function E(e,t){return c(d(e.map(e=>t.map(t=>function(e,t){const s=y(e.target,t.name);if(s){const i=function(e,t){let s;return e.tweens.map(i=>{let a=function(e,t){let s={};for(let i in e){let a=b(e[i],t);o.arr(a)&&(a=a.map(e=>b(e,t)),1===a.length&&(a=a[0])),s[i]=a}return s.duration=parseFloat(s.duration),s.delay=parseFloat(s.delay),s}(i,t);const l=a.value,c=S(t.target,e.name),d=s?s.to.original:c,h=o.arr(l)?l[0]:d,u=w(o.arr(l)?l[1]:l,h),p=v(u)||v(h)||v(c);return a.from=$(h,p),a.to=$(u,p),a.start=s?s.end:e.offset,a.end=a.start+a.delay+a.duration,a.easing=function(e){return o.arr(e)?n.apply(this,e):r[e]}(a.easing),a.elasticity=(1e3-g(a.elasticity,1,999))/1e3,a.isPath=o.pth(l),a.isColor=o.col(a.from.original),a.isColor&&(a.round=1),s=a,a})}(t,e);return{type:s,property:t.name,animatable:e,tweens:i,duration:i[i.length-1].end,delay:i[0].delay}}}(e,t)))),e=>!o.und(e))}function M(e,t,s,i){const a="delay"===e;return t.length?(a?Math.min:Math.max).apply(Math,t.map(t=>t[e])):a?i.delay:s.offset+i.delay+i.duration}let L=[],O=0;const A=(()=>{function e(){O=requestAnimationFrame(t)}function t(t){const s=L.length;if(s){let i=0;for(;i<s;)L[i]&&L[i].tick(t),i++;e()}else cancelAnimationFrame(O),O=0}return e})();function D(s={}){let a,o,n=0,r=null;function l(){return window.Promise&&new Promise(e=>r=e)}let d=l(),h=function(s){const i=m(e,s),a=m(t,s),o=function(e){const t=x(e);return t.map((e,s)=>({target:e,id:s,total:t.length}))}(s.targets),n=function(e,t,s){let i=[];const a=f(e,t);for(let e in s)a.hasOwnProperty(e)||"targets"===e||i.push({name:e,offset:a.offset,tweens:P(s[e],t)});return i}(i,a,s),r=E(o,n);return f(i,{children:[],animatables:o,animations:r,duration:M("duration",r,i,a),delay:M("delay",r,i,a)})}(s);function u(){h.reversed=!h.reversed}function p(e){return h.reversed?h.duration-e:e}function v(e){let t=0,s={};const a=h.animations,o=a.length;for(;t<o;){const i=a[t],o=i.animatable,n=i.tweens,r=n.length-1;let l=n[r];r&&(l=c(n,t=>e<t.end)[0]||l);const d=g(e-l.start-l.delay,0,l.duration)/l.duration,h=isNaN(d)?1:l.easing(d,l.elasticity),u=l.to.strings,p=l.round;let m,f=[];const v=l.to.numbers.length;for(let e=0;e<v;e++){let t;const s=l.to.numbers[e],i=l.from.numbers[e];t=l.isPath?N(l.value,h*s):i+h*(s-i),p&&(l.isColor&&e>
22||(t=Math.round(t*p)/p)),f.push(t)}const b=u.length;if(b){m=u[0];for(let e=0;e<b;e++){u[e];const t=u[e+1],s=f[e];isNaN(s)||(m+=t?s+t:s+" ")}}else m=f[0];I[i.type](o.target,i.property,m,s,o.id),i.currentValue=m,t++}const n=Object.keys(s).length;if(n)for(let e=0;e<n;e++){if(!i){const e="transform";i=_(document.body,e)?e:`-webkit-${e}`}h.animatables[e].target.style[i]=s[e].join(" ")}h.currentTime=e,h.progress=e/h.duration*100}function b(e){h[e]&&h[e](h)}function y(){h.remaining&&!0!==h.remaining&&h.remaining--}function S(e){const t=h.duration,s=h.offset,i=s+h.delay,c=h.currentTime,m=h.reversed,f=p(e);h.children.length&&function(e){const t=h.children,s=t.length;if(e>=h.currentTime)for(let i=0;i<s;i++)t[i].seek(e);else for(let i=s;i--;)t[i].seek(e)}(f),(f>=i||!t)&&(h.began||(h.began=!0,b("begin")),b("run")),f>s&&f<t?v(f):(f<=s&&0!==c&&(v(0),m&&y()),(f>=t&&c!==t||!t)&&(v(t),m||y())),b("update"),e>=t&&(h.remaining?(o=a,"alternate"===h.direction&&u()):(h.pause(),h.completed||(h.completed=!0,b("complete"),"Promise"in window&&(r(),d=l()))),n=0)}return h.reset=function(){const e=h.direction,t=h.loop;h.currentTime=0,h.progress=0,h.paused=!0,h.began=!1,h.completed=!1,h.reversed="reverse"===e,h.remaining="alternate"===e&&1===t?2:t,v(0);for(let e=h.children.length;e--;)h.children[e].reset()},h.tick=function(e){a=e,o||(o=a),S((n+a-o)*D.speed)},h.seek=function(e){S(p(e))},h.pause=function(){const e=L.indexOf(h);e>-1&&L.splice(e,1),h.paused=!0},h.play=function(){h.paused&&(h.paused=!1,o=0,n=p(h.currentTime),L.push(h),O||A())},h.reverse=function(){u(),o=0,n=p(h.currentTime)},h.restart=function(){h.pause(),h.reset(),h.play()},h.finished=d,h.reset(),h.autoplay&&h.play(),h}return D.version="2.2.0",D.speed=1,D.running=L,D.remove=function(e){const t=x(e);for(let e=L.length;e--;){const s=L[e],i=s.animations;for(let e=i.length;e--;)u(t,i[e].animatable.target)&&(i.splice(e,1),i.length||s.pause())}},D.getValue=S,D.path=function(e,t){const s=o.str(e)?l(e)[0]:e,i=t||100;return function(e){return{el:s,property:e,totalLength:T(s)*(i/100)}}},D.setDashoffset=function(e){const t=T(e);return e.setAttribute("stroke-dasharray",t),t},D.bezier=n,D.easings=r,D.timeline=function(e){let s=D(e);return s.pause(),s.duration=0,s.add=function(i){return s.children.forEach(e=>{e.began=!0,e.completed=!0}),h(i).forEach(i=>{let a=f(i,m(t,e||{}));a.targets=a.targets||e.targets;const n=s.duration,r=a.offset;a.autoplay=!1,a.direction=s.direction,a.offset=o.und(r)?n:w(r,n),s.began=!0,s.completed=!0,s.seek(a.offset);const l=D(a);l.began=!0,l.completed=!0,l.duration>n&&(s.duration=l.duration),s.children.push(l)}),s.seek(0),s.reset(),s.autoplay&&s.restart(),s},s},D.random=(e,t)=>Math.floor(Math.random()*(t-e+1))+e,D},i=[],void 0===(a="function"==typeof(s=o)?s.apply(t,i):s)||(e.exports=a)},22443:function(e){"use strict";e.exports={"X-User-Email":$('meta[name="email"]').attr("content"),"X-User-Token":$('meta[name="token"]').attr("content")}},87021:function(e,t,s){"use strict";e.exports={...s(22443),...s(98999)}},71996:function(e){"use strict";const t=window.performance||Date;e.exports={get(){const e=t.now(),{lastLayoutAt:s=0}=this,i=e-s>10;return(void 0===this.lastScrollPosition||null===this.lastScrollPosition||i)&&(this.lastScrollPosition=window.pageYOffset),this.lastScrollPosition}}},8478:function(e){"use strict";e.exports=e=>{e(document).on("copy","[data-copy-text]",function(e){const{currentTarget:t}=e,s=null==t?void 0:t.getAttribute("data-copy-text"),i=e.originalEvent;s&&(i.clipboardData.setData("text/plain",s),i.preventDefault())})}},99731:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;const s=()=>`${Date.now()}-${Math.random().toString(36).slice(2)}`,i=()=>{if("undefined"==typeof window)return null;try{return window.localStorage}catch{return null}},a=e=>e.value,o=e=>null==e?"":e;t.default=class{constructor({storageKey:e,initialValue:t="",serverRevision:n=0,flush:r,onChange:l=()=>{},onServerValue:c=()=>{},valueFromResponse:d=a},{createClientId:h=s,clientId:u=h(),storage:p=i()}={}){this.storageKey=e,this.storage=p,this.flushValue=r,this.onChange=l,this.onServerValue=c,this.valueFromResponse=d,this.createClientId=h,this.value=o(t),this.serverRevision=Number(n)||0,this.baseServerRevision=this.serverRevision,this.clientId=u,this.clientRevision=0,this.status="saved",this.hasRestoredValue=!1,this.stateRevision=0,this.retryTimer=null,this.restore(
2)}get hasUnsavedChanges(){return"saved"!==this.status}restore(){const e=this.readLocal();e&&(Number(e.baseServerRevision)===this.serverRevision?(this.value=o(e.value),this.clientId=e.clientId||this.clientId,this.clientRevision=Number(e.clientRevision)||0,this.baseServerRevision=Number(e.baseServerRevision)||this.serverRevision,this.status="dirty",this.hasRestoredValue=!0):this.removeLocal())}update(e){this.clearRetry(),this.value=o(e),this.clientRevision+=1,this.status="dirty",this.persist(),this.notify()}async flush(){if(!this.hasUnsavedChanges||!this.flushValue)return null;const e={value:this.value,draft_client_id:this.clientId,draft_client_revision:this.clientRevision,draft_base_server_revision:this.baseServerRevision},t=this.clientRevision,s=this.stateRevision;this.clearRetry(),this.status="saving",this.notify();try{const i=await this.flushValue(e),a=await(async e=>e?"function"!=typeof e.json?e:e.json().catch(()=>({})):{})(i);return this.stateRevision!==s||this.clientRevision!==t?a:a.conflict?this.isServerValueResponse(a)?this.acceptServerValue(a):this.handleUnsafeResponse(a):this.isCurrentRevisionResponse(a,t)?(this.serverRevision=Number(a.server_revision)||this.serverRevision,this.baseServerRevision=this.serverRevision,this.status="saved",this.removeLocal(),this.notify(),a):this.handleUnsafeResponse(a)}catch{return this.stateRevision===s&&this.clientRevision===t&&(this.status="error",this.scheduleRetry(),this.notify()),null}}resetClientRevisionChain(){this.clientId=this.createClientId(),this.clientRevision=0}publish({value:e=this.value,serverRevision:t=this.serverRevision}={}){this.stateRevision+=1,this.clearRetry(),this.value=o(e),this.serverRevision=Number(t)||this.serverRevision,this.baseServerRevision=this.serverRevision,this.resetClientRevisionChain(),this.status="saved",this.removeLocal(),this.notify()}destroy(){this.stateRevision+=1,this.clearRetry()}acceptServerValue(e={}){const t=this.valueFromResponse(e);return void 0===t?this.handleUnsafeResponse(e):(this.stateRevision+=1,this.clearRetry(),this.value=t,this.serverRevision=Number(e.server_revision)||this.serverRevision,this.baseServerRevision=this.serverRevision,this.status="saved",this.removeLocal(),this.notify(),this.onServerValue(this.value),e)}isServerValueResponse(e={}){return!!e.conflict&&!!e.draft_client_id&&e.draft_client_id!==this.clientId}isCurrentRevisionResponse(e,t){return e.draft_client_id===this.clientId&&Number(e.draft_client_revision)===t}handleUnsafeResponse(e){return this.status="error",this.scheduleRetry(),this.notify(),e}scheduleRetry(){this.retryTimer=setTimeout(()=>this.flush(),5e3)}clearRetry(){this.retryTimer&&(clearTimeout(this.retryTimer),this.retryTimer=null)}persist(){if(this.storage)try{this.storage.setItem(this.storageKey,JSON.stringify({value:this.value,clientId:this.clientId,clientRevision:this.clientRevision,baseServerRevision:this.baseServerRevision}))}catch{}}readLocal(){if(!this.storage)return null;try{return(e=>{try{return JSON.parse(e)}catch{return null}})(this.storage.getItem(this.storageKey))}catch{return null}}removeLocal(){if(this.storage)try{this.storage.removeItem(this.storageKey)}catch{}}notify(){this.onChange(this)}}},32101:function(e){"use strict";const t=["wheel","keydown","mousedown","touchstart"],s=["orientationchange","resize"],i=({type:e})=>{var t;t={event:"userInteractionWithEmbeddable",type:e},window.parent.postMessage(JSON.stringify(t),"*")};e.exports={bind:()=>{t.forEach(e=>document.addEventListener(e,i)),s.forEach(e=>window.addEventListener(e,i))}}},37229:function(e){"use strict";const t=()=>{$(".js__equalize").each((e,t)=>{const s=$(t).find(".is__equalized").get();s.forEach(e=>$(e).css({height:"auto"}));const i=Math.max(...s.map(e=>e.offsetHeight));s.forEach(e=>$(e).css({height:`${i}px`}))})};e.exports=()=>{$(document).on("appReady appResize",t)}},3818:function(e){"use strict";let t,s;const i="fonts"in document;e.exports=function(e){const a=navigator.userAgent.toLowerCase();let o;const n=$(".js__font-checker"),r=$.makeArray(n.map((e,t)=>({$el:$(t),minWidth:+$(t).attr("data-min-width"),maxWidth:+$(t).attr("data-max-width"),name:$(t).attr("class")}))),l=()=>{o||(clearInterval(t),n.hide(),o=!0,e())};a.indexOf("safari")<0?l():(s=setTimeout(l,4e3),t=setInterval(function(){let e=!0;r.forEach(t=>{(e=>e.minWidth?e.$el.width()>=e.minWidth:!e.maxWidth||e.$el.width()<=e.maxWidth)(t)||(e=!1,t.old=t.$el.width())}),e&&(clearInterval(t),clearTimeout(s),i?document.fonts.ready.then(function(){setTimeout(l,25)}):l())},25))}},57675:function(e,t){"use strict";
2Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,t.default=()=>{const e=$("<input>").css({position:"fixed",left:"-9999px"}).appendTo("body");e.focus(),setTimeout(()=>{e.blur().remove()},10)}},25999:function(e){"use strict";!function(t){var s=0,i=!1,a=!1;try{var o=Object.defineProperty({},"passive",{get:function(){a=!0}});window.addEventListener("test",null,o)}catch(e){}var n=function(e){for(var t=e.target;t!==document.body&&t!==document;){var i=window.getComputedStyle(t);if(!i)break;if("INPUT"===t.nodeName&&"range"===t.getAttribute("type"))return;var a=i.getPropertyValue("-webkit-overflow-scrolling"),o=i.getPropertyValue("overflow-y"),n=parseInt(i.getPropertyValue("height"),10),r="touch"===a&&("auto"===o||"scroll"===o),l=t.scrollHeight>t.offsetHeight;if(r&&l){var c=e.touches?e.touches[0].screenY:e.screenY,d=s<=c&&0===t.scrollTop,h=s>=c&&t.scrollHeight-t.scrollTop===n;return void((d||h)&&e.preventDefault())}t=t.parentNode}e.preventDefault()},r=function(e){s=e.touches?e.touches[0].screenY:e.screenY},l=function(){window.addEventListener("touchstart",r,!!a&&{passive:!1}),window.addEventListener("touchmove",n,!!a&&{passive:!1}),i=!0},c=document.createElement("div");document.documentElement.appendChild(c),c.style.WebkitOverflowScrolling="touch";var d="getComputedStyle"in window&&"touch"===window.getComputedStyle(c)["-webkit-overflow-scrolling"];document.documentElement.removeChild(c),d&&l();var h={enable:l,disable:function(){window.removeEventListener("touchstart",r,!1),window.removeEventListener("touchmove",n,!1),i=!1},isEnabled:function(){return i}};e.exports&&(e.exports=h),"function"==typeof t.define?(0,t.define)("iNoBounce",[],function(){return h}):t.iNoBounce=h}("undefined"!=typeof window?window:void 0)},945:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,t.default=e=>"bookshelf-all"===e},98999:function(e,t,s){"use strict";var i=s(86019);e.exports={Accept:"application/json","Content-Type":"application/json","X-Locale":i.locale}},53625:function(e){"use strict";const t=[{selector:".swash",font:'400 1em "Bureauserif Swash"',className:"has__serifSwash"},{selector:".sansSwash",font:'700 1em "Bureausans Swash"',className:"has__sansSwash"}],s=new Set,i=new Set,a=document.fonts&&document.fonts.load;let o=!1;const n=({selector:e,font:t,className:a})=>{s.has(a)||i.has(a)||document.querySelector(e)&&(i.add(a),document.fonts.load(t).then(()=>{$("body").addClass(a),s.add(a),i.delete(a)}).catch(()=>{i.delete(a)}))},r=()=>{o=!1,t.forEach(n)},l=()=>{o||(o=!0,window.requestIdleCallback?window.requestIdleCallback(r,{timeout:2e3}):setTimeout(r,1200))};e.exports=()=>{a&&$(document).on("appReady deferredComponentsReady",l)}},5875:function(e){"use strict";const t="schoolTest/answer";e.exports=class{addAnswer(e){try{localStorage.setItem([t,e].join("."),!0)}catch(e){console.warn("Failed to add answer: ",e)}}removeAnswer(e){try{localStorage.removeItem([t,e].join("."))}catch(e){console.warn("Failed to remove answer: ",e)}}getAnswers(){const e=new RegExp("^"+t+".");return Object.keys(localStorage||{}).filter(t=>e.test(t)).map(e=>e.split(".").slice(1).join("."))}}},47310:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.extractMeta=void 0,t.extractMeta=()=>(window.location.search+"").replace(/^\?/,"")},91454:function(e){"use strict";const t=/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent),s=navigator.userAgent.match(/(iPod|iPhone|iPad)/)&&navigator.userAgent.match(/AppleWebKit/),i=()=>window.innerHeight>window.innerWidth?"portrait":"landscape";e.exports=class{constructor(){this.savedHeight=window.innerHeight,this.savedOrientation=i(),this.check100vh=this.check100vh.bind(this),this.schedule100vhCheck=this.schedule100vhCheck.bind(this),this.enable()}schedule100vhCheck(){window.removeEventListener("touchmove",this.schedule100vhCheck),window.addEventListener("touchend",this.check100vh)}check100vh(){const e=window.innerHeight,t=i();if(this.savedOrientation!==t)return this.savedHeight=e,void(this.savedOrientation=t);this.savedHeight<e?(this.setTrueHeight(e,t),this.savedHeight=e):this.disable()}setTrueHeight(e,t){try{localStorage.setItem(`${t}True100vh`,e)}catch{}}enable(){t&&!s&&window.addEventListener("touchmove",this.schedule100vhCheck)}disable(){window.removeEventListener("touchmove",this.schedule100vhCheck),window.removeEventListener("touchend",this.check100vh)}}},93922:function(e){"use strict";let t,s=[];e.exports=(e,i)=>{document.addEventListener("keydown",a=>{const o=a.keyCode,n=Date.now();return(a.ctrlKey||a.altKey)&&e.includes(o)?(n-t>1500&&(s=[]),s.push(o),t=n,s.join("-").includes(e.join("-"))?(s=[],i()):null):null})}},15024:function(e,t,s){"use strict";var i=s(24994);
2Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=i(s(98999));t.default=e=>fetch(`/api/system/products/${e}/pricing/`,{headers:a.default}).then(e=>e.json())},62515:function(e){"use strict";e.exports=e=>{if(e)try{dataLayer.push({event:"data_to_gtm",data_event:e,data_description:""})}catch{}}},25572:function(e,t,s){"use strict";e.exports=s(92160)},33444:function(e,t,s){"use strict";t.A=function(e,t,s){const a=t&&"object"==typeof t?Object.assign({},t):t,o=(0,i.render)((0,i.h)(e,a),this[0]);return"function"==typeof s?s(o):o};var i=s(76148)},91978:function(e,t,s){"use strict";const i=s(78535),a="6LeTUVgeAAAAABo9OnX6IL8_8lEU3SCPtuBgwYAP",o=()=>i(`https://www.google.com/recaptcha/api.js?render=${a}`);let n;const r=(e={})=>new Promise((t,s)=>{const i=e=>{clearTimeout(n),t(e)},o=()=>{window.Sentry&&Sentry.captureMessage(`Recaptcha timeout error, email ${e.email}`),s()};grecaptcha.ready(()=>{n=setTimeout(o,3e4),grecaptcha.execute(a,{action:e.action||"form_submission"}).then(i).catch(s)})});e.exports={RECAPTCHA_KEY:a,initRecaptcha:o,executeRecaptcha:(e={})=>"undefined"==typeof grecaptcha?o().then(()=>r(e)):r(e)}},3988:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.mergeState=function(e,t){return t?{...e,...t}:e},t.persistRawState=a,t.persistState=function(e,t,s){return function(){const i=s||(e=>e),o=i(e.getState());a(t,o)}},t.readState=function(e){try{return i(localStorage.getItem(e))||{}}catch(e){console.warn("Failed to retrieve initial state: ",e)}return{}};const s=JSON.stringify,i=JSON.parse;function a(e,t){try{localStorage.setItem(e,s(t))}catch(e){console.warn("Failed to persist state: ",e)}}},98459:function(e,t,s){"use strict";var i=s(15011);const a=(0,i.toDateParam)(new Date),o=(e,t)=>{const s=$(t),o=s.attr("href").replace(i.CURRENT_DATE_PLACEHOLDER,a);s.attr("href",o)};e.exports=()=>{$(`a[href*=${i.CURRENT_DATE_PLACEHOLDER}]`).each(o)}},10656:function(){"use strict";!function(e){function t(t){var s=e(t),i=e(document.activeElement),a=0;if(1===i.length){var o=s.index(i);o+1<s.length&&(a=o+1)}s.eq(a).focus()}function s(t){var s=e(t),i=e(document.activeElement),a=s.length-1;if(1===i.length){var o=s.index(i);o>0&&(a=o-1)}s.eq(a).focus()}function i(t){var s,i,a,o=t.nodeName.toLowerCase(),n=!isNaN(e.attr(t,"tabindex"));return"area"===o?(i=(s=t.parentNode).name,!(!t.href||!i||"map"!==s.nodeName.toLowerCase())&&!!(a=e("img[usemap=#"+i+"]")[0])&&r(a)):(/^(input|select|textarea|button|object)$/.test(o)?!t.disabled:"a"===o&&t.href||n)&&r(t);function r(t){return e.expr.filters.visible(t)&&!e(t).parents().addBack().filter(function(){return"hidden"===e.css(this,"visibility")}).length}}
2e.focusNext=function(){t(":focusable")},e.focusPrev=function(){s(":focusable")},e.tabNext=function(){t(":tabbable")},e.tabPrev=function(){s(":tabbable")},e.extend(e.expr[":"],{data:e.expr.createPseudo?e.expr.createPseudo(function(t){return function(s){return!!e.data(s,t)}}):function(t,s,i){return!!e.data(t,i[3])},focusable:function(t){return i(t,isNaN(e.attr(t,"tabindex")))},tabbable:function(t){var s=e.attr(t,"tabindex");return(isNaN(s)||s>=0)&&i(t)}})}(jQuery)},34588:function(){"use strict";Array.from(document.querySelectorAll(".textHide")).forEach(e=>{const t=e.textContent;e.addEventListener("copy",e=>{e.preventDefault(),e.clipboardData.setData("text/plain",t)})})},92445:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isValidImageUpload=function(e){return e.length&&/^image/.test(e[0].type)},t.readAsDataURL=function(e){return e?new Promise(t=>{const s=new FileReader;s.onload=e=>t(e.target.result),s.readAsDataURL(e)}):Promise.resolve(null)}},9193:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.urlParamsArrayToStr=function(e){let t="";return e.forEach((e,s)=>{const i=s?"&":"?",a=e.value?`=${e.value}`:"";t+=`${i}${e.name}${a}`}),t},t.urlToParamsArray=function(e){if(!e.trim())return[];const t=e.split("&"),s=[];return t.forEach(e=>{const t=e.replace("?","").split("=");s.push({name:t[0],value:t[1]})}),s}},11946:function(e){"use strict";e.exports=e=>{if(!e)return;const t={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","/":"&#x2F;"};return e.replace(/[&<>"'/]/gi,e=>t[e])}},66349:function(e){"use strict";e.exports=class{constructor(){this.$el=$("meta[name=viewport]"),this.defaultValue=this.$el.attr("content"),this.setViewport(),$(document).on("appResize",this.setViewport.bind(this))}setViewport(){const e=window.screen.width<375?"width=375":this.defaultValue;this.$el.attr("content",e)}}},84292:function(e){"use strict";e.exports=class{constructor(e){this.$el=e,this.$document=$(document),this.$menuHolder=this.$el.parent(),this.$header=this.$menuHolder.closest(".js__header"),this.checkActiveElement(),this.bindEvents(),this.toggleScrollable(),this.updateHeaderBottomShift()}get isScrollable(){const e=this.$menuHolder[0];return e.scrollWidth>e.offsetWidth+5}bindEvents(){this.$document.on("appResize",this.scrollToActiveItem.bind(this)).on("appResize",this.toggleScrollable.bind(this)).on("appResize",this.updateHeaderBottomShift.bind(this))}checkActiveElement(){const e=window.location.pathname;this.$activeElement=this.$el.find("a").filter(function(){const t=$(this).attr("href");return($(this).attr("data-aliases")||"").split(",").concat(t).some(t=>t.length&&0===e.indexOf(t))}),this.$activeElement.addClass("is__active"),this.$activeElement.attr("href")===e&&this.$activeElement.addClass("is__exact"),this.scrollToActiveItem()}toggleScrollable(){this.$menuHolder.closest(".header-menu").toggleClass("is__scrollable",this.isScrollable)}scrollToActiveItem(){const e=this.$menuHolder.width(),t=this.$activeElement.width(),s=this.$activeElement.closest(".menu-item").prevAll().get().reduce((e,t)=>e+$(t).outerWidth(!0),0);e<s+t?this.$menuHolder.scrollLeft(s-e/2+t/2):this.$menuHolder.scrollLeft(0)}updateHeaderBottomShift(){if(this.$header.length){const e=this.$header.offset().top+this.$header.outerHeight();document.documentElement.style.setProperty("--headerBottomShift",e+"px")}}}},39315:function(e){"use strict";e.exports=class{constructor(e){this.id=Math.random().toString(10).slice(4),this.CLASS_ACTIVE="is__active",this.$el=e,this.$toggler=this.$el.find("h1, button"),this.$document=$(document),"initialized"!==this.$el.attr("data-page-menu")&&this.setListeners()}setListeners(){this.$toggler.on("click",()=>{this.$el.toggleClass(this.CLASS_ACTIVE),this.$el.hasClass(this.CLASS_ACTIVE)&&this.$document.trigger("pageMenuActivated",this.id)}),this.$document.on("pageMenuActivated",(e,t)=>{this.id!==t&&this.$el.removeClass(this.CLASS_ACTIVE)}),this.$el.attr("data-page-menu","initialized")}}},57157:function(e){"use strict";const t="lastWeek",s=()=>{var e,t;return`classroom-scroll-${(null===(e=window.classroom)||void 0===e?void 0:e.id)||(null===(t=window.classroom)||void 0===t?void 0:t.eventId)}`};const i=()=>document.getElementsByClassName("js__curriculumWeek"),a=e=>window.pageYOffset+e.getBoundingClientRect().top;function o(){const e=i(),o=e[e.length-1],n=a(o);!function(e){try{localStorage.setItem(s(),JSON.stringify(e))}catch(e){console.warn("Failed to save scroll position: ",e)}}(window.scrollY+window.innerHeight/2>n?{type:t,y:window.scrollY,weeksCount:e.length}:{type:"coordinate",y:window.scrollY})}e.exports={initiate:function(){if(!function(){const e=document.getElementsByClassName("js__classroom")[0];return document.contains(e)}())return;const e=function(){const e=function(){let e=null;try{e=localStorage.getItem(s())}catch(e){console.warn("Failed to get scroll position: ",e)}return e?JSON.parse(e):null}();if(!e)return null;let o=null;const n=i(),r=e.type===t,l=e.weeksCount<n.length,c="number"==typeof e.y;if(r&&l){const e=n[n.length-1];o=a(e)-50}else c&&(o=e.y);return o}();e&&window.scrollTo(0,e),function(){let e=null;window.addEventListener("scroll",function(){e&&clearTimeout(e),e=setTimeout(o,100)})}()}}},90943:function(e){"use strict";const t=$(".js__halfpixel-checker");e.exports=()=>{const e=1===t[0].offsetHeight;return t.hide(),e}},2933:function(e){"use strict";e.exports=()=>window.devicePixelRatio>1||!(!window.matchMedia||!window.matchMedia("(-webkit-min-device-pixel-ratio: 1.5), (min--moz-device-pixel-ratio: 1.5), (-o-min-device-pixel-ratio: 3/2), (min-resolution: 1.5dppx)").matches)},87816:function(e,t,s){"use strict";var i=s(86019);{function n(e,t,s,i){if(!1===t||null==t||!t&&("class"===e||"style"===e))return"";if(!0===t)return" "+(i?e:e+'="'+e+'"');var a=typeof t;return"object"!==a&&"function"!==a||"function"!=typeof t.toJSON||(t=t.toJSON()),"string"==typeof t||(t=JSON.stringify(t),s||-1===t.indexOf('"'))?(s&&(t=d(t))," "+e+'="'+t+'"'):" "+e+"='"+t.replace(/'/g,"&#39;")+"'"}function r(e,t){return Array.isArray(e)?l(e,t):e&&"object"==typeof e?c(e):e||""}function l(e,t){for(var s,i="",a="",o=Array.isArray(t),n=0;n<e.length;n++)(s=r(e[n]))&&(o&&t[n]&&(s=d(s)),i=i+a+s,a=" ");return i}function c(e){var t="",s="";for(var i in e)i&&e[i]&&a.call(e,i)&&(t=t+s+i,s=" ");return t}function d(e){var t=""+e,s=o.exec(t);if(!s)return e;var i,a,n,r="";for(i=s.index,a=0;i<t.length;i++){switch(t.charCodeAt(i)){case 34:n="&quot;";break;case 38:n="&amp;";break;case 60:n="&lt;";break;case 62:n="&gt;";break;default:continue}a!==i&&(r+=t.substring(a,i)),a=i+1,r+=n}return a!==i?r+t.substring(a,i):r}var a=Object.prototype.hasOwnProperty,o=/["&<>]/;function h(e){if(!e)return"";if("object"==typeof e){var t="";for(var s in e)a.call(e,s)&&(t=t+s+":"+e[s]+";");return t}return e+""}function u(e){var t,s="",i=e||{};return function(i,a){(i=i||e||{}).class=i.class||"";const o=i.soviet||{},l=o.compiledTitle||o.title,c=o.hyphenatedCompiledTitle||o.hyphenatedTitle;l.length,i.class+=" soviet";let u="is__sizeLead";i.isLarge&&(u="is__sizeLarge"),s=s+"<div"+(n("class",r(["spacer",i.class],[!1,!0]),!1,!1)+n("style",h(i.style),!0,!1))+'><a class="module"'+n("href",o.url,!0,!1)+n("data-goal",`${i.goal||"SPACER_SOVIET_CLICK"}`,!0,!1)+"><div"+n("class",r(["p","soviet-title","is__firstChild",u],[!1,!1,!1,!0]),!1,!1)+'><strong class="spacer-col-title">'+d(null==(t=o.column)?"":t)+" </strong>"+d(null==(t=i.noHyphen?l:c)?"":t)+'</div><div class="p is__sizeSmall is__lastChild col-caption"><span class="link">Совет '+d(null==(t=o.authorGenitiveName)?"":t)+"</span>
2",(o.commentsCount||o.newCommentsCount)&&(s=s+'<span class="link no-u">'+(null==(t=a.sovietCommentsCount(o.commentsCount,o.newCommentsCount))?"":t)+"</span>"),s+="</div></a></div>"}.call(this,"options"in i?i.options:"undefined"!=typeof options?options:void 0,"textHelper"in i?i.textHelper:"undefined"!=typeof textHelper?textHelper:void 0),s}t.soviet=u}{function p(e,t,s,i){if(!1===t||null==t||!t&&("class"===e||"style"===e))return"";if(!0===t)return" "+(i?e:e+'="'+e+'"');var a=typeof t;return"object"!==a&&"function"!==a||"function"!=typeof t.toJSON||(t=t.toJSON()),"string"==typeof t||(t=JSON.stringify(t),s||-1===t.indexOf('"'))?(s&&(t=b(t))," "+e+'="'+t+'"'):" "+e+"='"+t.replace(/'/g,"&#39;")+"'"}function m(e,t){var s="";for(var i in e)if(a.call(e,i)){var o=e[i];if("class"===i){s=p(i,o=f(o),!1,t)+s;continue}"style"===i&&(o=y(o)),s+=p(i,o,!1,t)}return s}function f(e,t){return Array.isArray(e)?v(e,t):e&&"object"==typeof e?g(e):e||""}function v(e,t){for(var s,i="",a="",o=Array.isArray(t),n=0;n<e.length;n++)(s=f(e[n]))&&(o&&t[n]&&(s=b(s)),i=i+a+s,a=" ");return i}function g(e){var t="",s="";for(var i in e)i&&e[i]&&a.call(e,i)&&(t=t+s+i,s=" ");return t}function b(e){var t=""+e,s=o.exec(t);if(!s)return e;var i,a,n,r="";for(i=s.index,a=0;i<t.length;i++){switch(t.charCodeAt(i)){case 34:n="&quot;";break;case 38:n="&amp;";break;case 60:n="&lt;";break;case 62:n="&gt;";break;default:continue}a!==i&&(r+=t.substring(a,i)),a=i+1,r+=n}return a!==i?r+t.substring(a,i):r}function _(e,t){if(1===arguments.length){for(var s=e[0],i=1;i<e.length;i++)s=_(s,e[i]);return s}for(var a in t)if("class"===a){var o=e[a]||[];e[a]=(Array.isArray(o)?o:[o]).concat(t[a]||[])}else if("style"===a){o=(o=y(e[a]))&&";"!==o[o.length-1]?o+";":o;var n=y(t[a]);n=n&&";"!==n[n.length-1]?n+";":n,e[a]=o+n}else e[a]=t[a];return e}function y(e){if(!e)return"";if("object"==typeof e){var t="";for(var s in e)a.call(e,s)&&(t=t+s+":"+e[s]+";");return t}return e+""}function S(e){var t,s="",a=e||{};return function(i,a){const o=(a=a||e||{}).course||{},n=o.key||"",r=`/courses/${n}/`,l=`COURSE_${n.toUpperCase()}_CLICK`,c=`COURSE_${n.toUpperCase()}_APPLY`,d={class:`is__${o.key}`,style:`background: ${o.keyColor}; color: ${o.textColor}`},h=o.closestEvent||{},u="open"===h.status;let v=o.title;a.fullWidth&&(v=v.replace("и представление информации","и представление информации"));const g=o.lead||o.sentence;if(a.class=a.class||"",a.class+=a.isSmall?"is__small":"",u){s=s+"<div"+p("class",f(["course","is__opened","module","banner-debug",a.class],[!1,!1,!1,!1,!0]),!1,!1)+'><a class="course-header doubleHover"'+p("href",r,!0,!1)+p("data-goal",l,!0,!1)+"><div"+m(_([{class:"course-logo"},d]),!1)+">"+(null==(t=o.icon)?"":t)+'</div><div class="p course-title is__firstChild is__lastChild">'+b(null==(t=v)?"":t)+'</div></a><div class="course-content"><a'+m(_([{class:"course-enroll button",href:b(`${r}?self`),"data-goal":b(c)},d]),!1)+">";const e=o.installmentPaymentStartsFrom;s=s+'<span class="course-enrollText">'+(null==(t=i.t("courses.openCourses.enrollFor",{price:e}))?"":t)+'</span><span class="course-enrollShortText">'+(null==(t=i.t("courses.openCourses.enrollForShort",{price:e}))?"":t)+'</span></a><a class="course-description doubleHover"'+p("href",r,!0,!1)+p("data-goal",l,!0,!1)+'><div class="p is__sizeLead course-dates">'+b(null==(t=h.dates)?"":t)+'</div><div class="p is__sizeSmall"><span class="link course-link">'+b(null==(t=o.shortDescription)?"":t)+"</span></div></a></div></div>"}else s=s+"<div"+p("class",f(["course","module","banner-debug",a.class],[!1,!1,!1,!0]),!1,!1)+'><a class="course-header doubleHover"'+p("href",r,!0,!1)+p("data-goal",l,!0,!1)+"><div"+m(_([{class:"course-logo"},d]),!1)+">"+(null==(t=o.icon)?"":t)+'</div><div class="p course-title is__firstChild is__lastChild">'+b(null==(t=v)?"":t)+'</div></a><a class="course-content doubleHover"'+p("href",r,!0,!1)+p("data-goal",l,!0,!1)+"><div"+m(_([{class:"course-logo"},d]),!1)+">"+(null==(t=o.icon)?"":t)+'</div><div class="course-description hyphen"><div class="course-lead p is__sizeSmall">'+b(null==(t=g)?"":t)+'</div><div class="course-link p is__sizeSmall"><span class="course-link-long link">'+b(null==(t=o.description)?"":t)+'</span><span class="course-link-short link">'+b(null==(t=o.shortDescription)?"":t)+"</span></div></div></a></div>"}
2.call(this,"I18n"in a?a.I18n:void 0!==i?i:void 0,"options"in a?a.options:"undefined"!=typeof options?options:void 0),s}a=Object.prototype.hasOwnProperty,o=/["&<>]/,t.course=S}{function w(e,t,s,i){if(!1===t||null==t||!t&&("class"===e||"style"===e))return"";if(!0===t)return" "+(i?e:e+'="'+e+'"');var a=typeof t;return"object"!==a&&"function"!==a||"function"!=typeof t.toJSON||(t=t.toJSON()),"string"==typeof t||(t=JSON.stringify(t),s||-1===t.indexOf('"'))?(s&&(t=N(t))," "+e+'="'+t+'"'):" "+e+"='"+t.replace(/'/g,"&#39;")+"'"}function C(e,t){return Array.isArray(e)?k(e,t):e&&"object"==typeof e?T(e):e||""}function k(e,t){for(var s,i="",a="",o=Array.isArray(t),n=0;n<e.length;n++)(s=C(e[n]))&&(o&&t[n]&&(s=N(s)),i=i+a+s,a=" ");return i}function T(e){var t="",s="";for(var i in e)i&&e[i]&&a.call(e,i)&&(t=t+s+i,s=" ");return t}function N(e){var t=""+e,s=o.exec(t);if(!s)return e;var i,a,n,r="";for(i=s.index,a=0;i<t.length;i++){switch(t.charCodeAt(i)){case 34:n="&quot;";break;case 38:n="&amp;";break;case 60:n="&lt;";break;case 62:n="&gt;";break;default:continue}a!==i&&(r+=t.substring(a,i)),a=i+1,r+=n}return a!==i?r+t.substring(a,i):r}function $(e){var t,s="",i=e||{};return function(i){const a=(i=i||e||{}).category||{};s=s+"<div"+w("class",C(["promoted-category","module",`is__promotedCategory-${a.key}`],[!1,!1,!0]),!1,!1)+'><div class="promoted-category-holder"><div class="promoted-category-in"><svg class="promoted-category-triangle" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 197.434 388.365"><defs>\n  <style>\n    .a {\n      fill: none;\n      fill: var(--backgroundColor);\n      stroke: rgba(0, 0, 0, .2);\n      stroke: var(--strokeColor);\n      stroke-width: .5px;\n    }\n  </style>\n</defs>\n<path class="a" d="M98.8,99.8C55.3,56.4,11.8,10.5,2.5.7L0.7,2.2V386l2.1,1.7c9.7-10.3,52.4-55.3,95.3-98.1,49.2-49.1,98.8-95.3,98.8-95.3s-49-45.6-98.1-94.5" transform="translate(-0.2 -0.016)"/>\n</svg><a class="promoted-category-link"'+w("href",a.customPath?a.customPath:`/projects/${a.key}/`,!0,!1)+'><div class="promoted-category-link-in"><div class="promoted-category-icon"><img class="js__inlineSVG"'+w("src",`/assets/images/categories/${a.icon}.svg`,!0,!1)+'/></div><h2 class="promoted-category-title is__firstChild">'+N(null==(t=a.title)?"":t)+'</h2><div class="promoted-category-projects">',function(){var e=a.promotedProjects;if("number"==typeof e.length)for(var i=0,o=e.length;i<o;i++){var n=e[i];const o=[];0===i&&o.push("is__firstChild"),i===a.promotedProjects.length-1&&o.push("is__lastChild"),s=s+"<div"+w("class",C(["p","is__sizeMedium",o],[!1,!1,!0]),!1,!1)+">"+(null==(t=n)?"":t)+"</div>"}else for(var i in o=0,e){o++,n=e[i];const r=[];0===i&&r.push("is__firstChild"),i===a.promotedProjects.length-1&&r.push("is__lastChild"),s=s+"<div"+w("class",C(["p","is__sizeMedium",r],[!1,!1,!0]),!1,!1)+">"+(null==(t=n)?"":t)+"</div>"}}.call(this),s=s+'</div><div class="promoted-category-counter p is__sizeSmall is__lastChild"><span class="link">'+N(null==(t=a.projectsCount)?"":t)+"</span></div></div></a></div></div></div>"}.call(this,"options"in i?i.options:"undefined"!=typeof options?options:void 0),s}a=Object.prototype.hasOwnProperty,o=/["&<>]/,t.promotedCategory=$}},5502:function(e,t,s){"use strict";const i=s(2733);$("[data-alternating]").each((e,t)=>{const s=$(t),a=s.attr("data-alternating"),o=s.attr("data-alternating-index");i.set(a,o,{expires:14,path:"/"})})},64854:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;const s="is__active";t.default=class{constructor(e){this.el=e,this.id=this.el.getAttribute("data-id"),this.calculateTrigger()}get spread(){return $(this.el).closest(".spread")[0]}get page(){return $(this.el).closest(".page")[0]}get pageIn(){return $(this.el).closest(".page-in")[0]}get isSwissTheme(){return this.spread.classList.contains("is_swiss")||this.page.classList.contains("grid__column")}get pageOffset(){const e=this.spread.getBoundingClientRect().top,t=this.page.getBoundingClientRect().top,s=getComputedStyle(this.pageIn).getPropertyValue("padding-top"),i=getComputedStyle(this.page).getPropertyValue("padding-top");return t-e+parseInt(s,10)+parseInt(i,10)}calculateTrigger(){const e=window.application.currentScrollPosition+this.el.getBoundingClientRect().top;this.trigger=Math.max(e-50-this.pageOffset,5)}setActive(){this.el.classList.add(s)}setInactive(){this.el.classList.remove(s)}}},95050:function(e,t,s){"use strict";var i=s(24994)(s(64854));const a=s(21834);class o extends a{get currentScrollPosition(){return window.application.currentScrollPosition}preInit(){this.isFinal=!0,this.$document=$(document),this.scrollTop=0}preCalculate(){this.buildAnchors(),this.bindEvents()}preRender(){this.setActive()}buildAnchors(){this.anchors=Array.from(this.$el[0].querySelectorAll(".js__anch
2or")).map(e=>new i.default(e)),this.squashAnchors()}squashAnchors(){if(!this.anchors.length)return;const e=this.anchors[0].spread,{viewHeight:t}=window.application;let s=this.currentScrollPosition+e.getBoundingClientRect().bottom-t;this.anchors.reverse(),this.anchors.forEach(e=>{e.trigger>s?(e.trigger=s,s-=75):s=e.trigger-75}),this.anchors.reverse()}bindEvents(){this.$document.on("appScroll",this.setActive.bind(this))}setActive(){this.currentAnchorId="1",this.anchors.forEach(e=>{this.currentScrollPosition>=e.trigger&&(this.currentAnchorId=e.id)}),this.activateCurrent(),this.notifyCollaborators()}activateCurrent(){if(this.currentAnchor&&this.currentAnchor.id===this.currentAnchorId)return;const e=this.anchors.find(e=>e.id===this.currentAnchorId);this.currentAnchor&&this.currentAnchor.setInactive(),e&&e.setActive(),this.currentAnchor=e}notifyCollaborators(){this.currentAnchor&&this.$el.trigger("anchor",{id:this.currentAnchorId,anchor:this.currentAnchor})}}$(".spread").each(function(){const e=$(this),t=__.generateID(6);e.attr("data-spread-id",t),window.application.anchorsBySpreadId=window.application.anchorsBySpreadId||{},window.application.anchorsBySpreadId[t]=new o(e)})},49026:function(){"use strict";{const e=200,t="is__active",s=(e,t,s)=>(s=s||"0",(e+="").length>=t?e:new Array(t-e.length+1).join(s)+e);class i{constructor(t){this.$wrapper=t,this.$el=this.$wrapper.find(".animatedCover"),this.$framesBox=this.$wrapper.find(".animatedCoverSequence"),this.$spine=this.$el.find(".animatedCover-spine"),this.$frames=$(".animatedCover-frames"),this.sequenceLength=this.$framesBox.data("length"),this.sequenceBase=this.$framesBox.data("base"),this.framesRatio=e/this.sequenceLength,this.initSequence(),this.bindEvents(),this.loadImages()}initSequence(){for(let e=0;e<=this.sequenceLength;e+=1){const t=this.sequenceBase.replace("%%",s(e,2));this.$frames=this.$frames.add($(`<div class="animatedCoverSequence-frame" style="background-image: url(${t})"></div>`))}this.$framesBox.append(this.$frames)}bindEvents(){$(document).on("appScroll",this.draw.bind(this))}loadImages(){this.$wrapper.find("div").each((e,t)=>{const s=$(t).css("background-image").match(/url\((['"])?(.*?)\1\)/);s&&(this.$el=this.$el.add($("<img>").attr("src",s.pop())))}),this.$el.imagesLoaded(()=>this.$wrapper.addClass(t)),this.draw()}seekSequence(){let e=this.scrollTop/this.framesRatio|0;e<0&&(e=0),e>this.sequenceLength&&(e=this.sequenceLength),this.$frames.removeClass("is__visible").eq(e).addClass("is__visible")}draw(){this.scrollTop=window.application.currentScrollPosition,this.seekSequence()}}$(".js__animatedCover").each(function(){new i($(this))})}},61612:function(){"use strict";{const e="is__hidden",t="is__loaded";class s{constructor(t){this.$wrapper=t,this.$covers=t.find(".animatedCover a"),this.$wrapper.addClass(e),this.loadCovers()}loadCovers(){this.$covers.imagesLoaded({background:!0},()=>this.$wrapper.addClass(t))}}$(".js__lazyCoverLoading").each(function(){new s($(this))})}},18270:function(e,t,s){"use strict";var i=s(24994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=i(s(96414)),o=s(91978),n=i(s(62515)),r=s(73345),l=s(25493),c=i(s(30730)),d=i(s(70202));const h=["email"],u="pagehide.applicationFormDraft beforeunload.applicationFormDraft";class p{constructor(e,{serverDraft:t=null}={}){if(this.$el=e,this.serverDraft=t,this.onInput=this.onInput.bind(this),this.onFirstInput=this.onFirstInput.bind(this),this.submit=this.submit.bind(this),this.onPageLeave=this.onPageLeave.bind(this),this.isSubmitted=new URLSearchParams(window.location.search).has("success"),this.isSubmitting=!1,this.isSubmitted)this.showSuccessScreen();else{if(this.$form=this.$el.find("form"),this.$button=this.$form.find("button"),this.$draftCaption=this.$el.find(".applicationForm-draftCaption"),this.$errorCaption=this.$el.find(".applicationForm-error"),this.options=JSON.parse(e.attr("data-options")),this.formId=this.options.formId,this.formName=this.options.formName,!this.formId)throw new Error("Form ID is not set");if(!this.formName)throw new Error("Form name is not set");this.user=window.application.user||{},this.rememberedFields={},this.mergeUserFields(),this.mergeServerDraft(),this.applyRememberedFields(),(0,o.initRecaptcha)(),this.checkButtonAvailability(),this.focusOnFirstEmptyField(),this.$form.on("input",this.onInput),this.$form.on("input.firstInput",this.onFirstInput),this.$form.on("submit",this.submit),$(window).on(u,this.onPageLeave),this.purchaseIntentTracking=new a.default}}get $fields(){return this.$form.find("textarea, input")}get $requiredFields(){return this.$form.find("[required]")}get intentData(){return{userEmail:this.userEmail,productId:this.productId,payload:{referer:this.referer}}}get userEmail(){return this.$form.find('[name="email"]').val()}get productId(){return`form-${(0,r.toKebabCase)(this.formName)}`}get referer(){return window.location.href}applyRememberedFields(){Object.keys(this.rememberedFields).forEac
2h(e=>{const t=this.rememberedFields[e];t&&this.$form.find(`[name='${e}']`).val(t)})}mergeUserFields(){const e={name:this.user.name||"",email:this.user.email||""};Object.keys(e).forEach(t=>{this.rememberedFields[t]=this.rememberedFields[t]||e[t]})}get isValid(){return this.$requiredFields.get().every(e=>e.validity.valid)}checkButtonAvailability(){this.$button.toggleClass("is__disabled",!this.isValid)}showDraftCaption(){this.$el.addClass("is__saved")}hideDraftCaption(){this.$el.removeClass("is__saved")}showSuccessScreen(){this.$el.addClass("is__success"),$(document).trigger("appResize"),window.scrollTo({top:0,left:0,behavior:"smooth"})}focusOnFirstEmptyField(){(0,d.default)({getFields:()=>this.$fields.get(),mode:this.options.autoFocusOnEmptyForm})}startTrackingIntent(){this.purchaseIntentTracking.start(this.intentData)}decorateFormData(e){return e.append("form_id",this.formId),e.append("form_name",(0,r.toKebabCase)(this.formName)),e}get hasServerDraft(){var e;return!(null===(e=this.serverDraft)||void 0===e||!e.data)}get fieldNames(){return new Set(this.$fields.get().map(({name:e})=>
2e).filter(Boolean))}mergeServerDraft(){if(!this.hasServerDraft)return;const e=Object.fromEntries(Object.entries(this.serverDraft.data).filter(([e])=>this.fieldNames.has(e)));this.rememberedFields={...this.rememberedFields,...e}}flushDraft({keepalive:e=!1}={}){if(this.isSubmitted)return Promise.resolve();const t=this.$form.get(0);return(0,l.flushDraft)({formData:this.decorateFormData(new FormData(t)),keepalive:e}).then(()=>this.showDraftCaption()).catch(e=>{this.hideDraftCaption(),window.Sentry&&window.Sentry.captureMessage(`Application form draft save error: ${e}`)})}scheduleDraftSave(){clearTimeout(this.saveDraftTimeout),this.saveDraftTimeout=setTimeout(()=>this.flushDraft(),1e3)}onPageLeave(){this.isSubmitted||(clearTimeout(this.saveDraftTimeout),this.flushDraft({keepalive:!0}))}onFirstInput(){(0,n.default)("APPLICATION_FORM_STARTED"),this.startTrackingIntent(),this.$form.off("input.firstInput")}onInput(e){this.rememberedFields[e.target.name]=e.target.value,this.scheduleDraftSave(),h.includes(e.target.name)&&this.startTrackingIntent(),this.checkButtonAvailability()}submit(e){return e.preventDefault(),this.isSubmitted||this.isSubmitting?Promise.resolve():(this.isSubmitting=!0,(0,o.executeRecaptcha)().then(t=>{const s=this.decorateFormData(new FormData(e.target));return s.append("g-recaptcha-response-data",t),fetch("/pages/form_submissions",{method:"POST",body:s}).then(e=>{if(!e.ok)throw Error(e.statusText);this.isSubmitted=!0,(0,n.default)("APPLICATION_FORM_SUBMITTED"),clearTimeout(this.saveDraftTimeout),$(window).off(u,this.onPageLeave),this.showSuccessScreen(),this.purchaseIntentTracking.cancel()}).catch(e=>{window.Sentry&&window.Sentry.captureMessage(`Application form error: ${e}`),this.$el.addClass("is__error")})}).catch(()=>{this.$el.addClass("is__error")}).finally(()=>{this.isSubmitting=!1}))}}t.default=p,$(".js__applicationForm").each(function(){const e=$(this),t=JSON.parse(e.attr("data-options")),s=(0,r.toKebabCase)(t.formName),i=___.getCookie(`form_${s}_last_draft_uid`);(0,c.default)({formName:s,uid:i}).then(t=>new p(e,{serverDraft:t})).catch(e=>{window.Sentry&&window.Sentry.captureMessage(`Application form draft read error: ${e}`)})})},70202:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,t.default=({getFields:e,mode:t})=>{"off"!==t&&setTimeout(()=>{const t=e().find(({value:e})=>""===e);t&&t.focus()},1e3)}},30730:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,t.default=async({formName:e,uid:t})=>{if(!e)return null;const s=new URLSearchParams({form_name:e});t&&s.set("uid",t);const i=await fetch(`/pages/form_submission_draft?${s.toString()}`,{method:"GET",credentials:"include"});if(204===i.status)return null;if(!i.ok)throw Error(i.statusText);return i.json()}},25493:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.flushDraft=void 0,t.flushDraft=async({formData:e,keepalive:t=!1})=>{const s=await fetch("/pages/form_submission_draft",{method:"PUT",credentials:"include",body:e,keepalive:t});if(!s.ok)throw Error(s.statusText);return s}},87693:function(e,t,s){"use strict";var i=s(24994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=s(76148),o=s(27384),n=s(45169),r=i(s(32485));t.default=({previous:e,next:t})=>{const s=(0,r.default)("assetsNavigation-previous",{no__link:!e}),i=(0,r.default)("assetsNavigation-next",{has__shortTitle:(l=(t||{}).title,l&&l.split(/\s/).length<=2),no__link:!t});var l;return(0,a.h)(o.Cols,{className:"assetsNavigation",isRibbed:!0},(0,a.h)("div",{className:s},e&&(0,a.h)(n.TextNode,null,e.isDisabled&&(0,a.h)("span",{className:"disabled",dangerouslySetInnerHTML:{__html:`<span class="assetsNavigation-pointer">❰ </span>${e.title}`}}),!e.isDisabled&&(0,a.h)("a",{href:e.href,className:"no-u",dangerouslySetInnerHTML:{__html:`<span class="assetsNavigation-pointer">❰ </span>${e.title}`}}))),(0,a.h)("div",{className:i},t&&(0,a.h)(n.TextNode,null,t.isDisabled&&(0,a.h)("span",{className:"disabled",dangerouslySetInnerHTML:{__html:`${t.title}<span class="assetsNavigation-pointer"> ❱</span>`}}),!t.isDisabled&&(0,a.h)("a",{href:t.href,className:"no-u",dangerouslySetInnerHTML:{__html:`${t.title}<span class="assetsNavigation-pointer"> ❱</span>`}}))))}},59162:function(e,t,s){"use strict";var i=s(36192);$(".js__assetsNavigation").each((e,t)=>{const s=$(t),a=JSON.parse(s.attr("data-options")||null);s.empty().reactify(i.AssetsNavigation,a||{}),s.children().unwrap()})},36192:function(e,t,s){"use strict";var i=s(24994);
2Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"AssetsNavigation",{enumerable:!0,get:function(){return a.default}});var a=i(s(87693))},12942:function(){"use strict";const e=$('meta[name="backLink"]');if(e.length){const t=e.attr("href"),s=['<span class="backTitleLink-leftArrow">❰ </span>',e.attr("title"),'<span class="backTitleLink-rightArrow"> ❱</span>'].join(""),i=$(`\n    <div class="backTitleLink">\n      <div class="backTitleLink-in">\n        <a class="no-u" href="${t}">${s}</a>\n      </div>\n    </div>\n  `.trim());$(".heading-1, .product").first().before(i)}},31415:function(e,t,s){"use strict";var i=s(24994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=s(76148),o=i(s(32485)),n=s(73345),r=s(63229),l=s(45169),c=i(s(53349));const d=()=>(0,a.h)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 188 188"},(0,a.h)("polygon",{class:"sticker-bg",points:"94,0 86.7,10 77.7,1.4 72.2,12.6 61.8,5.7 58.4,17.6 47,12.6 45.7,25 33.6,22 34.4,34.4 22,33.6 25,45.7 12.6,47 17.6,58.4 5.7,61.9 12.6,72.2 1.4,77.7 10,86.7 0,94 10,101.3 1.4,110.3 12.6,115.8 5.7,126.1 17.6,129.6 12.6,141 25,142.3 22,154.4 34.4,153.6 33.6,166 45.7,163 47,175.4 58.4,170.4 61.8,182.3 72.2,175.4 77.7,186.6 86.7,178 94,188 101.3,178 110.3,186.6 115.8,175.4 126.2,182.3 129.6,170.4 141,175.4 142.3,163 154.4,166 153.6,153.6 166,154.4 163,142.3 175.4,141 170.4,129.6 182.3,126.1 175.4,115.8 186.6,110.3 178,101.3 188,94 178,86.7 186.6,77.7 175.4,72.2 182.3,61.9 170.4,58.4 175.4,47 163,45.7 166,33.6 153.6,34.4 154.4,22 142.3,25 141,12.6 129.6,17.6 126.2,5.7 115.8,12.6 110.3,1.4 101.3,10 "}),(0,a.h)("path",{class:"sticker-text",d:"M81.9,103.2l0,9.6l-35.9,9l-2.3-4.5c6.8-8.8,22.9-32.6,19.6-45.9c-2-8.1-7.8-9.7-13.3-8.3 c-5.1,1.3-8.6,4.3-10.7,8l-5-3.6c1.5-4.2,6.3-10.2,15.8-12.5c11.1-2.8,18.8,2.7,21.3,12.7c3.4,13.7-8.2,34-15.6,44.2l0.3,0.3 C61.8,110.6,75.8,106.3,81.9,103.2z M95.8,43.4c13.5-3.4,22.3,8,26.7,25.7c4.1,16.5,2.4,34.4-12.1,38.1c-13.7,3.4-23-9.3-27-25.6 C78.5,61.8,81.9,46.8,95.8,43.4z M97.3,51.1c-8.7,2.2-9.6,12.7-5.9,27.2c3.7,14.8,8.9,23.1,17.5,21c8.2-2,9.5-12.6,5.8-27.2 C110.8,57.4,106.1,48.9,97.3,51.1z"}),(0,a.h)("path",{class:"sticker-text",d:"M151.3,70.5l2.1,1l-13.2,27.4l-2.1-1L151.3,70.5z M136.5,74.2c2.7-0.7,5.7,0.8,6.5,4.1 c0.9,3.4-0.9,6.7-4.2,7.5c-2.8,0.7-5.8-0.8-6.6-4C131.4,78.5,133.5,75,136.5,74.2z M136.9,77.2c-1.9,0.5-2.6,2.3-2.2,3.7 c0.4,1.5,1.8,2.6,3.6,2.1c2-0.5,2.7-2.2,2.4-3.7C140.1,77.4,138.7,76.7,136.9,77.2z M152.7,83.6c2.7-0.7,5.7,0.8,6.5,4.1 c0.9,3.4-0.9,6.7-4.2,7.5c-2.8,0.7-5.8-0.8-6.6-4C147.6,87.8,149.7,84.3,152.7,83.6z M153.1,86.6c-1.9,0.5-2.6,2.3-2.2,3.7 c0.4,1.5,1.8,2.6,3.6,2.1c2-0.5,2.7-2.2,2.4-3.7C156.3,86.8,154.9,86.1,153.1,86.6z"}),(0,a.h)("path",{class:"sticker-text",d:"M63.8,133.8l-0.7,2.7c-0.9-0.3-2-0.6-3.9-0.1c-2.1,0.5-3.7,2.9-3,5.9c0.8,3.2,3,4.6,5.6,4 c1.7-0.4,2.8-1.4,3.4-2l1.6,1.8c-0.7,1.3-2.5,2.6-4.9,3.2c-4.2,1.1-7.4-1-8.5-5.7c-1.1-4.4,1.1-8.8,5.4-9.9 C60.8,133.2,62.7,133.4,63.8,133.8z M70.6,131.2l1.5,5.9c0.5-0.4,1.3-1.2,1.9-2.1c0.9-1.5,2.5-5.2,2.5-5.2l3.5-0.9 c0,0-2.8,5.7-4.4,8c0.4,0.3,7.7,5.7,8.6,6.3l-3.9,1l-5.5-4.8c-0.8-0.7-1.7-0.7-2.2-0.6l0.9,3.6c0.3,1.1,0.6,2.2,1,3.2l-3.2,0.8 l-2.8-11.2c-0.3-1.1-0.6-2.2-1-3.2L70.6,131.2z M86.6,127.3l2.6,10.4l0.2,0c1.5-4.1,3.4-9.4,4.2-12.1l0,0l0,0l3.2-0.8l2.8,11.2 c0.3,1.1,0.6,2.2,1,3.2l-3.2,0.8l-2.5-10.1l-0.1,0c-1.3,4-3.1,7.9-4.3,11.8l-0.1-0.1l0,0.1l-3.2,0.8l-2.8-11.2 c-0.3-1.1-0.6-2.2-1-3.2L86.6,127.3z M104.6,122.8l10.4-2.6l3,11.9l2.8-0.7c0.3,2.3,0.6,4.7,1.1,7l-2.2,0.5c-0.5-1-1-3.2-1.3-4.3 l0,0l-12.1,3l0,0c0.3,1.1,0.9,3.3,0.9,4.4l-2.2,0.5c-0.6-2.2-1.5-4.5-2.3-6.7l1.3-0.3c0.9-0.2,1.6-0.9,2-2.2 c0.4-1.6-0.4-6.4-0.8-8.1l0,0L104.6,122.8z M108.5,134.5l6.4-1.6l-2.4-9.4c-1.4,0.3-3.1,0.7-4.5,1 C108.9,127.9,109.2,132.8,108.5,134.5z M124.6,117.8l1.5,5.9c0.5-0.4,1.3-1.2,1.9-2.1c0.9-1.5,2.5-5.2,2.5-5.2l3.5-0.9 c0,0-2.8,5.7-4.4,8c0.4,0.3,7.7,5.7,8.6,6.3l-3.9,1l-5.5-4.8c-0.8-0.7-1.7-0.7-2.2-0.6l0.9,3.6c0.3,1.1,0.6,2.2,1,3.2l-3.2,0.8 l-2.8-11.2c-0.3-1.1-0.6-2.2-1-3.2L124.6,117.8z M139.6,125.9c-0.9-3.6,3.2-6.5,7.1-7.7l-0.2-0.9c-0.5-2-1.9-2.2-3.2-1.9 c-1.4,0.3-2.9,1.3-4.1,2.5l-1.6-2.1c1.2-1.4,3.3-2.6,5.7-3.2c2.7-0.7,5.1,0.2,5.8,3.2c0.5,1.9,0.9,4.2,1.4,6.3 c0.3,1.3,1.1,3,1.4,3.7L149,127l-0.9-2.1l-0.2,0.1c-0.4,1.3-1.3,3.1-3.5,3.7C142,129.3,140.1,128.1,139.6,125.9z M142.4,124.5 c0.3,1,1,1.5,2.1,1.3c1.9-0.5,3.3-2.4,2.8-4.7l-0.1-0.5C144.5,120.9,141.9,122.4,142.4,124.5z"})),h={default:d,20:d,60:()=>(0,a.h)("svg",{width:"188",height:"188",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,a.h)("path",{class:"sticker-bg",d:"M94 0l7.291 10.658 9.032-9.23 5.33 11.763 10.497-7.522 3.206 12.51L141 12.593l.985 12.876 12.437-3.478-1.265 12.851 12.851-1.265-3.478 12.437 12.876.985-5.584 11.644 12.509 3.206-7.522 10.497 11.763 5.33-9.23 9.031L188 94l-10.658 7.291 9.23 9.032-11.763 5.33 7.522 10.497-12.509 3.206L175.406 141l-12.876.985 3.478 12.437-12.851-1.265 1.265 12.851-12.437-3.478-.985 12.876-11.644-5.584-3.206 12.509-10.497-7.522-5.33 11.763-9.032-9.23L94 188l-7.291-10.658-9.032 9.23-5.33-11.763-10.497 7.522-3.206-12.509L47 175.406l-.985-12.876-12.437 3.478 1.265-12.851-12.851 1.265 3.478-12.437L12.594 141l5.584-11.644-12.51-3.206 7.523-10.497-11.763-5.33 9.23-9.032L0 94l10.658-7.291-9.23-9.032 11.763-5.33L5.669 61.85l12.51-3.206L12.593 47l12.876-.985-3.478-12.437 12.851 1.265-1.265-12.851 12.437 3.478L47 12.594l11.644 5.584 3.206-12.51 10.497 7.523 5.33-11.763 9.031 9.23L94 0z"}),(0,a.h)("path",{class:"sticker-text",d:"M66.033 57.773l-3.597-5.735c-19.902 8.69-27.278 28.815-22.66 47.451 3.648 14.723 13.853 22.777 25.5 19.89 11.369-2.817 16.702-14.424 13.861-25.885-2.447-9.878-9.676-15.9-20.578-13.198-7.548 1.87-10.468 6.451-11.59 8.707l-.466.116c-1.319-15.3 6.174-24.18 19.53-31.346zm-8.188 30.019c6.336-1.57 11.964 1.584 13.765 8.853 1.894 7.64-1.24 14.153-7.576 15.724-7.268 1.801-13.288-3.334-16.082-14.61l-.162-.651c.89-2.793 3.439-7.677 10.055-9.316zM95.81 43.767C81.74 47.255 78.263 62.358 83.204 82.3c4.064 16.4 13.397 29.318 27.281 25.878 14.63-3.625 16.367-21.76 12.234-38.44-4.434-17.89-13.304-29.34-26.909-25.97zm1.45 7.85c8.946-2.217 13.632 6.315 17.443 21.294 3.741 14.7 2.438 25.407-5.855 27.462-8.666 2.148-13.91-6.245-17.628-21.247-3.648-14.723-2.718-25.338 6.04-27.509zm39.748 19.279c-3.525.873-5.951 4.955-4.996 8.808.945 3.812 4.424 5.56 7.703 4.748 3.894-.965 5.909-4.771 4.914-8.788-.955-3.853-4.424-5.56-7.621-4.768zm17.421-4.317l-15.635 32.067 2.497 1.121 15.553-32.046-2.415-1.142zm-16.957 7.77c2.132-.529 3.81.274 4.348 2.446.427 1.722-.417 3.758-2.795 4.347-2.131.528-3.757-.766-4.184-2.487-.406-1.64.377-3.748 2.631-4.307zm18.533 7.545c-3.525.874-5.951 4.956-4.996 8.809.945 3.812 4.424 5.56 7.703 4.748 3.894-.965 5.909-4.771 4.914-8.788-.955-3.853-4.423-5.56-7.621-4.769zm.485 3.535c2.131-.528 3.809.274 4.348 2.447.426 1.721-.418 3.758-2.795 4.347-2.132.528-3.758-.766-4.184-2.487-.407-1.64.376-3.748 2.631-4.307zM68.307 133.651c-.984-.354-2.695-.561-4.478-.119-3.848.953-5.85 4.936-4.88 8.846 1.038 4.192 3.856 6.05 7.641 5.112 2.127-.527 3.724-1.72 4.376-2.844l-1.435-1.636a6.096 6.096 0 01-3.045 1.783c-2.315.574-4.297-.728-5.003-3.575-.674-2.721.831-4.821 2.677-5.278 1.689-.419 2.72-.143 3.486.132l.661-2.421zm6.1-2.276l-2.91.721c.327.915.638 1.901.878 2.871l2.48 10.01 2.91-.721a30.613 30.613 0 01-.877-2.87l-.799-3.222c.508-.093 1.235-.107 1.992.535l4.908 4.263 3.504-.869c-.742-.58-7.282-5.4-7.649-5.675 1.435-1.982 3.947-7.12 3.947-7.12l-3.16.783s-1.43 3.342-2.26 4.677a7.395 7.395 0 01-1.662 1.873l-1.302-5.256zm14.297-3.542l-2.91.72c.327.916.638 1.901.878 2.871l2.48 10.01 2.91-.721-.016-.062.047.055c1.094-3.492 2.657-6.967 3.86-10.553l.125-.031 2.24 9.041 2.91-.721a30.645 30.645 0 01-.878-2.87l-2.48-10.011-2.91.721.008.031-.039-.023c-.732 2.406-2.391 7.233-3.75 10.857l-.157.039-2.318-9.353zm16.118-3.995l.558 2.253.032-.008c.341 1.509 1.129 5.763.727 7.224-.323 1.242-.98 1.804-1.794 2.005l-1.157.287c.746 1.94 1.492 4.013 2.051 6l1.971-.489c-.037-.954-.526-2.924-.805-3.918l-.008-.031 10.824-2.682.008.031c.216 1.009.705 2.98 1.117 3.841l1.971-.489c-.434-2.017-.742-4.199-.988-6.263l-2.502.62-.171-.688-2.48-10.01-9.354 2.317zm3.496 10.49c.628-1.484.333-5.893-.357-8.943 1.283-.318 2.761-.651 4.02-.93l.163.657 1.93 7.789-5.756 1.427zm14.448-14.936l
2-2.909.721c.327.915.637 1.9.878 2.87l2.48 10.011 2.909-.721a30.662 30.662 0 01-.877-2.871l-.798-3.222c.508-.093 1.235-.107 1.992.536l4.908 4.262 3.503-.868c-.741-.58-7.282-5.401-7.648-5.675 1.434-1.983 3.946-7.121 3.946-7.121l-3.159.783s-1.43 3.343-2.261 4.678a7.41 7.41 0 01-1.661 1.872l-1.303-5.255zm13.49 7.282c.489 1.971 2.144 3.022 4.302 2.487 2.002-.496 2.756-2.144 3.134-3.3l.219-.054.824 1.854 2.496-1.05c-.296-.657-.965-2.152-1.251-3.309-.458-1.846-.805-3.918-1.232-5.639-.666-2.69-2.853-3.476-5.231-2.887-2.127.527-3.958 1.579-5.071 2.851l1.466 1.894c1.026-1.084 2.403-1.957 3.655-2.267 1.189-.294 2.415-.034 2.849 1.718l.21.844c-3.489 1.064-7.16 3.667-6.37 6.858zm2.583-1.237c-.466-1.877 1.827-3.209 4.275-3.517l.108.438c.379 2.064-.852 3.797-2.541 4.216-.907.225-1.618-.23-1.842-1.137z"}))};t.default=e=>{const{couponValidUntil:t}=window.productSubscription.prices,s=new Date(t);if(!t)return null;const i=Date.now()<s.getTime(),d=(0,o.default)("module","bookDiscountBanner","fullWidthFloor",e.class,{is__invalid:!i}),u=(0,n.birmanize)((0,r.moscowifyLocal)(s).toISOString(),{format:"weekDay"}),p=(0,n.birmanize)((0,r.moscowifyLocal)(s).toISOString(),{format:"month"}),m=h[e.discount]||h.default;return(0,a.h)("div",{className:d,style:{color:e.textColor,backgroundColor:e.bgColor}},(0,a.h)("style",null,`.bookDiscountBanner .sticker-text { fill: ${e.stickerTextColor||"#fff"} }\n          .bookDiscountBanner .sticker-bg { fill: ${e.stickerBgColor||"#000"} }`),(0,a.h)("div",{className:"bookDiscountBanner-sticker"},(0,a.h)(m,null)),(0,a.h)("div",{className:"bookDiscountBanner-textWrapper"},i&&(0,a.h)(l.TextNode,{html:(0,n.sanitize)(e.text)}),!i&&(0,a.h)(l.TextNode,null,(0,a.h)("b",null,"Время закончилось"),(0,a.h)("br",null),"Скидка на книгу",(0,a.h)("br",null),"больше не действует")),(0,a.h)("div",{className:"bookDiscountBanner-factoidWrapper"},(0,a.h)(c.default,{number:(0,r.moscowifyLocal)(s).getDate(),mod:"sans"},(0,a.h)("nobr",null,`${p}, ${u.toLowerCase()}`)),(0,a.h)(c.default,{number:"23:59",mod:"sans"},(0,a.h)("nobr",null,"по московскому времени"))))}},62488:function(e,t,s){"use strict";var i=s(24994)(s(31415));$(".js__bookDiscountBanner").each(function(){$(this).reactify(i.default,$(this).data()),$(this).children().unwrap()})},8846:function(){"use strict";{const e=$(document),t=$(".bookPresentationSpacer-button"),s=$(".js__bookPresentationSpacer-form").attr("data-course-id");let i=!1;e.on("appSetUser",function(e,s){s&&(s.name&&t.prop("disabled",!1),s.email&&$(".bookPresentationSpacerSubscribeEmail").val(s.email))}),e.on(`submitSubscription.${s}`,()=>{t.prop("disabled",!0),i=!0}),e.on(`subscriptionChanged.${s}`,function(e,s){const a=$(".js__bookPresentationSpacerSubscriptionControl");t.prop("disabled",s),i?setTimeout(()=>a.toggleClass("has__subscribed",s),400):a.toggleClass("has__subscribed",s)})}},95673:function(e,t,s){"use strict";var i=s(24994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=s(76148),o=i(s(94634)),n=i(s(32485)),r=i(s(15024)),l=s(38367),c=i(s(14526)),d=s(13335),h=s(42795),u=s(49884),p=s(55024);class m extends a.Component{constructor(e){super(e);const{email:t,isSubscribed:s}=(0,l.getStoredEmail)(e.eventType);this.state={prices:{},email:t,isSubscribed:s},this.isHalf="half"===e.size,this.isFull="full"===e.size,this.isProductBookshelf=(0,p.isBookshelf)(e.id),this.href=(0,p.bookHref)(e.id),this.isPreorder=!1,this.trackClick=p.trackGoal.bind(this,e.goal),this.subscribe=this.subscribe.bind(this)}componentDidMount(){this.fetch()}get isCouponApplied(){return this.state.prices.isCouponApplied}get couponDiscount(){return this.state.prices.couponDiscount}get couponTheme(){return this.state.prices.couponTheme}fetch(){(0,r.default)(this.props.id).then(e=>{(0,p.isUpgradeMode)()&&(e.specialOffer=p.specialOfferStub),this.setState({prices:e,hasSpecialOffer:e.specialOffer&&e.specialOffer.oneTime&&e.default})}).catch(e=>console.error(e))}subscribe({email:e}){return(0,l.subscribeUser)({email:e,eventType:this.props.eventType,eventId:"1"}).then(e=>this.setState({isSubscribed:e})).catch(e=>console.error(e))}
2render(){if(!this.state.prices.default)return null;const e=(0,p.pickTitle)(this.props),t=this.isFull?d.FullWidthText:h.HalfWidthText,s=this.isFull?d.FullWidthPreorderText:h.HalfWidthPreorderText,i=(0,n.default)("bookSpacer",{is__full:this.isFull,is__half:this.isHalf,is__bookshelf:this.isProductBookshelf,is__book:!this.isProductBookshelf,is__upgradeAvailable:this.state.prices.specialOffer,is__preorder:this.isPreorder},this.props.customClass);return(0,a.h)("div",{className:i},(0,a.h)(c.default,{id:this.props.id,cellSize:this.props.size,href:this.href,onClick:this.trackClick,coverSize:this.props.coverSize,fullCoverLaptopSize:this.props.fullCoverLaptopSize,coverMobileSize:this.props.coverMobileSize,halfCoverLaptopSize:this.props.halfCoverLaptopSize,labelText:this.props.labelText,isCouponApplied:this.isCouponApplied,discount:this.couponDiscount,couponTheme:this.couponTheme}),this.isPreorder&&(0,a.h)(s,(0,o.default)({},this.props,{title:e,isSubscribed:this.state.isSubscribed,href:this.href,email:this.state.email,onClick:this.trackClick,onSubmit:this.subscribe})),!this.isPreorder&&(0,a.h)(t,(0,o.default)({},this.props,{productId:this.props.id,title:e,href:this.href,prices:this.state.prices,isProductBookshelf:this.isProductBookshelf,hasSpecialOffer:this.state.hasSpecialOffer,onClick:this.trackClick})),this.isPreorder&&(0,a.h)(u.MobilePreorderText,(0,o.default)({},this.props,{title:e,href:this.href,onClick:this.trackClick})),!this.isPreorder&&(0,a.h)(u.MobileText,(0,o.default)({},this.props,{productId:this.props.id,title:e,titleMobile:this.props.nameMobile,href:this.href,prices:this.state.prices,isProductBookshelf:this.isProductBookshelf,hasSpecialOffer:this.state.hasSpecialOffer,onClick:this.trackClick})))}}t.default=m},37662:function(e,t,s){"use strict";var i=s(24994)(s(95673));$(".js__bookSpacer").each((e,t)=>{const s=$(t);s.reactify(i.default,s.data()),s.children().unwrap()})},13036:function(e,t,s){"use strict";var i=s(86019),a=s(24994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=s(76148),n=s(45169),r=a(s(32485));class l extends o.Component{get hasPercentageDiscount(){const e=parseInt(this.props.discount,10);return!Number.isNaN(e)&&e>0}get discountIcon(){const e=`${this.props.discount}<span>%</span>`;return this.hasPercentageDiscount?e:"%"}get hasBlackTheme(){return!!this.props.hasBlackTheme}render(){const e=(0,r.default)("bookSpacerCouponSticker-wrapper",{has__blackTheme:this.hasBlackTheme,[`is__${this.props.theme}Theme`]:this.props.theme}),t=(0,r.default)("bookSpacerCouponSticker",{has__percentageDiscount:this.hasPercentageDiscount});return(0,o.h)("div",{className:e},(0,o.h)("div",{className:t},(0,o.h)("div",{className:"percentage",dangerouslySetInnerHTML:{__html:this.discountIcon}}),this.hasPercentageDiscount&&(0,o.h)(n.Caption,{html:i.t("books.bookSpacer.discount")})))}}t.default=l},14526:function(e,t,s){"use strict";var i=s(24994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=s(76148),o=s(55024),n=s(40193),r=i(s(13036));t.default=e=>{const t=(0,o.isBookshelf)(e.id),s="half"===e.cellSize,i="full"===e.cellSize;return(0,a.h)("a",{href:e.href,className:"bookSpacerCover module doubleHover is__fitToContent",onClick:e.onClick},e.isCouponApplied&&(0,a.h)(r.default,{discount:e.discount,theme:e.couponTheme}),t&&(0,a.h)(n.BookshelfCover,{id:e.id,coverSize:e.coverSize,halfCoverLaptopSize:e.halfCoverLaptopSize,fullCoverLaptopSize:e.fullCoverLaptopSize,isHalf:s,isFull:i}),!t&&(0,a.h)(n.BookCover,{id:e.id,isHalf:s,isFull:i}),(0,a.h)(n.MobileCover,{coverMobileSize:e.coverMobileSize,id:e.id,labelText:e.labelText}))}},40193:function(e,t,s){"use strict";var i=s(24994);Object.defineProperty(t,"__esModule",{value:!0}),t.MobileCover=t.BookshelfCover=t.BookCover=void 0;var a=s(76148),o=i(s(32485)),n=s(66192),r=s(55024);const l=e=>`/projects/${e}/files/`;t.MobileCover=e=>{const t=`${l(e.id)}_cover-spacer-mobile.png`,s=""!==e.labelText;return(0,a.h)(n.Image,{size:(0,r.mobileCoverSize)(e.coverMobileSize),src:t,className:"device device__mobile"},s&&(0,a.h)("div",{className:"bookSpacerLabel"},e.labelText))},t.BookCover=e=>{const t=`${l(e.id)}
2_cover-spacer-half.png`,s=`${l(e.id)}_cover-spacer-full.png`;return(0,a.h)("div",null,e.isHalf&&(0,a.h)(n.Image,{size:r.HALF_BOOK_COVER_SIZE,src:t,className:"device device__desktop device__laptop"}),e.isFull&&(0,a.h)(n.Image,{size:r.FULL_BOOK_COVER_SIZE,src:s,className:"device device__desktop device__laptop"}))},t.BookshelfCover=e=>{const t=`${l(e.id)}_cover-spacer.png`,s=`${l(e.id)}_cover-spacer-half-laptop.png`,i=""!==e.fullCoverLaptopSize,c=e.halfCoverLaptopSize||e.fullCoverLaptopSize,d=(0,o.default)("device","device__desktop",{device__laptop:e.isFull&&!i});return(0,a.h)("div",null,e.isHalf&&(0,a.h)(n.Image,{size:(0,r.bookshelfHalfLaptopCoverSize)(c),src:s,className:"device device__laptop"}),e.isFull&&i&&(0,a.h)(n.Image,{size:(0,r.bookshelfHalfLaptopCoverSize)(e.fullCoverLaptopSize),src:s,className:"device device__laptop"}),(0,a.h)(n.Image,{size:(0,r.bookshelfCoverSize)(e.coverSize),src:t,className:d}))}},13335:function(e,t,s){"use strict";var i=s(86019),a=s(24994);Object.defineProperty(t,"__esModule",{value:!0}),t.FullWidthText=t.FullWidthPreorderText=void 0;var o=s(76148),n=s(45169),r=a(s(74353)),l=a(s(44445)),c=a(s(54032)),d=a(s(32943)),h=a(s(945)),u=s(55024);t.FullWidthText=e=>{const{productId:t,title:s,description:i,descriptionShort:a,href:n,linkText:d,prices:p,isProductBookshelf:m,hasSpecialOffer:f,onClick:v}=e,g=s.length>=u.LONG_TITLE_LENGTH,b=s.length>=u.VERY_LONG_TITLE_LENGTH,_=m&&f,y=i.length>=u.VERY_LONG_DESCRIPTION_LENGTH,S=a?"device desktop":"";return(0,o.h)("div",{className:"bookSpacer-text device laptop desktop"},(0,o.h)("div",{className:"bookSpacer-cols"},(0,o.h)("div",{className:"bookSpacer-left"},(0,o.h)("div",{className:"bookSpacer-titleWrapper"},(0,o.h)("a",{href:n,className:"bookSpacer-title doubleHover"},(0,o.h)("b",null,s),(0,o.h)("br",null),(0,o.h)("span",{className:S},i),a&&(0,o.h)("span",{className:"device laptop",dangerouslySetInnerHTML:{__html:a}}),y&&(0,o.h)(r.default,{href:n,text:d,onClick:v,isInline:!0}))),!y&&(0,o.h)(r.default,{href:n,text:d,onClick:v})),(0,o.h)("div",{className:"bookSpacer-right"},!b&&(0,o.h)("div",{className:"device desktop"},_&&(0,o.h)(c.default,{prices:p,size:"pageTitle",unitsSize:"heading",isBookshelfAll:(0,h.default)(t)}),!f&&(0,o.h)(l.default,{prices:p,size:"pageTitle",unitsSize:"heading"})),!g&&(0,o.h)("div",{className:"device laptop"},_&&(0,o.h)(c.default,{prices:p,size:"title",unitsSize:"medium",isBookshelfAll:(0,h.default)(t)}),!f&&(0,o.h)(l.default,{prices:p,unitsSize:"medium"})))))},t.FullWidthPreorderText=e=>{const{title:t,email:s,href:a,linkText:l,isSubscribed:c,onClick:h,onSubmit:u}=e;return(0,o.h)("div",{className:"bookSpacer-text device laptop desktop"},(0,o.h)("div",{className:"bookSpacer-titleWrapper"},(0,o.h)("a",{href:a,className:"bookSpacer-title doubleHover"},(0,o.h)("b",null,t))),(0,o.h)("div",{className:"bookSpacer-cols"},(0,o.h)("div",{className:"bookSpacer-left"},(0,o.h)(n.TextNode,null,i.t("books.bookSpacer.subscriptionFormCaption"),(0,o.h)("br",null),(0,o.h)(r.default,{href:a,text:l,onClick:h,isInline:!0}))),(0,o.h)("div",{className:"bookSpacer-right"},(0,o.h)(d.default,{email:s,onSubmit:u,className:"bookSpacer-form",isSubscribed:c,thinButton:!0}))))}},42795:function(e,t,s){"use strict";var i=s(86019),a=s(24994);Object.defineProperty(t,"__esModule",{value:!0}),t.HalfWidthText=t.HalfWidthPreorderText=void 0;var o=s(76148),n=s(45169),r=a(s(74353)),l=a(s(44445)),c=a(s(54032)),d=a(s(32943)),h=a(s(945)),u=s(55024);t.HalfWidthText=e=>{const{productId:t,title:s,href:i,linkText:a,linkTextShort:d,prices:p,isProductBookshelf:m,hasSpecialOffer:f,onClick:v}=e,g=a.length>=u.LONG_LINK_LENGTH,b=m&&f;return(0,o.h)("div",{className:"bookSpacer-text device laptop desktop"},(0,o.h)(n.Heading3,null,s),b&&(0,o.h)(c.default,{prices:p,unitsSize:"medium",isBookshelfAll:(0,h.default)(t)}),!f&&(0,o.h)(l.default,{prices:p,unitsSize:"medium"}),(0,o.h)(r.default,{href:i,text:g&&d?d:a,onClick:v}))},t.HalfWidthPreorderText=e=>{const{title:t,email:s,href:a,linkText:l,linkTextShort:c,isSubscribed:h,onClick:p,onSubmit:m}=e,f=l.length>=u.LONG_LINK_LENGTH;return(0,o.h)("div",{className:"bookSpacer-text device laptop desktop"},(0,o.h)(n.Heading3,null,t),(0,o.h)(n.TextNode,null,i.t("books.bookSpacer.subscriptionFormCaption")+" ",(0,o.h)(r.default,{href:a,text:f&&c?c:l,onClick:p,isInline:!0})),(0,o.h)(d.default,{email:s,onSubmit:m,className:"bookSpacer-form",isSubscribed:h,thinButton:!0}))}},74353:function(e,t,s){"use strict";var i=s(24994);
2Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=s(76148),o=i(s(94634)),n=i(s(28436));t.default=e=>(0,a.h)(n.default,(0,o.default)({},e,{isNoVisited:!0,isDoubleHover:!0,isSmall:e.isSmall,isInline:e.isInline}))},49884:function(e,t,s){"use strict";var i=s(86019),a=s(24994);Object.defineProperty(t,"__esModule",{value:!0}),t.MobileText=t.MobilePreorderText=void 0;var o=s(76148),n=s(45169),r=a(s(74353)),l=a(s(945));t.MobileText=e=>{const{productId:t,title:s,titleMobile:a,href:c,linkText:d,isProductBookshelf:h,hasSpecialOffer:u,onClick:p,prices:m}=e,f=h&&u,{renewalPeriod:v}=m,g=v>=12,b=(0,l.default)(t),_=i.t(`subscription.defaultUnits_${m.renewalPeriod}`),y=i.t(`subscription.subscriptionUnits_${m.renewalPeriod}`);return(0,o.h)("div",{className:"bookSpacer-text device mobile"},(0,o.h)(n.Caption,null,(0,o.h)("b",null,a||s),(0,o.h)("br",null),f&&!b&&(0,o.h)("span",{className:"bookSpacer-specialOfferHighlight"},`Переключение ${m.specialOffer.oneTime} ${_} `),b&&u&&(0,o.h)("span",null,(0,o.h)("s",{className:"is__crossedOut"},m.oneTime),(0,o.h)("span",{className:"bookSpacer-specialOfferHighlight"},` ${m.specialOffer.oneTime}`)),!u&&(0,o.h)("span",null,g?m.oneTime:m.default),`, затем ${m.subscription} ${y}`),(0,o.h)(r.default,{isSmall:!0,href:c,text:d,onClick:p}))},t.MobilePreorderText=e=>{const{title:t,description:s,href:i,linkText:a,onClick:l}=e;return(0,o.h)("div",{className:"bookSpacer-text device mobile"},(0,o.h)(n.Caption,null,(0,o.h)("b",null,t),(0,o.h)("br",null),s),(0,o.h)(r.default,{isSmall:!0,href:i,text:a,onClick:l}))}},55024:function(e,t,s){"use strict";var i=s(24994);Object.defineProperty(t,"__esModule",{value:!0}),t.trackGoal=t.specialOfferStub=t.pickTitle=t.mobileCoverSize=t.isUpgradeMode=t.isBookshelf=t.bookshelfHalfLaptopCoverSize=t.bookshelfCoverSize=t.bookHref=t.VERY_LONG_TITLE_LENGTH=t.VERY_LONG_DESCRIPTION_LENGTH=t.LONG_TITLE_LENGTH=t.LONG_LINK_LENGTH=t.HALF_BOOK_COVER_SIZE=t.FULL_BOOK_COVER_SIZE=t.DEFAUL_HALF_LAPTOP_BOOKSHELF_COVER_SIZE=t.DEFAULT_MOBILE_COVER_SIZE=t.DEFAULT_BOOKSHELF_COVER_SIZE=void 0;var a=s(15011),o=i(s(62515));t.LONG_TITLE_LENGTH=26,t.VERY_LONG_TITLE_LENGTH=34,t.LONG_LINK_LENGTH=28,t.VERY_LONG_DESCRIPTION_LENGTH=45;const n=t.DEFAULT_BOOKSHELF_COVER_SIZE=[334,342],r=t.DEFAUL_HALF_LAPTOP_BOOKSHELF_COVER_SIZE=[157,342],l=t.DEFAULT_MOBILE_COVER_SIZE=[692,342];t.HALF_BOOK_COVER_SIZE=[342,342],t.FULL_BOOK_COVER_SIZE=[356,270],t.isBookshelf=e=>/bookshelf-/i.test(e),t.bookHref=e=>{const t=(0,a.utmSource)({platform:"Сайт бюро",postType:"Банер",productType:"Книги",product:e.replace(/(book|bookshelf)-/,""),postDate:new Date});return`/projects/${e}/?utm_source=${t}`},t.trackGoal=o.default,t.isUpgradeMode=()=>{const e=window.location.search.match(/mode=([\w-]+)/i);return e&&"upgrade"===e[1]},t.specialOfferStub={oneTime:110,ownedBooks:[{key:"typography",title:"Типографика и вёрстка"},{key:"ui",title:"Пользовательский интерфейс"},{key:"text",title:"Информационный стиль"}]};const c=e=>Math.floor(Math.random()*Math.floor(e.length));t.pickTitle=({nameShort:e="",name:t=""})=>e&&Array.isArray(e)?e[c(e)]:t&&Array.isArray(t)?t[c(t)]:e||t,t.bookshelfCoverSize=e=>e?e.split(":"):n,t.bookshelfHalfLaptopCoverSize=e=>e?e.split(":"):r,t.mobileCoverSize=e=>e?e.split(":"):l},38519:function(e,t,s){"use strict";var i=s(86019);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=s(76148),o=s(27384),n=s(45169),r=s(14285);class l extends a.Component{get requirementsText(){return i.t("books.bookSystemRequirements.text")}render(){return(0,a.h)(o.Cols,{className:"bookSystemRequirements",isRibbed:!0,mobileRibMask:[!1,!0]},(0,a.h)("div",{className:"bookSystemRequirements-main"},(0,a.h)("div",{className:"bookSystemRequirements-text"},(0,a.h)(n.TextNode,{html:this.requirementsText})),(0,a.h)("div",{className:"bookSystemRequirements-icon"},(0,a.h)(r.BookSystemRequirementsWithMobileIcon,null))),(0,a.h)("div",{className:"bookSystemRequirements-retina"},(0,a.h)(n.Caption,{html:i.t("books.bookSystemRequirements.retina")})))}}t.default=l},87544:function(e,t,s){"use strict";var i=s(24994)(s(38519));const{productSubscription:a={}}=window,o=(a.subscription||{}).product||"";$(".js__bookSystemRequirements").each(function(){const e=(window.productDetails||{}).books||[],t={...$(this).data("options"),books:e,product:o};$(this).reactify(i.default,t)})},89837:function(e,t,s){"use strict";var i=s(86019),a=s(24994);
2Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=s(76148),n=s(73345),r=a(s(945)),l=a(s(23262));class c extends o.Component{get isBookshelfAll(){return(0,r.default)(this.props.productId)}get isApplicableForDiscount(){return this.props.prices.isApplicableForDiscount&&!this.isUpgrade}get isApplicableForSubscriptionDiscount(){return this.hasDifferentSubscriptionPrices&&!this.isUpgrade}get hasDifferentSubscriptionPrices(){const{subscription:e,previousSubscription:t}=this.props.prices;return!!t&&e!==t}get isUpgrade(){return!!this.props.prices.specialOffer}get renewalPeriod(){return this.props.prices.renewalPeriod}get pricesCaption(){let e=i.t(`books.priceCaption_${this.renewalPeriod}`);return this.isUpgrade||(e+=`,<br/>${i.t("books.priceCaptionRenewsAutomatically")}`),e}get pricesUpgradeCaption(){const e=this.isBookshelfAll?"captionUpgrade":"captionSpecial";return i.t(`books.bookshelf.subscriptionFooter.${e}`)}get oneTimePriceLabel(){const{prices:e}=this.props,t=this.isUpgrade?"Discount":"";let s=i.t(`subscription.prices.defaultLabel_${this.renewalPeriod}${t}`);return this.isApplicableForDiscount&&e.previousOneTime!==e.oneTime&&(s+=` <s>${e.previousOneTime}</s>`),s}get subscriptionPriceLabel(){let e=i.t(`subscription.prices.subscriptionLabel_${this.renewalPeriod}`);return this.isApplicableForSubscriptionDiscount&&(e+=` <s>${this.props.prices.previousSubscription}</s>`),e}get oneTimeUnits(){const e=this.isUpgrade?"Discount":"";return i.t(`subscription.defaultUnits_${this.renewalPeriod}${e}`)}get oneTimePrice(){const{prices:e}=this.props;return e.renewalPeriod>=12||this.isUpgrade?e.oneTime:e.default}get specialOfferTitle(){const e=this.props.prices.specialOffer.ownedBooks.length,t=(0,n.pluralize)(e,"отдельную книгу","отдельные книги","отдельных книг");return this.isBookshelfAll?i.t("books.bookshelf.bookshelfAllspecialOfferTitle"):i.t("books.bookshelf.specialOfferTitle",{booksCount:e,pluralizedBookCount:t})}get upgradeOneTimePriceLabel(){const{renewalPeriod:e,previousOneTime:t}=this.props.prices;return this.isBookshelfAll?i.t(`subscription.prices.defaultLabel_${e}`)+` <s class="previousOneTimeValue">${t}</s>`:i.t("subscription.prices.upgradeLabel")}get updateSubscriptionPriceLabel(){return this.isBookshelfAll?i.t(`subscription.prices.subscriptionLabel_${this.props.prices.renewalPeriod}`):i.t("subscription.prices.upgradeSubscriptionLabel")}render(){const{prices:e}=this.props;return(0,o.h)("div",null,(0,o.h)(l.default,{title:i.t("books.bookshelf.offerTitle"),oneTimePriceLabel:this.oneTimePriceLabel,oneTimePrice:this.isUpgrade?e.previousOneTime:this.oneTimePrice,oneTimePriceUnits:this.oneTimeUnits,subscriptionPriceUnits:i.t(`subscription.subscriptionUnits_${this.renewalPeriod}`),subscriptionPriceLabel:this.subscriptionPriceLabel,subscriptionPrice:this.isUpgrade?e.previousSubscription:e.subscription,isStrikedOut:this.isUpgrade,smallUnits:this.props.smallUnits,hasCaption:this.props.hasCaption,omitHeading:this.props.omitHeading,isApplicableForDiscount:this.isApplicableForDiscount,isApplicableForSubscriptionDiscount:this.isApplicableForSubscriptionDiscount,captionText:this.pricesCaption}),this.isUpgrade&&(0,o.h)(l.default,{title:this.specialOfferTitle,oneTimePriceLabel:this.upgradeOneTimePriceLabel,oneTimePrice:e.specialOffer.oneTime,oneTimePriceUnits:this.oneTimeUnits,subscriptionPriceUnits:i.t(`subscription.subscriptionUnits_${this.renewalPeriod}`),subscriptionPriceLabel:this.updateSubscriptionPriceLabel,subscriptionPrice:e.subscription,highlighted:!0,highlightedSubscriptionPrice:this.hasDifferentSubscriptionPrices,smallUnits:this.props.smallUnits,hasCaption:this.props.hasCaption,omitHeading:this.props.omitHeading,captionText:this.pricesUpgradeCaption}))}}t.default=c},67834:function(e,t,s){"use strict";var i=s(24994)(s(89837));const{productSubscription:a={}}=window;a&&($(".js__bookshelfPricing").each(function(){const e=a.prices,t=$(this).data("small-units"),s=$(this).data("caption"),o=a.subscription.product_id;$(this).reactify(i.default,{productId:o,prices:e,smallUnits:t,hasCaption:s})}),$(".js__bundledSubscriptionPricing, .js__bundledSubscriptionPrices").each(function(){$(this).reactify(i.default,{prices:a.prices.bundled,smallUnits:!!$(this).attr("data-small-units"),omitHeading:!0,productId:"bookshelf-all"})}))},32806:function(e,t,s){"use strict";var i=s(86019);
2Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=s(76148),o=s(45169);class n extends a.Component{get isUpgrade(){return!!this.props.prices.specialOffer}get footerCaption(){const e=this.isUpgrade?"captionUpgradeSpecial":"caption";return i.t(`books.bookshelf.subscriptionFooter.${e}`)}render(){return(0,a.h)(o.Caption,{html:this.footerCaption})}}t.default=n},20983:function(e,t,s){"use strict";var i=s(24994)(s(32806));const{productSubscription:a}=window;a&&$(".js__bookshelfPricingFooter").each(function(){const e=a.prices,t=a.subscription.product_id;$(this).find(".bookSubscription-info").reactify(i.default,{productId:t,prices:e})})},23262:function(e,t,s){"use strict";var i=s(24994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return(0,a.h)("div",{className:(0,o.default)("shelfPrices module",{is__strikedOut:e.isStrikedOut})},!e.omitHeading&&(0,a.h)(r.Heading3,null,e.title),(0,a.h)("div",{className:(0,o.default)("shelfPrices-list",{has__caption:e.hasCaption})},(0,a.h)("div",{className:"shelfPrices-item"},(0,a.h)(n.default,{className:e.isApplicableForDiscount?"is__applicableForDiscount":"",label:e.oneTimePriceLabel,amount:e.oneTimePrice,units:e.oneTimePriceUnits,highlighted:e.highlighted,smallUnits:e.smallUnits})),(0,a.h)("div",{className:"shelfPrices-item"},(0,a.h)(n.default,{className:e.isApplicableForSubscriptionDiscount?"is__applicableForDiscount":"",label:e.subscriptionPriceLabel,amount:e.subscriptionPrice,units:e.subscriptionPriceUnits,highlighted:e.highlightedSubscriptionPrice,smallUnits:e.smallUnits}))),e.hasCaption&&(0,a.h)(r.Caption,{html:e.captionText}))};var a=s(76148),o=i(s(32485)),n=i(s(25033)),r=s(45169)},23328:function(){"use strict";{const e="is__sticky",t="is__beforeBottomStickyModule";class s{constructor(e){this.$el=e,this.$parentEl=e.parent(),this.$prevEl=e.prev(),this.$document=$(document),this.updateStickiness=this.updateStickiness.bind(this),this.setListeners(),this.addMarginForPrevElement()}setListeners(){this.$document.on("appScroll appResize",this.updateStickiness).on("appReady",()=>setTimeout(this.updateStickiness,100))}addMarginForPrevElement(){this.$prevEl.addClass(t)}updateStickiness(){const t=Math.abs(this.$el[0].getBoundingClientRect().bottom-window.innerHeight)<1;this.$el.toggleClass(e,t)}}$(".js__bottomStickyModule").each(function(){new s($(this))})}},53030:function(e,t,s){"use strict";var i=s(24994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=s(76148),o=i(s(32485)),n=s(66192),r=s(45169),l=i(s(48471)),c=s(73345);class d extends a.Component{constructor(e){super(e)}get authorOrganizationAndJob(){const e=(0,c.lowerCaseFirst)(this.props.authorJob);return(0,c.capitalize)((0,c.joinWithComma)([this.props.authorOrganization,e]))}get isAnonymous(){return!this.props.authorName}get burosferaLink(){return`/burosfera/${this.props.authorEnglishName}`}render(e){if(!e.isVisible)return null;const t=(0,o.default)("burosferaVacancyForm-author",{is__visible:e.isVisible});return(0,a.h)("div",{className:t},!this.isAnonymous&&e.authorAvatarUrl&&(0,a.h)(n.Image,{src:e.authorAvatarUrl,size:[100,100],href:this.burosferaLink,className:"doubleHover"}),!this.isAnonymous&&(0,a.h)(r.Caption,null,(0,a.h)("a",{className:"doubleHover novisited",href:this.burosferaLink},(0,a.h)("strong",null,e.authorName)),(0,a.h)(l.default,null,e.authorCpd),(0,a.h)("br",null),this.authorOrganizationAndJob),this.isAnonymous&&(0,a.h)("div",null,(0,a.h)(n.Image,{src:"/assets/images/vacancy-user.svg",size:[100,100]}),(0,a.h)(r.Caption,null,(0,a.h)("strong",null,"Ваши имя и фамилия"),(0,a.h)("br",null),"Компания, профессия"),(0,a.h)(r.Caption,null,"После публикации вакансии здесь будут отображаться информация о вас и ваша фотография из Бюросферы")))}}t.default=d},33883:function(e,t,s){"use strict";var i=s(24994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=s(76148),o=i(s(32485)),n=s(67697),r=i(s(9769)),l=i(s(30330)),c=s(45169),d=i(s(52452)),h=i(s(31770)),u=i(s(21363)),p=i(s(53030)),m=s(88525),f=s(73345),v=s(68329),g=i(s(46336));class b extends a.Component{constructor(e){super(e);const{children:t,...s}=e;this.state=s,this.bindRootRef=e=>this.el=e,this.onJobDescriptionHeightChange=()=>$(document).trigger("appResize"),this.save=this.save.bind(this),this.onImageLoaded=this.onImageLoaded.bind(this),this.onImageDeleted=this.onImageDeleted.bind(this),this.onAuthorVisibleChange=this.onAuthorVisibleChange.bind(this),["jobTitle","companyTitle","jobLocation","contactEmail","jobDescription"].forEach(e
2=>{this[`on${(0,f.capitalize)(e)}Input`]=({value:t,target:s})=>this.setState({[e]:(null==s?void 0:s.value)||t||null,isDirty:!0})}),["remote","office"].forEach(e=>{this[`onJobFormat${(0,f.capitalize)(e)}`]=()=>this.setState({jobFormat:e,isDirty:!0})})}get title(){return this.state.isPublished?"Вакансия":"Новая вакансия"}componentDidMount(){window.application.newPaybar=window.application.newPaybar||{},window.application.newPaybar.externalForm=this}componentDidUpdate(){this.state.isDirty&&(clearTimeout(this.saveDraftTimeout),this.saveDraftTimeout=setTimeout(this.save,1e3))}get isValid(){return this.validator.isValid}get isBlank(){return this.validator.isBlank}get validationMessage(){return this.validator.validationMessage}get validator(){return new u.default(this.state)}async submit(){return(0,v.flushDraft)(this.state)}async save(){return this.submit().then(()=>this.setState({isSaved:!this.isBlank,isDirty:!1})).catch(()=>this.setState({isSaved:!1,isDirty:!0}))}get data(){return{uid:this.state.uid}}async reset(){return(0,g.default)().then(e=>this.setState({...e,isDirty:!1,isSaved:!1}))}focus(){this.el.scrollIntoView({behavior:"smooth"})}onImageLoaded({imageId:e,imageUrl:t}){this.setState({imageId:e,imageUrl:t,isDirty:!0})}onImageDeleted(){this.setState({imageId:null,imageUrl:null,isDirty:!0})}onAuthorVisibleChange({value:e}){this.setState({authorVisible:e,isDirty:!0})}get isJobLocationRequired(){return"office"===this.state.jobFormat}render(){const{uid:e,jobTitle:t,companyTitle:s,jobFormat:i,jobLocation:u,contactEmail:f,jobDescription:v,imageUrl:g,authorVisible:b,authorName:_,authorEnglishName:y,authorOrganization:S,authorJob:w,authorCpd:C,authorAvatarUrl:k,isSaved:T}=this.state,N=(0,o.default)("burosferaVacancyForm","module",{is__saved:T});return(0,a.h)("div",{className:N,ref:this.bindRootRef},(0,a.h)(c.Heading1,{className:"l"},this.title),(0,a.h)(r.default,{divisionProportions:"12:4",transposeOnMobile:!0},(0,a.h)(l.default,null,(0,a.h)(n.Form,{className:"burosferaVacancyForm-form"},(0,a.h)("div",{className:"burosferaVacancyForm-fieldset"},(0,a.h)(m.Row,null,(0,a.h)(m.Label,{name:"jobTitle",text:"Профессия или роль по‑русски"}),(0,a.h)(m.Input,{name:"jobTitle",value:t,onInput:this.onJobTitleInput})),(0,a.h)(m.Row,null,(0,a.h)(m.Label,{name:"companyTitle",text:"Название проекта или компании"}),(0,a.h)(m.Input,{name:"companyTitle",value:s,onInput:this.onCompanyTitleInput}))),(0,a.h)("div",{className:"burosferaVacancyForm-fieldset"},(0,a.h)(m.Row,null,(0,a.h)(m.Label,{name:"jobFormat",text:"Формат работы"}),(0,a.h)(m.JobFormatSwitcher,{value:i,onRemoteClick:this.onJobFormatRemote,onOfficeClick:this.onJobFormatOffice})),(0,a.h)(m.Row,null,(0,a.h)(m.Label,{name:"jobLocation",text:"Город"}),(0,a.h)(m.Input,{name:"jobLocation",value:u,onInput:this.onJobLocationInput,required:this.isJobLocationRequired}))),(0,a.h)("div",{className:"burosferaVacancyForm-jobDescriptionRow"},(0,a.h)(m.Label,{name:"jobDescription",text:"<b>Описание вакансии</b>"}),(0,a.h)(c.TextNode,null,"Расскажите о задаче, ожиданиях, команде, графике.",(0,a.h)("br",null),(0,a.h)("a",{href:"/burosfera/hire/vacancy/howto/",target:"_blank"},"Как написать хорошую вакансию")),(0,a.h)(m.JobDescriptionTextarea,{uid:e,value:v,onHeightChange:this.onJobDescriptionHeightChange,onInput:this.onJobDescriptionInput}),(0,a.h)(c.Caption,null,(0,a.h)("a",{href:"/burosfera/hire/vacancy/formatting/",target:"_blank"},"❔ Форматирование"))),(0,a.h)("div",{className:"burosferaVacancyForm-imageRow"},(0,a.h)(m.Label,{name:"image",text:"Иллюстрация над описанием вакансии"}),(0,a.h)(d.default,{imageUrl:g,onLoaded:this.onImageLoaded,onDeleted:this.onImageDeleted})),(0,a.h)("div",{className:"burosferaVacancyForm-fieldset"},(0,a.h)(m.Row,null,(0,a.h)(m.Label,{name:"contactEmail",text:"Эл. почта для откликов"}),(0,a.h)(m.Input,{name:"contactEmail",value:f,onInput:this.onContactEmailInput})),(0,a.h)(m.Row,null,(0,a.h)(n.FormCheckbox,{name:"authorVisible",value:b,text:"Указать меня как автора вакансии",onChange:this.onAuthorVisibleChange}
2))))),(0,a.h)(l.default,null,(0,a.h)("div",{className:"sidenote burosferaVacancyForm-sidenote module"},(0,a.h)("div",{className:"sidenote-text"},(0,a.h)(p.default,{isVisible:b,authorName:_,authorEnglishName:y,authorOrganization:S,authorJob:w,authorCpd:C,authorAvatarUrl:k}),(0,a.h)("div",{className:"module device device__laptop device__desktop"},(0,a.h)(m.DraftCaption,null)))))),(0,a.h)(h.default,null))}}t.default=b},65284:function(e,t,s){"use strict";var i=s(24994),a=i(s(76158)),o=i(s(33883));$(".js__burosferaVacancyForm").each(async(e,t)=>{const s=$(t),i=(0,a.default)();s.reactify(o.default,i),s.children().unwrap()})},52452:function(e,t,s){"use strict";var i=s(24994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=s(76148),o=i(s(32485)),n=i(s(40963)),r=i(s(12177)),l=i(s(2331)),c=s(92445),d=i(s(41215));class h extends a.Component{constructor(e){super(e),this.state={imageUrl:e.imageUrl},this.onFileInputChange=this.onFileInputChange.bind(this),this.onUploadProgress=this.onUploadProgress.bind(this),this.onUploadCompleted=this.onUploadCompleted.bind(this),this.onUploadError=this.onUploadError.bind(this),this.onUploadDelete=this.onUploadDelete.bind(this),this.onDrop=this.onDrop.bind(this),this.onDragStart=()=>this.setState({isDragOver:!0}),this.onDragEnd=()=>this.setState({isDragOver:!1})}componentDidMount(){document.addEventListener("documentDrop",this.onDrop),document.addEventListener("documentDragStart",this.onDragStart),document.addEventListener("documentDragEnd",this.onDragEnd)}componentWillUnmount(){document.removeEventListener("documentDrop",this.onDrop),document.removeEventListener("documentDragStart",this.onDragStart),document.removeEventListener("documentDragEnd",this.onDragEnd)}componentWillReceiveProps({imageUrl:e}){e||this.setState({imageUrl:e})}onDrop({detail:{files:e}}){this.upload(e)}onFileInputChange(){var e;null!==(e=this.fileInput)&&void 0!==e&&null!==(e=e.files)&&void 0!==e&&e.length&&this.upload(this.fileInput.files)}onUploadProgress(e){this.setState({uploadingFileLoaded:e})}upload(e){if(!(0,c.isValidImageUpload)(e))return;const t=e[0];this.uploadImage(t).then(this.onUploadCompleted).then(()=>this.displayFile(t)).catch(this.onUploadError).then(()=>this.setState({isUploading:!1}))}uploadImage(e){return this.setState({isUploading:!0,uploadingFileName:e.name,uploadingFileTotal:e.size}),(0,d.default)({file:e,onProgress:this.onUploadProgress})}displayFile(e){(0,c.readAsDataURL)(e).then(e=>this.setState({imageUrl:e}))}onUploadCompleted(e){const{onLoaded:t}=this.props,{id:s,url:i}=e;t&&t({imageId:s,imageUrl:i})}onUploadError(e){console.error("Vacancy image failed to upload",e)}onUploadDelete(){const{onDeleted:e}=this.props;this.setState({imageUrl:null},()=>e&&e())}render(){const{imageUrl:e}=this.state,t=(0,o.default)("burosferaVacancyForm-imageUploader",{is__dragOver:this.state.isDragOver,is__loaded:!!this.state.imageUrl});return(0,a.h)("div",{className:t},(0,a.h)(l.default,{fileInputRef:e=>this.fileInput=e,onChange:this.onFileInputChange}),(0,a.h)(n.default,{file:this.state.uploadingFileName,loaded:this.state.uploadingFileLoaded,total:this.state.uploadingFileTotal,isActive:this.state.isUploading}),e&&(0,a.h)("div",{className:"burosferaVacancyForm-imageUploaderResult",style:`background-image: url(${e})`},(0,a.h)(r.default,{onClick:this.onUploadDelete})))}}t.default=h},2331:function(e,t,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=s(76148),a=s(45169);t.default=({fileInputRef:e,onChange:t})=>(0,i.h)("div",{className:"burosferaVacancyForm-imageUploaderPlaceholder"},(0,i.h)("label",{htmlFor:"burosferaVacancyForm-image"},(0,i.h)(a.TextNode,null,"Перетащите иллюстрацию на страницу"),(0,i.h)(a.Caption,null,"Лучше всего — от 2000 пикселей в ширину и с пропорциями 16:9")),(0,i.h)("input",{type:"file",id:"burosferaVacancyForm-image",accept:"image/jpeg,image/png,image/gif",ref:e,onChange:t}))},31770:function(e,t,s){"use strict";var i=s(86019),a=s(24994);
2Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=s(76148),n=a(s(32485)),r=s(88525);class l extends o.Component{constructor(e){super(e),this.state={top:0,bottom:0,isVisible:!1,isSticky:!1},this.recalculate=this.recalculate.bind(this),this.updateStickiness=this.updateStickiness.bind(this),this.openPaybar=this.openPaybar.bind(this),this.bindInnerEl=e=>this.innerEl=e}componentDidMount(){$(document).on("appReady appResize",()=>setTimeout(this.recalculate,1e3)),$(document).on("appScroll appResize",this.updateStickiness)}recalculate(){this.setState({top:this.top,bottom:this.bottom,isVisible:!0,isSticky:this.isSticky})}updateStickiness(){this.setState({isSticky:this.isSticky})}openPaybar(){document.querySelector(".newPaybar .stickyButton").click()}get webpage(){return this._webpage||(this._webpage=document.querySelector(".js__webpage"))}get form(){return this._form||(this._form=document.querySelector(".burosferaVacancyForm"))}get button(){return this._button||(this._button=document.querySelector(".burosferaVacancyForm-button"))}get relativeTop(){return window.application.currentScrollPosition+this.webpage.getBoundingClientRect().top}get top(){return this.relativeTop+this.form.getBoundingClientRect().top}get bottom(){const e=this.button.getBoundingClientRect();return this.relativeTop+e.top+e.height}get isSticky(){if(!this.innerEl)return!1;const e=this.innerEl.getBoundingClientRect().bottom;return Math.abs(e-window.innerHeight)<1}get shaftStyles(){const{top:e,bottom:t}=this;return{height:t-e+"px"}}render(){return this.state.isVisible?(0,o.h)("div",{className:"burosferaVacancyForm-stickyShaft",style:this.shaftStyles},(0,o.h)("div",{className:(0,n.default)("module bottomStickyModule is__slim",{is__sticky:this.state.isSticky}),ref:this.bindInnerEl},(0,o.h)("div",{className:"burosferaVacancyForm-footer"},(0,o.h)(r.DraftCaption,null),(0,o.h)("button",{className:"stickyButton is__publication",onClick:this.openPaybar},i.t("buyButtonText.vacancy.default"))))):null}}t.default=l},88525:function(e,t,s){"use strict";var i=s(24994);Object.defineProperty(t,"__esModule",{value:!0}),t.Row=t.Label=t.JobFormatSwitcher=t.JobDescriptionTextarea=t.Input=t.DraftCaption=void 0;var a=s(76148),o=i(s(32485)),n=i(s(43631)),r=s(67697),l=s(45169);t.Row=({children:e})=>(0,a.h)("div",{className:"burosferaVacancyForm-row"},e),t.Label=({text:e,name:t})=>(0,a.h)("div",{className:`formLabel burosferaVacancyForm-${t}`},(0,a.h)("label",{htmlFor:t,dangerouslySetInnerHTML:{__html:e}})),t.Input=({name:e,value:t,onInput:s,required:i=!0})=>{const o=/email/i.test(e)?"email":"text";return(0,a.h)("div",{className:"formInput"},(0,a.h)(r.FormInput,{className:"is__fullWidth",id:e,name:e,value:t,onInput:s,type:o,required:i}))},t.JobFormatSwitcher=({value:e,onRemoteClick:t,onOfficeClick:s})=>(0,a.h)("div",{className:"formSwitcher"},(0,a.h)("div",{className:(0,o.default)("formSwitcher-item",{is__active:"remote"===e}),onClick:t},(0,a.h)("span",null,"Можно удалённо")),(0,a.h)("div",{className:(0,o.default)("formSwitcher-item",{is__active:"office"===e}),onClick:s},(0,a.h)("span",null,"Только офис"))),t.JobDescriptionTextarea=({uid:e,value:t,onInput:s,onHeightChange:i})=>(0,a.h)("div",{className:"formTextarea-wrapper"},(0,a.h)(n.default,{key:[e,"jobDescription"].join(":"),className:"formTextarea",id:"jobDescription",name:"jobDescription",onHeightChange:i,onInput:s},t)),t.DraftCaption=()=>(0,a.h)(l.Caption,{className:"burosferaVacancyForm-draftCaption"},"✓ Черновик сохранён")},76158:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e=window.vacancyDraft){return Object.assign({},s,e)};const s={uid:null,jobTitle:null,jobDescription:null,jobFormat:"remote",jobLocation:null,companyTitle:null,contactEmail:null,imageId:null,imageUrl:null,authorName:null,authorAvatarUrl:null,authorCpd:null,authorOrganization:null,authorJob:null,authorVisible:!1,authorEnglishName:null}},46336:function(e,t,s){"use strict";var i=s(24994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=async function(){return fetch("/burosfera/hire/vacancy/new.json",{method:"GET",headers:a.default,credentials:"include"}).then(e=>e.json()).then(e=>(0,n.default)((0,o.default)(e)))};var a=i(s(98999)),o=i(s(96194)),n=i(s(76158))},68329:function(e,t,s){"use strict";var i=s(24994);
2Object.defineProperty(t,"__esModule",{value:!0}),t.flushDraft=void 0;var a=i(s(98999)),o=i(s(36468));t.flushDraft=async e=>{const{uid:t,imageUrl:s,slug:i,isDirty:n,isSaved:r,...l}=e;return fetch(`/api/burosfera/vacancies/${t}/`,{method:"PUT",headers:a.default,credentials:"include",body:JSON.stringify((0,o.default)(l))})}},41215:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function({file:e,onProgress:t}){const i=new FormData;return i.append("image",e),new Promise((e,a)=>{$.ajax({url:"/api/burosfera/vacancy_images",data:i,contentType:!1,processData:!1,type:"POST",xhr:s({onProgress:t}),success:t=>e(t),error:e=>a(e)})})};const s=({onProgress:e})=>function(){const t=new window.XMLHttpRequest;return t.upload.addEventListener("progress",t=>{t.lengthComputable&&e&&e(t.loaded)},!1),t}},21363:function(e,t,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=s(73345);const a=e=>!(!e||!e.trim()),o={jobTitle:"профессию",companyTitle:"название компании",jobLocation:"город",contactEmail:"эл. почту для откликов"};t.default=class{constructor(e){this.state=e}get isJobTitleValid(){return a(this.state.jobTitle)}get isCompanyTitleValid(){return a(this.state.companyTitle)}get isJobDescriptionValid(){return a(this.state.jobDescription)}get isJobLocationValid(){return a(this.state.jobLocation)||"remote"===this.state.jobFormat}get isContactEmailValid(){return e=this.state.contactEmail,/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(e);var e}get isBlank(){return!(a(this.state.jobTitle)||a(this.state.companyTitle)||a(this.state.jobLocation)||a(this.state.contactEmail)||a(this.state.jobDescription)||a(this.state.imageUrl)||"remote"!==this.state.jobFormat||!0===this.state.authorVisible)}get isValid(){return this.isJobTitleValid&&this.isCompanyTitleValid&&this.isJobLocationValid&&this.isContactEmailValid&&this.isJobDescriptionValid}get validationMessage(){if(this.isValid)return null;const e=Object.keys(o).filter(e=>!this[`is${(0,i.capitalize)(e)}Valid`]).map(e=>o[e]);return this.isJobDescriptionValid?`Укажите ${(0,i.joinWithAnd)(e)}, чтобы опубликовать вакансию`:e.length?`Укажите ${e.join(", ")} и расскажите о вакансии, чтобы её опубликовать`:"Расскажите о вакансии, чтобы её опубликовать"}}},54915:function(e,t,s){"use strict";var i=s(24994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=s(76148),o=i(s(94634)),n=s(70753),r=i(s(32485)),l=s(65448),c=i(s(55041));const d=18,h=(e,t,s)=>Math.max(Math.min(t,s),e),u=e=>({paddingRight:h(0,d,e),paddingLeft:h(0,d,e),marginRight:d-h(0,d,e),marginLeft:d-h(0,d,e)}),p=e=>(0,a.h)("li",{className:"calendar-headerDayItem"},e),m=e=>{const t=e[0].date.getDay()||7,s=[...Array(t-1)],i=[...Array(7-e.length-s.length)];return(0,a.h)("div",{className:"calendar-week"},s.map(()=>(0,a.h)("div",{className:"calendar-dayStrut is__before"})),e.map(e=>e&&(0,a.h)(c.default,{date:e})),i.map(()=>(0,a.h)("div",{className:"calendar-dayStrut is__after"})))},f=({name:e,weeks:t,isJanuary:s})=>{return(0,a.h)("div",{className:"calendar-month"},(0,a.h)("div",{className:(0,r.default)("calendar-monthName",{is__embed:t.length>1&&(i=t[0],i.length<=5)})},e," ",s&&(new Date).getUTCFullYear()+Number((new Date).getUTCMonth()>6)),(0,a.h)("div",{className:"calendar-weekList"},t.map(m)));var i};class v extends a.Component{render(){const{months:e,getRef:t}=this.props;return(0,a.h)("div",{ref:t,className:"calendar-body"},e.map(f))}}const g=({heading:e,scrollTop:t,months:s,getCalendarBodyRef:i,...n})=>(0,a.h)("div",(0,o.default)({className:"calendar"},n),(0,a.h)("div",{className:"calendar-headingText",dangerouslySetInnerHTML:{__html:e||"Дата публикации"}}),(0,a.h)("ul",{className:"calendar-header",style:u(t)},["Пн","Вт","Ср","Чт","Пт","Сб","Вс"].map(p)),(0,a.h)(v,{getRef:i,months:s}));class b extends a.Component{constructor(e){super(e),this.state={scrollTop:0},this.onCalendarScroll=this.onCalendarScroll.bind(this),this.months=(0,l.markEngaged)((0,l.generateMonths)(new Date),(0,l.omitSelectedDate)(e.engagedDates,e.id))}componentDidMount(){this.calendarBody.addEventListener("scroll",this.onCalendarScroll)}componentWillUnmount(){this.calendarBody.removeEventListener("scroll",this.onCalendarScroll)}onCalendarScroll(){const{scrollTop:e}=this.calendarBody;this.setState({scrollTop:e})}render(){return(0,a.h)(g,{heading:this.props.heading,scrollTop:this.state.scrollTop,months:this.months,getCalendarBodyRef:e=>this.calendarBody=e})}}
2t.default=(0,n.connect)(({soviet:{id:e,engagedDates:t,publishAt:s}})=>({engagedDates:t,publishAt:s,id:e}))(b)},55041:function(e,t,s){"use strict";var i=s(24994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=s(76148),o=s(70753),n=i(s(32485)),r=s(76604),l=s(63229);const c=(e,t,s)=>({is__engaged:t,is__selected:s===e}),d=e=>(e=>e.toISOString())((0,l.setTimeToMidnightByMoscow)((0,l.removeTimezoneOffset)(new Date(e)))),h=e=>e.preventDefault(),u={setPublishAt:r.setPublishAt};t.default=(0,o.connect)(({soviet:{publishAt:e}})=>({publishAt:e}),u)(({date:e,setPublishAt:t,publishAt:s})=>(0,a.h)("div",{onMouseDown:h,onClick:()=>!e.isEngaged&&t(d(e.date)),className:(0,n.default)("calendar-day",c(d(e.date),e.isEngaged,d(s)))},e.date.getDate()))},3687:function(e,t,s){"use strict";var i=s(24994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=i(s(93652)),o=s(38757),n=s(65448),r=s(5238);const l=(0,o.lowerify)(n.monthsParentalCaseList).join("|"),c=(0,o.lowerify)(n.shortMonths).join("|"),d=e=>`${String(e.getDate()).padStart(2,"0")}.${String(e.getMonth()+1).padStart(2,"0")}.${e.getFullYear()}`,h=e=>`${String(e.getDate()).padStart(2,"0")}.${String(e.getMonth()+1).padStart(2,"0")}`,u=e=>(0,r.birmanize)(e,{format:"fullMonthDateYearOnly"}),p=e=>(0,r.birmanize)(e,{format:"fullMonthDateOnly"}),m=e=>(0,r.birmanize)(e,{format:"dateYearOnly"}),f=e=>(0,r.birmanize)(e,{format:"dateOnly"});t.default=(e,t)=>{const s=new Date(e);if(!t)return m(s);const i={"^([0]?[1-9]|[12]\\d|3[01])\\.([0]?[1-9]|1[0-2])\\.(\\d{4})$":d,"^([0]?[1-9]|[12]\\d|3[01])\\.([0]?[1-9]|1[0-2])$":h,[`^([0]?[1-9]|[12]\\d|3[01])[ | ](${l})$`]:p,[`^([0]?[1-9]|[12]\\d|3[01])[ | ](${l})[ | ](\\d{4})$`]:u,[`^([0]?[1-9]|[12]\\d|3[01])[ | ](${c})$`]:f,[`^([0]?[1-9]|[12]\\d|3[01])[ | ](${c})[ | ](\\d{4})$`]:m};return(0,a.default)(i,t,s)||m(s)}},65448:function(e,t,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.unifyEngagedDates=t.shortMonths=t.omitSelectedDate=t.monthsParentalCaseList=t.months=t.markEngaged=t.isDateEngaged=t.groupMonthByWeeks=t.generateMonths=t.generateMonth=t.datify=void 0;const{addTimezoneOffset:i}=s(63229);class a{constructor(e,t){this.start=e,this.end=t}}const o=t.shortMonths=["Янв","Фев","Мар","Апр","Май","Июн","Июл","Авг","Сен","Окт","Ноя","Дек"],n=(t.months=["Январь","Февраль","Март","Апрель","Май","Июнь","Июль","Август","Сентябрь","Октябрь","Ноябрь","Декабрь"],t.monthsParentalCaseList=["Января","Февраля","Марта","Апреля","Мая","Июня","Июля","Августа","Сентября","Октября","Ноября","Декабря"],e=>o[e]),r=e=>e?e-1:6,l=e=>Math.abs(Math.ceil((e.getDate()-1-r(e.getDay()))/7)),c=(e,t)=>{const s=new Date(e);return s.setDate(s.getDate()+t),s},d=(e,t)=>{const s=new Date(e,t,1),i=new Date(e,t+1,0);return(e=>{const t=[];let s=e.start;for(;s<=e.end;)t.push(new Date(s)),s=c(s,1);return t})(new a(s,i))};t.generateMonth=d;const h=e=>{let t=[];return e.forEach(e=>{const s=l(e);t[s]=[...t[s]||[],e]}),t};t.groupMonthByWeeks=h;const u=e=>({name:n(e%12),isJanuary:e%12==0,weeks:h(d((new Date).getFullYear(),e))});t.generateMonths=e=>{const t=e.getMonth(),s=e.getMonth()+3,i=l(e),a=r(e.getDay());var o,n;const c=((e,t,s)=>{const i=e.slice();return i[0].weeks[t]=i[0].weeks[t].filter(e=>r(e.getDay())>=s),i[0].weeks=i[0].weeks.slice(t),i})((o=t,n=s,[...Array(n-o).keys()].map(e=>e+o)).map(u),i,a);return c};const p=(e,t)=>e.weeks.map(e=>e.map(t)),m=(e,t)=>Boolean(e.find(e=>{return i=t,(s=e).getFullYear()===i.getFullYear()&&s.getMonth()===i.getMonth()&&s.getDate()===i.getDate();var s,i}));t.isDateEngaged=m,t.markEngaged=(e,t)=>e.map(e=>({...e,weeks:p(e,e=>({date:e,isEngaged:m(t,e)}))}));const f=e=>new Date(e);t.datify=f;const v=e=>e.map(f).map(i);t.unifyEngagedDates=v,t.omitSelectedDate=(e,t)=>{const s=Object.keys(e).reduce((s,i)=>e[i]!==t?[...s,i]:s,[]);return v(s)}},93652:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,t.default=(e,t,s)=>Object.keys(e).reduce((i,a)=>new RegExp(a).test(t)&&e[a](s)||i,null)},63229:function(e,t,s){"use strict";
2Object.defineProperty(t,"__esModule",{value:!0}),t.setTimeToMidnightByMoscow=t.removeTimezoneOffset=t.moscowifyLocal=t.moscowify=t.datify=t.addTimezoneOffset=void 0;const{populateTimeZones:i,findTimeZone:a,getUTCOffset:o}=s(81345);i(s(57839));const n=a("Europe/Moscow"),r=e=>60*-o(e,n).offset*1e3,l=e=>60*e.getTimezoneOffset()*1e3;t.datify=e=>new Date(e);const c=e=>new Date(e.getTime()+l(e));t.addTimezoneOffset=c,t.removeTimezoneOffset=e=>new Date(e.getTime()-l(e));const d=e=>((e,t)=>new Date(e.getTime()+t))(e,r(e));t.moscowify=d,t.moscowifyLocal=e=>d(c(e)),t.setTimeToMidnightByMoscow=e=>new Date(Date.UTC(e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate(),0,0,0)-r(e))},96081:function(e,t,s){"use strict";var i=s(24994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=s(76148),o=i(s(25401));class n extends o.default{constructor(e){super(e),this.className="challengeBanner",this.state.pickedCourse=this.props.challenge}renderCourseDiscountMessage(){return(0,a.h)("span",{class:"educenterCoursesSpacer-discount bureausans",dangerouslySetInnerHTML:{__html:"<nobr>🎁Призы и бонусы!</nobr> "}})}}t.default=n},59478:function(e,t,s){"use strict";var i=s(24994)(s(96081));$(".js__challengeBanner").each(function(){$(this).reactify(i.default,$(this).data())})},65559:function(e,t,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=s(76148);class a extends i.Component{constructor(e){super(e)}render(){const{pathname:e}=window.location,t=e?encodeURIComponent(btoa(e)):"",s=t?`tg://resolve?domain=bureauChatBot&start=${t}`:"tg://resolve?domain=bureauChatBot";return(0,i.h)("div",{className:"chatButton",ref:this.props.buttonRef},(0,i.h)("div",{className:"chatButton-inner"},(0,i.h)("a",{href:s,className:"chatButton-button novisited no-u",target:"_blank"},"🗩")))}}t.default=a},92632:function(e,t,s){"use strict";var i=s(24994)(s(65559));document.querySelectorAll(".js__chatButton").forEach(e=>{const t=$(e),s=JSON.parse(t.attr("data-options"));t.reactify(i.default,s)})},6526:function(e,t,s){"use strict";var i=s(24994)(s(85233));Array.from(document.querySelectorAll("pre code:not(.hljs)")).forEach(e=>i.default.highlightElement(e))},9441:function(e,t,s){"use strict";var i=s(24994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=s(76148),o=i(s(94634)),n=s(43772),r=i(s(32485));class l extends a.Component{get isUpgrade(){return!!this.props.prices.specialOffer}render(){const e=(0,r.default)("collecturePrice module",{is__strikedOut:this.isUpgrade});return(0,a.h)("div",null,this.props.isCompact&&(0,a.h)(n.CollecturePricingCompactView,(0,o.default)({},this.props,{isUpgrade:this.isUpgrade})),!this.props.isCompact&&(0,a.h)(n.CollecturePricingFullView,(0,o.default)({},this.props,{isUpgrade:this.isUpgrade,className:e})))}}t.default=l},35494:function(e,t,s){"use strict";var i=s(24994)(s(9441));const a=window.productSubscription||{};a&&$(".js__collecturePricing").each(function(){const e=a.subscription.product_id,t=a.prices||{},s=$(this).data("options")||$(this).data()||{},o={productId:e,prices:t,isCompact:"compact"===s.view,hasCaption:s.hasCaption||!1};$(this).reactify(i.default,o),$(this).children().unwrap()})},75026:function(e,t,s){"use strict";var i=s(86019);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=s(76148),o=s(44960),n=s(45169);class r extends a.Component{get hasCompactCaption(){return this.props.hasStickyOrderButton}get isUpgrade(){return!!this.props.prices.specialOffer}get captionText(){const{upgradePeriod:e,subscriptionPeriod:t}=this.props.prices,s=this.isUpgrade?"Upgrade"+e:t;return i.t(`collectures.pricing.subscriptionFooter.captionCompact${s}`)}render(){return(0,a.h)("div",{className:"productSubscription-footer"},(0,a.h)(n.Caption,{html:this.captionText}),(0,a.h)(o.StickyOrderButtonBottom,null))}}t.default=r},80827:function(e,t,s){"use strict";var i=s(24994)(s(75026));const a=window.productSubscription||{};a&&$(".js__collecturePricingFooter").each(function(){const e={productId:a.subscription.product_id,prices:a.prices||{},isCompact:"compact"===($(this).data("options")||{}).view};$(this).reactify(i.default,e),$(this).children().unwrap()})},43772:function(e,t,s){"use strict";var i=s(24994);
2Object.defineProperty(t,"__esModule",{value:!0}),t.CollecturePricingFullView=t.CollecturePricingCompactView=void 0;var a=s(76148),o=i(s(79250)),n=i(s(9877));t.CollecturePricingFullView=e=>(0,a.h)("div",{className:"module"},(0,a.h)(o.default,e),e.isUpgrade&&(0,a.h)(n.default,e)),t.CollecturePricingCompactView=e=>(0,a.h)("div",null,!e.isUpgrade&&(0,a.h)(o.default,e),e.isUpgrade&&(0,a.h)(n.default,e))},79250:function(e,t,s){"use strict";var i=s(86019),a=s(24994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){const t=this.props.prices.subscriptionPeriod,s=i.t(`collectures.pricing.subscriptionFooter.caption${t}`);return(0,o.h)("div",{className:e.className},(0,o.h)(r.Heading3,null,i.t("collectures.pricing.title")),(0,o.h)(n.default,{prices:e.prices,smallUnits:!0,hasCompactUnitsView:!0}),e.hasCaption&&(0,o.h)(r.Caption,{html:s}))};var o=s(76148),n=a(s(44445)),r=s(45169)},9877:function(e,t,s){"use strict";var i=s(86019),a=s(24994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=s(76148),n=a(s(54032)),r=s(45169);class l extends o.Component{get hasOtherLectures(){return this.props.prices.specialOffer.ownedLectures.length>0}get hasOtherCollectures(){return this.props.prices.specialOffer.ownedCollectures.length>0}get hasOtherLecturesAndCollectures(){return this.hasOtherLectures&&this.hasOtherCollectures}get titleText(){let e=this.hasOtherLectures?"lectures":"collectures";return this.hasOtherLecturesAndCollectures&&(e="lecturesAndCollectures"),i.t(`collectures.pricing.titleUpgradeFor.${e}`)}get captionText(){const{upgradePeriod:e}=this.props.prices,t="Upgrade"+e;return i.t(`collectures.pricing.subscriptionFooter.caption${t}`)}render(){return(0,o.h)("div",{className:"collecturePrice"},(0,o.h)(r.Heading3,null,this.titleText),(0,o.h)(n.default,{product:"collecture",prices:this.props.prices,size:"title"}),this.props.hasCaption&&(0,o.h)(r.Caption,{html:this.captionText}))}}t.default=l},44960:function(e,t,s){"use strict";var i=s(86019);Object.defineProperty(t,"__esModule",{value:!0}),t.StickyOrderButtonBottom=void 0;var a=s(76148);t.StickyOrderButtonBottom=()=>(0,a.h)("button",{className:"js__stickyButtonDouble js__stickyButtonBottomEdge stickyButton-double"},i.t("subscription.subscription"))},347:function(e,t,s){"use strict";var i=s(24994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=s(76148),o=s(27384),n=i(s(88173)),r=i(s(72748)),l=i(s(41437)),c=i(s(15024)),d=s(2090);class h extends a.Component{constructor(e){super(e),this.state={prices:{}},this.href=(0,d.collectureHref)(e.id)}componentDidMount(){this.fetch()}fetch(){(0,c.default)(this.props.id).then(e=>{this.setState({prices:e,hasSpecialOffer:e.specialOffer&&e.specialOffer.oneTime})}).catch(e=>console.error(e))}render(){return this.state.prices.default?(0,a.h)(o.Cols,{className:"collectureSpacer",transposeOnMobile:!0},(0,a.h)(r.default,{className:"collectureSpacer-cover",id:this.props.id,href:this.href}),(0,a.h)(n.default,{className:"collectureSpacer-title",id:this.props.id,href:this.href}),(0,a.h)(l.default,{className:"collectureSpacer-pricing",isUpgrade:this.state.hasSpecialOffer,prices:this.state.prices,href:this.href})):null}}t.default=h},70500:function(e,t,s){"use strict";var i=s(24994)(s(347));$(".js__collectureSpacer").each((e,t)=>{const s=$(t);s.reactify(i.default,s.data())})},72748:function(e,t,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=s(76148),a=s(66192);t.default=e=>{const t={desktop:[255,109],laptop:[128,109],mobile:[335,132]};return(0,i.h)("a",{href:e.href,className:"collectureSpacer-cover is__fitToContent doubleHover no-u"},["desktop","laptop","mobile"].map(s=>(0,i.h)(a.Image,{className:`device device__${s}`,src:`/assets/images/spacers/collectures/collectureSpacer/${e.id}-${s}.png`,size:t[s]})))}},82991:function(e,t,s){"use strict";var i=s(86019);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=s(76148),o=s(45169),n=s(73345),r=s(77817);t.default=e=>{const{isUpgrade:t,prices:s}=e,l=i.t(`subscription.subscriptionUnits_${s.renewalPeriod}`);
2return(0,a.h)(o.Caption,null,t&&(0,a.h)("span",null,(0,a.h)("s",{className:"is__crossedOut"},(0,n.formatPrice)(s.specialOffer.previousOneTime)),(0,a.h)("span",{className:"is__highlight"},` ${(0,n.formatPrice)(s.specialOffer.oneTime)}`,r.THINSP,i.t(`subscription.defaultUnits_${s.upgradePeriod}`))),!t&&(0,a.h)("span",null,(0,n.formatPrice)(s.previousOneTime)),`, затем ${(0,n.formatPrice)(s.subscription)} ${l}`)}},41437:function(e,t,s){"use strict";var i=s(24994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=s(76148),o=i(s(44445)),n=i(s(54032)),r=i(s(82991)),l=s(2090);t.default=e=>(0,a.h)("div",{className:"collectureSpacer-pricing"},(0,a.h)("div",{className:"device desktop"},!e.isUpgrade&&(0,a.h)(o.default,{prices:e.prices,size:"pageTitle",unitsSize:"heading"}),e.isUpgrade&&(0,a.h)(n.default,{product:"collecture",prices:e.prices,unitsSize:"heading"})),(0,a.h)("div",{className:"device laptop"},!e.isUpgrade&&(0,a.h)(o.default,{prices:e.prices,unitsSize:"medium",size:"title",hasCompactUnitsView:!0}),e.isUpgrade&&(0,a.h)(n.default,{product:"collecture",prices:e.prices,size:"title",unitsSize:"medium"})),(0,a.h)("div",{className:"device mobile"},(0,a.h)(r.default,e),(0,a.h)(l.CollectureSpacerLink,{href:e.href,isSmall:!0})))},88173:function(e,t,s){"use strict";var i=s(86019);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=s(76148),o=s(45169),n=s(2090),r=s(73345);const l=e=>{const t=e.device?(0,r.capitalize)(e.device):"";return(0,a.h)("div",{className:e.className},(0,a.h)("b",{className:"heading"},i.t(`collectures.spacer.${e.collectureId}.title${t}`)),(0,a.h)("br",null),(0,a.h)("span",null,i.t(`collectures.spacer.${e.collectureId}.description${t}`)+" "),(0,a.h)(n.CollectureSpacerLink,{href:e.href,isInline:!0}))};t.default=e=>{const t=e.id.replace(/(collecture)-/,"");return(0,a.h)("div",{className:"collectureSpacer-title"},(0,a.h)("a",{href:e.href,className:"doubleHover no-u"},(0,a.h)(l,{className:"device desktop",collectureId:t}),(0,a.h)(l,{className:"device laptop",collectureId:t,device:"laptop"}),(0,a.h)("div",{className:"device mobile"},(0,a.h)(o.Caption,null,(0,a.h)("b",null,i.t(`collectures.spacer.${t}.title`))))))}},2090:function(e,t,s){"use strict";var i=s(86019),a=s(24994);Object.defineProperty(t,"__esModule",{value:!0}),t.collectureHref=t.CollectureSpacerLink=void 0;var o=s(76148),n=a(s(94634)),r=s(15011),l=a(s(28436));t.collectureHref=e=>`/lectures/${e}/?utm_source=${(0,r.utmSource)({platform:"Сайт бюро",postType:"Банер",productType:"Лекции",product:e,postDate:new Date})}`,t.CollectureSpacerLink=e=>(0,o.h)(l.default,(0,n.default)({},e,{isNoVisited:!0,isDoubleHover:!0,text:i.t("collectures.spacer.link"),isSmall:e.isSmall,isInline:e.isInline}))},30330:function(e,t,s){"use strict";var i=s(24994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=s(76148),o=i(s(94634));t.default=e=>(0,a.h)("div",(0,o.default)({},e,{className:`col module ${e.className?e.className:""}`}),(0,a.h)("div",{className:"col-in module"},e.children))},9769:function(e,t,s){"use strict";var i=s(24994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=s(76148),o=i(s(32485));t.default=e=>{const t=e.className||"";let s=(0,o.default)("cols","module","grid__column",{is__transposeOnMobile:e.transposeOnMobile,is__ribbed:e.isRibbed||e.ribMask,is__ribbedOnMobile:e.isRibbed||e.mobileRibMask},t.split(" "));return(0,a.h)("div",{className:s},(e=>e.children.map((t,s)=>{var i,n,r;let l=1,c={};const d=((null==t||null===(i=t.props)||void 0===i?void 0:i.className)||(null==t||null===(n=t.attributes)||void 0===n?void 0:n.className)||(null==t||null===(r=t.attributes)||void 0===r?void 0:r.class)||"").split(" ").map(e=>`${e}Wrapper`),h=(0,o.default)("col","module",{has__noRib:e.ribMask&&!e.ribMask[s],has__noMobileRib:e.mobileRibMask&&!e.mobileRibMask[s]},d);return e.divisionProportions&&(l=e.divisionProportions.split(":")[s],Object.assign(c,{"flex-grow":l})),(0,a.h)("div",{className:h,style:c},(0,a.h)("div",{className:"col-in module"},t))}))(e))}},27384:function(e,t,s){"use strict";var i=s(24994);
2Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"Col",{enumerable:!0,get:function(){return o.default}}),Object.defineProperty(t,"Cols",{enumerable:!0,get:function(){return a.default}});var a=i(s(9769)),o=i(s(30330))},48821:function(e,t,s){"use strict";var i=s(24994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=s(76148),o=i(s(20681)),n=i(s(83821)),r=s(5327);class l extends a.Component{constructor(e){super(e),this.state={isEditable:!1},this.handleEditableToggle=this.handleEditableToggle.bind(this)}applyScrollPositionCorrection(e){requestAnimationFrame(()=>{if(!this.base)return;const t=this.base.getBoundingClientRect().bottom-e;t&&window.scrollBy(0,t)})}createScrollPositionCorrection(){if(!(0,r.shouldCorrectScrollPosition)(this.base))return null;const e=this.base.getBoundingClientRect().bottom;return()=>this.applyScrollPositionCorrection(e)}handleEditableToggle(e){this.setState({isEditable:e},this.createScrollPositionCorrection())}render(e){return this.state.isEditable&&!e.isDefaultView?(0,a.h)(n.default,{comment:e.comment,commentableSubject:e.commentableSubject,moderationNote:e.moderationNote,toggleEditable:this.handleEditableToggle,onAfterEdit:e.onAfterEdit}):(0,a.h)(o.default,{comment:e.comment,commentableSubject:e.commentableSubject,toggleEditable:this.handleEditableToggle,isDefaultView:e.isDefaultView,onStatusUpdate:e.onStatusUpdate,onFeaturedToggle:e.onAfterEdit})}}t.default=l},23891:function(e,t,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=s(76148),a=s(73345),o=s(66192);const n=({englishName:e,children:t})=>e?(0,i.h)("a",{href:`/burosfera/${e}/`,name:e,className:"module doubleHover"},t):{children:t};t.default=({author:{name:e,englishName:t,avatarUrl:s}})=>{if(s)return(0,i.h)(n,{englishName:t},(0,i.h)(o.Image,{className:"comment-avatar",src:s,size:[126,126],loading:"lazy"}));const r=!e.includes(",");return(0,i.h)(n,{englishName:t},(0,i.h)("div",{className:"comment-avatar no__image"},(0,i.h)("div",{className:"comment-avatarInitialsWrapper"},(0,i.h)("div",{className:"comment-avatarInitials"},r?(0,a.toInitials)(e):""))))}},726:function(e,t,s){"use strict";var i=s(24994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=s(76148),o=i(s(70635));const n=({isAvatarVisible:e,author:{name:t,jobTitle:s,company:i,avatarUrl:n}})=>{return(0,a.h)("div",{className:"comment-authorInner"},e&&(0,a.h)(o.default,{isActive:!0,name:t,src:n}),(0,a.h)("div",{className:"comment-authorDetails"},(0,a.h)("span",{className:"comment-authorName"},t),s&&(0,a.h)("span",{className:"comment-authorJobTitle"},`, ${r=s,r?r.slice(0,2)===r.slice(0,2).toUpperCase()?r:r.charAt(0).toLowerCase()+r.slice(1):r}`),i&&(0,a.h)("span",{className:"comment-authorCompany"},`, ${i}`)));var r};t.default=e=>{const{author:{englishName:t}}=e;return t?(0,a.h)("a",{href:`/burosfera/${t}/`,name:t,className:"module comment-author no-u doubleHover"},(0,a.h)(n,e)):(0,a.h)("div",{className:"module comment-author"},(0,a.h)(n,e))}},83821:function(e,t,s){"use strict";var i=s(24994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=s(76148),o=i(s(94634)),n=i(s(43631)),r=i(s(32485)),l=i(s(22443)),c=i(s(44386)),d=s(38757),h=s(73345),u=s(5238),p=s(67697),m=s(27384),f=s(45169),v=s(52630),g=i(s(12177)),b=s(92445),_=i(s(58172)),y=i(s(80978)),S=i(s(91390));class w extends a.Component{constructor(e){super(e),this.state={name:e.comment.authorName,email:e.comment.authorEmail,company:e.comment.authorCompany,jobTitle:e.comment.authorJobTitle,body:e.comment.body,status:e.comment.status,isValid:!1,isSent:!1,hasError:!1,attachmentUrl:e.comment.imageUrl,isAttachmentDeleted:!1},this.isCommentAuthorAuthenticated=!!e.comment.sovietUsername,this.isEditable=!this.isCommentAuthorAuthenticated||!(0,c.default)(e.comment.name),this.validityStates=this.isCommentAuthorAuthenticated?{}:{name:!1,email:!1},this.handleInput=this.handleInput.bind(this),this.handleAuthorFieldsetEdit=this.handleAuthorFieldsetEdit.bind(this),this.displayAttachment=this.displayAttachment.bind(this),this.deleteAttachment=this.deleteAttachment.bind(this),this.submit=this.submit.bind(this),this.onInputValidityChange=this.onInputValidityChange.bind(this),this.handleFetchError=this.handleFetchError.bind(this),this.finishEditing=this.finishEditing.bind(this)}get isValid(){return this.state.body&&this.state.body.trim()&&Object.keys(this.validityStates).every(e=>this.validityStates[e])}get isDisabled(){return!this.isValid||this.state.isLoading}componentDidMount(){this.textarea.focus({preventScroll:!0}),this.textarea.setSelectionRange(0,0)}handleInput(e){this.setState({body:e.target.value,isValid:this.isValid,hasError:!1})}handleAuthorFieldsetEdit({name:e=this.state.name,email:t=this.state.email}){this.setState({name:e,email:t})}displayAttachment(){if(!this.fileInput||!this.fileInput.files)return;const{files:e}=this.fileInput,t=e[0];
2(0,b.readAsDataURL)(t).then(e=>this.setState({attachmentUrl:e}))}deleteAttachment(){this.fileInput&&(this.fileInput.value=""),this.setState({attachmentUrl:"",isAttachmentDeleted:!0})}onInputValidityChange(e,t){this.validityStates[e]=t,this.setState({isValid:this.isValid,hasError:!1})}submit(e){if(this.setState({isLoading:!0,hasError:!1}),e.created_at){const t=(0,d.parseDate)(e.created_at);if(t.isValid){const s=(0,u.mergeDateWithTime)(t.value,this.props.comment.createdAt,{useUtc:!1});e.created_at=s.toISOString()}}this.submitToServer(e)}submitToServer(e){const t=`/commentables/${encodeURIComponent(this.props.commentableSubject)}/comments/${this.props.comment.id}/`,s={...l.default,Accept:"application/json"},i=this.toFormData(e);fetch(t,{method:"PATCH",headers:s,body:i}).then(e=>{if(!e.ok)throw Error(e.statusText);this.handleSuccessfullySentComment()}).catch(this.handleFetchError)}toFormData(e){let t=new FormData;return Object.keys(e).forEach(s=>{const i=["email","name","company","job_title"].includes(s)?`author_${s}`:s;t.append(`comment[${i}]`,e[s])}),t.append("comment[status]",this.state.status),this.fileInput&&this.fileInput.files&&this.fileInput.files.length&&t.append("comment_image",this.fileInput.files[0]),this.state.isAttachmentDeleted&&t.append("comment_image",""),t}handleSuccessfullySentComment(){this.setState({isSent:!0,body:""}),this.finishEditing(),this.props.onAfterEdit()}handleFetchError(){this.setState({hasError:!0,isLoading:!1})}finishEditing(){this.props.toggleEditable(!1)}render(e){const t=e.comment,s={disabled:this.isDisabled?"disabled":""},i=(0,r.default)("commentForm",{is__loading:this.state.isLoading}),l=`comment-${t.id}-created-at`,c=t.createdAt?(0,h.birmanize)(t.createdAt,{format:"dateYearOnly"}):"",d=`comment-${t.id}-author-avatar-url`,u=`comment-${t.id}-body`;return(0,a.h)("div",{className:"module comment is__edit",id:`comment-${t.id}`},(0,a.h)(m.Cols,{className:"is__transposeOnMobile",divisionProportions:"11:1:4"},(0,a.h)(p.Form,{className:i,onSubmit:this.submit},(0,a.h)(_.default,{commentId:t.id,author:{name:t.authorName,email:t.authorEmail,avatarUrl:t.authorAvatarUrl},isAuthenticated:this.isCommentAuthorAuthenticated}),this.isEditable&&(0,a.h)(y.default,{author:this.state,onEdit:this.handleAuthorFieldsetEdit,onValidityChange:this.onInputValidityChange,disableEmailValidation:!0}),(0,a.h)("div",{className:"commentForm-fieldset"},(0,a.h)(m.Cols,{className:"formRow is__transposeOnMobile",divisionProportions:"3:9"},(0,a.h)("div",{className:"formLabel commentForm-createdAtLabel"},(0,a.h)("label",{htmlFor:l},"Дата")),(0,a.h)("div",null,(0,a.h)(p.FormInput,{className:"is__fullWidth",id:l,name:"created_at",type:"text",initialValue:c}))),(0,a.h)(m.Cols,{className:"formRow is__transposeOnMobile",divisionProportions:"3:9"},(0,a.h)("div",{className:"formLabel commentForm-authorAvatarLabel"},(0,a.h)("label",{htmlFor:d},"Ссылка на фото")),(0,a.h)("div",null,(0,a.h)(p.FormInput,{className:"is__fullWidth",id:d,name:"new_author_avatar_url",type:"text"})))),(0,a.h)("div",{className:"formLabel"},(0,a.h)("label",{htmlFor:u},"Комментарий")),(0,a.h)("div",{className:"formTextarea-wrapper commentForm-textWrapper"},(0,a.h)(n.default,{inputRef:e=>this.textarea=e,id:u,name:"body",className:"formTextarea",value:this.state.body,onInput:this.handleInput})),this.state.attachmentUrl&&(0,a.h)("div",{className:"commentForm-attachment is__position",style:{backgroundImage:`url(${this.state.attachmentUrl})`}},(0,a.h)(g.default,{onClick:this.deleteAttachment})),(0,a.h)("footer",{className:"commentForm-footer"},(0,a.h)("span",{className:"commentForm-submitWrapper"},(0,a.h)("button",(0,o.default)({className:"button is__enlargedOnMobiles",type:"submit"},s),"Сохранить")),(0,a.h)("button",{className:"commentForm-cancelButton",onClick:this.finishEditing},"Отменить"),this.state.hasError&&(0,a.h)("div",{className:"commentForm-error"},(0,a.h)(f.Caption,{className:"error"},"Ошибка отправки. Попробуйте ещё раз")),(0,a.h)("div",{className:"commentForm-attach attach"},(0,a.h)(v.AttachmentIconWithHover,null),(0,a.h)("input",{ref:e=>this.fileInput=e,type:"file","aria-label":"Прикрепить изображение",name:"attachment",onChange:this.displayAttachment,accept:"image/jpeg,image/png,image/gif"})))),(0,a.h)("div",null),e.moderationNote?(0,a.h)(S.default,{note:e.moderationNote}):(0,a.h)("div",null)))}}t.default=w},90350:function(e,t,s){"use strict";var i=s(24994);
2Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=s(76148),o=s(73345),n=s(45169),r=i(s(56457));class l extends a.Component{constructor(e){super(e),this.approve=this.approve.bind(this),this.sink=this.sink.bind(this),this.unsink=this.unsink.bind(this)}approve(){this.props.updateStatus("approved","justApproved")}sink(){this.props.updateStatus("sunk")}unsink(){this.props.updateStatus("new")}render(e){const{comment:t,status:s,featured:i,isDefaultView:l}=e;if("justApproved"===s)return(0,a.h)("footer",{className:"comment-footer"},(0,a.h)(n.Caption,null,"Опубликован"));const c="approved"===s,d="sunk"===s,h=t.impressionSummary||{};return(0,a.h)("footer",{className:"comment-footer"},c&&(0,a.h)(r.default,{impressionSubject:t.impressionSubject,selected:h.selected,helpful:h.helpful,useless:h.useless,mod:"small"}),!c&&(0,a.h)("button",{className:"comment-approveButton button is__thin is__small",onClick:this.approve},"Разрешить"),(0,a.h)(n.Caption,{className:"comment-date"},(0,o.birmanize)(t.createdAt,{format:"dateYearOnly"})),!l&&(0,a.h)("div",{className:"comment-actions"},(0,a.h)("button",{className:"comment-actionButton",onClick:this.props.edit},"✎"),(0,a.h)("button",{className:"comment-actionButton",onClick:this.props.toggleFeatured},i?"★":"☆"),d?(0,a.h)("button",{className:"comment-actionButton",onClick:this.unsink},"↺"):(0,a.h)("button",{className:"comment-actionButton",onClick:this.sink},"🗑")))}}t.default=l},20681:function(e,t,s){"use strict";var i=s(24994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=s(76148),o=i(s(32485)),n=i(s(87021)),r=i(s(5634)),l=i(s(22046)),c=i(s(726)),d=i(s(23891)),h=i(s(90350)),u=s(66192),p=s(27384);class m extends a.Component{constructor(e){super(e);const{status:t,featured:s}=e.comment;this.state={status:t,featured:s},this.updateStatus=this.updateStatus.bind(this),this.toggleFeatured=this.toggleFeatured.bind(this)}componentDidMount(){$(this.wrapperRef).find(".doubleHover").each(function(){new l.default($(this))})}componentDidUpdate(e){const t=e.comment.status,{status:s}=this.props.comment;s!==t&&this.setState({status:s})}updateStatus(e,t=e){this.setState({status:t}),this.update({status:e})}toggleFeatured(){const e=!this.state.featured;this.setState({featured:e}),this.update({featured:e})}update(e){const t=this.state.status,{comment:s,commentableSubject:i,onFeaturedToggle:a,onStatusUpdate:o}=this.props,r=encodeURIComponent(i);fetch(`/commentables/${r}/comments/${s.id}/`,{method:"PATCH",headers:n.default,body:JSON.stringify(e)}).then(s=>{s.ok||this.setState({status:t}),"featured"in e?a():o()}).catch(e=>console.error(e))}buildCommentTextHTML({body:e}){return{__html:(0,r.default)({body:e,$:$})}}extractAuthorFrom(e){let t={};return Object.keys(e).forEach(s=>{if(s.includes("author")){let i=s.replace("author","");i=i.charAt(0).toLowerCase()+i.slice(1),t[i]=e[s]}}),t}render(e){const{comment:t,isDefaultView:s}=e,i=this.extractAuthorFrom(t),{status:n,featured:r}=this.state,l=(0,o.default)("module","comment","textBox",`is__${n}`);return(0,a.h)("div",{className:l,id:`comment-${t.id}`,ref:e=>this.wrapperRef=e},(0,a.h)(p.Cols,{className:"comment-cols",divisionProportions:"2:14"},(0,a.h)(d.default,{author:i}),(0,a.h)("div",null,(0,a.h)("div",{className:"module comment-body"},(0,a.h)(c.default,{author:i,isAvatarVisible:!0}),(0,a.h)("div",{className:"comment-text",dangerouslySetInnerHTML:this.buildCommentTextHTML(t)}),t.imageUrl&&(0,a.h)(u.Image,{src:t.imageUrl,size:t.imageSize,className:"comment-asset",bordered:!0}
2)),(0,a.h)(h.default,{comment:t,isDefaultView:s,status:n,featured:r,updateStatus:this.updateStatus,toggleFeatured:this.toggleFeatured,edit:()=>this.props.toggleEditable(!0)}))))}}t.default=m},5327:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.shouldCorrectScrollPosition=void 0,t.shouldCorrectScrollPosition=e=>{const t=(e=>{let t=e;for(;t&&t!==document.body&&t.parentElement;){if(t.previousElementSibling)return t.previousElementSibling;t=t.parentElement}return null})(e);return!t||t.getBoundingClientRect().bottom<0}},32488:function(e,t,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=s(76148),a=s(67697),o=s(27384);class n extends i.Component{constructor(e){super(e),this.handleInput=this.handleInput.bind(this)}handleInput({value:e}){this.props.onEdit({name:e})}render(e){const{id:t,name:s,value:n,placeholder:r,required:l,label:c}=e,d=e.type||"text",h=`${t||"new"}-${s}`;return(0,i.h)(o.Cols,{className:"formRow is__transposeOnMobile",divisionProportions:"3:9"},(0,i.h)("div",{className:`formLabel commentForm-${s}Label`},(0,i.h)("label",{htmlFor:h},c)),(0,i.h)("div",null,(0,i.h)(a.FormInput,{className:"is__fullWidth",id:h,name:s,type:d,initialValue:n,placeholder:r,onInput:this.handleInput,onValidityChange:e.onValidityChange,required:l})))}}t.default=n},80978:function(e,t,s){"use strict";var i=s(24994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=s(76148),o=i(s(32485)),n=i(s(32488)),r=i(s(68380));class l extends a.Component{constructor(e){super(e)}render({isAuthenticated:e,onEdit:t,onValidityChange:s,disableEmailValidation:i,author:l}){const c=(0,o.default)("commentForm-fieldset",{is__authenticated:e});return(0,a.h)("div",{className:c},e&&l.name?(0,a.h)(r.default,{name:"name",value:l.name}):(0,a.h)(n.default,{name:"name",label:"Имя и фамилия",value:l.name,placeholder:"Обязательны полностью",onEdit:t,onValidityChange:s,required:!0}),e&&l.email?(0,a.h)(r.default,{name:"email",value:l.email}):(0,a.h)(n.default,{name:"email",label:"Эл. почта",type:i?"text":"email",value:l.email,placeholder:"Не будет опубликована",onEdit:t,onValidityChange:s,required:!0}),(0,a.h)(n.default,{name:"company",label:"Место работы",value:l.company,onEdit:t,onValidityChange:s}),(0,a.h)(n.default,{name:"job_title",label:"Должность",value:l.jobTitle,onEdit:t,onValidityChange:s}))}}t.default=l},68380:function(e,t,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=s(76148);class a extends i.Component{shouldComponentUpdate(){return!1}render({name:e,value:t}){return(0,i.h)("input",{type:"hidden",name:e,value:t})}}t.default=a},4257:function(e,t,s){"use strict";var i=s(24994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=s(76148),o=i(s(94634)),n=i(s(43631)),r=i(s(32485)),l=i(s(2733)),c=i(s(22443)),d=s(67697),h=s(27384),u=s(45169),p=s(52630),m=i(s(12177)),f=s(92445),v=s(3988),g=i(s(1997)),b=i(s(58172)),_=i(s(80978)),y=i(s(91390));const S={name:(l.default.get("name")||"").replace(/\+/g," ")||null,email:l.default.get("email")||null,jobTitle:"",company:"",body:"",attachmentUrl:"",isValid:!1,isLoading:!1,isSent:!1,hasError:!1};class w extends a.Component{constructor(e){super(e),this.author=this.prepareAuthorAttributes(window.application.user||{}),this.scope=e.commentableSubject+"/comment/draft",this.isAuthenticated=!!this.author.id,this.state=(0,v.mergeState)(S,(0,v.readState)(this.scope)),this.validityStates=this.isAuthenticated?{}:{name:!1,email:!1},this.handleBodyInput=this.handleBodyInput.bind(this),this.handleAuthorFieldsetEdit=this.handleAuthorFieldsetEdit.bind(this),this.displayAttachment=this.displayAttachment.bind(this),this.deleteAttachment=this.deleteAttachment.bind(this),this.submit=this.submit.bind(this),this.reset=this.reset.bind(this),this.onInputValidityChange=this.onInputValidityChange.bind(this),this.handleFetchError=this.handleFetchError.bind(this)}get isValid(){return this.state.body&&this.state.body.trim()&&Object.keys(this.validityStates).every(e=>this.validityStates[e])}get isDisabled(){return!this.isValid||this.state.isLoading}prepareAuthorAttributes(e){return e.jobTitle=e.profession,e.company=e.jobPlace,e}componentDidUpdate(){(0,v.persistRawState)(this.scope,{text:this.state.body})}handleBodyInput(e){this.setState({body:e.target.value,isValid:this.isValid,hasError:!1})}handleAuthorFieldsetEdit({name:e=this.state.name,email:t=this.state.email,jobTitle:s=this.state.jobTitle,company:i=this.state.company}){this.setState({name:e,email:t,jobTitle:s,company:i})}displayAttachment(){if(!this.fileInput||!this.fileInput.files)return;const{files:e}=this.fileInput,t=e[0];
2(0,f.readAsDataURL)(t).then(e=>this.setState({attachmentUrl:e},()=>$(document).trigger("appResize")))}deleteAttachment(){this.fileInput.value="",this.setState({attachmentUrl:""})}onInputValidityChange(e,t){this.validityStates[e]=t,this.setState({isValid:this.isValid,hasError:!1})}submit(e){if(!this.isValid)return;this.setState({isLoading:!0,hasError:!1});const t=this.toFormData(e),s=encodeURIComponent(this.props.commentableSubject);fetch(`/commentables/${s}/comments`,{method:"POST",headers:{...c.default,Accept:"application/json"},body:t}).then(e=>{if(!e.ok)throw Error(e.statusText);this.handleSentComment()}).catch(this.handleFetchError)}toFormData(e){let t=new FormData;return Object.keys(e).forEach(s=>{const i=["email","name","job_title","company"].includes(s)?`author_${s}`:s;t.append(`comment[${i}]`,e[s])}),this.fileInput&&this.fileInput.files&&this.fileInput.files.length&&t.append("comment_image",this.fileInput.files[0]),t}handleSentComment(){this.state.name&&l.default.set("name",this.state.name),this.state.email&&l.default.set("email",this.state.email),$(document).trigger("commentSent"),this.setState({isSent:!0,text:""})}handleFetchError(){this.setState({hasError:!0,isLoading:!1})}reset(){this.setState({...S,name:this.state.name,email:this.state.email})}render({title:e,pluralTitle:t,moderationNote:s,mod:i=""}){const{isSent:l,isLoading:c}=this.state;if(l)return(0,a.h)(g.default,{onClick:this.reset,title:e.toLowerCase()});const f=(0,r.default)("commentFormFloor is__transposeOnMobile",{is__noTopLine:i.includes("noTopLine")}),v=(0,r.default)("commentForm",{is__loading:c}),S={disabled:this.isDisabled?"disabled":""};return(0,a.h)(h.Cols,{className:f,divisionProportions:"11:1:4"},(0,a.h)(d.Form,{className:v,onSubmit:this.submit},(0,a.h)(b.default,{author:this.author,isAuthenticated:this.isAuthenticated}),(0,a.h)(_.default,{isAuthenticated:this.isAuthenticated,author:this.author,onEdit:this.handleAuthorFieldsetEdit,onValidityChange:this.onInputValidityChange}),(0,a.h)("div",{className:"formLabel"},(0,a.h)("label",{htmlFor:"new-body"},"Ваше мнение")),(0,a.h)("div",{className:"formTextarea-wrapper commentForm-textWrapper"},(0,a.h)(n.default,{id:"new-body",name:"body",className:"formTextarea",value:this.state.body,onInput:this.handleBodyInput})),this.state.attachmentUrl&&(0,a.h)("div",{className:"commentForm-attachment is__position",style:{backgroundImage:`url(${this.state.attachmentUrl})`}},(0,a.h)(m.default,{onClick:this.deleteAttachment})),(0,a.h)("footer",{className:"commentForm-footer"},(0,a.h)("span",{className:"commentForm-submitWrapper"},(0,a.h)("button",(0,o.default)({className:"button is__enlargedOnMobiles",type:"submit"},S),"Отправить")),this.state.hasError&&(0,a.h)("div",{className:"commentForm-error"},(0,a.h)(u.Caption,{className:"error"},"Ошибка отправки. Попробуйте ещё раз")),(0,a.h)("div",{className:"commentForm-attach attach"},(0,a.h)(p.AttachmentIconWithHover,null),(0,a.h)("input",{ref:e=>this.fileInput=e,type:"file","aria-label":"Прикрепить изображение",name:"attachment",onChange:this.displayAttachment,accept:"image/jpeg,image/png,image/gif"})))),(0,a.h)("div",{className:"module device device__desktop device__laptop"}),(0,a.h)(y.default,{title:t,note:s}))}}t.default=w},77126:function(e,t,s){"use strict";var i=s(24994)(s(4257));$(".js__commentForm").each(function(){$(this).reactify(i.default,$(this).data()),$(this).children().unwrap()})},58172:function(e,t,s){"use strict";var i=s(24994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=s(76148),o=i(s(44386)),n=i(s(32485)),r=i(s(70635));t.default=({commentId:e,author:t,isAuthenticated:s})=>{const{name:i,email:l,avatarUrl:c}=t,d=s&&(0,o.default)(i),h=(0,n.default)("commentForm-authorRow",{is__authenticated:d,not__authenticated:!d});return(0,a.h)("div",{className:h},(0,a.h)(r.default,{name:i,isActive:d,src:c}),d&&(0,a.h)("div",{className:"commentForm-author"},i,(0,a.h)("span",{className:"commentForm-authorEmail"},", ",(0,a.h)("a",{className:"is__masked",href:`mailto:${l}`}
2,l))),!d&&(0,a.h)("div",{className:"commentForm-author"},(0,a.h)("label",{htmlFor:`${e}-name`},"Имя и фамилия")))}},91390:function(e,t,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=s(76148),a=s(73345),o=s(45169);class n extends i.Component{shouldComponentUpdate(){return!1}render({note:e,title:t}){const s=(0,a.wrapText)($,e||`<p>${t} модерируются</p>`);return(0,i.h)("div",{className:"commentFormSidenote"},(0,i.h)(o.Sidenote,{html:s}))}}t.default=n},1997:function(e,t,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=s(76148),a=s(45169);class o extends i.Component{render(){return(0,i.h)("div",{className:"commentFormSuccessFrame bureausans"},(0,i.h)("div",null,(0,i.h)(a.Heading3,null,"Спасибо! Ваш ",this.props.title," отправлен"),(0,i.h)(a.TextNode,null,"Если он соответствует нашим условиям, то появится на сайте.")),(0,i.h)("footer",null,(0,i.h)("button",{class:"button is__enlargedOnMobiles",onClick:this.props.onClick},"Написать ещё")))}}t.default=o},10751:function(e,t,s){"use strict";var i=s(24994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=s(76148),o=i(s(87021)),n=i(s(96194)),r=s(45169),l=i(s(55588)),c=i(s(48821));const d={approved:0,new:0,sunk:0},h={all:"",new:"#comments-new",sunk:"#comments-sunk"};class u extends a.Component{constructor(e){super(e),this.state={comments:[],count:d,activeTab:"",hasFetchedComments:!1},this.isModerator=window.application.user&&(window.application.user.isStaff||window.application.user.isModerator),this.isDefaultView=!this.isModerator,this.updateLocation=this.updateLocation.bind(this),this.countComments=this.countComments.bind(this),this.refreshCommentsList=this.refreshCommentsList.bind(this),this.recountComments=this.recountComments.bind(this),this.setActiveTab=this.setActiveTab.bind(this)}componentDidMount(){this.setActiveTab(),this.refreshCommentsList(),$(window).on("popstate.comments",this.setActiveTab),this.isModerator&&$(document).on("commentSent",this.refreshCommentsList)}componentWillUnmount(){$(window).off("popstate.comments")}componentDidUpdate(e,t){this.state.hasFetchedComments!==t.hasFetchedComments&&this.scrollSelectedCommentIntoView()}scrollSelectedCommentIntoView(){const e=window.location.hash.substring(1);e&&e.length&&requestAnimationFrame(()=>{const t=document.getElementById(e)||document.getElementsByName(e)[0];t&&t.scrollIntoView()})}countComments(e){const t=e.reduce((e,t)=>(e[t.status]+=1,e),{...d});this.setState({count:t})}fetchComments(){const e=encodeURIComponent(this.props.commentableSubject);return fetch(`/commentables/${e}/comments`,{headers:o.default}).then(e=>e.json())}refreshCommentsList(){this.fetchComments().then(e=>{this.setState({hasFetchedComments:!0,comments:e.map(n.default)},()=>{this.countComments(this.state.comments),this.setNoMoreComments(this.state.comments),$(document).trigger("appResize")})}).catch(e=>console.error(e))}recountComments(){this.fetchComments().then(e=>this.countComments(e)).catch(e=>console.error(e))}setNoMoreComments(e){const t=e.filter(({status:e})=>"approved"===e),s=t.filter(({featured:e})=>e),i=t.length===s.length,a=document.querySelector(`[data-comments-subject='${this.props.commentableSubject}']`);a&&a.classList.toggle("has__no-more-comments",i)}setActiveTab(){if(this.isDefaultView)return void this.setState({activeTab:"approved"});const e=window.location.hash,t=Object.keys(h).find(t=>h[t]===e)||"all";t&&this.setState({activeTab:t})}updateLocation(e,t){window.history.pushState({},e,t),this.setActiveTab(),this.refreshCommentsList()}get isReverseOrder(){var e;return null===(e=this.props.mod)||void 0===e?void 0:e.includes("reverseOrder")}get isFeaturedFirst(){var e;return null===(e=this.props.mod)||void 0===e?void 0:e.includes("featuredFirst")}get isFeaturedOnly(){var e;return null===(e=this.props.mod)||void 0===e?void 0:e.includes("featuredOnly")}get isMenuHidden(){var e;return this.isFeaturedOnly||(null===(e=this.props.mod)||void 0===e?void 0:e.includes("noMenu"))}get isTitleHidden(){var e;return null===(e=this.props.mod)||void 0===e?void 0:e.includes("noTitle")}get isLimitApplied(){return this.props.limit}filterAndSort(e){return this.isFeaturedOnly&&(e=e.filter(e=>e.featured)),this.isReverseOrder&&e.reverse(),this.isFeaturedFirst&&e.sort((e,t)=>
2t.featured-e.featured),this.isLimitApplied&&(e=e.slice(0,this.props.limit)),e}get visibleComments(){const e=this.state.comments.filter(e=>"all"===this.state.activeTab?"approved"===e.status||"new"===e.status:e.status===this.state.activeTab);return this.filterAndSort(e)}renderComments(){return this.visibleComments.map(e=>(0,a.h)(c.default,{key:e.id,comment:e,commentableSubject:this.props.commentableSubject,moderationNote:this.props.moderationNote,isDefaultView:this.isDefaultView,onAfterEdit:this.refreshCommentsList,onStatusUpdate:this.recountComments}))}renderTitle(){const{title:e,genitiveTitle:t}=this.props;return this.isTitleHidden?null:this.visibleComments.length||this.state.count.approved>0?(0,a.h)(r.Heading2,null,e):(0,a.h)(r.Heading2,null,t," пока нет")}render({title:e}){return(0,a.h)("div",{className:"comments"},this.renderTitle(),!this.isDefaultView&&!this.isMenuHidden&&(0,a.h)(l.default,{title:e,changeTabAction:this.updateLocation,activeTab:this.state.activeTab,count:this.state.count}),!!this.visibleComments.length&&(0,a.h)("div",{className:"module"},this.renderComments()))}}t.default=u},18816:function(e,t,s){"use strict";var i=s(24994)(s(10751));$(".js__comments").each(function(){const e=$(this),t=(e=>{const t=(s=e.data("options"),JSON.parse(decodeURIComponent(s)));var s;return{commentableSubject:t.subject,title:t.title,genitiveTitle:t.genitiveTitle,moderationNote:t.moderationNote,mod:t.mod,limit:t.limit}})(e);e.reactify(i.default,t,()=>{e.children(".comments__ssr").remove()}),e.children().unwrap()})},55588:function(e,t,s){"use strict";var i=s(86019);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=s(76148),o=s(20270);class n extends a.Component{constructor(e){super(e),this.baseUrl=window.location.pathname}switchTab(e,t){t.preventDefault(),this.props.changeTabAction("",e)}render({count:e,activeTab:t}){const s=e.approved+e.new,n="all"===t,r="new"===t,l="sunk"===t,c=i.t(`comments.menu.tabs.${t}`);return(0,a.h)(o.Product,{name:c,mod:"h2"},(0,a.h)(o.ProductMenuItem,{link:this.baseUrl,isActive:n,isDisabled:0===s&&!n,count:s,onClick:this.switchTab.bind(this,this.baseUrl)},i.t("comments.menu.tabs.all")),(0,a.h)(o.ProductMenuItem,{link:`${this.baseUrl}#comments-new`,isActive:r,isDisabled:0===e.new&&!r,count:e.new,onClick:this.switchTab.bind(this,`${this.baseUrl}#comments-new`)},i.t("comments.menu.tabs.new")),(0,a.h)(o.ProductMenuItem,{link:`${this.baseUrl}#comments-sunk`,isActive:l,isDisabled:0===e.sunk&&!l,onClick:this.switchTab.bind(this,`${this.baseUrl}#comments-sunk`)},i.t("comments.menu.tabs.sunk")))}}t.default=n},32494:function(){"use strict";{class e{constructor(e){this.$table=e,this.$tableHolder=this.$table.parents(".horizontalScrollableModuleWrapper"),this.checkActualElement()}get isScrollable(){const e=this.$tableHolder[0];return e.scrollWidth>e.offsetWidth}checkActualElement(){this.$actualElement=this.$table.find(".is__actual"),this.$actualElement&&this.isScrollable&&(this.$actualElement.parents("table").addClass("is__horizontalScrollableTable"),this.scrollToActualElement())}scrollToActualElement(){const e=this.$tableHolder,t=e[0].scrollWidth,s=this.$actualElement,i=s.width(),a=s.closest("th").prevAll().get().reduce((e,t)=>e+$(t).outerWidth(!0),0),o=s.closest("th").prevAll(".contestsTable-caption"),n=a-(o?o.width():0)-i;t>a+i?e.scrollLeft(n):e.scrollLeft(0)}}$(".js__horizontalScrollableTable").each(function(){new e($(this))})}},60654:function(e,t,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CountdownMobile=t.Countdown=void 0;var i=s(76148),a=s(73345),o=s(45169);const n=e=>{const t=(new Date).getTime();return 1+((new Date(e).getTime()-t)/864e5|0)};t.Countdown=e=>{const t=n(e.enrollEndDate);return(0,i.h)("div",{className:"module countdown"},(0,i.h)("div",{className:"countdown-days"},t),(0,a.pluralize)(t,"день","дня","дней"),(0,i.h)("br",null),"до конца")},t.CountdownMobile=e=>{const t=n(e.enrollEndDate);return(0,i.h)("div",{className:"module countdownMobile"},(0,i.h)("div",{className:"countdownMobile-days"},t),(0,i.h)("div",{className:"countdownMobile-caption"},(0,i.h)(o.Caption,null,(0,a.pluralize)(t,"день","дня","дней"),(0,i.h)("br",null),"до конца")))}},69894:function(e,t,s){"use strict";var i=s(24994)(s(73953));$(".js__courseNavigation").each((e,t)=>{const s=$(t),a=s.next();a.is(".webpageLikes")&&a.after(s),a.is(".navigationPlaceholder")&&a.remove();const o=JSON.parse(s.attr("data-options")||null);s.empty().reactify(i.default,o),s.children().unwrap()})},63797:function(e,t,s){"use strict";const i=s(21834);
2class a extends i{preInit(){this.$image=this.$el.find(".image")}preCalculate(){this.imageHeight=this.$image.height()}preRender(){this.$el.css({"--coverImageHeight":this.imageHeight+"px"})}preReset(){this.$el.css({"--coverImageHeight":this.imageHeight+"px"})}}$(".js__courseSkinCover").each((e,t)=>new a($(t)))},48471:function(e,t,s){"use strict";var i=s(24994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return e.children[0]?(0,a.h)("div",(0,o.default)({},e,{className:"cpdBadge"}),(0,a.h)("span",{className:"cpdBadge-score"},"[",e.children," ")):null};var a=s(76148),o=i(s(94634))},3529:function(e,t,s){"use strict";var i=s(24994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=function({device:e,onClick:t}){const s=(0,o.default)("crossButton",{device:!!e},e);return(0,a.h)("button",{type:"button",className:s,onClick:t},"×")};var a=s(76148),o=i(s(32485))},20562:function(){"use strict";{const e="is__active";class t{constructor(e){this.$el=e,this.$rope=this.$el.find(".curtain-rope"),this.$content=this.$el.find(".curtain-content"),this.$rope.on("click",this.unveil.bind(this))}unveil(t){t.preventDefault(),this.$el.addClass(e)}}$(".curtain").each(function(){new t($(this))})}},12177:function(e,t,s){"use strict";var i=s(24994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=s(76148),o=i(s(94634)),n=s(86582);t.default=e=>(0,a.h)("div",(0,o.default)({className:"deleteButton"},e),(0,a.h)(n.DeleteCrossIcon,null))},75057:function(e,t,s){"use strict";var i=s(86019),a=s(24994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=s(76148),n=s(27384),r=s(73345),l=s(63229),c=a(s(62490)),d=a(s(35470)),h=a(s(35209)),u=a(s(32485));class p extends o.Component{constructor(e){super(e),this.openLinkOrPaybar=this.openLinkOrPaybar.bind(this)}componentDidMount(){this.$paybar=$(".js__newPaybar")}get isNoBleedBackground(){return"none"===this.props.bleedBackground}get discountAmount(){return parseInt(this.props.discount,10)}get hasExtraCharge(){return!Number.isNaN(this.discountAmount)&&this.discountAmount<0}get endsAtInitial(){return 1e3*this.props.endsAt}get endsAtMoscowTime(){return(0,l.moscowifyLocal)(new Date(this.endsAtInitial))}get endsAtShortDate(){return this.props.endsAtShortDate||(0,r.birmanize)(this.endsAtMoscowTime)}get endsAtLongDate(){return this.props.endsAtLongDate||(0,r.birmanize)(this.endsAtMoscowTime,{format:"fullMonthDateAndTime"})}get isDiscountTimeOver(){return(0,l.moscowifyLocal)(new Date)>this.endsAtMoscowTime}get isLastHoursLeft(){const e=(0,l.moscowifyLocal)(new Date),t=this.endsAtMoscowTime;return Math.abs(e-t)/36e5<=3}get supportsBonuses(){return this.props.bonuses&&this.props.bonuses.length&&!!i.translations[i.locale].discountBanner[this.props.productType].textWithBonuses}get textSuffix(){return this.isDiscountTimeOver?"textTimeOver":this.supportsBonuses?"textWithBonuses":"text"}get customDiscountTimeOverText(){return this.isDiscountTimeOver&&this.props.captionTextTimeOver?this.props.captionTextTimeOver:null}get customDiscountText(){return!this.isDiscountTimeOver&&this.props.captionText}get customDesktopText(){const e="en"===i.locale?"until":"до";return this.customDiscountText?`${this.props.captionText} ${e} ${this.endsAtLongDate}`:this.customDiscountTimeOverText}get customMobileText(){const e="en"===i.locale?"until":"до";return this.customDiscountText?`${this.props.captionText} ${e} ${this.endsAtShortDate}`:this.customDiscountTimeOverText}get translationScope(){return this.hasExtraCharge?"discountBanner.withExtraCharge":"discountBanner"}get defaultDesktopText(){return i.t(`${this.translationScope}.${this.props.productType}.${this.textSuffix}`,{endsAt:this.endsAtLongDate})}get defaultMobileText(){return i.t(`${this.translationScope}.${this.props.productType}.${this.textSuffix}`,{endsAt:this.endsAtShortDate})}get discountSpacerDesktopText(){return this.customDesktopText||this.defaultDesktopText}get discountSpacerMobileText(){return this.customMobileText||this.defaultMobileText}get hasCustomText(){return!!this.customDesktopText}get hasBlackTheme(){return!!this.props.hasBlackTheme}openLinkOrPaybar(e){e.target&&"A"!==e.target.nodeName&&(this.props.href?window.parent.location=this.props.href:this.$paybar.find(".stickyButton").click())}render(){const e=(0,u.default)("module discountSpacerWrap",`is__${this.props.productType}Discount`,{is__discountTimeOver:this.isDiscountTimeOver,is__lastHoursLeft:this.isLastHoursLeft,is__bleedBackgroun
2dSides:!this.isNoBleedBackground,has__blackTheme:this.hasBlackTheme,[`is__${this.props.theme}Theme`]:this.props.theme});return(0,o.h)("div",{className:e,onClick:this.openLinkOrPaybar},(0,o.h)(n.Cols,{className:"discountSpacer",divisionProportions:"7:9",transposeOnMobile:!0},(0,o.h)("div",{className:"discountSpacer-cols"},(0,o.h)(c.default,{productType:this.props.productType,discount:this.props.discount,icon:this.props.stickerIcon,caption:this.props.stickerText,hasBlackTheme:this.hasBlackTheme}),(0,o.h)(d.default,{productType:this.props.productType,desktopText:this.props.desktopText||this.discountSpacerDesktopText,mobileText:this.props.mobileText||this.discountSpacerMobileText,hasCustomText:this.hasCustomText})),(0,o.h)("div",{className:"discountSpacer-timer"},!this.hasBlackTheme&&(0,o.h)(h.default,{to:this.endsAtInitial,hasSeconds:!0,hasShortUnits:!0}))))}}t.default=p},1366:function(e,t,s){"use strict";var i=s(24994)(s(75057));const a=window.productSubscription||{},o=a.subscription||{},n=a.prices||{},r=o.product||"",{isCouponApplied:l,bonuses:c,couponDiscount:d,couponValidUntil:h,couponTheme:u}=n;$(".js__discountBanner").each(function(){const e=$(this).data("options"),t={productType:r,discount:d,endsAt:h,theme:u,bonuses:c,...e};return l||e.isVisible?$(this).reactify(i.default,t):$(this).remove()})},62490:function(e,t,s){"use strict";var i=s(86019),a=s(24994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=s(76148),n=s(45169),r=a(s(32485));class l extends o.Component{get discountAmount(){return parseInt(this.props.discount,10)}get hasPercentageDiscount(){return!Number.isNaN(this.discountAmount)&&this.discountAmount>0}get hasExtraCharge(){return!Number.isNaN(this.discountAmount)&&this.discountAmount<0}get discountIcon(){const e=`${this.props.hasBlackTheme?"−":""}${this.props.discount}<span>%</span>`;return this.hasPercentageDiscount?e:"%"}get stickerIcon(){return this.props.icon||this.discountIcon}get captionText(){return this.props.caption?this.props.caption:this.hasExtraCharge?i.t("discountBanner.extraCharge"):this.defaultDiscountCaptionText}get defaultDiscountCaptionText(){const e=i.t("discountBanner.discount");return i.t(`discountBanner.${this.props.productType}.discount`,{defaultValue:e})}render(){const e=(0,r.default)("spacerSticker-wrapper",{has__percentageDiscount:this.hasPercentageDiscount&&!this.props.icon});return(0,o.h)("div",{className:e},(0,o.h)("div",{className:"spacerSticker"},(0,o.h)("div",{className:"percentage",dangerouslySetInnerHTML:{__html:this.stickerIcon}}),(0,o.h)(n.Caption,null,this.captionText)))}}t.default=l},35470:function(e,t,s){"use strict";var i=s(24994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=s(76148),o=i(s(32485));class n extends a.Component{get hasLongText(){const{productType:e}=this.props;return"prep"===e||"bookshelf"===e}render(){const e=(0,o.default)("discountSpacer-text",{has__longText:this.hasLongText,has__customText:this.props.hasCustomText});return(0,a.h)("div",{className:e},(0,a.h)("div",{className:"device laptop desktop",dangerouslySetInnerHTML:{__html:this.props.desktopText}}),(0,a.h)("div",{className:"device mobile",dangerouslySetInnerHTML:{__html:this.props.mobileText}}))}}t.default=n},86747:function(e,t,s){"use strict";var i=s(24994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=s(76148),o=i(s(93925));class n extends a.Component{constructor(e){super(e),this.extraButtonOnClick=this.extraButtonOnClick.bind(this)}extraButtonOnClick(){this.props.second.href&&(window.location=this.props.second.href)}render(e){return(0,a.h)(o.default,{href:e.first.href,text:e.first.text,shortText:e.first.shortText,goal:e.first.goal,type:e.first.type},(0,a.h)("button",{className:`extraButton is__${e.second.type}`,onClick:this.extraButtonOnClick,"data-goal":e.second.goal},(0,a.h)("span",{className:"extraButton-text device mobile"},e.second.shortText||e.second.text),(0,a.h)("span",{className:"extraButton-text device desktop laptop"},e.second.text)))}}t.default=n},94660:function(e,t,s){"use strict";var i=s(24994)(s(86747));$(".js__doubleStickyButton").each((e,t)=>{const s=$(t),a=JSON.parse(s.attr("data-options"));s.reactify(i.default,a),s.children().unwrap()})},25401:function(e,t,s){"use strict";var i=s(24994);
2Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.RegisterButton=t.CourseLink=void 0;var a=s(76148),o=i(s(32485)),n=i(s(98999)),r=s(73345),l=s(5238),c=s(15011),d=i(s(38184)),h=s(38367),u=s(45169),p=s(27384),m=i(s(32943)),f=i(s(28436)),v=i(s(22046));const g=e=>{const t=(0,l.birmanize)(e.priceEndsAt,{format:"dateOnly"});return`<nobr>🕑Сэкономьте ${e.discount}% до ${t}</nobr> `},b=e=>(0,a.h)("span",{class:"educenterCoursesSpacer-discount bureausans",dangerouslySetInnerHTML:{__html:g(e)}}),_=e=>(0,a.h)("span",null,!e.noFeedback&&(0,a.h)(f.default,{href:e.href,className:"educenterCoursesSpacer-linkTextLong",text:"Программа и отзывы",isDoubleHover:!0}),(0,a.h)(f.default,{href:e.href,className:"educenterCoursesSpacer-linkTextShort",text:"Программа",isDoubleHover:!0}));t.CourseLink=_;const y=e=>(0,a.h)("div",{className:"educenterCoursesSpacer-buttonWrapper"},(0,a.h)("a",{href:e.href,className:"button educenterCoursesSpacer-button"},"Записаться"));t.RegisterButton=y;class S extends a.Component{constructor(e){super(e);const{email:t,isSubscribed:s}=(0,h.getStoredEmail)(e.eventType);this.className="educenterCoursesSpacer",this.state={courses:[],pickedCourse:this.props.course,email:t,isSubscribed:s},this.pickCourseToShow=this.pickCourseToShow.bind(this),this.subscribe=this.subscribe.bind(this)}componentDidMount(){this.state.pickedCourse||this.fetchCourses()}fetchCourses(){fetch("/products/courses",{headers:n.default}).then(e=>e.json()).then(e=>e.map(d.default)).then(e=>this.setState({courses:e},this.pickCourseToShow)).catch(e=>console.error(e))}componentDidUpdate(){$(".doubleHover").each(function(){new v.default($(this))})}subscribe({email:e}){return(0,h.subscribeUser)({email:e,eventType:this.props.eventType,eventId:1}).then(e=>this.setState({isSubscribed:e}))}pickCourseToShow(){const{courseKey:e}=this.props,{courses:t}=this.state;if(t.length)if(e){const s=t.find(t=>t.key===e);this.setState({pickedCourse:s})}else{const e=t.filter(e=>!!e.closestEvent)[0]||t[0];this.setState({pickedCourse:e})}}laptopTitle(e){return this.props.laptopTitle?this.props.laptopTitle:e.length<42?e:e.split(/\sи\s/)[0]}renderCourseDiscountMessage(e){return e.discount?(0,a.h)(b,e):null}render(e){let{pickedCourse:t={}}=this.state;if(!t.key)return null;const{closestEvent:s}=t,i="open"===(null==s?void 0:s.status),n="half"===e.size,d="full"===e.size,h=(0,c.utmSource)({platform:"Сайт бюро",postType:"Банер",productType:"Курсы",product:t.key.replace("-online",""),postDate:new Date}),f=`/courses/${t.key}/?utm_source=${h}`,v=`/courses/${t.key}/?self&utm_source=${h}`,g=(0,o.default)(this.className,{is__open:i,is__closed:!i,is__half:n,is__full:d,has__noFeedback:e.noFeedback});return(0,a.h)("div",{className:g},(0,a.h)("div",{className:"educenterCoursesSpacer-titleWrapper"},(0,a.h)("div",{className:"educenterCoursesSpacer-title"},(0,a.h)("a",{href:f,class:"device laptop doubleHover is__noUnderline"},this.laptopTitle(t.title)),(0,a.h)("a",{href:f,class:"device mobile desktop doubleHover is__noUnderline"},this.props.title||t.title))),(0,a.h)("div",{className:"educenterCoursesSpacer-text"},i&&d&&(0,a.h)("div",{className:"device laptop desktop"},(0,a.h)("div",{className:"educenterCoursesSpacer-cols"},(0,a.h)("div",{className:"educenterCoursesSpacer-left"},(0,a.h)(u.TextNode,null,(0,a.h)("a",{href:f,className:"doubleHover is__noUnderline"},(0,r.typograf)(t.openDescription)+" ",(0,a.h)("nobr",null,(0,l.shortenMonths)(s.dates),".")," ",this.renderCourseDiscountMessage(s),(0,a.h)("br",{className:"educenterCoursesSpacer-linkBreak"}),(0,a.h)(_,{href:f,noFeedback:e.noFeedback})))),(0,a.h)(y,{href:v}))),i&&n&&(0,a.h)("div",{className:"device laptop desktop"},(0,a.h)(u.TextNode,null,(0,a.h)("a",{href:f,className:"doubleHover is__noUnderline"},(0,r.typograf)(t.openDescription)+" ",(0,a.h)("nobr",null,(0,l.shortenMonths)(s.dates),".")," ",this.renderCourseDiscountMessage(s))),(0,a.h)("div",{className:"educenterCoursesSpacer-cols"},(0,a.h)("div",{className:"educenterCoursesSpacer-left"},(0,a.h)(u.TextNode,null,(0,a.h)(_,{href:f,noFeedback:e.noFeedback}))),(0,a.h)(y,{href:v}))),i&&(0,a.h)("div",{className:"device mobile"},(0,a.h)(u.TextNode,null,(0,a.h)("a",{href:f,className:"doubleHover is__noUnderline"},(0,r.typograf)(t.openDescription)+" ",(0,a.h)("nobr",null,(0,l.shortenMonths)(s.dates),".")," ",this.renderCourseDiscountMessage(s))),(0,a.h)("div",{className:"educenterCoursesSpacer-cols"},(0,a.h)("div",{className:"educenterCoursesSpacer-left"},(0,a.h)(u.TextNode,null,(0,a.h)(_,{href:f,noFeedback:e.noFeedback}))),(0,a.h)(y,{href:v}))),!i&&n&&(0,a.h)(u.TextNode,null,(0,a.h)("a",{href:f,className:"doubleHover is__noUnderline"}
2,(0,r.typograf)(`${t.shortDescription}. Мы напишем вам, когда откроется запись. `),(0,a.h)(_,{href:f,noFeedback:e.noFeedback}))),!i&&d&&(0,a.h)(p.Cols,{className:"device device__laptop device__desktop"},(0,a.h)("div",null,(0,a.h)(u.TextNode,null,(0,a.h)("a",{href:f,className:"doubleHover is__noUnderline"},(0,r.typograf)(`${t.shortDescription}. Мы напишем вам, когда откроется запись. `),(0,a.h)("br",{className:"educenterCoursesSpacer-linkBreak"}),(0,a.h)(_,{href:f,noFeedback:e.noFeedback})))),(0,a.h)(m.default,{email:this.state.email,autoComplete:null,onSubmit:this.subscribe,className:"educenterCoursesSpacer-form",isSubscribed:this.state.isSubscribed,thinButton:!0})),!i&&d&&(0,a.h)("div",{className:"device mobile"},(0,a.h)(u.TextNode,null,(0,a.h)("a",{href:f,className:"doubleHover is__noUnderline"},(0,r.typograf)(`${t.shortDescription}. Мы напишем вам, когда откроется запись. `),(0,a.h)(_,{href:f,noFeedback:e.noFeedback}))))),!i&&n&&(0,a.h)(m.default,{email:this.state.email,autoComplete:null,onSubmit:this.subscribe,className:"educenterCoursesSpacer-form",isSubscribed:this.state.isSubscribed,thinButton:!0}),!i&&d&&(0,a.h)("div",{className:"device mobile"},(0,a.h)(m.default,{email:this.state.email,autoComplete:null,onSubmit:this.subscribe,className:"educenterCoursesSpacer-form",isSubscribed:this.state.isSubscribed,thinButton:!0})))}}t.default=S},28350:function(e,t,s){"use strict";var i=s(24994)(s(25401));$(".js__educenterCoursesSpacer").each(function(){$(this).reactify(i.default,$(this).data())})},32943:function(e,t,s){"use strict";var i=s(86019),a=s(24994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=s(76148),n=a(s(32485));const r=/\S+@\S+\.\S+/,l={default:"",invalid:"has__error",loading:"is__loading",loaded:"is__loaded",submitted:"is__submitted",subscribed:"is__subscribed"},c=window.___;class d extends o.Component{constructor(e){super(e);const t=e.email||c&&c.getCookie&&c.getCookie("email")||(window.URLSearchParams?new URLSearchParams(window.location.search).get("presetEmail"):"")||"";let s="default";t&&(s="default"),e.isSubscribed&&(s="subscribed"),this.state={email:t,formState:s},this.afterSubmitState="submitted",this.loadingStartTime=0,this.handleSubmit=this.handleSubmit.bind(this),this.handleInput=this.handleInput.bind(this),this.handleFocus=this.handleFocus.bind(this),this.waitForPreloaderAndHandleResponse=this.waitForPreloaderAndHandleResponse.bind(this),this.onSubmit=this.props.onSubmit||function(){return Promise.resolve()},this.placeholder=i.t("emailForm.placeholder")}componentDidUpdate(e,t){this.props.isSubscribed&&(this.afterSubmitState="subscribed");const s=t.formState!==this.state.formState;Object.keys(l).forEach(e=>{const t=`onFormState${i=e,i.charAt(0).toUpperCase()+i.slice(1)}`;var i;const a=this.props[t];s&&this.state.formState===e&&a&&a()})}handleSubmit(e){this.isLoading||(e.preventDefault(),r.test(this.state.email)?(this.hideIosKeyboard(),this.cleanUpCurrentLoadingTimeouts(),this.scheduleLoadingIndicator(),this.isLoading=!0,this.onSubmit({email:this.state.email}).then(this.waitForPreloaderAndHandleResponse).catch(this.waitForPreloaderAndHandleResponse)):this.setState({formState:"invalid"}))}hideIosKeyboard(){document.activeElement&&document.activeElement.blur()}cleanUpCurrentLoadingTimeouts(){this.loadingStartTime=0,clearTimeout(this.loadingTimeout),clearTimeout(this.loadingDelayTimeout),clearTimeout(this.submittedTimeout)}scheduleLoadingIndicator(){this.loadingDelayTimeout=setTimeout(()=>{this.setState({formState:"loading"}),this.loadingStartTime=(new Date).getTime()},100)}waitForPreloaderAndHandleResponse(){this.isLoading=!1,clearTimeout(this.loadingDelayTimeout),this.loadingTimeout=setTimeout(()=>{this.setState({formState:"loaded"}),this.submittedTimeout=setTimeout(()=>{this.setState({formState:this.afterSubmitState})},1500)},this.preloaderDisplayDuration)}get preloaderDisplayDuration(){return this.loadingStartTime?300-((new Date).getTime()-this.loadingStartTime):0}handleInput(e){const t=e.target.value.toLowerCase();this.setState({email:t,formState:"default"})}handleFocus(e){window.application.isOnIOS&&e.target.scrollIntoView()}render(e){const t=(0,n.default)("subscriptionForm",l[this.state.formState],e.className,{has__buttonText:e.buttonText}),s=(0,n.default)("button","subscriptionForm-submit",{is__thin:e.thinButton});return(0,o.h)("form",{onSubmit:this.handleSubmit,className:t},(0,o.h)("div",{className:"subscriptionForm-inputWrapper"},(0,o.h)("input",{type:"email",name:"email",autoComplete:void 0===e.autoComplete?"email":e.autoComplete,value:this.state.email,onInput:this.handleInput,onFocus:this.handleFocus,ref:e.inputRef,className:"subscriptionForm-input",placeholder:this.placeholder})),(0,o.h)("button",{className:s,type:"submit"},e.buttonText&&(0,o.h)("span",{className:"subscriptionForm-submitText is__text"},e.buttonText),(0,o.h)("span",{className:"subscriptionForm-submitText is__default"},"→"),(0,o.h)("span",{className:"subscriptionForm-submitText is__success"},"✓"),(0,o.h)("span",{className:"subscriptionForm-submitText is__loading"}),(0,o.h)("span",{className:"subscriptionForm-submitText is__reset"},"↻")))}}t.default=d},40458:function(e,t,s){"use strict";var i=s(38367);{const e="has__resubscribed",t="has__optedIn",a=s(2733);class o{constructor(e){this.$el=e,this.$email=this.$el.find(".js__unsubscribedEmail"),this.unsubscribedEmail=a.get("s_unsubscribe"),this.resubscribedEmail=a.get("s_resubscribe"),this.optInList=a.get("s_opt_in"),this.type=this.$el.attr("data-type"),this.eventId=this.$el.attr("data-event-id"),/\?resubscribed/.test(window.location.search)&&(this.resubscribedEmail=this.userEmail),/\?unsubscribed/.test(window.location.search)&&(this.unsubscribedEmail=this.userEmail),/\?opt_in/.test(window.location.search)&&(this.optInList="school-welcome-series"),this.unsubscribedEmail?(this.display(),this.cleanUpCookies(),this.setupResubscribe(),this.bindEvents()):this.resubscribedEmail?(this.cleanUpCookies(),this.display(),this.setupResubscribe(),this.displayResubscribeMessage()):this.optInList&&(this.cleanUpCookies(),this.display(),this.displayOptInMessage())}get userEmail(){return ___.getCookie("email")||(window.application.user?window.application.user.email:null)}display(){this.$el.addClass("is__active")}cleanUpCookies(){a.remove("s_unsubscribe"),a.remove("s_unsubscribe",{domain:`.${window.location.hostname}`}),a.remove("s_resubscribe"),a.remove("s_resubscribe",{domain:`.${window.location.hostname}`}),a.remove("s_opt_in"),a.remove("s_opt_in",{domain:`.${window.location.hostname}`}),a.remove(`event_subscribe_${this.type}_${this.eventId}`),a.remove(`event_subscribe_${this.type}_${this.eventId}`,{domain:`.${window.location.hostname}`})}setupResubscribe(){this.$email.text(this.unsubscribedEmail||this.resubscribedEmail)}bindEvents(){this.$el.find(".js__emailSubscriptionNotification-resubscribe").on("click",this.resubscribe.bind(this))}resubscribe(){(0,i.subscribeUser)({email:this.unsubscribedEmail,eventType:this.t
2ype,eventId:this.eventId}),this.displayResubscribeMessage()}displayResubscribeMessage(){this.$el.addClass(e)}displayOptInMessage(){this.$el.addClass(t)}}$(".js__emailSubscriptionNotification").each(function(){new o($(this))})}},80474:function(e,t,s){"use strict";const{providers:i}=s(397),{initEmbeddedVideos:a}=s(14150);i.forEach(e=>a(e))},19115:function(e,t,s){"use strict";const i=s(21834);class a extends i{preInit(){this.$video=this.$el.closest(".embeddedVideo"),this.video=this.$video[0],this.$el.on("click",this.revealAndPlayVideo.bind(this))}revealAndPlayVideo(){this.$video.addClass("is__active"),this.video.dispatchEvent(new CustomEvent("playNow"))}}$(".js__embeddedVideoCover").each((e,t)=>new a($(t)))},4564:function(e,t,s){"use strict";const i=s(18288),a=s(78535),o=s(94857),n=e=>console.error(e);class r{constructor(e,t={}){this.el=e,this.el.classList.add("is__initialized"),this.url=e.getAttribute("data-kinescope-url"),this.id=e.getAttribute("data-kinescope-id"),this.start=e.getAttribute("data-kinescope-start")||0,this.customUnmuteButton=document.querySelector("button.kinescopeCustomUnmute"),this.domId=`ki-${this.id}-${__.generateID(6)}`,this.playerState=new o({id:`ki-${this.id}`}),this.shouldSaveProgress=t.shouldSaveProgress,this.shouldSavePlaybackRate=t.shouldSavePlaybackRate,this.shouldShowControls=t.shouldShowControls,this.autoplay=t.autoplay,this.loop=t.loop,this.muted=t.muted,this.restartOnUnmute=this.restartOnUnmute.bind(this),this.ensureUnmuteAfterRestart=this.ensureUnmuteAfterRestart.bind(this),this.handleCustomUnmuteButton=this.handleCustomUnmuteButton.bind(this),this.el.querySelector(".kinescopeVideo-container").setAttribute("id",this.domId),a("https://player.kinescope.io/latest/iframe.player.js").then(()=>{Kinescope.IframePlayer.create(this.domId,{url:this.url+`?t=${this.startTime}`,behavior:{localStorage:!1,preload:!0,autoPlay:this.autoplay,loop:this.loop,muted:this.muted},ui:{controls:this.shouldShowControls}}).then(e=>{this.player=e,this.setup()})}).catch(e=>console.error("Failed to load Kinescope player JS",e))}get startTime(){return this.loop?0:(this.shouldSaveProgress?this.playerState.progress:0)||this.start}setup(){this.markReady(),this.setupCoverPlayButton(),this.setupQuality(),this.setupAutoplay(),this.setupPlaybackRate(),this.setupProgress(),this.setupUnmuteAfterRestart()}markReady(){this.player.once(this.player.Events.Ready,()=>this.el.classList.add("is__ready"))}setupCoverPlayButton(){this.autoplay||this.el.addEventListener("playNow",()=>this.player.play().catch(n))}setupQuality(){this.player.on(this.player.Events.Ready,()=>{const e=/^\/(school|lectures)\//.test(window.location.pathname)?720:"auto";this.player.setVideoQuality(e)})}setupAutoplay(){this.autoplay&&this.player.once(this.player.Events.Play,()=>{this.isFinished=!1,this.player.isMuted()&&this.player.on(this.player.Events.VolumeChange,this.restartOnUnmute),this.muted&&this.player.on(this.player.Events.Pause,this.restartOnUnmute),this.customUnmuteButton&&document.addEventListener("kinescopeCustomUnmute",this.handleCustomUnmuteButton)})}setupPlaybackRate(){this.shouldSavePlaybackRate&&(this.playbackRate=this.playerState.playbackRate,this.player.on(this.player.Events.Ready,()=>{this.player.setPlaybackRate(this.playbackRate).catch(n)}),this.player.on(this.player.Events.PlaybackRateChange,this.savePlaybackRate.bind(this)),this.player.on(this.player.Events.Play,this.markAsActive.bind(this)),document.addEventListener("playbackRateChange",this.onPlaybackRateChange.bind(this)))}setupProgress(){this.shouldSaveProgress&&this.player.on(this.player.Events.TimeUpdate,i(1e3,this.saveProgress.bind(this)))}setupUnmuteAfterRestart(){this.player.on(this.player.Events.Play,this.ensureUnmuteAfterRestart)}markAsActive(){this.el.classList.add("is__active")}onPlaybackRateChange(e){const{playbackRate:t,id:s}=e.detail;this.id!==s&&t!==this.playbackRate&&this.player.setPlaybackRate(t).catch(n)}handleCustomUnmuteButton(){this.player.unmute().then(()=>{var e;this.restartOnUnmute(),null===(e=this.customUnmuteButton)||void 0===e||e.classList.add("is__muted")}).catch(n),document.removeEventListener("kinescopeCustomUnmute",this.handleCustomUnmuteButton)}async restartOnUnmute(){if(!document.hidden)try{const e=await this.player.getCurrentTime(),t=await this.player.getDuration();if(t>0&&e>=t-.5)return this.isFinished=!0,await this.player.seekTo(0),void await this.player.pause();await this.player.seekTo(0),await this.player.unmute(),await this.player.play(),this.player.off(this.player.Events.VolumeChange,this.restartOnUnmute),this.player.off(this.player.Events.Pause,this.restartOnUnmute),this.player.off(this.player.Events.Play,this.ensureUnmuteAfterRestart)}catch(e){n(e)}}ensureUnmuteAfterRestart(){this.isFinished&&(this.player.unmute().c
2atch(n),this.isFinished=!1)}saveProgress({data:{currentTime:e,duration:t}}){this.playerState.saveProgress({seconds:e,duration:t})}savePlaybackRate({data:{playbackRate:e}}){this.playbackRate=e,this.playerState.savePlaybackRate(e),this.syncPlaybackRates()}syncPlaybackRates(){const{playbackRate:e,id:t}=this,s=new CustomEvent("playbackRateChange",{detail:{playbackRate:e,id:t}});document.dispatchEvent(s)}static vitalize(e,t={}){return e.classList.contains("is__initialized")?null:new r(e,t)}}e.exports=r},98534:function(e,t,s){"use strict";const{buildEmbedHtml:i}=s(26604),{parseKinescopeParams:a}=s(89322),o=a;e.exports={name:"kinescope",selector:".kinescopeVideo",markdownLabel:"Видео в Кинескопе",allowedAttrs:["id"],allowedDataAttrs:["kinescope-id","kinescope-url","kinescope-start"],getPublicUrl:e=>`https://kinescope.io/${e}`,match:o,render:e=>{if(!e||!e.id)return null;const{id:t,src:s,start:a}=e;return i({className:"kinescopeVideo",dataAttrs:{"kinescope-id":t,"kinescope-url":s,"kinescope-start":a},innerHtml:`<div class="kinescopeVideo-container" id="ki-${t}"></div>`})},getPlayerClass:()=>s(4564)}},26604:function(e){"use strict";const t=(e={})=>Object.entries(e).filter(([,e])=>null!=e).map(([e,t])=>`data-${e}="${t}"`).join(" ");e.exports={buildAllowedDivAttrs:(e=[])=>{const t=new Set(["class"]);return e.forEach(e=>{const{allowedAttrs:s=[],allowedDataAttrs:i=[]}=e;s.forEach(e=>t.add(e)),i.forEach(e=>t.add(`data-${e}`))}),Array.from(t)},buildDataAttrs:t,buildEmbedHtml:({className:e,dataAttrs:s={},attrs:i={},innerHtml:a=""}={})=>{if(!e)return null;const o=((e={})=>Object.entries(e).filter(([,e])=>null!=e).map(([e,t])=>`${e}="${t}"`).join(" "))(i),n=[o,t(s)].filter(Boolean).join(" ");return`<div class="module media"><div class="${e} embeddedVideo module"${n?` ${n}`:""}>${a}</div></div>`}}},14150:function(e,t,s){"use strict";const i=s(21834),a=s(47683),o=s(67500),n=({PlayerClass:e})=>
2e?class extends i{preRender(){if(!this.player){const t=this.$el[0],s=t.parentNode.getAttribute("class"),i=a(s);this.player=new e(t,i)}}}:null;e.exports={createVideoModule:n,initEmbeddedVideos:(e={})=>{const{selector:t}=e;if(!t)return;const s=document.querySelectorAll(t),i=(({getPlayerClass:e}={})=>"function"==typeof e?e():null)(e),a=n({PlayerClass:i});a&&(s.forEach(e=>new a($(e))),"function"==typeof i.vitalize&&o(t,i.vitalize))}}},67500:function(e){"use strict";const t={shouldSaveProgress:!0,shouldSavePlaybackRate:!0},s=[];let i=null;e.exports=(e,a)=>{s.push({selector:e,vitalize:a}),(()=>{const e=document.querySelector(".webpage");e&&!i&&(i=new MutationObserver(e=>{e.forEach(e=>{e.addedNodes.forEach(e=>{e instanceof HTMLElement&&s.forEach(({selector:s,vitalize:i})=>{e.matches(s)&&i(e,t),e.querySelectorAll(s).forEach(e=>i(e,t))})})})}),i.observe(e,{childList:!0,subtree:!0}))})()}},397:function(e,t,s){"use strict";const i=[s(38840),s(98534),s(71701),s(15192),s(47588)];e.exports={providers:i,getProvider:e=>i.find(t=>t.name===e),findMatch:e=>{for(const t of i){const s=t.match(e);if(s)return{provider:t,params:s}}return null}}},47683:function(e){"use strict";const t="is__noSave";e.exports=e=>{const s=(e+"").split(" "),i=!s.includes(t)&&!s.includes("is__noSavePosition"),a=!s.includes(t)&&!s.includes("is__noSaveSpeed"),o=!s.includes("is__noControls"),n=s.includes("is__autoplay"),r=s.includes("is__loop");return{shouldSaveProgress:i,shouldSavePlaybackRate:a,shouldShowControls:o,muted:s.includes("is__muted"),autoplay:n,loop:r}}},94857:function(e){"use strict";const t=JSON.stringify,s=JSON.parse,i=(e,s)=>{try{localStorage.setItem(e,t(s))}catch(e){console.warn("Failed to persist state: ",e)}};e.exports=class{constructor({id:e}){this.id=e,this.scope="videoPlayersState"}get currentState(){return(e=>{try{return s(localStorage.getItem(e))||{}}catch(e){console.warn("Failed to retrieve initial state: ",e)}return{}})(this.scope)||{}}get progress(){const e=this.currentState[this.id],t=Math.floor((null==e?void 0:e.seconds)||(null==e?void 0:e.progress)||0),s=null==e?void 0:e.duration;return void 0!==s&&s-t<=3?0:t}saveProgress({seconds:e,duration:t}){const s=Object.assign(this.currentState,{[this.id]:{seconds:e,duration:t}});i(this.scope,s),this.triggerProgressEvent({seconds:e,duration:t})}get playbackRate(){return this.currentState.playbackRate||1}savePlaybackRate(e){const t=Object.assign(this.currentState,{playbackRate:e});i(this.scope,t)}triggerProgressEvent({seconds:e,duration:t}){const s=new CustomEvent("videoProgressUpdate",{detail:{seconds:e,duration:t,id:this.id}});document.dispatchEvent(s)}}},71701:function(e,t,s){"use strict";const{buildEmbedHtml:i}=s(26604),{parseVimeoParams:a}=s(89322),o=a;e.exports={name:"vimeo",selector:".vimeoVideo",markdownLabel:"Видео в Вимео",allowedDataAttrs:["vimeo-id","vimeo-url","vimeo-defer","vimeo-byline","vimeo-portrait","vimeo-title","vimeo-start"],getPublicUrl:e=>`https://vimeo.com/${e}`,match:o,render:e=>{if(!e||!e.id)return null;const{id:t,src:s,start:a}=e;return i({className:"vimeoVideo",dataAttrs:{"vimeo-id":t,"vimeo-url":s,"vimeo-defer":"","vimeo-byline":"0","vimeo-portrait":"0","vimeo-title":"0","vimeo-start":a}})},getPlayerClass:()=>s(84874)}},84874:function(e,t,s){"use strict";const i=s(18288),a=s(78535),o=s(94857),n=e=>console.error(e);class r{constructor(e,t={}){this.el=e,this.el.classList.add("is__initialized"),this.id=e.getAttribute("data-vimeo-id"),this.startTime=e.getAttribute("data-vimeo-start"),this.playerState=new o({id:`vi-${this.id}`}),this.shouldSaveProgress=t.shouldSaveProgress,this.shouldSavePlaybackRate=t.shouldSavePlaybackRate;let s=(this.shouldSaveProgress?this.playerState.progress:null)||this.startTime;const i=/^\/(school|lectures)\//.test(window.location.pathname)?"720p":"auto";if(this.id.includes("/")){const t=this.id.replace("/","?h=");e.removeAttribute("data-vimeo-id"),e.setAttribute("data-vimeo-url",`https://player.vimeo.com/video/${t}`)}a("https://player.vimeo.com/api/player.js").then(()=>{this.player=new Vimeo.Player(e,{start_time:s,quality:i}),this.player.ready().then(this.setup.bind(this))}).catch(e=>console.error("Failed to load Vimeo player JS",e))}setup(){this.el.classList.add("is__ready"),this.el.addEventListener("playNow",this.player.play.bind(this.player)),this.shouldSavePlaybackRate&&(this.playbackRate=this.playerState.playbackRate,this.player.setPlaybackRate(this.playbackRate).cat
2ch(n),this.player.on("playbackratechange",this.savePlaybackRate.bind(this)),document.addEventListener("playbackRateChange",this.onPlaybackRateChange.bind(this))),this.shouldSaveProgress&&this.player.on("timeupdate",i(1e3,this.saveProgress.bind(this)))}onPlaybackRateChange(e){const{playbackRate:t,id:s}=e.detail;this.id!==s&&t!==this.playbackRate&&this.player.setPlaybackRate(t).catch(n)}saveProgress({seconds:e,duration:t}){this.playerState.saveProgress({seconds:e,duration:t})}savePlaybackRate({playbackRate:e}){this.playbackRate=e,this.playerState.savePlaybackRate(e),this.syncPlaybackRates()}syncPlaybackRates(){const{playbackRate:e,id:t}=this,s=new CustomEvent("playbackRateChange",{detail:{playbackRate:e,id:t}});document.dispatchEvent(s)}static vitalize(e,t={}){return e.classList.contains("is__initialized")?null:new r(e,t)}}e.exports=r},15192:function(e,t,s){"use strict";const{buildEmbedHtml:i}=s(26604),{parseVkParams:a}=s(89322),o=a;e.exports={name:"vk",selector:".vkVideo",markdownLabel:"Видео в ВК",allowedDataAttrs:["vk-video-id","vk-video-url","vk-video-list","vk-video-hash","vk-video-start"],getPublicUrl:e=>`https://vk.com/video${e}`,match:o,render:e=>{if(!e||!e.id)return null;const{id:t,src:s,list:a}=e;return i({className:"vkVideo",dataAttrs:{"vk-video-id":t,"vk-video-url":s,"vk-video-list":a||null}})},getPlayerClass:()=>s(14310)}},14310:function(e,t,s){"use strict";const i=s(18288),a=s(78535),o=s(94857);class n{constructor(e,t={}){this.el=e,this.el.classList.add("is__initialized"),this.id=e.getAttribute("data-vk-video-id"),this.hash=e.getAttribute("data-vk-video-hash"),this.startTime=e.getAttribute("data-vk-video-start"),this.playerState=new o({id:`vkvi-${this.id}`}),this.shouldSaveProgress=t.shouldSaveProgress;let s=(this.shouldSaveProgress?this.playerState.progress:null)||this.startTime;a("https://vk.com/js/api/videoplayer.js").then(()=>{this.appendIframeAndInitializePlayer({startTime:s,autoplay:t.autoplay}),this.setup({startTime:s})}).catch(e=>console.error("Failed to load VK Video player JS",e))}appendIframeAndInitializePlayer({startTime:e,autoplay:t}){const[s,i]=this.id.split("_"),{hash:a}=this;let o=`https://vk.com/video_ext.php?oid=${s}&id=${i}&js_api=1`;a&&(o=`${o}&hash=${a}`),e&&(o=`${o}&t=${e}s`),t&&(o=`${o}&autoplay=1`);const n=$((e=>`<iframe src="${e}" width="1280" height="720" allow="autoplay; encrypted-media; fullscreen; picture-in-picture; screen-wake-lock;" frameborder="0" allowfullscreen></iframe>`)(o));$(this.el).append(n),this.player=VK.VideoPlayer(n[0])}setup(){this.el.addEventListener("playNow",this.player.play.bind(this.player)),this.shouldSaveProgress&&this.player.on("timeupdate",i(1e3,this.saveProgress.bind(this))),this.player.on("inited",()=>{this.el.classList.add("is__ready"),this.player.unmute()})}saveProgress({time:e,duration:t}){const s=parseInt(e,10);this.playerState.saveProgress({seconds:s,duration:t})}static vitalize(e,t={}){return e.classList.contains("is__initialized")?null:new n(e,t)}}e.exports=n},38840:function(e,t,s){"use strict";const{buildEmbedHtml:i}=s(26604),{parseYoutubeParams:a}=s(89322),o=a;e.exports={name:"youtube",selector:".youtubeVideo",markdownLabel:"Видео в Ютубе",allowedAttrs:["id"],allowedDataAttrs:["youtube-id","youtube-start","youtube-end"],getPublicUrl:(e,t={})=>{const s=new URLSearchParams({v:e});return t["data-youtube-start"]&&s.set("t",t["data-youtube-start"]),t["data-youtube-end"]&&s.set("end",t["data-youtube-end"]),`https://www.youtube.com/watch?${s}`},match:o,render:e=>{if(!e||!e.id)return null;const{id:t,start:s,end:a}=e;return i({className:"youtubeVideo",attrs:{id:`video-${t}`},dataAttrs:{"youtube-id":t,"youtube-start":s||null,"youtube-end":a||null},innerHtml:'<div class="youtubeVideo-container"></div>'})},getPlayerClass:()=>s(60036)}},60036:function(e,t,s){"use strict";const i=s(29378),a=s(94857);class o{constructor(e,t={}){this.el=e,this.el.classList.add("is__initialized"),this.id=e.getAttribute("data-youtube-id"),this.playerState=new a({id:`yt-${this.id}`}),this.startTime=parseInt(e.getAttribute("data-youtube-start"),10),this.endTime=parseInt(e.getAttribute("data-youtube-end"),10),this.shouldSaveProgress=t.shouldSaveProgress,this.shouldSavePlaybackRate=t.shouldSavePlaybackRate;const s=e.querySelector(".youtubeVideo-container"),o={videoId:this.id,start:(this.shouldSaveProgress?this.playerState.progress:null)||this.startTime,end:this.endTime,related:!1};this.player=new i(s,o),this.player.load(this.id,o),this.setup()}setup(){this.el.addEventListener("playNow",this.player.play.bind(this.player)),this.player.on("cued",()=>this.el.classList.add("is__ready")),this.shouldSavePlaybackRate&&(this.playbackRate=this.playerState.playbackRate,this.player.setPlaybackRate(this.playbackRate),this.player.on("playbackRateChange",this.savePlaybackRate.bind(this)),document.addEventListener("playbackRateChange",this.onPlaybackRateChange.bind(this))),this.shouldSaveProgress&&this.player.on("timeupdate",this.saveProgress.bind(this))}onPlaybackRateChange(e){const{playbackRate:t,id:s}=e.detail;this.id!==s&&t!==this.playbackRate&&this.player.setPlaybackRate(t)}saveProgress(e){this.duration||(this.duration=this.player.getDuration()),this.playerState.saveProgress({seconds:e,duration:this.duration})}savePlaybackRate(e){this.playbackRate=e,this.playerState.savePlaybackRate(e),this.syncPlaybackRates()}syncPlaybackRates(){const{playbackRate:e,id:t}=this,s=new CustomEvent("playbackRateChange",{detail:{playbackRate:e,id:t}});document.dispatchEvent(s)}static vitalize(e,t={}){return e.classList.contains("is__initialized")?null:new o(e,t)}}
2e.exports=o},47588:function(e,t,s){"use strict";const{buildEmbedHtml:i}=s(26604),{parseZenParams:a}=s(89322),o=a;e.exports={name:"zen",selector:".zenVideo",markdownLabel:"Видео в Дзене",allowedAttrs:["id"],allowedDataAttrs:["zen-id","zen-url","zen-start"],getPublicUrl:e=>`https://dzen.ru/video/watch/${e}`,match:o,render:e=>{if(!e||!e.id)return null;const{id:t,src:s,start:a}=e;return i({className:"zenVideo",dataAttrs:{"zen-id":t,"zen-url":s,"zen-start":a},innerHtml:`<div class="zenVideo-container" id="zen-${t}"></div>`})},getPlayerClass:()=>s(11364)}},11364:function(e){"use strict";class t{constructor(e){this.el=e,this.el.classList.add("is__initialized"),this.url=e.getAttribute("data-zen-url"),this.id=e.getAttribute("data-zen-id"),this.containerEl=document.querySelector(`#zen-${this.id}`),this.setup()}setup(){this.containerEl.outerHTML=`\n<iframe\n  src="https://dzen.ru/embed/${this.id}?from_block=partner&from=zen&mute=0&autoplay=0&tv=0"\n  allow="autoplay; fullscreen; accelerometer; gyroscope; picture-in-picture; encrypted-media"\n  data-testid="embed-iframe"\n  frameborder="0"\n  scrolling="no"\n  allowfullscreen></iframe>`,this.el.classList.add("is__ready")}static vitalize(e,s={}){return e.classList.contains("is__initialized")?null:new t(e,s)}}e.exports=t},56766:function(){"use strict";{const e=$(document),t=e=>{$('.js__eventSpacerSubscriptionControl .subscriptionForm-input[type="email"][name="email"]').filter((e,t)=>!$(t).val()).val(e)};$(".js__eventSpacerSubscriptionControl").each((s,i)=>{const a=$(i),o=a.find(".js__eventSpacer-button"),n=a.find(".js__eventSpacer-form").attr("data-course-id");let r,l=!1;e.on("appSetUser",function(e,t){t&&(o.prop("disabled",!1),t.email&&a.find(".js__eventSpacerSubscribeEmail").val(t.email))}),e.on(`submitSubscription.${n}`,(e,t)=>{o.prop("disabled",!0),l=!0,r=t.email}),e.on(`subscriptionChanged.${n}`,function(e,s){o.prop("disabled",s),l&&s&&t(r),l?setTimeout(()=>a.toggleClass("has__subscribed",s),400):a.toggleClass("has__subscribed",s)})})}},53349:function(e,t,s){"use strict";var i=s(24994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=s(76148),o=i(s(32485)),n=s(73345),r=s(45169);t.default=e=>{const t=""!==e.number,s=e.mod&&e.mod.length?e.mod.split(" ").map(e=>`is__${e}`):[],i=(0,o.default)("module","factoid",e.className,s,{is__simple:t});return(0,a.h)("div",{className:i},t&&e.label&&(0,a.h)(r.Caption,{className:"factoid-label",html:e.label}),t&&(0,a.h)("div",{className:"factoid-number",dangerouslySetInnerHTML:{__html:(0,n.sanitize)(String(e.number))}}),t&&e.caption&&(0,a.h)(r.Caption,{className:"factoid-caption",html:e.caption}),t&&!e.caption&&(0,a.h)(r.Caption,{className:"factoid-caption"},e.children),!t&&e.children)}},89830:function(e,t,s){"use strict";const i=s(21834),a="is__active";class o extends i{postInit(){this.switchOn=this.$el.data("switch-on"),this.isActive=!1,this.$closestSpread=this.$el.closest(".spread, .switcherContainer"),this.$closestSpread.on("anchor",(e,t)=>requestAnimationFrame(()=>this.draw(t)))}disable(){this.isActive&&(this.isActive=!1,this.$el.removeClass(a))}enable(){this.isActive||(this.isActive=!0,this.$el.addClass(a))}draw(e){e.id>=this.switchOn?this.enable():this.disable(),this.$el.toggleClass("is__activeRightNow",String(e.id)===String(this.switchOn))}}$(".js__fffader").each(function(){new o($(this))})},91120:function(e,t,s){"use strict";var i=s(24994),a=s(76148),o=i(s(32485));{class e extends a.Component{constructor(e){super(e),this.state={text:e.placeholder,isFocused:!1},this.handleFocus=this.handleFocus.bind(this),this.handleBlur=this.handleBlur.bind(this),this.handleInput=this.handleInput.bind(this)}handleFocus(){this.setState({isFocused:!0})}handleBlur(){this.setState({isFocused:!1})}handleInput(e){this.setState({text:e.target.value})}render(e){const t=(0,o.default)("fontTester-wrapper",{is__focused:this.state.isFocused});return(0,a.h)("div",{className:t},(0,a.h)("div",{className:"fontTester-labelWrapper"},(0,a.h)("div",{className:"fontTester-label"},e.label)),(0,a.h)("input",{type:"text",className:`fontTester-field ${e.fontClass}`,value:this.state.text,onFocus:this.handleFocus,onBlur:this.handleBlur,onInput:this.handleInput}))}}$(".js__fontTester").each(function(){$(this).reactify(e,$(this).data())})}},15376:function(e,t,s){"use strict";var i=s(24994);
2Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=s(76148),o=i(s(32485)),n=s(20690);class r extends a.Component{constructor(e){super(e),this.state={isOpen:e.isOpen},this.toggle=this.toggle.bind(this),this.hide=this.hide.bind(this),this.hideOnDocumentClick=this.hideOnDocumentClick.bind(this),this.onEsc=this.onEsc.bind(this),this.bindCurrentElRef=this.bindCurrentElRef.bind(this)}componentDidMount(){this.props.isComboBox||(document.addEventListener("keydown",this.onEsc),document.addEventListener("click",this.hideOnDocumentClick)),$(document).on("enableFocusMode",this.hide)}componentWillUnmount(){this.props.isComboBox||(document.removeEventListener("keydown",this.onEsc),document.removeEventListener("click",this.hideOnDocumentClick)),$(document).off("enableFocusMode",this.hide)}componentWillReceiveProps({isOpen:e}){null!=e&&this.setState({isOpen:e})}onEsc(e){27===e.keyCode&&this.hide()}toggle(e){e.preventDefault(),this.setState({isOpen:!this.state.isOpen})}hide(){this.setState({isOpen:!1})}hideOnDocumentClick(e){this.currentEl.contains(e.target)||this.hide()}bindCurrentElRef(e){this.currentEl=e}render(){const e=(0,o.default)("dropdown-wrapper",this.wrapperClassName,this.props.wrapperClassName,{is__open:this.state.isOpen||this.props.isOpen});return(0,a.h)("div",{className:e},(0,a.h)("div",{className:"dropdown-current",ref:this.bindCurrentElRef,onClick:this.toggle},this.currentItem||this.props.currentItem,(0,a.h)(n.DropdownIcon,null)),(0,a.h)("div",{className:"dropdown"},this.dropdownItems||this.props.children))}}t.default=r},79395:function(e,t,s){"use strict";var i=s(24994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=s(76148),o=i(s(94634));class n extends a.Component{render(e){return(0,a.h)("form",(0,o.default)({},e,{className:`\n          form\n          ${e.className?e.className:""}\n        `,noValidate:!0,onSubmit:t=>{if(t.preventDefault(),e.isDisabled)return;const s=Array.from(t.target.querySelectorAll("[name]")).reduce((e,t)=>Object.assign(e,{[t.getAttribute("name")]:t.value}),{});e.onSubmit(s)}}),e.children)}}t.default=n},16830:function(e,t,s){"use strict";var i=s(24994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=s(76148),o=i(s(55784)),n=s(45169);class r extends o.default{constructor(e){super(e),this.onChange=this.onChange.bind(this)}componentDidMount(){this.validate()}onChange(e){this.setState({value:e.target.checked,isValid:!0,isDirty:!0},this.validateAndRunCallbacks)}render(){return(0,a.h)("label",{className:this.getClassNames("checkbox")},(0,a.h)("input",{type:"checkbox",ref:this.bindRef,name:this.props.name,required:this.props.required,checked:this.state.value,onChange:this.onChange}),(0,a.h)(n.TextNode,{className:"checkbox-caption",html:this.props.text}))}}t.default=r},24623:function(e,t,s){"use strict";var i=s(24994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=s(76148),o=i(s(94634)),n=i(s(55784));class r extends n.default{render(e){return(0,a.h)("input",(0,o.default)({},e,{className:this.getClassNames("input"),onInput:this.onInput,ref:this.bindRef,value:this.state.value}))}}t.default=r},71472:function(e,t,s){"use strict";var i=s(24994)(s(24623));$(".js__formInput").each(function(){const e=$(this).find("input").remove(),t=e.val()||!1,s=e.attr("name")||!1,a=e.attr("id")||!1,o=e.attr("type")||!1,n=e.attr("required")||!1,r=e.attr("class");$(this).reactify(i.default,{value:t,name:s,id:a,type:o,className:r,required:n}),$(this).children().unwrap()})},56807:function(e,t,s){"use strict";var i=s(24994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=s(76148),o=i(s(94634));t.default=e=>(0,a.h)("button",(0,o.default)({},e,{className:`button ${e.className?e.className:""}`,type:"submit",dangerouslySetInnerHTML:{__html:e.text}}),e.children)},13585:function(e,t,s){"use strict";var i=s(24994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=s(76148),o=i(s(94634)),n=i(s(55784)),r=i(s(43631));class l extends n.default{dispatchResize(){document.dispatchEvent(new Event("appResize"))}render(){return(0,a.h)(r.default,(0,o.default)({},this.props,{className:this.getClassNames("input"),minRows:this.props.minRows||9,onInput:this.onInput,value:this.state.value,onHeightChange:this.dispatchResize}))}}t.default=l},67697:function(e,t,s){"use strict";var i=s(24994);
2Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"ExtendableDropdown",{enumerable:!0,get:function(){return c.default}}),Object.defineProperty(t,"Form",{enumerable:!0,get:function(){return a.default}}),Object.defineProperty(t,"FormCheckbox",{enumerable:!0,get:function(){return n.default}}),Object.defineProperty(t,"FormInput",{enumerable:!0,get:function(){return o.default}}),Object.defineProperty(t,"FormSubmitButton",{enumerable:!0,get:function(){return l.default}}),Object.defineProperty(t,"FormTextarea",{enumerable:!0,get:function(){return r.default}});var a=i(s(79395)),o=i(s(24623)),n=i(s(16830)),r=i(s(13585)),l=i(s(56807)),c=i(s(15376))},55784:function(e,t,s){"use strict";var i=s(24994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=s(76148),o=i(s(32485));const n=/\S+@\S+\.\S+/;class r extends a.Component{constructor(e){super(e);const{isValid:t,value:s,initialValue:i}=e;this.state={value:s||i||null,isValid:void 0===t||t},this.bindRef=this.bindRef.bind(this),this.onInput=this.onInput.bind(this),this.validate=this.validate.bind(this)}componentDidMount(){this.props.initialValue&&this.validate()}componentWillReceiveProps({value:e,name:t,required:s}){this.props.name!==t||this.props.required!==s&&this.state.isDirty?this.setState({value:e||""},this.validate):null!=e&&""!==e?this.setState({value:e},this.validate):e!==this.props.value&&this.setState({value:e})}onInput(e){this.setState({value:e.target.value,isValid:!0,isDirty:!0},this.validateAndRunCallbacks)}validateAndRunCallbacks(){this.validate();const e=this.props.onInput||this.props.onChange;return e&&e({...this.props,...this.state}),!0}validate(){const{name:e,required:t,type:s,validate:i,onValidityChange:a}=this.props,{value:o}=this.state;let r=!0;t&&!this.hasValue&&(r=!1),"email"===s&&this.hasValue&&!o.match(n)&&(r=!1),i&&(r=i(o)),this.setState({isValid:r}),a&&a(e,r)}get hasValue(){const{value:e}=this.state;return"string"==typeof e?e.trim():e}bindRef(e){this.el=e}resetState(){this.setState({isValid:!0,isDirty:!1})}getClassNames(e){return(0,o.default)(e,this.props.className,{is__invalid:!this.state.isValid&&!this.props.silent,is__false:!this.state.isDirty})}}t.default=r},89934:function(e,t,s){"use strict";{const e=s(21834),t="is__active",i="is__scrollable",a="is__loaded",o="is__noDots",n="is__noClick",r="is__noLoop",l=300;class c extends e{postInit(){this.$shaft=this.$el.find(".fotoramaNew-shaft"),this.$slides=this.$shaft.children(),this.length=this.$slides.length,this.slides=this.$slides.get(),this.isScrollable=this.$el.hasClass(i),this.hasDots=!this.$el.hasClass(o),this.isClickable=!this.$el.hasClass(n),this.isLooped=!this.$el.hasClass(r),this.currentSlideIndex=0,this.scrollSpeed=this.$el.data("speed")||1,this.hasDots&&this.buildDots(),this.bindEvents(),this.showCurrentSlide(),this.isScrollable&&(this.calculateScrollTriggers(),this.handleScrollPosition(),this.waitTilAllSlidesLoaded())}buildDots(){const e=$('<div class="fotoramaNew-dots"/>');for(let t=0;t<this.$slides.length;t+=1){const t=$('<div class="fotoramaNew-dot"/>');e.append(t)}this.$el.append(e),this.$dots=this.$el.find(".fotoramaNew-dot"),this.$dots.on("click",this.handleDotClick.bind(this))}bindEvents(){this.isScrollable&&($(document).on("allSlidesLoaded",this.handleScrollPosition.bind(this)),$(document).on("appScroll",this.handleScrollPosition.bind(this)),$(document).on("appResize",()=>{this.calculateScrollTriggers(),this.handleScrollPosition()})),this.isClickable&&this.$slides.on("click",this.nextSlide.bind(this))}handleDotClick(e){const t=$(e.target);this.currentSlideIndex=this.$dots.index(t),this.showCurrentSlide()}nextSlide(){this.currentSlideIndex+=1,!this.isLooped&&this.currentSlideIndex>=this.$slides.length?this.currentSlideIndex=this.$slides.length-1:(this.currentSlideIndex>this.$slides.length-1&&(this.currentSlideIndex=0),this.showCurrentSlide())}showCurrentSlide(){this.$slides.removeClass(t),this.$slides.eq(this.currentSlideIndex).prevAll().addBack().addClass(t),this.hasDots&&(this.$dots.removeClass(t),this.$dots.eq(this.currentSlideIndex).addClass(t))}calculateScrollTriggers(){this.scrollDistance=(window.innerHeight-this.$el.height())/this.scrollSpeed,this.scrollDistance=Math.max(this.scrollDistance,l),this.startTrigger=Math.max(this.$el.offset().top-this.scrollDistance,0);const e=this.scrollDistance/this.length;this.triggers=[...Array(this.length)].map((t,s)=>e*s+this.startTrigger)}handleScrollPosition(e,t=window.application.currentScrollPosition){this.isAllSlidesLoaded&&(this.scrollTop=t,this.triggers.forEac
2h((e,t)=>{this.scrollTop>=e&&(this.currentSlideIndex=t)}),this.scrollTop>this.startTrigger+this.scrollDistance&&(this.currentSlideIndex=this.$slides.length-1),this.scrollTop<this.startTrigger&&(this.currentSlideIndex=0),this.showCurrentSlide(),this.showProgress())}showProgress(){this.$el.attr("data-scroll-progress",this.normalizedProgress)}get isAllSlidesLoaded(){return this.slides.every(e=>e.classList.contains(a))}get normalizedProgress(){return Math.max(0,Math.min(1,(this.scrollTop-this.startTrigger)/this.scrollDistance))}waitTilAllSlidesLoaded(){this.slidesLoadingTimer=setInterval(()=>this.checkSlidesLoading(),100)}checkSlidesLoading(){this.isAllSlidesLoaded&&($(document).trigger("allSlidesLoaded"),clearInterval(this.slidesLoadingTimer))}}$(".js__fotoramaNew").each(function(){new c($(this))})}},27797:function(e,t,s){"use strict";var i=s(86019),a=s(24994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=s(76148),n=a(s(2733)),r=a(s(32485)),l=s(45169),c=a(s(4739)),d=a(s(97116)),h=s(3426),u=a(s(65679)),p=a(s(82147)),m=a(s(57675));class f extends o.Component{constructor(e){super(e),this.state={isLoading:!1,isValid:!0,present:null},$("body").addClass("giftPage"),this.checkCode=this.checkCode.bind(this),this.acceptCode=this.acceptCode.bind(this),this.resendAccessMail=this.resendAccessMail.bind(this),this.setCodeError=this.setCodeError.bind(this),this.unsetLoading=this.unsetLoading.bind(this),new u.default}resendAccessMail(){const e=$(this.el).find("input[name=code]").val();$.post("/get/resend.php",{code:e})}checkCode(){this.unsetCodeError(),this.setLoading(),this.saveUserDataToCookies(),$.post("/get/activate.php",$(this.el).find("form").serialize()).done(e=>{this.setState({present:e}),(0,h.fetchProductDetails)(e.productId).then(this.acceptCode)}).fail(this.setCodeError).always(this.unsetLoading)}acceptCode(e){const t=p.default[e.product_id]||p.default.default;this.setState({present:{...this.state.present,...e,keyColor:t},isPresentReady:!0}),(0,m.default)(),$("body").trigger("codeAccepted",Object.assign(this.data,this.state.present))}saveUserDataToCookies(){n.default.set("name",this.data.name),n.default.set("email",this.data.email)}setLoading(){this.setState({isLoading:!0})}unsetLoading(){this.setState({isLoading:!1})}setCodeError(){this.setState({hasCodeError:!0})}unsetCodeError(){this.setState({hasCodeError:!1})}get data(){let e={};return $(this.el).find("form").serializeArray().forEach(t=>e[t.name]=t.value),e}render(){const e=(0,r.default)("getGift",{is__loading:this.state.isLoading,has__codeError:this.state.hasCodeError});return(0,o.h)("div",{className:e,ref:e=>this.el=e},(0,o.h)("div",{className:"getGift-header"},(0,o.h)(l.Heading1,{className:"is__large"},i.t("getGift.title")),(0,o.h)(l.TextNode,{html:i.t("getGift.codeHint")})),(0,o.h)(c.default,{onSubmit:this.checkCode,hasCodeError:this.state.hasCodeError}),(0,o.h)(d.default,{isPresentReady:this.state.isPresentReady,present:this.state.present,email:this.data.email,onResend:this.resendAccessMail}))}}t.default=f},72002:function(e,t,s){"use strict";var i=s(24994)(s(27797));$(".js__getGift").each(function(){$(this).reactify(i.default)})},42688:function(e,t,s){"use strict";var i=s(86019);Object.defineProperty(t,"__esModule",{value:!0}),t.default=function({accessUrl:e,keyColor:t}){const s=`\n      --buttonColor: #fff;\n      --buttonTextColor: #000;\n      --buttonHoverColor: ${t};\n      --buttonHoverTextColor: #fff;\n  `;return(0,a.h)("div",{className:"getGiftPresentOverlay"},(0,a.h)("a",{href:e,style:s,className:"getGiftPresentOverlay-button button is__enlargedOnMobiles"},i.t("getGift.readButton")))};var a=s(76148)},97116:function(e,t,s){"use strict";var i=s(24994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=s(76148),o=i(s(94634)),n=i(s(10582)),r=s(8818);const l="is__opened";class c extends a.Component{componentDidMount(){this.$box=$(this.box),this.$caps=this.$box.find(".box-cap-inner"),this.$content=$(this.content),this.$styles=$("<style>").appendTo("head"),this.$innerStuff=this.$box.find(".box-side").filter(".is__left, .is__right, .is__back").add(".box-cap-side.is__inside"),this.$html=$("html"),this.$body=$("body"),this.$form=$(".getGift"),$(document).on("appReady",()=>{this.init(),this.setListeners()})}setListeners(){this.$body.on("codeAccepted",this.onCodeAccepted.bind(this)),$(window).on("resize.all",this.init.bind(this))}
2onCodeAccepted(){this.$body.off("codeAccepted"),this.unseal(),setTimeout(()=>{this.$body.addClass("is__unsealed"),this.setDrawListeners(),this.setScrollInterceptor(),this.setContentFinalPosition()},600),window.scrollTo(0,4)}init(){this.setBoxPositions(),this.setContentFinalPosition(),this.moveBox(this.boxPosition.sealed),this.setBoxSizeInCss(),this.setBodyReady(),(this.isUnsealing||this.isOpened)&&this.drawOpening()}setBodyReady(){this.$body.addClass("is__ready")}setBoxPositions(){this.boxPosition={sealed:this.calculateBoxSealedPosition(),unsealed:this.calculateBoxUnsealedPosition(),opened:this.calculateBoxOpenedPosition()}}calculateBoxSealedPosition(){const e=.27*this.calculateBoxSize(),{viewHeight:t}=window.application;return-(t-this.$form.height()-e)*((0,r.isOnMobile)()?.33:.5)}calculateBoxUnsealedPosition(){const{viewHeight:e}=window.application,t=-e/5,s=-e/3;return(0,r.isOnMobile)()?t:s}calculateBoxOpenedPosition(){return this.calculateBoxSize()/4}setContentFinalPosition(){let e=-(this.calculateBoxContentHeight()+this.boxPosition.opened);(0,r.isOnMobile)()&&(e+=.3*this.calculateBoxSize()),this.contentFinalPosition=e}calculateBoxContentHeight(){return this.calculateBodyVisibleHeight()*((0,r.isOnMobile)()?.95:.85)}calculateBodyVisibleHeight(){let e=this.$body.height();return this.isUnsealing&&!this.isOpened&&(e-=300),e}setBoxSizeInCss(){const e=this.calculateBoxSize();this.$html.css({fontSize:e+"px"})}calculateBoxSize(){if((0,r.isOnMobile)())return 350;const e=.9*window.application.viewWidth;let t=window.application.viewHeight;return t>e&&(t=e),t<792&&(t=792),t%2?t:t-1}setDrawListeners(){$(window).on("scroll",this.drawOpening.bind(this)),this.$box.on("click",this.showPresent)}showPresent(){$("html, body").animate({scrollTop:300},1e3,"linear")}setScrollInterceptor(){$(document).on("wheel",()=>{$("html, body").stop(),this.$body.addClass("is__manuallyControlled")})}unseal(){this.isUnsealing=!0,this.$body.addClass("is__unsealing"),this.moveBox(this.boxPosition.unsealed)}drawOpening(){const e=this.calculateProgress();this.moveOpenedBox(e),this.openBoxCover(e),this.moveContent(e),this.showInnerStuff(e),this.boxShouldBeOpened(e)&&this.markBoxOpened()}calculateProgress(){let e=this.isOpened?300:window.pageYOffset;e<0&&(e/=5);const t=e/300;return t>1?1:t}openBoxCover(e){const t=e-1,s=150*(t*t*t+1)+2;this.$caps.css({transform:`rotateY(${s}deg)`})}moveOpenedBox(e){const{unsealed:t,opened:s}=this.boxPosition;let i=t+e*(s-t);i<t&&(i=t),this.moveBox(i)}moveContent(e){const t=this.contentFinalPosition*e,s=this.progressToBrightness(e);this.$content.css({transform:`translate(-50%, ${t}px)`,filter:`brightness(${s})`})}showInnerStuff(e){const t=this.progressToBrightness(e);this.$innerStuff.css({filter:`brightness(${t})`})}moveBox(e){this.$box.css({transform:`translateY(${e}px)`},600)}progressToBrightness(e){const t=.66*e+.34;return t>1?1:t}boxShouldBeOpened(e){return e>=1&&!this.isOpened}markBoxOpened(){this.isOpened=!0,$(window).off("scroll"),$(document).trigger("boxOpened"),this.debouncedSetBodyOpenedClass()}debouncedSetBodyOpenedClass(){let e=setTimeout(()=>this.$body.addClass(l),300);document.addEventListener("scroll",()=>{clearTimeout(e),e=setTimeout(()=>this.$body.addClass(l),300)},!1)}get product(){var e,t;const s=(null===(e=this.props.present)||void 0===e?void 0:e.productId)||(null===(t=this.props.present)||void 0===t?void 0:t.product_id);return null==s?void 0:s.match(/[a-z]*/)[0]}render(){const{isPresentReady:e,email:t,present:s}=this.props;return(0,a.h)("div",{className:"getGiftBox"},(0,a.h)("div",{className:"box-wrapper"},(0,a.h)("div",{className:"box",ref:e=>this.box=e},(0,a.h)("div",{className:"box-content",ref:e=>this.content=e},e&&(0,a.h)(n.default,(0,o.default)({},s,{email:t,product:this.product,productKey:s.key}))),(0,a.h)("div",{className:"box-side is__top"},(0,a.h)("div",{className:"box-cap is__left"},(0,a.h)("div",{className:"box-cap-inner"},(0,a.h)("div",{className:"box-cap-side is__inside"}),(0,a.h)("div",{className:"box-cap-side is__outside"}))),(0,a.h)("div",{className:"box-cap is__right"},(0,a.h)("div",{className:"box-cap-inner"},(0,a.h)("div",{className:"box-cap-side is__inside"}),(0,a.h)("div",{className:"box-cap-side is__outside"})))),(0,a.h)("div",{className:"box-side is__front"}),(0,a.h)("div",{className:"box-side is__right"}),(0,a.h)("div",{className:"box-side is__back"}),(0,a.h)("div",{className:"box-side is__left"}))))}}t.default=c},4739:function(e,t,s){"use strict";var i=s(86019);
2Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=s(76148),o=s(67697),n=s(45169),r=s(3426);class l extends a.Component{constructor(e){super(e),this.state={name:(0,r.getUserName)()||null,email:(0,r.getUserEmail)()||null,code:null},this.validityStates={name:!!this.state.name,email:!!this.state.email,code:!1},this.submitTimeout=null,this.focusFirstEmptyField=this.focusFirstEmptyField.bind(this),this.onInput=this.onInput.bind(this),this.onInputValidityChange=this.onInputValidityChange.bind(this),this.validateCode=this.validateCode.bind(this),this.clearCodeError=this.clearCodeError.bind(this)}componentDidMount(){setTimeout(this.focusFirstEmptyField,150)}componentDidUpdate(e){const{hasCodeError:t}=this.props;e.hasCodeError!==t&&this.setState({hasCodeError:t})}focusFirstEmptyField(){const e=$(this.el).find("input").filter((e,t)=>!t.value);e.length&&e[0].focus()}onInput(e){this.setState({[e.name]:e.value}),this.isValid&&(clearTimeout(this.submitTimeout),this.submitTimeout=setTimeout(this.props.onSubmit,450))}onInputValidityChange(e,t){this.validityStates[e]=t}clearCodeError(){this.setState({hasCodeError:!1})}validateCode(e){return!this.state.hasCodeError&&e.length>=6}get isValid(){return Object.keys(this.validityStates).every(e=>this.validityStates[e])}render(){const{name:e,email:t,code:s,hasCodeError:r}=this.state;return(0,a.h)("form",{className:"getGiftForm",ref:e=>this.el=e},(0,a.h)("label",{className:"getGiftForm-field"},(0,a.h)(n.Caption,{className:"getGiftForm-label",html:i.t("getGift.form.name")}),(0,a.h)("div",{className:"getGiftForm-inputWrapper"},(0,a.h)(o.FormInput,{className:"is__fullWidth",name:"name",type:"text",onInput:this.onInput,onValidityChange:this.onInputValidityChange,initialValue:e,required:!0}))),(0,a.h)("label",{className:"getGiftForm-field"},(0,a.h)(n.Caption,{className:"getGiftForm-label",html:i.t("getGift.form.email")}),(0,a.h)("div",{className:"getGiftForm-inputWrapper"},(0,a.h)(o.FormInput,{className:"is__fullWidth",name:"email",type:"email",onInput:this.onInput,onValidityChange:this.onInputValidityChange,initialValue:t,required:!0}))),(0,a.h)("label",{className:"getGiftForm-field"},(0,a.h)(n.Caption,{className:"getGiftForm-label",html:i.t("getGift.form.code")}),(0,a.h)("div",{className:"getGiftForm-inputWrapper"},(0,a.h)(o.FormInput,{className:"is__fullWidth "+(r?"is__invalid":""),name:"code",type:"text",minlength:6,onInput:this.onInput,onKeydown:this.clearCodeError,onValidityChange:this.onInputValidityChange,initialValue:s,validate:this.validateCode,required:!0})),r&&(0,a.h)(n.Caption,{className:"getGiftForm-error",html:i.t("getGift.form.errors.code")})))}}t.default=l},10582:function(e,t,s){"use strict";var i=s(86019),a=s(24994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=s(76148),n=a(s(32485)),r=s(45169),l=a(s(945)),c=s(8818),d=a(s(96465)),h=a(s(21201)),u=a(s(12528));class p extends o.Component{constructor(e){super(e);const{shouldDisplayDummyShelf:t}=this;this.state={shouldDisplayDummyShelf:t}}componentDidMount(){$(document).on("appResize",this.setDummyShelfDisplay.bind(this))}setDummyShelfDisplay(){const{shouldDisplayDummyShelf:e}=this;this.state.shouldDisplayDummyShelf!==e&&this.setState({shouldDisplayDummyShelf:e})}get shouldDisplayDummyShelf(){return(0,l.default)(this.props.productId)&&(0,c.isOnMobile)()}get accessUrl(){const{product:e,productId:t,productKey:s}=this.props;return"bookshelf"===e?`/projects/${t}/?self`:`/books/${s}/`}get bookCover(){return`/projects/${this.props.productId}/files/_book-cover-face.jpg`}render(){const{product:e,productId:t,books:s,canRead:a,email:l,keyColor:c}=this.props,{shouldDisplayDummyShelf:p}=this.state,m="bookshelf"===e&&!p,f=(0,n.default)("getGiftPresent",`is__${e}`,{is__cannotRead:!a,is__dummyShelf:p});return(0,o.h)("div",{className:f},(0,o.h)("div",{className:"getGiftPresent-in"},(0,o.h)("div",{className:"getGiftPresent-title"},(0,o.h)(r.Heading2,{html:i.t("getGift.openedTitle")}),(0,o.h)(r.TextNode,{html:i.t("getGift.openedSubtitle")})),(0,o.h)("a",{className:"getGiftPresent-product no-u",href:this.accessUrl},"book"===e&&(0,o.h)("img",{className:"getGiftBook",src:this.bookCover}),m&&(0,o.h)(d.default,{height:180,product:"bookshelf",books:s}),p&&(0,o.h)(h.default,{productId:t,isLarge:!0}))),(0,o.h)(u.default,{canRead:a,email:l,product:e,accessUrl:this.accessUrl,keyColor:c}))}}t.default=p},12528:function(e,t,s){"use strict";var i=s(24994);
2Object.defineProperty(t,"__esModule",{value:!0}),t.default=function({canRead:e,email:t,product:s,accessUrl:i,keyColor:r}){return e?(0,a.h)(o.default,{accessUrl:i,keyColor:r}):(0,a.h)(n.default,{product:s,email:t})};var a=s(76148),o=i(s(42688)),n=i(s(65372))},65372:function(e,t,s){"use strict";var i=s(86019),a=s(24994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=function({product:e,email:t}){const s=i.t(`getGift.emailCaption.${e}Break`,{email:t});return(0,o.h)("div",{className:"getGiftPresentOverlay is__long"},(0,o.h)("div",{className:"getGiftPresentOverlay-access"},(0,o.h)("span",{className:"getGiftPresentOverlay-lock"},"🔓"),(0,o.h)("div",{className:"textNode"},(0,o.h)("p",{dangerouslySetInnerHTML:{__html:s}})),(0,o.h)("div",{className:"getGiftPresentOverlay-support textNode"},(0,o.h)(n.default,{html:i.t("getGift.supportCaption")}))))};var o=s(76148),n=a(s(37011))},3426:function(e,t,s){"use strict";var i=s(24994);Object.defineProperty(t,"__esModule",{value:!0}),t.resendGift=t.getUserName=t.getUserEmail=t.fetchProductDetails=t.checkGiftCode=void 0;var a=i(s(2733)),o=i(s(98999)),n=i(s(69803));t.checkGiftCode=e=>fetch("/get/activate.php",{method:"POST",credentials:"include",body:JSON.stringify(e),headers:o.default}),t.resendGift=e=>fetch("/get/resend.php",{method:"POST",credentials:"include",body:JSON.stringify({code:e}),headers:o.default}),t.getUserName=()=>{const e=(window.application.user||{}).name;if(e)return e;return(a.default.get("name")||"").replace(/\+/g," ")||null||null},t.getUserEmail=()=>{const e=(window.application.user||{}).email;if(e)return e;return a.default.get("email")||null||null},t.fetchProductDetails=e=>fetch((0,n.default)({productId:e}),{headers:o.default}).then(e=>e.json())},20609:function(e,t,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=s(76148);class a extends i.Component{constructor(e){super(e),this.state={isOpen:!1},this.$header=$(".header"),this.$document=$(document),this.show=this.show.bind(this),this.hide=this.hide.bind(this)}componentDidMount(){this.$document.on("keyup.header",e=>{this.state.isOpen&&27===e.keyCode&&this.hide()}),this.$document.on("click.header",e=>{this.state.isOpen&&(e.target&&e.target.className.includes("headerSearch")||this.hide())})}componentDidUpdate(){this.$header.toggleClass("is__searching",this.state.isOpen)}componentWillUnmount(){this.$document.off("keyup.header"),this.$document.off("click.header")}show(){this.state.isOpen||(this.setState({isOpen:!0}),this.input.focus())}hide(){this.setState({isOpen:!1}),this.input.blur()}render(){const e=window.application.isOnMobile?"Поиск":"Поиск советов";return(0,i.h)("div",{className:"headerSearch"},(0,i.h)("button",{className:"headerSearch-toggler",onClick:this.show},"🔍"),(0,i.h)("form",{className:"headerSearch-form",action:"/mod/search/index.php",method:"get"},(0,i.h)("input",{className:"headerSearch-input",type:"text",name:"text",placeholder:e,ref:e=>this.input=e})),(0,i.h)("button",{className:"headerSearch-clear",onClick:this.hide},"×"))}}t.default=a},26502:function(e,t,s){"use strict";var i=s(24994)(s(20609));$("body.soviets .js__headerSearch").each(function(){$(this).reactify(i.default)})},62693:function(e,t,s){"use strict";var i=s(24994),a=s(76148),o=i(s(18288));class n extends a.Component{constructor(e){super(e),this.state={isLeftFullyVisible:!0,isRightFullyVisible:!0},this.checkBoundaries=(0,o.default)(300,this.checkBoundaries.bind(this))}componentDidMount(){$(document).on("appResize.horizontalScrollableBox boxGeometryChange",this.calculate.bind(this)),this.calculate()}componentWillUnmount(){$(document).off("appResize.horizontalScrollableBox")}getScrollWidth(){return this.box.scrollWidth-this.box.clientWidth}calculate(){this.scrollWidth=this.getScrollWidth(),this.checkBoundaries()}checkBoundaries(){this.box.scrollLeft<=0?this.setState({isLeftFullyVisible:!0}):this.setState({isLeftFullyVisible:!1}),this.box.scrollLeft>=this.scrollWidth?this.setState({isRightFullyVisible:!0}):this.setState({isRightFullyVisible:!1})}render(e){return(0,a.h)("div",{className:`\n            horizontalScrollableBox\n            ${this.state.isLeftFullyVisible?"":"is__leftScrolled"}\n            ${this.state.isRightFullyVisible?"":"is__rightScrolled"}\n          `},(0,a.h)("div",{className:"horizontalScrollableBox-view"},(0,a.h)("div",{className:"horizontalScrollableBox-holder",ref:e=>this.box=e,onScroll:this.checkBoundaries},(0,a.h)("div",{className:"horizontalScrollableBox-shaft"},e.children))))}}e.exports=n},21191:function(e,t,s){"use strict";var i=s(24994);
2Object.defineProperty(t,"__esModule",{value:!0}),t.IconSelectorItem=t.IconSelector=void 0;var a=s(76148),o=i(s(32485));t.IconSelector=e=>{const t=(0,o.default)("iconSelector",{[e.className]:e.className,is__small:e.isSmall});return(0,a.h)("div",{className:t},(0,a.h)("div",{className:"iconSelector-items"},e.children))},t.IconSelectorItem=e=>(0,a.h)("div",{className:`iconSelector-item ${e.className||""}`,onClick:e.onClick},e.children)},66275:function(e,t,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"IconSelector",{enumerable:!0,get:function(){return i.IconSelector}}),Object.defineProperty(t,"IconSelectorItem",{enumerable:!0,get:function(){return i.IconSelectorItem}});var i=s(21191)},79538:function(e,t,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AttachmentIcon=void 0;var i=s(76148);t.AttachmentIcon=()=>(0,i.h)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 36 36"},(0,i.h)("path",{className:"sovietFilesButton-bg",d:"M2.715.25A2.414 2.414 0 0 0 .25 2.715v30.57a2.414 2.414 0 0 0 2.465 2.465h30.57a2.414 2.414 0 0 0 2.465-2.465V2.715A2.414 2.414 0 0 0 33.285.25z"}),(0,i.h)("path",{className:"sovietFilesButton-front",d:"M33.25 0H2.75A2.707 2.707 0 0 0 0 2.75v30.5A2.707 2.707 0 0 0 2.75 36h30.5A2.707 2.707 0 0 0 36 33.25V2.75A2.707 2.707 0 0 0 33.25 0zm0 .5a2.19 2.19 0 0 1 2.25 2.25v7.45a6.58 6.58 0 0 1-3.25.8A7.347 7.347 0 0 1 25 3.75 6.59 6.59 0 0 1 25.8.5zM2.75.5h22.5a7.174 7.174 0 0 0-.75 3.25 7.759 7.759 0 0 0 7.75 7.75 7.174 7.174 0 0 0 3.25-.746v17.185L25.042 17.285l-6 6.7-10.4-10.6L.5 22.5V2.75A2.19 2.19 0 0 1 2.75.5zM.5 33.25v-10l8.159-9.131 10.218 10.405.006.012h.009L29.652 35.5H2.75A2.189 2.189 0 0 1 .5 33.25zm32.75 2.25h-2.912c-.006-.007 0-.018-.01-.024L19.4 24.339l5.663-6.323L35.5 28.651v4.6a2.19 2.19 0 0 1-2.25 2.249z"}))},52630:function(e,t,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AttachmentIconWithHover=void 0;var i=s(76148);t.AttachmentIconWithHover=()=>(0,i.h)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 36 36",className:"with__hoverVersion"},(0,i.h)("path",{className:"is__exceptHover",d:"M33.25 0H2.75A2.707 2.707 0 0 0 0 2.75v30.5A2.707 2.707 0 0 0 2.75 36h30.5A2.707 2.707 0 0 0 36 33.25V2.75A2.707 2.707 0 0 0 33.25 0zm0 .5a2.19 2.19 0 0 1 2.25 2.25v7.45a6.58 6.58 0 0 1-3.25.8A7.347 7.347 0 0 1 25 3.75 6.59 6.59 0 0 1 25.8.5zM2.75.5h22.5a7.174 7.174 0 0 0-.75 3.25 7.759 7.759 0 0 0 7.75 7.75 7.174 7.174 0 0 0 3.25-.746v17.185L25.042 17.285l-6 6.7-10.4-10.6L.5 22.5V2.75A2.19 2.19 0 0 1 2.75.5zM.5 33.25v-10l8.159-9.131 10.218 10.405.006.012h.009L29.652 35.5H2.75A2.189 2.189 0 0 1 .5 33.25zm32.75 2.25h-2.912c-.006-.007 0-.018-.01-.024L19.4 24.339l5.663-6.323L35.5 28.651v4.6a2.19 2.19 0 0 1-2.25 2.249z"}),(0,i.h)("path",{className:"is__hoverOnly",d:"M33.34 0H2.71a2.4 2.4 0 0 0-.28 0h-.24L1.9.13 1.68.2l-.26.14a1.28 1.28 0 0 0-.2.11A2 2 0 0 0 1 .63L.82.77a1.43 1.43 0 0 0-.2.23c0 .06-.1.11-.14.16s-.1.19-.15.28a1.62 1.62 0 0 0-.1.18A1.93 1.93 0 0 0 .12 2l-.06.16a2.48 2.48 0 0 0-.06.5v30.59A2.71 2.71 0 0 0 2.66 36h30.63a2.4 2.4 0 0 0 .28 0h.24l.28-.08.23-.07.26-.14a.78.78 0 0 0 .2-.11c.08 0 .15-.12.23-.18l.17-.14c.07-.07.13-.15.2-.23s.1-.1.14-.16.1-.18.15-.27.07-.12.1-.19a1.83 1.83 0 0 0 .11-.33l.06-.17a2.48 2.48 0 0 0 .06-.54V2.75A2.7 2.7 0 0 0 33.34 0zM2.68 35.25a2 2 0 0 1-1.93-2V23.16l7.91-8.86 10.11 10.29v.07l10.46 10.59H2.68zm16.89-10.92 5.5-6.13 10.18 10.37v4.75a2 2 0 0 1-2 1.93h-3zm5.56-7.13-.13-.1-6 6.7L8.73 13.3l-.09-.1L.75 22V2.68a2 2 0 0 1 2-1.93H25a7.36 7.36 0 0 0-.62 3 7.88 7.88 0 0 0 7.87 7.87h.06a7.26 7.26 0 0 0 2.94-.62v16.51zm7.22-6.32h-.1a7.19 7.19 0 0 1-7.13-7.12 6.52 6.52 0 0 1 .7-3h7.52a1.86 1.86 0 0 1 1.34.57 1.94 1.94 0 0 1 .57 1.43v7.43a6.49 6.49 0 0 1-2.9.69z"}))},14285:function(e,t,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BookSystemRequirementsWithMobileIcon=void 0;var i=s(76148);t.BookSystemRequirementsWithMobileIcon=()=>(0,i.h)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 235 90"},(0,i.h)("path",{d:"M62 86c0 1.5.6 2.9 1.5 4H22.1C6.2 90 0 87.4 0 87.4V86h13V4c0-2.2 1.8-4 4-4h113c2.2 0 4 1.8 4 4v20h-4V4H17v82h45zm92-56v56c0 2.2-1.8 4-4 4H68c-2.2 0-4-1.8-4-4V30c0-2.2 1.8-4 4-4h82c2.2 0 4 1.8 4 4zm-4 0H68v56h82V30z",class:"laptopTabletPlusMobileIcon-laptop"}),(0,i.h)("path",{d:"M227 0h-30c-4.6 0-8 3.5-8 8.1V82c0 4.6 3.5 8 8 8h30c4.6 0 8-3.5 8-8.1V8.1c0-4.6-3.5-8.1-8-8.1zm4 80.5c0 4.1-1.5 5.5-5.5 5.5h-27c-4 0-5.5-1.5-5.5-5.5v-71c0-4 1.5-5.5 5.5-5.5h3.6l1 2.8c.2.8.7 1.2 1.2 1.2h15.5c.5 0 1-.5 1.2-1.2l.9-2.8h3.6c4 0 5.5 1.5 5.5 5.5v71zm-58.6-34.1h12.7v2.4h-12.7V61h-2.6V48.9H157v-2.4h12.8V33.3h2.6v13.1z",class:"laptopTabletPlusMobileIcon-mobile"}))},79788:function(e,t,s){"use strict";
2Object.defineProperty(t,"__esModule",{value:!0}),t.BureausphereIcon=void 0;var i=s(76148);t.BureausphereIcon=()=>(0,i.h)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 29.999"},(0,i.h)("path",{d:"M27.817 4.714A17.485 17.485 0 0 0 15.608 0h-.1A16.361 16.361 0 0 0 4.062 4.285c-5.22 5.25-5.646 15.105.107 21A18.222 18.222 0 0 0 16.67 30a15.218 15.218 0 0 0 10.93-4.182c5.223-5.142 6.395-14.998.217-21.104zM8.386 25.522c1.086-.4 2.662-.917 3.648-1.209 1.008-.378 1.764-1.26 1.764-3.024a1.735 1.735 0 0 0-.42-1.345 17.115 17.115 0 0 1-1.6-3.78 3.585 3.585 0 0 1-.8-2.311c0-.672.336-.756.588-.756h.42l-.084-2.226c0-1.513.168-2.563 1.05-3.067a5.741 5.741 0 0 1 3.235-.588 4.122 4.122 0 0 1 2.562.882 3.856 3.856 0 0 1 1.008 3.025l-.084 1.848h.427c.294 0 .545.168.545.84 0 .714-.251 2.017-.8 2.269-.336.5-.84 2.9-1.638 3.78-.294.294-.21.84-.21 1.345a2.926 2.926 0 0 0 1.89 3.024 39 39 0 0 1 4.187 1.435 13.767 13.767 0 0 1-7.406 1.995 17.088 17.088 0 0 1-8.282-2.137zm17.558-1.354c-.017.017-.037.032-.054.049a20.92 20.92 0 0 0-4.278-1.417c-1.009-.252-1.6-.462-1.723-1.428-.21-1.513 1.344-3.193 1.513-4.243a4.857 4.857 0 0 0 1.176-3.361A2.13 2.13 0 0 0 21.57 11.8s.126-1.26.126-2.227a4.035 4.035 0 0 0-2.017-3.612A9.369 9.369 0 0 0 16.7 5.2a7.738 7.738 0 0 0-4.831.672A4.519 4.519 0 0 0 9.976 9.82a12.5 12.5 0 0 0 .084 1.933 2.417 2.417 0 0 0-1.009 2.1 5.313 5.313 0 0 0 .925 3.319c.126 1.05 2.016 3.36 1.89 4.285-.21.966-.672 1.176-1.68 1.428a21.791 21.791 0 0 0-3.9 1.149c-.147-.13-.307-.251-.444-.386-5.027-5.148-4.21-13.6-.136-17.698a13.992 13.992 0 0 1 9.8-3.61h.1a15.031 15.031 0 0 1 10.566 4.038 11.9 11.9 0 0 1 3.488 8.56 13.155 13.155 0 0 1-3.716 9.23z"}))},41299:function(e,t,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BureausphereInIcon=void 0;var i=s(76148);t.BureausphereInIcon=()=>(0,i.h)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 30"},(0,i.h)("path",{d:"M27.8 4.7c6.2 6.1 5 16-.2 21.1-6.3 6.3-17.9 4.9-23.4-.5-5.8-5.9-5.3-15.7-.1-21 5.8-5.8 17.4-5.8 23.7.4z"}))},64091:function(e,t,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CrossIcon=void 0;var i=s(76148);t.CrossIcon=()=>(0,i.h)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"7",height:"6",fill:"none"},(0,i.h)("path",{className:"crossIcon-line",d:"M1 0h4"}),(0,i.h)("path",{className:"crossIcon",fill:"#000",d:"M1.29 5.77 3.66 3.4l2.36 2.36.5-.49L4.16 2.9 6.52.54l-.5-.49-2.36 2.36L1.29.04.8.54 3.17 2.9.8 5.27l.49.5z"}))},5204:function(e,t,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CrossBoldIcon=void 0;var i=s(76148);t.CrossBoldIcon=()=>(0,i.h)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"15",height:"15",fill:"none"},(0,i.h)("g",{className:"crossBoldIcon"},(0,i.h)("path",{fill:"#fff",d:"m4.95 10.727-1.786 1.75L4.93 14.28l1.786-1.785-1.768-1.768zM7.555 8.12l1.768-1.768-1.768-1.768-1.768 1.768L7.556 8.12zm2.596 2.596-1.768 1.768 1.75 1.75 1.768-1.732-1.75-1.786zm.55-.539 1.75 1.786 1.8-1.764-1.778-1.786-1.772 1.764zM8.106 7.57 6.338 5.802 4.574 7.566l1.76 1.768L8.107 7.57zm2.596-2.596 1.768 1.768 1.786-1.786-1.804-1.768-1.75 1.786zm-.55-.539 1.75-1.786L10.134.917l-1.75 1.75 1.768 1.768zM7.556 7.031 5.788 8.799l1.768 1.768 1.768-1.768L7.556 7.03zM4.95 4.424l1.768-1.768L4.931.871 3.164 2.674l1.785 1.75zm-.539.55-1.785-1.75L.889 4.996l1.757 1.75L4.41 4.974zM7.017 7.57l1.768 1.768 1.771-1.772L8.781 5.8 7.017 7.57zM4.41 10.177 2.642 8.409l-1.75 1.75 1.733 1.768 1.785-1.75zm2.307 2.318 2.607-2.607-3.536-3.536L3.181 8.96l3.536 3.536zm-.929-2.607 2.596 2.596 3.536-3.536-2.596-2.596-3.536 3.536zm6.114 2.614.55-.54-3.5-3.57-.55.538 3.5 3.572zm.572-4.089L9.878 5.806 6.335 9.334l2.596 2.607 3.543-3.528zm-2.6.925 2.596-2.596-3.536-3.536-2.596 2.596 3.536 3.536zm2.578-6.15-.55-.539-3.5 3.572.55.539 3.5-3.572zm-4.068-.52L5.788 5.262 9.324 8.8l2.596-2.596-3.536-3.536zm.94 2.595L6.717 2.656 3.181 6.192l2.607 2.607 3.536-3.536zm-6.16-2.589-.54.55 3.572 3.5.539-.55-3.571-3.5zm-.518 4.072 2.607 2.596 3.528-3.543-2.607-2.596-3.528 3.543zm2.603-.944L2.642 8.41l3.536 3.536 2.607-2.607-3.536-3.536zm-2.624 6.125.539.55 3.57-3.5-.538-.55-3.571 3.5z"}),(0,i.h)("path",{fill:"#000",d:"M4.749 11.027 7.356 8.42l2.596 2.596.55-.539L7.906 7.87l2.596-2.596-.55-.539-2.596 2.596-2.607-2.607-.539.55L6.817 7.87 4.21 10.477l.539.55z"}),(0,i.h)("path",{fill:"#000",d:"m4.749 11.027-.714.7.707.721.714-.714-.707-.707zM7.356 8.42l.707-.707-.707-.707-.707.707.707.707zm2.596 2.596-.707.707.7.7.707-.693-.7-.714zm.55-.539.7.714.72-.705-.711-.715-.709.706zM7.906 7.87l-.707-.707-.706.706.704.707.709-.706zm2.596-2.596.707.707.714-.714-.721-.707-.7.714zm-.55-.539.7-.714-.707-.693-.7.7.707.707zM7.356 7.331l-.707.707.707.707.707-.707-.707-.707zM4.749 4.724l.707-.707-.714-.714-.707.721.714.7zm-.539.55-.714-.7-.695.709.703.7.706-.709zM6.817 7.87l.707.707.709-.708-.71-.708-.706.709zM4.21 10.477l-.707-.707-.7.7.693.707.714-.7zm1.246 1.257 2.607-2.607L6.65 7.713 4.042 10.32l1.414 1.414zM6.65 9.127l2.596 2.596 1.414-1.414-2.596-2.596L6.65 9.127zm4.003 2.603.55-.539-1.4-1.428-.55.539 1.4 1.428zm.559-1.959L8.615 7.164 7.197 8.576l2.596 2.607 1.418-1.412zM8.613 8.577l2.596-2.596-1.414-1.414-2.596 2.596 1.414 1.414zm2.589-4.017-.55-.54-1.4 1.43.55.538 1.4-1.428zm-1.957-.532L6.649 6.624l1.414 1.414 2.596-2.596-1.414-1.414zM8.063 6.624 5.456 4.017 4.042 5.43l2.607 2.607 1.414-1.414zm-4.028-2.6-.54.55 1.43 1.4.538-.55-1.428-1.4zm-.53 1.959L6.11 8.579 7.523 7.16 4.916 4.565 3.504 5.983zm2.605 1.18L3.503 9.77l1.414 1.414 2.607-2.607L6.11 7.163zm-2.614 4.014.539.55 1.428-1.4-.539-.55-1.428 1.4z"})))},54046:function(e,t,s){"use strict";
2Object.defineProperty(t,"__esModule",{value:!0}),t.DeadlineScoreStickerIcon=void 0;var i=s(76148);t.DeadlineScoreStickerIcon=()=>(0,i.h)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 145.3 145.4"},(0,i.h)("path",{d:"m72.4 145.1-5.7-7.7-6.9 6.6-4.2-8.6-8 5.3-2.7-9.2-8.8 3.9-1-9.5-9.3 2.3.6-9.6-9.6.6 2.3-9.3-9.5-1 3.9-8.8-9.2-2.7 5.3-8L1 85.2l6.6-6.9L0 72.7 7.7 67l-6.6-6.9 8.6-4.2-5.3-8 9.2-2.7-3.9-8.8 9.5-1-2.2-9.2 9.6.6-.6-9.6 9.3 2.3 1-9.5 8.8 3.9 2.7-9.2 8 5.3L60 1.4 66.9 8 72.6.3 78 8.1l6.9-6.6 4.2 8.6 8-5.3 2.7 9.2 8.8-3.9 1 9.5 9.3-2.3-.6 9.6 9.6-.6-2.3 9.3 9.5 1-3.9 8.8 9.2 2.7-5.3 8 8.6 4.2-6.6 6.9 7.7 5.7-7.7 5.7 6.6 6.9-8.6 4.2 5.3 8-9.2 2.7 3.9 8.8-9.5 1 2.3 9.3-9.6-.6.6 9.6-9.3-2.3-1 9.5-8.8-3.9-2.7 9.2-8-5.3-4.2 8.6-6.9-6.6-5.6 7.4zm-5.5-9.3 5.5 7.5 5.5-7.5 6.7 6.5 4.1-8.4 7.8 5.2 2.6-9 8.6 3.8 1-9.3 9.1 2.2-.6-9.3 9.3.6-2.2-9.1 9.3-1-3.8-8.6 9-2.6-5.2-7.8 8.4-4-6.5-6.7 7.5-5.5-7.5-5.5 6.5-6.7-8.4-4.1 5.2-7.8-9-2.6 3.8-8.6-9.3-1 2.2-9.1-9.3.6.6-9.3-9.1 2.2-1-9.3-8.6 3.8-2.6-9-7.8 5.2-4.1-8.4-6.7 6.5-5.5-7.5-5.5 7.5-6.7-6.5-4.2 8.3-7.8-5.2-2.6 9-8.6-3.8-1 9.3-9-2.2.6 9.3-9.3-.6 2.2 9.1-9.3 1L15 46l-9 2.6 5.2 7.8-8.4 4.1 6.5 6.7-7.5 5.5 7.5 5.5L2.8 85l8.4 4.1L6 96.9l9 2.6-3.8 8.6 9.3 1-2.2 9.1 9.3-.6-.6 9.3 9.1-2.2 1 9.3 8.6-3.8 2.6 9 7.8-5.2 4.1 8.4 6.7-6.6z",class:"DeadlineScoreStickerIcon"}))},86582:function(e,t,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DeleteCrossIcon=void 0;var i=s(76148);t.DeleteCrossIcon=()=>(0,i.h)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 19 19"},(0,i.h)("path",{fill:"#fff",d:"M9.5 18.548A9.048 9.048 0 1 0 .452 9.5 9.047 9.047 0 0 0 9.5 18.548"}),(0,i.h)("path",{d:"M9.5 19A9.5 9.5 0 1 1 19 9.5 9.511 9.511 0 0 1 9.5 19ZM9.5.905A8.595 8.595 0 1 0 18.1 9.5 8.605 8.605 0 0 0 9.5.905ZM5.615 14.3l4-4 3.985 3.984.845-.827-3.985-4 3.985-3.985-.845-.831-3.982 3.986-4-4-.827.844 4 3.985-4 4Z",class:"delete-cross"}))},54948:function(e,t,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DesignersBellIcon=void 0;var i=s(76148);t.DesignersBellIcon=()=>(0,i.h)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 43 55"},(0,i.h)("path",{d:"M18.7 53.7c2.6.8 5.4-.6 6.2-3.2-3.1-.9-6.3-1.8-9.5-2.7-.6 2.5.8 5.1 3.3 5.9zm23.1-8.8c0-.2-.1-.5-.1-.7-.4-1.9-1.2-3.7-2.2-5.4-.5-.7-.8-1.5-.9-2.4-.1-1.3-.1-2.7.2-4 .4-2 .9-4 1.5-5.9.7-2.2.9-4.4.6-6.7-.2-2-1-3.8-2.2-5.4L25 32.3l16.8 12.6zM13.2 25.3c-.3.6-.6 1.3-.9 1.9-.7 1.3-1.8 2.4-3.2 3.1-2 .9-3.7 2.2-5.1 3.9-.8.9-1.4 1.9-1.8 3-.5 1.4-.8 2.6-1.2 3.8v.6c.1.4.5.7.9.8 3.7 1.1 7.4 2.1 11.1 3.2l9.9-13-9.7-7.3zm10.9 8.2L14.6 46c6.1 1.8 12.3 3.5 18.4 5.2l6.3 1.8c.5.2 1.1-.1 1.3-.6 0-.1 0-.1.1-.2.2-.6.3-1.1.5-1.7.2-.8.5-1.6.7-2.5.1-.4.1-.7.1-1.1L24.1 33.5zm13.6-20.4c-.7-.7-1.5-1.3-2.4-1.9-.1 0-.1-.1-.2-.1 2.6-1.4 3.5-4.6 2.1-7.2-1.3-2.4-4.2-3.5-6.7-2.5-1.2.5-2.2 1.4-2.8 2.5-.9 1.6-.9 3.5 0 5.1h-.2c-2.6 0-5 .8-7.1 2.3-2.2 1.6-3.8 3.9-4.6 6.5-.6 1.6-1 3.2-1.5 4.8-.1.4-.3.9-.4 1.3l9.9 7.5 13.9-18.3zm-5.2-8.9c1.1 0 2.1.9 2.1 2v.2c0 1.1-.9 2.1-2 2.1h-.2c-1.2 0-2.2-1-2.2-2.2.1-1.2 1.1-2.1 2.3-2.1z",class:"designersBellIcon-key"}))},25758:function(e,t,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DesignersChaletIcon=void 0;var i=s(76148);t.DesignersChaletIcon=()=>(0,i.h)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 182.6 211.2"}
2,(0,i.h)("path",{d:"M69.4 85.4c-.1-.4-.1-.8-.1-1.2 0-.5.1-.7-.4-.8-.8-.1-1.2.1-2 0-.2 0-.6.1-.8.1h-3.8c-1.9 0-3.8-.1-5.7-.1-1.6 0-3.2.1-4.8.1-.5 0-1 .1-1.5.2-.1.6-.1 1.3-.1 1.9 0 .6 0 1.2.1 1.8.1.7.1 1.4.1 2.1 0 1 .1 1.9.1 2.9v1.9c-.1.8-.1 1.7-.1 2.5 0 .6.1 1.3.1 1.9 0 .4.1.9.1 1.4-.1.4.3.8 0 1.2.6.5.5.5 1.1.5h2c.4 0 .9.1 1.3.1 1.1-.1 2.2 0 3.4 0h7.2c.8-.1 1.7-.1 2.5 0 .2 0 .4 0 .5-.1.8-.2.8-.6.7-1.3-.1-.5-.1-.9 0-1.4-.1-.7.1-1.2 0-1.9.1-.4.1-.9 0-1.3-.1-1.9 0-2.8 0-4.8 0-1.1-.1-2.3-.1-3.4 0-.4 0-.8.1-1.2.1-.4.2-.7.1-1.1zm14.1 17c1 .1 3.1.1 4 .1H93c.9-.1 1.7-.1 2.6 0h4.7c.3 0 .8 0 .9-.2.2-.5.2-1 .2-1.5-.1-1.3.1-2.3-.1-3.7-.1-1.6 0-3.3-.1-4.9-.1-1 .1-2.1 0-3.1 0-.9.1-1.8.1-2.7l-.1-1.7c0-1.1-.5-1.2-1.1-1.2h-.7c-.9 0-2.2 0-3.1.1h-2.1c-1.6 0-2.9-.1-4.5 0h-5c-.7 0-1.2.1-1.9.1-.6.2-.7.3-.6.8.1.6 0 1.3.1 1.9 0 .9 0 2.6.1 3.5v1.8c.1 1.3-.1 2.7.1 4 .1 1-.1 1.8 0 2.8-.1.7-.1 1.4 0 2.1-.1.1-.1.3-.1.4-.1 1.4.4 1.5 1.1 1.4zm17.8 37c.1-.6.1-1.3-.1-1.9-.1-.7-2-.5-2.6-.5-1.5-.1-3-.1-4.6-.1s-2.9 0-4.5.1c-1.4.1-2-.2-3.4-.1-.8 0-1.6.1-2.3.1-1-.1-1.6.1-1.5 1.1v1.2c.1.7.1 1.3 0 2v12.1c0 .4.2.8.4 1.2.5.3 1.1.5 1.7.5h2.2c.8-.1 1.6-.1 2.4 0 .3 0 .7.1 1 .1 1.1-.1 2.1.1 3.1 0 1.6-.1 3 0 4.6-.1h2.4c.5.1 1.1-.7 1.1-1.1.1-1.2-.1-2.5-.1-3.7.1-1.7 0-3.3.1-5 .2-1.3.2-2.6.2-3.9-.1-.7-.1-1.3-.1-2zm81.1-42.1c-.3-.3-.3-.5-.7-.8-.8-.6-1.3-1-2.1-1.6-.7-.5-1.3-1.1-1.9-1.8-.9-.9-1.9-1.7-2.9-2.4-1.1-.8-2.2-1.7-3.2-2.7-1.6-1.5-3.2-2.8-4.9-4.2-1.4-1.3-2.9-2.5-4.3-3.7-1.8-1.6-3.6-3.3-5.5-4.9l-3-2.7c-1.3-1.2-2.7-2.3-4-3.5-1.2-1-2.3-2.1-3.4-3.1-2-1.7-3.9-3.5-5.9-5.2-1.2-1.1-2.3-2.2-3.4-3.4-1.8-2.1-3.9-4-6.1-5.7-.5-.4-.7-1-.6-1.6v-1.9c0-2-.1-3.4 0-5.4.1-1.6 0-2.6 0-4.2 0-1.5.1-2.6 0-3.8 0-.5-.2-1.4-1-1.4h-1.1c-1.1.1-2.3.1-3.1.1-2.3-.1-2.6.1-4.8-.1h-2.7c-.8 0-1.7.2-1.7 1.2V40c0 1.3.1 2.5 0 3.8v10.1c0 .5.9 1.4 1.3 1.7.7.7 1.5 1.5 2.3 2.1 1.3 1.1 3.1 2.7 5.2 4.7 1.3 1.2 2.2 1.7 3.3 2.8.2.2.8.6.8.9v.7c0 .2-.3.4-.5.4-.3.1-.7.1-1 0-.7-.1-1.3-.4-1.8-.9-1-.8-1.7-1.5-2.7-2.4-1.3-1.2-2.5-2.2-3.8-3.4-.9-.8-1.7-1.6-2.5-2.5-1.1-1-1-1-2.1-2-.4-.4-1-.6-1-1.3v-5.5c0-1.6 0-2.8-.1-4.3 0-1-1.3-1.7-2.3-1.5h-2c-2.4.1-4.8 0-7.2 0-4 0-8 .2-11.9.1-2 0-4-.1-6-.2-1.6-.1-3.2.2-4.7.2-1.3 0-2.7-.1-4-.1-.9.1-1.7.1-2.6 0-.6-.1-1.2 0-1.6.4-.1.1-.2.1-.3.2-.2.1-.4.2-.6.4-.7.6-1.2 1-1.9 1.6-1.3 1.2-2.6 2.3-4 3.6-1 .9-2.3 2.1-3.3 3-.7.6-1.6 1.2-2.3 1.7-1.1.9-2.2 1.9-3.3 2.9-.8.7-1.2 1.2-2 1.9l-3 2.4c-.5.4-1.1.7-1.6 1.1-.9.8-1.8 1.6-2.7 2.3-.6.5-1.3.9-1.9 1.4-.8.6-1.5 1.3-2.2 1.9-.8.7-1.6 1.3-2.4 2-.9.7-1.7 1.5-2.6 2.2-.8.7-1.6 1.4-2.5 2.1-.5.5-1 .9-1.6 1.4-.5.4-1 .8-1.5 1.3-.6.6-1.3 1.2-1.9 1.7-.7.6-1.4 1.1-2 1.6-.4.4-.8.8-1.2 1.1-.7.6-1.5 1.1-2.2 1.7-.9.7-1.8 1.5-2.7 2.2-.7.7-1.5 1.4-2.3 2-.6.4-1.1 1-1.7 1.5-.9.8-1.9 1.6-2.9 2.4-.7.6-1.5 1.3-2.2 1.9-.8.6-1.6 1.2-2.4 1.7-.8.5-1.6 1.1-2.3 1.7-.4.6-.5 1.3-.3 1.9.1.3.9.1 1.4.1.4 0-.3.2 2.2 0h.6c.4 0 .8-.1 1.2-.1.9.1 1.8.1 2.7 0h2.1c.5-.1 1.2.1 1.7 0s1.2 0 1.7-.1h1.4c.7-.1 1.5-.1 2.2 0 .8.1 1.6 0 2.4 0 .9-.1 1.4-.1 2.3-.2.4 0 .6.5.6.8v3.9c0 .2 0 2.8.1 4.2 0 .4 0 .9-.2 1.3-.7 0-1.4.1-2.2.1-.8 0-1.7 0-2.5-.1h-2c-1.2 0-2.3.9-2.3 2.1v2.4c0 .6-.1 1.8-.1 2.4s.1 1.5.1 2.1v5.3c0 1.2.1 2.4 0 3.6v1.9c0 .3-.1.6-.1 1v1.3c0 .7 1.1 2.3 1.9 2.3h7c.3.3.4.6.4 1 0 .2-.1 1.1-.1 1.3v1.3c0 .4 0 .7.1 1.1V159c0 .5 0 1.1-.1 1.6v1.8c0 .3 0 .7.3.9-.1.3 0 .6.1.8.4.5 1.9.8 3.5.9 1 0 2.1 0 3.1.1v6c.1 1.5 0 2.6 0 4.1 0 1 .1 2 0 3.1v12.5c0 .4-.1.9-.1 1.3-5.6 2.6-12.4 5.8-16.1 7.6-1.7.8-4.1 1.9-5.8 2.7-2.4 1.1-4.4 2.1-6.6 3.1-2.6 1.2-5.1 2.5-7.5 3.9-1 .7-.8 1.1-.7 1.6.1.3 4.1.1 4.8 0 1.4-.1 2.7-.4 4-1 3.4-1.5 5.5-2.6 7.9-3.7 2.2-1.1 8.3-3.8 8.7-4 4.4-2.1 6.8-3.1 11.2-5.2 3.7-1.8 8.3-3.6 12-5.4 6-2.9 10.2-4.7 16.2-7.6.7-.3 10.6-4.7 15.1-6.9 14.2-6.8 29.6-10.9 45.3-12h10.8v-2.1c0-.8 0-1.5-.1-2.3 0-1 .2-2.1.1-3.2s-.1-2.1-.1-3.2c.1-1.9.1-3.9 0-5.8v-5.7c-.1-.5-.1-1 0-1.5v-1.7c0-.5.1-.9.2-1.4.1-.2.5-.6.6-.6.8 0 1.4.1 2.1.1h.1c1.1-.1 2.2 0 3.3 0 1.3-.1 2.6 0 3.9 0 .3 0 .6 0 .9.2.2.2.3.4.4.7v2.6c0 1.9-.2 3.5-.1 5.5v13.1c-.1.7-.1 1.5 0 2.2v2.7c1.5 0 2.9.1 4.5 0 1.4 0 2.6-.1 4 0 1.2 0 2.5-.1 3.7 0 .8.1 1.6-.2 2.4-.1.4 0 .9 0 1.3-.1.5-.1.4-.3.4-.9V162c0-1.7 0-3.3-.1-5v-7.3c0-1.1-.1-2.2-.1-3.3s-.1-3.7-.1-4.8c0-1.3-.1-2.6-.1-3.9-.2-1.4-.1-2.9.1-4.3.1-.3.2-.4.5-.4.6 0 1.3.1 1.9.1h3.7c.5.1.9.1 1.4 0 .4-.1.8.1 1.3.1.9 0 .9-.5 1-1.1.1-.7.1-1.4 0-2.1v-4.1c0-1.8.1-2.2.1-4v-11.1c0-.5-.4-1.6-.8-1.7-.7-.1-1.4-.2-2.1-.2h-1c-.5 0-1.3-.1-1.7-.1-.3 0-.5.1-.8.1-1.5 0-1.5-.1-3-.1-.9 0-1.4-.2-1.4-.7v-1.4c.1-1.2-.1-2.5 0-3.4.1-.5-.2-1-.7-1.2h-.1c-1-.1-2-.2-3-.2h-4.5c-2.1 0-4.1.1-6.2 0-1.4-.1-2.8 0-4.2 0h-9.4c-.7-.1-1.3-.1-2 0h-11.2c-.8 0-1.7 0-2.5.1-.7 0-1 1.3-1 1.6 0 1.3.1 4 .1 4.8-.1.2-.2.4-.4.6h-.3c-.5 0-1-.1-1.5-.
21-2.4.1-16.7.2-18.4.1-1.5 0-3.3-.1-4.8-.1h-7.1c-2 0-4 .1-6 0-1.9 0-3.6.1-5.5.1h-5.5c-1.8 0-3.4-.1-5.2-.1h-6.6c-1.1 0-2.3-.1-3.4 0h-8.6c-1.1 0-1.8.1-2.6.1h-1.7c-.4 0-1.5-.1-1.9-.1h-3.6l-.2-.2c-.1-.8-.1-1.6-.1-2.4-.1-1.4 0-2.8.1-4.2v-1.2c0-1.9-.1-2.9 0-4.4.1-1.1.1-2.3 0-3.4.1-.8.5-1.6 1.1-2.2.6-.4 1.1-.9 1.6-1.4.2-.2.5-.4.7-.6.7-.6 1.5-1.1 2.2-1.7 1.6-1.4 3-2.8 4.5-4.2.1-.1 2.3-2.1 3.4-3 .9-.8 1.9-1.5 2.8-2.3 1.2-1.1 2.5-2.2 3.7-3.3 1.3-1.2 2.5-2.1 3.8-3.2 1.1-.9 2.1-1.9 3.2-2.9.8-.7 1.6-1.5 2.4-2.2.6-.5 1.2-1.1 1.8-1.6.7-.6 1.4-1.3 2.1-1.8 1.2-1 1.9-1.9 3.1-2.8 1.5-1.2 2.5-2.2 4-3.3.2-.2.4-.2.7 0 1.2.8 2.3 1.7 3.3 2.7.9 1 2.1 2 3 3 .9.9 1.9 1.8 2.8 2.7 1.2 1.2 2.2 2 3.7 3.4 1 1 2.1 1.9 3.1 2.9.9.7 1.7 1.5 2.5 2.4.8.8 1.5 1.4 2.3 2.2.9.9 1.6 1.5 2.5 2.3 1.1 1 1.9 1.8 3 2.8 1.5 1.4 3.1 2.8 4.6 4.2s3 2.8 4.5 4.3c.8.8 1.6 1.8 2.4 2.6 1.4 1.4 2.1 2.3 3.6 3.6.3.3 1.2 1.1 1.6 1.5.4.4.9.8 1.4 1.1.2.3.5.6.9.7.3 0 .9.1 1 .1.9-.1 1.1.1 2 0 .8-.1 1.6 0 2.4 0h2.9c1.5 0 2.2.1 3.8 0 1.7 0 3 0 4.7-.1 1.5 0 3.2.1 4.7.1h4.6c1.5 0 3.1.1 4.5 0 2.1 0 3.8-.1 5.9 0 1.4 0 2.9.1 4.3.1h3.2c.6 0 2 .1 2.6.1 2-.1 3.4-.2 5.4-.2 
21 0 2.1.1 2.4.1.9-.1 1.7-.1 2.6 0h1.8c.2 0 1.4-.1 1.5-.1.8 0 1.1-.5 1.1-.8.6-.6.4-.8.2-1zM60.5 180.1c0 .2-.1.6-.1 1-1.7.8-3.4 1.6-5.4 2.5-3.1 1.4-5.9 2.8-8.9 4.2v-1.1c0-1.3 0-4.6-.1-6 .1.7 0-4.5 0-9.3 0-2.3-.1-4.3-.1-5.9v-.3h14.4c-.1.8-.1 1.7 0 2.5 0 1.1.2 4.8.2 6.6v5.8zm9.6-3.6c-.2.1-.3.2-.5.2V172c0-1.1-.1-5.9 0-7h3.5c6 0 10.1.1 16.1 0h9.4c-13.4 3.9-26.8 10.7-28.5 11.5zm48.3-25.4c0 1.5-.1 5.5-.1 7.1 0 .8 0 1.5.1 2.3H46.8c-1.7 0-4.1 0-5.8-.1h-5.9v-5.1c0-1 0-2.1-.1-3.1 0-1.6.1-2.7 0-4.3-.1-1.2.1-3.4 0-4.6-.1-2.3 0-4.3 0-5.9 0-1.5.1-2.2.1-3.6 0-.2.1-.4.2-.5h38.8c1.5 0 3.3.1 4.8.1h8.5c1.9-.1 3.5 0 5.4-.1h8.8c1.7 0 9.1 0 13.6.1h1.9c.4.1.7.2 1.1.3.1.6.1 1.2 0 1.8 0 1.1 0 2.3.1 3.4v2.8c.1.7 0 3.5.1 4.5 0 1.2-.1 2.2-.1 3.4 0 .5 0 1 .1 1.5zm-81.6-37.5h5.3c.8-.3 1.6-.4 2.4-.4h5.9c1.1 0 2.2.1 3.3.1H56c1.6-.1 3.1.1 4.7.1h9.5c1.4.1 2.7-.1 4.1 0 .9 0 1.9.1 2.8.1.6 0 1.3-.1 1.9-.1 2-.1 4.1 0 6.1-.1h4c.6 0 1.1-.1 1.7-.1h8c.8 0 12.4.2 14.3.2 1.7 0 2.1.1 3.2 0 .9-.1 1.9.1 2.8 0 .3 0 1.7-.1 1.9.1s1.9 1.6 2.6 2.3c.8.8 1.4 1.7 2.4 2.6.9.7 1.7 1.6 2.3 2.7 0 0-5.5 5.8-6.6 6.9-.4.5-1 .7-1.6.8-.9 0-1.7.1-2.6.1h-4.6l-9.4-.1h-.1l-3.4-.1c-1 0-2.1 0-3.1.1-1.6 0-3.3-.1-4.9 0-1.5 0-2.9.1-4.4.1-1.7 0-3.4-.1-5.1-.1-2.1.1-4.1.2-6.2.2-1.5 0-3.1-.1-4.6-.1-.8 0-1.7.1-2.5.1s-1.7-.1-2.5-.1H65c-1.2 0-2.4 
20-3.7.1-1.4.1-2.7-.1-4.1 0h-6.3c-1.2 0-2.4.1-3.6.1-1.3 0-2.3.1-3.5 0-1 0-1.9 0-2.9.1-1.8-.1-3.5 0-5.3-.1-1.7 0-3.4-.1-5-.1-.6.1-1.3.1-1.9.1-.9-.1-1.7-.1-2.6 0-.5 0-.9-.9-.9-1.4 0-.9 0-1.8.1-2.7 0-1.4-.1-2.9 0-4.3v-1.8c0-.2 0-.4-.1-.6 0-.6-.1-1.3-.1-1.9 0-.8.1-1.6.2-2.4 0-.1.7-.3.9-.3 1-.1 2 0 3.1-.1.7-.1 1.5-.1 2.2 0h2.8c.8-.1 1.7-.1 2.5 0zm32.6 26.9c0-.9 0-1.7-.1-2.6-.2-.3-.4-.5-.7-.7-.5-.2-1-.2-1.5-.2-2.1.1-4.2-.1-6.3 0-1.8.1-3.6 0-5.4 0h-.2c-1.2 0-2.1-.1-3.4-.1-.4.1-.7.3-1 .6-.1.4-.2.9-.2 1.3 0-1-.5 1.5 0 7.7.1 1-.3 2.1-.2 3.2.1.6.1 1.3 0 1.9 0 .9.1 1.8.2 2.7.3.5 1.1 1 1.4.9h9.9c1.9 0 3.3-.1 5.4 0 .4-.1.8-.1 1.2 0 .5-.1.8-.5.9-1 .1-.8.1-1.5 0-2.3v-.9c.1 4 0-6.6 0-10.5z",class:"designersChaletIcon-key"}),(0,i.h)("path",{d:"M121.7 26.8c-3-3.1-9.2-7.2-29.1-7.2-8.7 0-17.8-.1-24.5-.1h-8.2c-8.8 0-15.5.1-21.4.2-4.9 0-9.4.1-14.3.1-4 0-7.9 0-12.1-.1-2.1.2-4.1-1.2-4.8-3.2-.8-2.6.3-6.3 4.7-9.6C15.6 4.1 21.1 0 34.6 0c2 0 7 .3 9 .5C49 1 55.1 2.7 61.9 5.2c7.1 2.7 12.3 5 19.3 4.2 2.8-.3 5.1-1.4 9.4-1.6 2.4 0 4.9.1 7.3.5 13.4 2.3 21.4 7.6 26 15.6.6 1.1 1 2.2 1.3 3.4H122l-.3-.5z",class:"designersChaletIcon-text"}))},35570:function(e,t,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DesignersFunicularIcon=void 0;var i=s(76148);t.DesignersFunicularIcon=()=>(0,i.h)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 173.9 141.8"},(0,i.h)("path",{d:"M167.4 23.9c0 3.1.1 5.5 0 8.5v4.7c0 1.5-.1 3.1-.1 4.5v10.6c0 1.4.1 2.7 0 4.1 0 .7-.4 1.4-.5 1.6-.3.9-.9 1.8-1.1 2.3-.7 1.6-1.4 2.2-3 2.8-1.4.6-2.1.9-3.5 1.4-.2.1-1.4.6-1.6.7-.7.3-1.3.5-2 .9-.8.4-1.5.8-2.6 1.2-.5.2-2.3.9-2.8 1.2-.8.3-2 .8-2.2.9-.1 0-.1.1-.2.1v1.1c0 .4 0 .8-.1 1.2-.1.5-.2 1.1-.7 1.8-.8 1.2-2.3 1.9-2.8 2-.7.1-2.6.5-3.7.2-1.2-.4-2-.8-2.7-1.8 0 0-.1-.1-.1-.2-.3.1-.5.2-.7.3-.5.2-.8.3-1 .4-.9.3-2.3.9-3.2 1.3.1 1.2-.1 2.3-.5 3.2-.1.3-.2.6-.4.8-.8 1.2-2.1 2-2.7 2.1-.7.1-2.8.7-3.9.4-1.2-.4-2.1-1.2-2.8-2.2 0 0-.1 0-.1.1-1.3.5-2.2.9-2.7 1-1.1.5-5.5 2.4-9.1 3.9-.6.2-1.1.2-1.6.5-.5.2-1.1.6-1.6.8-.9.5-1.8.8-2.8 1.2-.5.2-1.2.5-1.7.7-1.3.6-2.5 1-3.7 1.4-.6.2-1.3.6-2 .9-1.3.5-1.9.7-2.9 1-1 .3-2 1.1-3 1.5-.1 0-1 .5-1.5.7-.6.3-1.5.6-2.3 1-2.8 1.4-4.8 1.9-7.7 3.2-2.4 1.1-4.7 2.1-7.3 3.2-1.1.5-2.6 1.3-3.6 1.7-1.7.7-3 1.2-4.7 1.8-1.3.5-2.6 1.1-4.1 1.8-1 .5-1.9.8-2.9 1.2-2.2.8-4 1.4-6 2.2-.4.2-.9.4-1.4.7.1 1.7 0 3-.9 4.2-.2.3-.5.7-.8.9-.6.7-1.2 1-1.7 1.2-.7.3-3.3.6-4.4.3-1.2-.4-1.9-1.2-2.6-2.2-.5.1-1.1.2-1.4.3-.3.1-1.6.9-1.8 1-.3.1-.8.4-1.3.6 0 0-.1 0-.1.1.1 1.3 0 2.4-.5 3.3-.1.3-.2.6-.4.9-.8 1.2-2.2 1.8-2.7 2.1-1 .4-3 .7-4.1.4-1.2-.3-2.1-1.1-2.8-2.3h-.1c-1.4.6-2.8 1-4.1 1.7-1.2.6-1.7.7-2.9 1.3-.7.3-1.1.5-1.6.7-1.3.5-2.5.6-3 .4-.5-.1-.7-.1-1.2-.4-.8-.4-1.4-.6-2.3-1.1-1.6-.8-2.5-1.3-4-2.1-.9-.5-2.1-1.3-3-1.9-1.4-1-2.1-2-2.1-3.8 0-1.4 0-2.9.1-4.3v-29c-.1-2 .1-3.6 0-5.6v-6.8c0-.9 1.1-3.2 2.2-4.1.3-.2 2.1-1.3 2.4-1.4 1.1-.4 2.1-.8 2.8-1 .7-.3 1.5-.6 2.3-.9 1.3-.6 1.7-.6 3.3-1.2 2.1-.9 3.5-1.4 5.6-2.4.9-.4 2.6-1.2 3.7-1.6 1.3-.5 2.5-1.2 4-1.8 1.7-.7 3.2-1.2 4.9-1.9 2.3-1 4.2-1.9 6.6-2.8 2-.8 3.7-1.5 5.7-2.4 1.1-.4 2.5-1.2 3.6-1.6 1.4-.5 2.7-1.1 4-1.6 1.1-.5 2.2-.8 3.3-1.3 1.7-.8 3.1-1.4 4.9-2.2 1.3-.6 3-1.1 4.3-1.7 1.3-.5 2.3-.8 3.9-1.5 2-.8 3.4-1.4 5.3-2.2 1.7-.6 3.2-1.3 4.8-2 1-.4 3-1.3 3.9-1.7 3.1-1.3 5.5-2.2 8.7-3.6 2.4-1.1 3.4-1.4 5.9-2.4.7-.3 4-1.4 4.7-1.8 1.9-.9 2.8-1.3 4.7-2.2.8-.4 1.7-.7 3.2-1.3l1.8-.9c1.2-.5 2.2-.6 3.4-1.2 3.6-1.6 5.6-2.4 9.2-4.1.5-.2 2-.9 2.9-1.3 1-.4 2-.9 2.9-1.3 1.4-.6 3.1-1.4 4.5-2 3.2-1.4 6.8-1.7 10.5-1.7h5.5c2 0 4 0 6 .1h5.3c1.3.1 2.2.4 3.4.9.5.3 1.5 1 1.9 1.5.4.7.9 1.9 1.1 3.2.2 1.2.3 2.7.3 3.9-.1 2.1-.1 3.4-.1 5zm-154 68.3v-7.4c0-2.2 0-3.5-.1-5.5 0-.8-.8-1.7-1.3-2.1-.8-.6-2.1-.5-3.6-.6h-3c-.6 0-2.1.7-2.4 1.1-.8.8-.9 2.5-.9 3.1 0 .8-.1 1 0 1.5.1 1.4 0 1.4 0 2.8v4.1c0 2.5.1 3.5.1 5.9v6.7c0 1.1 1.2 2.3 2.5 2.3H9c1 0 1.8 0 2.7-.1.5 0 1.2-.6 1.4-1.3.2-.6.3-3.1.3-4.7-.1-1.7 0-4.2 0-5.8zm23.5 4.3c0-2.2-.1-4.5 0-6.7V70c0-.7-.3-2-.4-2.5-.3-.7-.5-1.3-1.1-1.6-.6-.3-1.2-.4-2.2-.4h-1.5c-.5 0-1.4.1-1.9.1-1.1 0-2-.1-3.2 0-1.9 0-3.2 0-5.2.1-.6 0-2 .3-2.6.6-.8.6-1.2 1.3-1.6 2.6-.2.3-.2 2.1-.2 2.5 0 1.2.1 2.6 0 3.8-.1 2.4 0 4.8 0 7.2 0 1.8-.1 4 0 5.8.1 1.7 0 2.9 0 4.7v13.7c0 1.4.1 2.9.1 4.3 0 1.5-.1 3.3 0 3.9 0 .6 1.4.2 1.6.2.6-.3 1.5-.6 2.1-.9 2-.9 2.5-1.1 4.5-1.9 1.4-.6 3-1.1 4.3-1.8 1.9-.9 4.7-2.1 6.6-3.1.8-.4 1-1.2.9-1.8v-1.9c-.1-2.5-.2-4.5-.2-7.1zm30.5-35.4c-.1-1-.3-2.5-.8-3.3-.4-.5-1.3-1.2-2.5-1.2h-7.6c-1.7 0-3 .1-4.6.1h-2.7c-1.1 0-2.4.1-3.6 0-1.4-.1-2.8.2-3.5.8-1 .9-1.4 1.7-1.4 3.2 0 .6.1 2.1.1 2.7.1 2.2 0 6.1 0 5.5 0-.6-.1 1.7-.1 1.7.1 2-.1 2.7.1 4.7.1 1 .2 1.9 1.1 2.6.6.5 1.4.8 2.8.8 2.4 0 5 .1 7.4.1 3 0 5.4 0 7.9-.1 1.4 0 2.9-.1 4-.2.9-.1 1.9-.3 2.5-1 .7-.9 1.2-1.3 1.1-3.5V63.4c-.2-.6-.2-2-.2-2.3zm30.4-.9c-.1-1.8 0-4.2-.1-6.8V49c0-.8 0-1.9-.1-2.7-.1-.7-.7-1.2-.9-1.6-.6-.8-2.1-1.5-3.1-1.5-1.9 0-3.5.1-5.4 0-3-.1-6.6-.1-7.1-.1s-1.2.1-1.8.1h-3.4c-1.4.1-2.7.6-3.2 1.1-.5.4-1.2 1.4-1.3 1.9-.3.8-.4 1.6-.3 2.5v4c0 1.1.1 2 0 3.1-.1.9 0 1.6 0 2.1 0 .1.1 1.2.1 1.4v2.4c0 1 .3 1.6.6 2.2.8 1.3 1.7 1.4 3.4 1.5 3.1.1 5.7 0 8.7 0 1.1 0 2.6.1 3.7 0 1.5 0 3.8 0 5.3-.1.7 0 2.2-.1 2.9-.4.6-.2 1-.7 1.5-1.5.3-.4.5-2.1.5-3.2zm30.3-25.4c0-1-.3-2.2-.6-2.9-.4-.8-1-1.6-2.3-1.8-.6-.1-1.8 0-2.5-.1-1.6-.1-2.7 0-4.3 0-3.2 0-6-.1-9.3 0-1.1 0-3.2-.1-4.3.1-1.8.2-3.5 1.9-3.5 3.8 0 1.4 0 3.7-.1 6.4 0 2.3 0 4.3.1 7.1 0 .8 0 1.8.3 2.6.2.7 1.2 1.5 1.9 1.6.8.2 2 .4 3.4.4h8c1.7 0 3.4.1 5.1 0 1.7 0 3.6 0 5.3-.4 1.1-.3 2-1 2.3-2 .3-1 .3-2.2.3-3.2.1-1.6 0-2.7.1-4.8v-2.5c.2-1.6.1-2.6.1-4.3zm22.8-17.3h-7.6c-1.
26 0-3.2 0-4.8.1h-2.2c-.3 0-1.2.2-1.5.3-1.2.5-1.6 1-2.2 1.9-1 1.6-.6 3.5-.7 5.4-.1 2-.1 4.1-.1 5.7 0 3.2-.1 7.1 0 10.3 0 2.4 0 4.5.1 7 0 2.6 0 5.1-.1 7.7v9.7c1-.5 1.8-.8 2.7-1.2l7.8-3.6c1.2-.6 2.4-1.1 3.7-1.6 1.4-.6 2.7-1.2 4.1-1.8 1.2-.5 1.2-1 1.2-2.2 0-2.5-.1-4.5-.1-6.9v-11c0-1.7.1-3.5.1-5.2-.1-3.7 0-7.5 0-11.4-.2-1.3-.1-3.2-.4-3.2zm14.3 9.6v-5c0-1.6.1-3.8.1-4 0-.4-.7-.6-1-.6H156c-.7 0-1.1-.1-1.2.5v1.3c.1 1.9.1 4.2.1 6.1V32c0 2.8-.1 5.6.1 8.3 0 .4.1.8.2 1.1.1.4.4 1.4.6 1.6 1 .9 1.4 1.1 2.9 1.1h6.2c.5 0 .4-.3.4-.7v-1.8c0-1.5 0-2.2.1-3.6.1-1.5-.1-2.7-.1-4.2 0-2.3-.2-4.5-.1-6.7zm-1.6-20.8c0 .1-.1.7-.3.9-.3.4-.9.2-1.3.2-1 0-2-.1-3 0-1.3 0-2.7 0-4 .1-1.8 0-5.1.1-4.1 0 1 0-2.3 0-3.3-.3-.7-.5-.5-1-.1-1.5.4-.4 1-1.2 1.6-1.6.7-.6 1.5-1.2 2.3-1.8.9-.6 1.4-.9 2.6-1.8.3-.3 1-.4 1.4-.4 1.6 0 3-.1 4.6-.1h2.5c.8 0 1.2.2 1.2 1 0 1.3.1 1.5 0 2.2-.1.7-.1 1.7-.1 3.1zm-27.5 1.5c-2.6 1.1-5 1.9-7.3 3-1.5.7-2.9 1.2-4.5 1.7-.9.3-2.2.9-3 1.3-1.2.5-2.4 1-3.4 1.5-.6.3-1.3.5-2.2.9-.4.2-1.5.6-1.9.8-1.1.6-2.2 1-3.4 1.6-.2.1-1.5.6-1.8.7-1.6.7-1.7.9-3.3 1.6-1.2.5-2.4.8-3.6 1.2-1.6.5-2.9 1.2-4.5 1.9-.5.2-1 .4-1.6.6-2.3 1-4.3 1.7-6.6 2.7-1.6.7-3 1.2-4.5 1.9-.2.1-1.1.5-1.4.6-2.1.9-2.9 1.2-4.6 2-2.8 1.4-5.5 2.2-8.4 3.5-2.8 1.2-6 2.5-8.9 3.7-2.3 1-4.5 1.9-6.7 2.9-2.3 1-4.7 1.5-6.9 2.9-1.2.6-2.5 1.1-3.7 1.5-1.3.6-2.6 1.1-3.9 1.6-2 .8-3.6 1.5-5.6 2.3-.6.3-1.6.6-2.2.9-.9.5-1.7.7-2.4 1.1-.7.3-1.1.6-1.5.8-1 .4-3.6 1.4-3.9 1.6-.4.2-.7-1.1-.7-2.4 0-.8.1-1.5.4-1.7.3-.2 1.8-.9 3.2-1.5.6-.2 1.6-.7 2.1-.9 2.7-1.1 5.5-2.3 8.2-3.4 1.3-.5 2.7-1.3 4-1.8 1.8-.7 3.8-1.6 5.6-2.3 2.1-.9 3.9-1.6 6-2.5 2.4-1 4.8-2.1 7.2-3.2 2-.9 4.3-1.8 6.3-2.6 1.8-.7 3.4-1.5 5.2-2.3l7.2-3c2.7-1.1 5.6-2.2 8.3-3.2 3.2-1.2 6.3-2.6 9.5-3.8 3-1.2 5.7-2.5 8.7-3.7 1.7-.7 3.3-1.5 5-2.2 1.4-.5 2.9-1.2 4.3-1.7.8-.3 1.8-.9 2.6-1.3 3.3-1.5 6.4-2.6 9.7-4 1.9-.8 3.4-1.4 5.3-2.2.7-.3 1.5-.8 2.1-1 .6-.2 2-.9 2.5-.9s1 .2 1.3.8c.3.5.2.7.2 1.3-.1 1.5-1 2.2-2.5 2.7zm-118 49.3c-.6.3-2 .9-3.2 1.4-.9.4-1.7.7-2.6 1-1.8.7-3.7 1.5-5.5 2.3-.4.2-2 .8-2.4 1-.9.4-1.3.2-1.4-.3V61c0-.6-.1-2-.2-2.9-.1-.9.1-1.6 0-2.4 0-.7 1-1.4 1.5-1.4.6-.1 1.7 0 1.7 0h5.6c.6 0 1.3.1 2.2.1 1.5.3 2.9.5 4.1 1 .4.1.9.3 1 .8.2.3-.2.6-.8.9z",class:"designersFunicularIcon-text"}),(0,i.h)("path",{d:"m173.9 64.7-4.7 1.9v-2l-4.2.4v3.4l-8.2 3.4v-2l-4.1.3v3.5l-32.9 13.8v-2.1l-4.1.4v3.4l-8.2 3.5v-2.1l-4.2.4v3.4l-8.2 3.5v-2.1l-4.1.4v3.4l-8.2 3.5v-2.1l-4.1.4v3.4l-8.3 3.5v-2.1l-4.1.4v3.4l-8.2 3.5v-2.1l-4.1.4v3.4L21.1 129v-2.1l-4.1.3v3.5l-8.3 3.5V132l-4.1.4v3.5l-4.7 2v3.9l174-73.3z",class:"designersFunicularIcon-key"}))},20690:function(e,t,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DropdownIcon=void 0;var i=s(76148);t.DropdownIcon=()=>(0,i.h)("svg",{xmlns:"http://www.w3.org/2000/svg",class:"dropdown-icon",viewBox:"0 0 14 8"},(0,i.h)("path",{d:"M7 8a.433.433 0 0 1-.319-.141L.118.748A.45.45 0 0 1 .138.12a.434.434 0 0 1 .619.021L7 6.906 13.243.141a.433.433 0 0 1 .619-.021.45.45 0 0 1 .02.628L7.319 7.859A.433.433 0 0 1 7 8Z",class:"dropdown-arrow"}))},71852:function(e,t,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EditorsBellIcon=void 0;var i=s(76148);t.EditorsBellIcon=()=>(0,i.h)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 46 52"},(0,i.h)("path",{d:"m20.9 47.9 1.8-7.8 7.8 1.8-1.8 7.8-7.8-1.8z",class:"editorsBellIcon-key"}),(0,i.h)("path",{d:"m42.5 31.2 1-4.2 1-4.2.9-4-3.9-.9.9-3.9-4.9-1.2 1.2-4.9-3.9-.9.9-3.9-4.3-1L26.9 1 26 4.9 22.1 4 21 8.8l-3.9-.9-.9 3.9-4.9-1.2-.9 3.9-1 4.2-1 4.2-1 4.3-3.7-.9-1 4.1-1.1 4.7L.7 39l3.6.8.9-3.9L9.9 37l4.1 1 4.1 1 4.2 1 4.2 1 4.2 1 4.2 1 4.4 1-.9 3.9 4 1.1 1-4.2 1-4.4 1-4.1-3.9-.9 1-4.2zM23 17.6l-1 4.2-.8 3.5-3.9-.9-1.1 4.8-.9 4-3.9-.9.9-4 1.1-4.8 3.9.9.8-3.5 1-4.2.9-4 3.9 1-.9 3.9zm4.8-3.1-3.8-.9.9-3.8 3.9.9-1 3.8zM13.1 41.9l-4.1-1-4.7-1-.4 1.8-.5 2 4.7 1.1 4.1 1 4.2.9 4.6 1.1.5-2 .4-1.8-4.6-1.1-4.2-1zm16.5 4-.4 1.8-.5 2 4.3 1 4.5 1.1.5-2 .4-1.8-4.5-1.1-4.3-1z",class:"editorsBellIcon-text"}))},82957:function(e,t,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EditorsEscalatorIcon=void 0;var i=s(76148);t.EditorsEscalatorIcon=()=>(0,i.h)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 240 171"},(0,i.h)("path",{d:"M80 136.8V114H68.6v34.2h22.8v-11.4H80zm22.9-22.8v-11.4H91.4v22.8h22.9V114h-11.4zm0-22.8h11.4v11.4h-11.4V91.2zm-45.8-57h11.4v11.4H57.1V34.2zm11.5-11.4h34.3v11.4H68.6V22.8zM45.7 45.6h11.4V57H45.7V45.6zM34.3 57h11.4v11.4H34.3V57z",class:"editorsEscalatorIcon-key"}),(0,i.h)("path",{d:"M57.1 102.6h11.4V114H57.1v-11.4zM160 57v22.8h11.4V68.4h11.5V57H160zm-22.9 22.8v22.8h11.5V91.2H160V79.8h-22.9zm-22.8 22.8v22.8h11.4V114h11.4v-11.4h-22.8zm-22.9 22.8v22.8h11.5v-11.4h11.4v-11.4H91.4zm57.2
2-114H160v11.4h-11.4V11.4zm-11.5 11.4h11.4v11.4h-11.4V22.8zm-11.4 11.4h11.4v11.4h-11.4V34.2zm-11.4 11.4h11.4V57h-11.4V45.6zm-57.2 0v22.8h11.5V45.6H57.1zm57.2 34.2h11.4v11.4h-11.4V79.8zM0 125.4h11.4v34.2H0v-34.2zm228.6-114H240v34.2h-11.4V11.4zM114.3 45.6V34.2H68.6v11.4H80v22.8H68.6v11.4H80v11.4H68.6v11.4H80V114h11.4V79.8h22.9V57h-11.4V45.6h11.4zM11.4 114h45.7v11.4H11.4V114zm171.5-68.4h45.7V57h-45.7V45.6zM68.6 148.2v11.4H11.4V171H80v-11.4h11.4v-11.4H68.6zM160 0h68.6v11.4H160V0zM80 0v11.4H68.6v11.4h22.8V11.4h11.5V0H80z",class:"editorsEscalatorIcon-text"}))},1875:function(e,t,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EditorsMushroomIcon=void 0;var i=s(76148);t.EditorsMushroomIcon=()=>(0,i.h)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 224 238"},(0,i.h)("path",{d:"M210 98V70h-14V56h-14V42h-14V28h-14V14h-14V0H84v14H70v14H56v14H42v14H28v14H14v28H0v56h14v14h28v-14h140v14h28v-14h14V98h-14zm-98 0V84h14v14h-14zm14-42h-14V42h14v14zM84 98v14H70V98h14zm56 14h14v14h-14v-14zm28-14h14v14h-14V98zm0-28h-14V56h14v14zm-42-56v14h-14V14h14zM84 42v14H70V42h14zM56 70v14H42V70h14zM42 98v14H28V98h14zm0 42v-14h14v14H42zm140-14h14v14h-14v-14z",class:"editorsMushroomIcon-key"}),(0,i.h)("path",{d:"M140 210h-14v14H70v14h84v-14h-14v-14zm14-28h-14v28h14v-28zm-98 28v14h14v-14H56zm98 14h14v-14h-14v14zm14-70v56h14v-56h-14zm-126 0v56h14v-56H42z",class:"editorsMushroomIcon-text"}))},52297:function(e,t,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LeftTrumpetIcon=void 0;var i=s(76148);t.LeftTrumpetIcon=()=>(0,i.h)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 83.949 119.8"},(0,i.h)("path",{d:"M38.982 78.9c.6 0 1.2-.1 1.8-.1 7.1-.9 13.7-5.3 19.8-13.1v-24l-14.6 8.5a91.255 91.255 0 0 0-7 28.7Z",class:"leftTrumpetIcon-key"}),(0,i.h)("path",{d:"M37.982 78.9a92.256 92.256 0 0 1 6.6-27.9l-15.6 9.1V77a23.3 23.3 0 0 0 9 1.9Z"}),(0,i.h)("path",{d:"M37.882 79.9a24.733 24.733 0 0 1-8.9-1.8v41.7l10.8-18.4a73.24 73.24 0 0 1-1.9-21.5Z",class:"leftTrumpetIcon-key"}),(0,i.h)("path",{d:"M40.882 79.8c-.7.1-1.3.1-2 .2a70.629 70.629 0 0 0 1.6 20.2l3.7-6.3 16.4 9.6V67.2c-6.1 7.5-12.7 11.7-19.7 12.6Zm-35.4-28c-.1.1-.2.2-.1.3a3.268 3.268 0 0 0 .6 1.5 3.89 3.89 0 0 0 1.1 1.3h.2c2.2-1.3 6.9-3.8 7-3.9a9.7 9.7 0 0 1 1.7-5.1c-1.2.8-8.1 4.8-10.5 5.9Zm69.8-29a35.991 35.991 0 0 1-4.8-6.7 33.753 33.753 0 0 1-3.6-8.3c-.1-.5-.3-1-.4-1.5a19.332 19.332 0 0 1-7.8 11.2c-4.2 3-10.2 7-13.8 9.3-7.6 4.7-16.9 11-19.2 12.5-1.7 1.1-5.9 3.9-8.1 6.4a9.768 9.768 0 0 0-.8 10.8c3.4 5.9 9.8 3.5 13.7 1.2 4.3-2.5 24.4-14.2 29.3-17.1 5.6-3.2 5.9-7 4.7-10.3a5.19 5.19 0 0 0-2.2-3c-1.4.7-2.1 1-3.2 1.6a4.431 4.431 0 0 1 2.4 2.3 3.954 3.954 0 0 1-.4 4.3c-1.1 1.6-4.9 3.5-6.2 4.3-1.4.9-3.4 2-4.8 2.8-7.4 4.3-5.6 3.3-7.3 4.3-2.2 1.3-4.4 2.5-6.5 3.8-.2.1-.4.3-.6.4-2.9 1.5-6.1 3.6-9.1 4.9-5.2 2.1-7.1-1.1-7.4-2.9-.3-2.4 1.2-4.8 5.1-7.1 2.3-1.3 17.5-9.4 23.9-13.1 1.9-1.1 11.6-5.8 15.1-7.4 6-2.8 10.6-2.3 13.2-1.5-.3-.3-.6-.5-.9-.8a1.048 1.048 0 0 0-.3-.4Zm-70.5 31.4a6.391 6.391 0 0 1-.4-1c-.1-.4-.7-.2-1.3-.1s-1.4.7-2.1.5c-1-.4-1.5.7-.2 3.3 1.4 2.6 3 2.3 3 1.8a1.542 1.542 0 0 1 1-1.4c.5-.3 1.3-1.6.8-1.9a2.623 2.623 0 0 1-.8-1.2Zm77.9-39.1a46.277 46.277 0 0 0-3.1-6.3 23 23 0 0 0-7.3-8 3.379 3.379 0 0 0-1.2-.6 4.253 4.253 0 0 0-1.1-.2 2.663 2.663 0 0 0-1.2.3 2.967 2.967 0 0 0-1.3 2 9.548 9.548 0 0 0 .4 4.8 34.54 34.54 0 0 0 3.6 8.2 30.621 30.621 0 0 0 4.6 6.4l.4.4a14.041 14.041 0 0 0 3.5 2.5 2.746 2.746 0 0 0 2.5 0 2.869 2.869 0 0 0 1.3-2.1 13.19 13.19 0 0 0-1.1-7.4Zm-2.1 4.7a1.728 1.728 0 0 1-1.3.5.9.9 0 0 1-.5-.1c-1.4-.3-2.7-1.8-3.6-3a29.549 29.549 0 0 1-2.3-3.8c-.2-.4-.2-.5-.1-.5a.867.867 0 0 1 .7-.4.539.539 0 0 1 .4.4 20.317 20.317 0 0 0 2.9 4.3 6.83 6.83 0 0 0 2 1.8.767.767 0 0 0 .8 0 1.234 1.234 0 0 0 .5-.8v-.4a.494.494 0 0 1 .1-.3l.1-.1.3.1a1.06 1.06 0 0 1 .6.4 3.568 3.568 0 0 1-.6 1.9Z",class:"leftTrumpetIcon-dark"}))},73137:function(e,t,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ManagersCartIcon=void 0;var i=s(76148);t.ManagersCartIcon=()=>(0,i.h)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 56.7 59.6"},(0,i.h)("path",{d:"m9.8 54.2-2.3-.4.6-7.8s0 .3 0 0c1.2-.5 2.4-1.6 2.5-3 .1-1.4-.5-2.9-1.5-3.6l-5.8-.3c0 .2-1.6 17.3-1.6 17.3l7.7.9.4-3.1zm1.2-9.3c-.1 0-.1 0 0 0l-.1-.2c-.1.3-.9 1.3-2 1.8l-.4 3.6.5.7 3.3 3.6 5.8-5.5-2.3-2.5L14 48l-3-3.1zm40.1-27.4c.2-.1.4-.1.6-.2.1 0 .4-.1.4-.1l3.7-3.5s.1-.1.1-.2c.6-1.5.8-3.2.3-5-1.1-4-5.1-6.3-9-5.3-4 1.1-6.2 5.1-5.1 9s5 6.4 9 5.3zM48 6c2.4-.6 5 .8 5.6 3.3s-.8 5-3.3 5.6c-2.4.6-5-.8-5.6-3.3-.6-2.4.8-5 3.3-5.6zM31.7 3.3l-.2 3.5-6.8-.6-.7 10.7L37.9 3.7l-6.2-.4zM9 59.6l47.4-42.4.2-3.2L8.5 59.3l.5.3z",class:"managersCartIcon-text"}),(0,i.h)("path",{d:"M13 14.2c-.2-3.3-3.3-5.4-6.6-5.5-3.2 0-6.3 2.7-6.4 6l.1.7H1l.1 5.5c0 .8.6 1.6 1.4 1.8.2 0 .5.1.5.1v.8h-.6L2.5 40l9.1-.8-.1-15.8H9.9l-.5-.5-5.7.1v-.9h-.6c-.2.1-.3 0-.3 0-.6-.2-.9-.7-.9-1.2l-.1-5.5 9.6-.1h2.8v-1l-1.2-.1zM7 24.6c1.6.2 2.7 1.7 2.5 3.3 0 0-.4 2.8-.3 3.1.1.5.5 1.1.8 1.7l.7 1-3 3.3c-.2-.3-3.4-2.7-3.9-4.4-.5-1.8-.1-3.9 0-4.9V27c.3-1.5 1.7-2.6 3.2-2.4zM8.6 21c.5-.1 1.1-.4 1.5-.7 0 0 0 .1.1.1.2 0 .4-.2.3-.3.1-.1-.1-.2-.3-.2-.2 0-.3-.1-.4-.1 0 0 .1.2.1.3-.4.2-.9.4-1.4.5l-1.6.2c0-.1-.1-.1-.2.1-.1 0-.1.1.1.2 0-.2 1 .1 1.8-.1zm-1.9-1.9c.4 0 .8-.4.8-.9 0-.4-.5-.9-.8-.8-.4 0-.8.5-.8.9 0 .5.4.8.8.8zm.6-2c.2 0 .3.1.5-.1.1-.1.1-.2.1-.3 0-.1-.2 0-.4-.1-.3-.1-.5-.3-.8-.3-.8-.1-1.4.4-1.5 1.1.1 0 .2-.1.3-.2.5-.4 1.1-.5 1.8-.1zm3-1c-.4.1-.8.5-1.2.5h-.4c.1.2.1.4.3.5.3 0 .6-.1.8-.2.7-.5.9-.5 1.2-.4 0-.3-.1-.6-.7-.4zm-.6 1.5c-.4 0-.7.4-.7.8.2 0 .5-.2.8-.2.3 0 .7.1 1 .3 0-.7-.5-1-1.1-.9z",class:"managersCartIcon-text"}),(0,i.h)("path",{d:"M51.2 9c-.2-.3-.4-.5-.7-.6-.4-.3-1-.6-1.7-.7l-6.1-.4.2-6.2c.1-.9-1.1-1.5-1.8-.9L18.4 22.1c-.8.7-.8 2-.1 2.8l3.3 3.6-9 4.9L6 39.7l2.3 2.5 6.6-6.3 8.9-5.1 1.7 1.8c.7.6 1.8.8 2.4.1l.6-.7 3.5 3.6 2.4-2.3-3.4-3.6 8.5-8.2c.1 0 .2-.1.2-.1h.1c1.1-1.1 1.8-2.6 1.9-4.2v-.3l.2-2.1.5-.1 4-2.7c0 .1 0 .1.1.2.2.5.6.9 1.1 1 .5.3 1.1.3 1.6.3.1 0 .2-.1.3-.1.2-.1.3-.1.5-.2.4-.2.3-.7 0-.9l-1.5-.7c-.4-.2-.6-.6-.5-1l.1-.2h.1c.2-.3.7-.5 1.1-.3l1.5.7c.4.2.8-.2.7-.6-.1-.7-.2-.9-.3-1.2z",class:"managersCartIcon-key"}),(0,i.h)("path",{d:"m13.5 36.8-2.2-2.6-3.7 3.5L9 39.1c1.1 1 2.8 1.1 4 .1l.5-.4c.4-.8.3-1.5 0-2zm-1.9-21.5.1 5.4c0 .5-.3 1-.9 1.2-.1 0-.2.1-.4.1h-.7v.9l-5.7.2-.6.6h7l-.1-1s.3-.1.5-.1c.8-.2 1.4-1 1.4-1.8l-.1-5.5h-.5z",class:"managersCartIcon-text"}))},49090:function(e,t,s){"use strict";
2Object.defineProperty(t,"__esModule",{value:!0}),t.ManagersLegoIcon=void 0;var i=s(76148);t.ManagersLegoIcon=()=>(0,i.h)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 44 45"},(0,i.h)("path",{d:"M5 21v15.7c-.2 3.2 2.2 5.9 5.4 6.1h.6V45h21.8v-2.2c3.2.2 5.9-2.3 6.1-5.5v-.6L39 21H5zm32.1 15.7c.1 1.2-.4 2.4-1.3 3.3-.9.8-2 1.2-3.1 1.2H31v2H12.8v-2h-1.7c-1.2.1-2.3-.4-3.1-1.2-.8-.9-1.1-2.1-1-3.3V22h30.1v14.7zm-9.6-7.4c.9 0 1.7-.8 1.7-1.7 0-.9-.8-1.7-1.7-1.7-.9 0-1.7.7-1.7 1.6v.2c0 .9.7 1.6 1.6 1.6h.1zm-10.5 0c.9 0 1.7-.7 1.7-1.7s-.7-1.8-1.7-1.8c-.9 0-1.7.8-1.7 1.7 0 .9.8 1.7 1.7 1.8z",class:"managersLegoIcon-text"}),(0,i.h)("path",{d:"M26.5 34.8c-.1 0-.1.1-.2.1-1.9 1.5-4.6 1.8-6.8.8-.6-.3-1.2-.6-1.7-1-.3-.3-.8-.2-1.1.1-.1.2-.2.4-.2.6 0 .3.2.6.4.8 1.5 1.2 3.4 1.8 5.3 1.8 1.2 0 2.5-.3 3.6-.8.6-.3 1.2-.7 1.8-1.1.4-.2.6-.8.4-1.2 0 0 0-.1-.1-.1-.4-.3-1-.3-1.4 0zM41.9 20v-.9C41.9 8.8 33.6.5 23.1 0v20h-2.2V0C10.4.5 2.1 8.8 2.1 19.1v.9H0v3h44v-3h-2.1zM12.6 9.6C10.8 12.8 9.9 16.4 10 20H8.3c0-8.7 4.1-15.5 10.1-17.3l.5 1.6c-2.7.9-5 2.8-6.3 5.3zM34 20c.1-3.6-.8-7.2-2.6-10.4-1.3-2.5-3.5-4.4-6.2-5.3l.5-1.6c6 1.8 10.1 8.6 10.1 17.3H34z",class:"managersLegoIcon-key"}))},98681:function(e,t,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ManagersMegaphoneIcon=void 0;var i=s(76148);t.ManagersMegaphoneIcon=()=>(0,i.h)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 40.2 48"},(0,i.h)("path",{d:"m36.2 38.5-7.3-3.4V31h-7.6c-.1-.1-.1-.3-.2-.4l-.2.4-4.8 10.5c.6-.4 1.4-.5 2.1-.3.1 0 .1 0 .2.1L32 47.6c1.2.5 2.6 0 3.2-1.2l2.2-4.7c.5-1.2-.1-2.6-1.2-3.2zM26.7 3c-1.8-.7-3.9-.2-5.3 1.2l7.8 3.7c.3-2-.7-4-2.5-4.9z",class:"managersMegaphoneIcon-key"}),(0,i.h)("path",{d:"M39.4 14.7 7.7.1c-.8-.3-1.6.1-1.9.8-.1.3-.1.5-.2.8l2.4 
218c0 .3-.1.6-.2.8 0 0-6.6 14.1-7 14.8v.1C-1.1 39.8.7 44.9 5 47.1l.4.2c4.4 1.9 9.6 0 11.6-4.4 0-.1 0-.1.1-.2l6.6-14.3c.1-.2.3-.4.5-.5l15.4-10.7c.2-.1.4-.4.5-.5.3-.8 0-1.7-.7-2z",class:"managersMegaphoneIcon-text"}))},39725:function(e,t,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MaxIcon=void 0;var i=s(76148);t.MaxIcon=()=>(0,i.h)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 85 85"},(0,i.h)("path",{d:"M43.412 84.757c-8.342 0-12.217-1.223-18.956-6.115-4.262 5.505-17.759 9.805-18.347 2.446 0-5.524-1.218-10.192-2.598-15.287C1.867 59.52 0 52.53 0 42.399 0 18.203 19.768 0 43.19 0S85 19.1 85 42.623c.079 23.16-18.527 42.01-41.586 42.133m.344-63.842c-11.406-.591-20.296 7.338-22.264 19.772-1.624 10.294 1.259 22.83 3.714 23.483 1.177.285 4.14-2.12 5.988-3.975a21.05 21.05 0 0 0 10.31 3.689c11.819.57 21.918-8.466 22.71-20.323.462-11.882-8.637-21.947-20.458-22.626z",class:"maxIcon-circle"}))},76924:function(e,t,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NewImageIcon=void 0;var i=s(76148);t.NewImageIcon=()=>(0,i.h)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 129 73"},(0,i.h)("path",{d:"M107.4 25c5 0 9-4 9-9s-4-9-9-9-9 4-9 9 4 9 9 9zm0-17c4.4 0 8 3.6 8 8s-3.6 8-8 8-8-3.6-8-8 3.6-8 8-8zM65 43.5V34h9.5v-1H65v-9.5h-1V33h-9.5v1H64v9.5h1zM8.5 0h6.1v1H8.5V0zm21.2 0h6.1v1h-6.1V0zM19.1 0h6.1v1h-6.1V0zM0 18h1v6.1H0V18zM1 3.5C1 2.1 2.1 1 3.5 1h1V0h-1C1.6 0 0 1.6 0 3.5v.4h1v-.4zM0 28.2h1v6.1H0v-6.1zM0 7.9h1V14H0V7.9zM103.8 0h6.1v1h-6.1V0zM93.2 0h6.1v1h-6.1V0zM82.6 0h6.1v1h-6.1V0zM0 48.4h1v6.1H0v-6.1zM114.4 0h6.1v1h-6.1V0zM61.5 0h6.1v1h-6.1V0zM50.9 0H57v1h-6.1V0zM40.3 0h6.1v1h-6.1V0zM72 0h6.1v1H72V0zM61.5 72h6.1v1h-6.1v-1zM128 48.4h1v6.1h-1v-6.1zm0 13.8v.3l-32.3-27-25.4 21-43.3-36-.3-.3L1 41.4v-3.2H0v6.1h1v-1.6l25.6-21.2L87.2 72h-4.5v1h6.7v-1h-.6L71 57.2l24.6-20.4 32.4 27v.8h1v-6.1h-1v3.7zm0-23.9h1v6.1h-1v-6.1zM114.4 72h6.1v1h-6.1v-1zm13.6-2.5c0 1.4-1.1 2.5-2.5 2.5h-.5v1h.5c1.9 0 3.5-1.6 3.5-3.5v-.8h-1v.8zm0-61.6h1V14h-1V7.9zm0 20.3h1v6.1h-1v-6.1zM125.5 0h-1v1h1c1.4 0 2.5 1.1 2.5 2.5v.4h1v-.4c0-1.9-1.6-3.5-3.5-3.5zm2.5 18h1v6.1h-1V18zM50.9 72H57v1h-6.1v-1zm-31.8 0h6.1v1h-6.1v-1zM8.5 72h6.1v1H8.5v-1zm21.2 0h6.1v1h-6.1v-1zM1 69.5v-.8H0v.8C0 71.4 1.6 73 3.5 73H4v-1h-.5C2.1 72 1 70.9 1 69.5zM103.8 72h6.1v1h-6.1v-1zm-10.6 0h6.1v1h-6.1v-1zM72 72h6.1v1H72v-1zm-31.7 0h6.1v1h-6.1v-1zM0 58.5h1v6.1H0v-6.1z"}))},15774:function(e,t,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NoNewCommentsIcon=void 0;var i=s(76148);t.NoNewCommentsIcon=()=>(0,i.h)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 180 185"},(0,i.h)("path",{d:"M85.9 92.6c-3.7-8.7-10-24.2-15.9-32.4L56.4 73.7c9.6 11.4 18 29.7 24.8 46.1H90c16.6-37.2 47-84.3 71.1-113L153.6 0c-12.9 11.7-52.5 65-67.2 92.6h-.5z",class:"noNewCommentsIcon"}),(0,i.h)("path",{d:"M152.9 33.5c-2.4 3.2-4.7 6.5-7.1 9.9 13.5 11.4 21.8 27 21.8 44.3 0 38.6-31.4 62.6-72.5 62.6-7.2 0-18.4-1.2-25.9-3.8-9.1 11-19.1 19.7-31.6 24 4.3-7.7 9.1-20.9 8.6-31.2C27.3 128 12.7 110.5 12.7 87c0-37.4 34.7-62.9 76.8-62.9 9.2 0 18.4 1.3 27.3 3.9 2.7-3.6 5.4-7 7.9-10.3-11.2-3.9-22.9-5.9-34.7-5.9C40.5 11.8 0 44 0 86.7c0 26.9 13.2 46.1 33.8 59 0 7.7-5.7 25.2-12.7 36l3.1 3.1c18.6-2.6 35.7-11.6 48.4-25.4 5 1.7 14.8 2.9 22.3 2.9 49.1 0 85.2-31 85.2-75.1-.1-20.9-10.5-40-27.2-53.7z",class:"noNewCommentsIcon"}))},52905:function(e,t,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PauseIcon=void 0;var i=s(76148);t.PauseIcon=()=>(0,i.h)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"5",height:"6",fill:"none"},(0,i.h)("g",{className:"pauseIcon"}
2,(0,i.h)("path",{fill:"#fff",d:"M0 0h10v10H0z"}),(0,i.h)("path",{fill:"#000",d:"M0 0h1v6H0V0zm4 0h1v6H4V0z"})))},59338:function(e,t,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PauseBoldIcon=void 0;var i=s(76148);t.PauseBoldIcon=()=>(0,i.h)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",fill:"none"},(0,i.h)("path",{className:"pauseBoldIcon",fill:"#000",stroke:"#fff","stroke-width":"1.5",d:"M2 1.25h-.75v9.5h4.7v-9.5H2zm4.8 0h-.75v9.5h4.7v-9.5H6.8z"}))},9013:function(e,t,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.QuestionMarkInCircleIcon=void 0;var i=s(76148);t.QuestionMarkInCircleIcon=()=>(0,i.h)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 21 21"},(0,i.h)("path",{fill:"var(--keyColor)",d:"M8.757 15.286a1.127 1.127 0 0 0 1.05 1.029 1.271 1.271 0 0 0 1.239-1.155A1.115 1.115 0 0 0 10 14.089a1.294 1.294 0 0 0-1.239 1.2m-.8-9.807.567.924a3.453 3.453 0 0 1 2.247-.987 1.33 1.33 0 0 1 1.512 1.428c0 1.407-2.1 2.184-2.814 3.129a3.271 3.271 0 0 0-.189 2.436h.987a2.71 2.71 0 0 1 .5-2.142c.8-.756 2.94-1.869 2.94-3.57 0-1.638-1.092-2.478-2.751-2.478a3.987 3.987 0 0 0-3 1.26"}),(0,i.h)("path",{fill:"var(--keyColor)",d:"M10.5 21A10.5 10.5 0 1 1 21 10.5 10.512 10.512 0 0 1 10.5 21zm0-20a9.5 9.5 0 1 0 9.5 9.5A9.511 9.511 0 0 0 10.5 1z",class:"semitransparent",opacity:".5"}))},70556:function(e,t,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RightTrumpetIcon=void 0;var i=s(76148);t.RightTrumpetIcon=()=>(0,i.h)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 84.13 119.8"},(0,i.h)("path",{d:"M78.606 51.8c-2.3-1.2-9.2-5.1-10.5-5.8a10.332 10.332 0 0 1 1.7 5.1c.1 0 4.8 2.5 7 3.9.1.1.2.1.2 0a3.89 3.89 0 0 0 1.1-1.3 3.724 3.724 0 0 0 .6-1.5.483.483 0 0 0-.1-.4Zm-20.2-12.6c-2.2-1.5-11.5-7.7-19.1-12.5-3.6-2.3-9.7-6.3-13.8-9.3a19.332 19.332 0 0 1-7.8-11.2 8.331 8.331 0 0 0-.4 1.5 38.561 38.561 0 0 1-3.6 8.4 34.906 34.906 0 0 1-4.8 6.7l-.4.4a3.915 3.915 0 0 0-1 .8c2.6-.8 7.3-1.3 13.2 1.5 3.5 1.7 13.1 6.3 15.1 7.4 6.5 3.7 21.6 11.8 23.9 13.1 4 2.3 5.5 4.8 5.1 7.1-.2 1.8-2.2 5.1-7.4 2.9a79.739 79.739 0 0 1-9.1-4.9 2.092 2.092 0 0 1-.6-.4c-2.2-1.3-4.4-2.5-6.5-3.8-1.7-1 .1 0-7.3-4.3-1.4-.8-3.4-2-4.8-2.8-1.3-.8-5.1-2.7-6.2-4.3a4.159 4.159 0 0 1-.4-4.3 4.431 4.431 0 0 1 2.4-2.3 31.726 31.726 0 0 0-3.2-1.6 5.19 5.19 0 0 0-2.2 3c-1.2 3.3-.9 7 4.7 10.3 5 2.9 25 14.6 29.3 17.1 3.9 2.2 10.3 4.7 13.7-1.2a9.616 9.616 0 0 0-.8-10.8c-2-2.6-6.3-5.4-8-6.5Zm24.7 14.3c-.7.3-1.5-.4-2.1-.5s-1.2-.2-1.3.1-.4 1-.4 1a3.934 3.934 0 0 1-.8 1.1c-.4.3.3 1.6.8 1.9a1.542 1.542 0 0 1 1 1.4c0 .5 1.7.8 3-1.8 1.4-2.5.8-3.5-.2-3.2Zm-75.1-31.8a34.835 34.835 0 0 0 4.6-6.4 40.073 40.073 0 0 0 3.6-8.2 9.548 9.548 0 0 0 .4-4.8 2.866 2.866 0 0 0-1.3-2 2.133 2.133 0 0 0-1.2-.3 5.16 5.16 0 0 0-1.1.2 3.379 3.379 0 0 0-1.2.6 22.13 22.13 0 0 0-7.3 8 46.277 46.277 0 0 0-3.1 6.3 14.564 14.564 0 0 0-1.3 7.5 2.772 2.772 0 0 0 1.3 2.1 2.746 2.746 0 0 0 2.5 0 12.43 12.43 0 0 0 3.5-2.5Zm-3.2-1.4a2.226 2.226 0 0 1-1.3-.5 2.851 2.851 0 0 1-.5-1.9.622.622 0 0 1 .6-.4l.3-.1.1.1c.1 0 .1.2.1.2v.4a.792.792 0 0 0 .5.8 1.1 1.1 0 0 0 .8 0 6.83 6.83 0 0 0 2-1.8 32.51 32.51 0 0 0 2.9-4.3.781.781 0 0 1 .4-.4.755.755 0 0 1 .7.4 1.75 1.75 0 0 1-.1.5 29.549 29.549 0 0 1-2.3 3.8c-.9 1.2-2.3 2.7-3.6 3a.988.988 0 0 1-.6.2Z",class:"rightTrumpetIcon-key"}),(0,i.h)("path",{d:"M35.106 79.7a56.2 56.2 0 0 0 20.1-11.8v-7.8l-10.2-6a57.686 57.686 0 0 0-9.9 25.6Z",class:"rightTrumpetIcon-dark"}),(0,i.h)("path",{d:"M34.006 80a58.624 58.624 0 0 1 10.1-26.4l-20.5-12V82a47.936 47.936 0 0 0 10.4-2Zm.9.8a70.324 70.324 0 0 0 0 15.9l5-2.9 15.2 26V69.2a53.766 53.766 0 0 1-20.2 11.6Z",class:"rightTrumpetIcon-key"}),(0,i.h)("path",{d:"M33.906 81.1a53.8 53.8 0 0 1-10.3 1.9v20.3l10.4-6.1a71.71 71.71 0 0 1-.1-16.1Z",class:"rightTrumpetIcon-dark"}))},30782:function(e,t,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SovietAskFormIcon=void 0;var i=s(76148);t.SovietAskFormIcon=()=>(0,i.h)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"211",height:"171",fill:"none",preserveAspectRatio:"xMinYMin meet",viewBox:"0 0 211 171"},(0,i.h)("path",{fill:"#E30016",d:"M20.16 134.689c10.45 0 17.67 8.832 17.67 17.419 0 11.04-9.705 18.892-20.408 18.892C7.717 171 0 163.148 0 154.071c0-9.811 9.705-19.382 20.16-19.382Zm172.181 0c10.707 0 17.671 8.832 17.671 17.419 0 11.04-9.706 18.892-20.409 18.892-9.456 0-17.421-7.852-17.421-16.929-.012-9.811 9.693-19.382 20.159-19.382Zm-143.907.068-14.019-13.216 28.568-37.86S84.99 106.4 108.931 106.4c21.926 0 43.497-14.991 43.497-40.186 0-26.447-17.112-39.387-40.338-45.69L116.388 0c34.162 3.204 60.161 31.663 60.161 66.214 0 34.55-25.983 64.336-67.618 64.336-13.536 0-30.063-7.211-40.889-15.002l-19.608 19.209Z"}),(0,i.h)("path",{fill:"#E30016",d:"M79.055 15.266c28.737 33.786 68.631 75.114 97.368 106.799l-14.401 13.887c-31.719-28.749-73.097-69.56-106.518-97.47l23.551-23.216Z"}))},55631:function(e,t,s){"use strict";
2Object.defineProperty(t,"__esModule",{value:!0}),t.TelegramInCircleIcon=void 0;var i=s(76148);t.TelegramInCircleIcon=()=>(0,i.h)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 87 87"},(0,i.h)("circle",{cx:"43.5",cy:"43.5",r:"43.5",class:"telegramInCircleIcon-circle"}),(0,i.h)("path",{d:"M61.6 20.954 18.061 39.088a1.742 1.742 0 0 0 .241 3.288l9.659 2.539 4.721 14.54a1.729 1.729 0 0 0 2.962.586l6.1-7.052 11.069 8.79a1.745 1.745 0 0 0 2.8-.977l8.352-37.862a1.758 1.758 0 0 0-2.365-1.986Zm-7.943 9.539L35.1 46.673a2.039 2.039 0 0 0-.717 1.433l-.651 7.325a.283.283 0 0 1-.553.065l-2.962-10.613a.948.948 0 0 1 .424-1.107L53.365 30.1c.214-.163.475.2.28.391Z",class:"telegramInCircleIcon-plane"}))},35988:function(e,t,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.VkIcon=void 0;var i=s(76148);t.VkIcon=()=>(0,i.h)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 30 30"},(0,i.h)("path",{d:"M27.9 30c1.1 0 2-.8 2.1-1.9v-26C30 1 29.2 0 28.1 0h-26C1 0 0 .8 0 1.9v26c0 1.1.8 2 1.9 2.1h26z",class:"vkIcon-bg"}),(0,i.h)("path",{d:"M25.5 8.6h-3.7c-.3 0-.6.2-.7.4 0 0-1.5 2.7-1.9 3.6-1.3 2.5-2.1 1.7-2.1.5V9.3c0-.7-.6-1.2-1.2-1.2H13c-.8-.1-1.5.3-2 .9 0 0 1.4-.2 1.4 1.7v3c0 .5-.3.8-.8.8-.2 0-.5-.1-.6-.3-1.1-1.6-2-3.3-2.7-5.1-.1-.3-.4-.5-.7-.5H4.3c-.3 0-.6.3-.6.6v.2c1 2.8 5.4 11.5 10.4 11.5h2.1c.5 0 .8-.4.8-.8v-1.3c0-.5.4-.8.8-.8.2 0 .4.1.6.2l2.5 2.4c.2.2.5.3.8.3H25c1.6 0 1.6-1.1.7-2-.6-.6-2.8-2.9-2.8-2.9-.4-.4-.4-1-.1-1.5.7-.9 1.9-2.5 2.4-3.1.7-.9 1.9-2.8.3-2.8z",class:"vkIcon-front"}))},79118:function(e,t,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.YoutubeIcon=void 0;var i=s(76148);t.YoutubeIcon=()=>(0,i.h)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 30 30"},(0,i.h)("path",{d:"M27.9 30c1.1 0 2-.8 2.1-1.9v-26C30 1 29.2 0 28.1 0h-26C1 0 0 .8 0 1.9v26c0 1.1.8 2 1.9 2.1h26z",class:"youtubeIcon-bg"}),(0,i.h)("path",{d:"M24.9 9.5c-.2-.9-.9-1.7-1.8-1.9-3.2-.8-8.1-.7-8.1-.7s-5-.1-8.2.7c-.9.2-1.6 1-1.8 1.9-.5 1.7-.5 5.1-.5 5.1 0 .7.1 3.5.5 4.9.2.9.9 1.7 1.8 1.9 3.2.8 8.2.7 8.2.7s4.9.1 8.1-.7c.9-.2 1.6-1 1.8-1.9.4-1.4.5-4.2.5-4.9 0 0 0-3.4-.5-5.1zM13 17.7v-6.3l5.4 3.2-5.4 3.1z",class:"youtubeIcon-front"}))},93058:function(e,t,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ZenIcon=void 0;var i=s(76148);t.ZenIcon=()=>(0,i.h)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 85 85"},(0,i.h)("path",{d:"M33.362 51.638c6.375 6.375 7.65 16.15 7.863 33.362C18.7 84.362.638 66.3 0 43.775c17.212.212 26.775 1.275 33.362 7.863ZM41.225 0c-.212 17.212-1.488 26.775-7.863 33.362-6.375 6.375-16.15 7.65-33.362 7.863C.637 18.7 18.7.638 41.225 0Zm10.413 51.638c6.375-6.375 16.15-7.65 33.362-7.863C84.362 66.3 66.088 84.362 43.775 85c.212-17.213 1.275-26.987 7.863-33.362Zm0-18.276c-6.375-6.375-7.65-16.15-7.863-33.362C66.088.637 84.362 18.7 85 41.225c-17.213-.212-26.987-1.488-33.362-7.863Z",class:"zenIcon-circle"}))},69245:function(e,t,s){"use strict";var i=s(24994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=s(76148),o=i(s(32485));t.default=e=>{const t=e.size[1]/e.size[0],s=(e.align||"").toLowerCase(),i=(0,o.default)("image","media","module",{is__bordered:e.bordered,"is__align-top":s.includes("top"),"is__align-right":s.includes("right"),"is__align-bottom":s.includes("bottom"),"is__align-left":s.includes("left"),is__fillModule:e.fillModule},e.className),n={paddingBottom:`${(100*t).toFixed(2)}%`},r=e.href?"a":"div";return(0,a.h)(r,{className:i,style:e.style,href:e.href||null},(0,a.h)("div",{className:"image-spacer",style:n}),(0,a.h)("img",{class:"image-img",src:e.src,alt:e.alt||"",loading:e.loading}),e.children)}},66192:function(e,t,s){"use strict";var i=s(24994);Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"Image",{enumerable:!0,get:function(){return a.default}});var a=i(s(69245))},48446:function(){"use strict";$(document).on("appReady",()=>{$(".js__imagePreloader").find("link").each((e,t)=>{const s=$(t);s.attr("href",s.attr("data-href")),s.attr("rel","preload")})})},56457:function(e,t,s){"use strict";var i=s(86019),a=s(24994);
2Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=s(76148),n=a(s(32485)),r=a(s(98999)),l=s(21376),c=s(45169);const d={selected:"",helpful:"",useless:""},h=e=>{const t=parseInt(e.count,10),s=(0,n.default)("button","is__thin","impressions-helpful",{is__selected:e.selected&&!e.disabled,is__disabled:e.disabled,is__unauthenticated:e.unauthenticated,is__zero:!t});return(0,o.h)("div",{className:s,onClick:e.onClick,disabled:e.disabled},(0,o.h)("div",{className:"impressions-caption"},i.t("impressions.upvote")),(0,o.h)("div",{className:"impressions-counter"},e.count),(0,o.h)("div",{className:"impressions-counter impressions-counter__alternate"},t||""))},u=e=>{const t=parseInt(e.count,10),s=(0,n.default)("button","is__thin","impressions-useless",{is__selected:e.selected&&!e.disabled,is__disabled:e.disabled,is__unauthenticated:e.unauthenticated,is__zero:!t});return(0,o.h)("div",{className:s,onClick:e.onClick,disabled:e.disabled},(0,o.h)("div",{className:"impressions-caption"},i.t("impressions.downvote")),(0,o.h)("div",{className:"impressions-counter"},e.count),(0,o.h)("div",{className:"impressions-counter impressions-counter__alternate"},t||""))};class p extends o.Component{constructor(e){super(e),this.pageId=encodeURIComponent(e.impressionSubject||this.defaultPageId),this.changeEventId=`impressionChange:${this.pageId}`,this.initialState={...d,...e},this.state={...d,...e,isAuthorized:!!window.application.user},this.onSimilarImpressionChange=this.onSimilarImpressionChange.bind(this),this.voteHelpful=this.voteHelpful.bind(this),this.voteUseless=this.voteUseless.bind(this)}componentDidMount(){void 0!==this.props.helpful&&void 0!==this.props.useless||this.fetchImpressionsSummary(),$(document).on(this.changeEventId,this.onSimilarImpressionChange)}componentWillUnmount(){$(document).off(this.changeEventId,this.onSimilarImpressionChange)}get defaultPageId(){const e=$('meta[name="pageId"]').attr("content");return"/"!==e?e:window.location.pathname}onSimilarImpressionChange(e,t){this.updateStateFromSummary(t)}voteHelpful(e){e.stopPropagation(),e.preventDefault(),"helpful"===this.state.selected?this.deleteImpression("helpful"):this.setImpression("helpful")}voteUseless(e){e.stopPropagation(),e.preventDefault(),"useless"===this.state.selected?this.deleteImpression("useless"):this.setImpression("useless")}fetchImpressionsSummary(){fetch(`/impression_summaries/${this.pageId}`,{method:"GET",headers:r.default,credentials:"include"}).then(e=>e.ok?e.json():Promise.resolve(this.state)).then(e=>{this.updateStateFromSummary(e),$(document).trigger(this.changeEventId,e)})}updateStateFromSummary(e){const{selected:t,helpful:s,useless:i}=e;this.setState({selected:t,helpful:s,useless:i},()=>{this.initialState={...this.state}})}setImpression(e){this.state.isAuthorized&&(this.initialState={...this.state},this.setState({selected:e,[e]:this.state[e]+1}),fetch(`/impressions/${this.pageId}`,{method:"PUT",headers:r.default,credentials:"include",body:JSON.stringify({kind:e})}).then(e=>this.handleImpressionChange(e,this.initialState)))}deleteImpression(e){this.state.isAuthorized&&(this.initialState={...this.state},this.setState({selected:"",[e]:Math.max(this.state[e]-1,0)}),fetch(`/impressions/${this.pageId}`,{method:"DELETE",headers:r.default,credentials:"include"}).then(e=>this.handleImpressionChange(e)))}handleImpressionChange(e){e.ok?this.fetchImpressionsSummary():this.setState(this.initialState)}render(e){const t=(0,n.default)("impressions",{is__disabled:e.disabled,is__unauthenticated:!this.state.isAuthorized,is__inversed:e.isInversed,is__regular:!/(small|medium)/.test(e.mod)},String(e.mod).split(" ").filter(e=>e).map(e=>`is__${e}`)),s=(0,l.recalculateCountPadding)(this.initialState.helpful,this.state.helpful),a=(0,l.recalculateCountPadding)(this.initialState.useless,this.state.useless);return(0,o.h)("div",{className:t},(0,o.h)("div",{className:"buttonGroup"},(0,o.h)(h,{selected:"helpful"===this.state.selected,count:s,disabled:e.disabled,unauthenticated:!this.state.isAuthorized,onClick:this.voteHelpful}),(0,o.h)(u,{selected:"useless"===this.state.selected,count:a,disabled:e.disabled,unauthenticated:!this.state.isAuthorized,onClick:this.voteUseless})),!this.state.isAuthorized&&(0,o.h)(c.Caption,{className:"impressions-hint",html:i.t("impressions.hint")}))}}t.default=p},69774:function(e,t,s){"use strict";var i=s(24994)(s(56457));$(".js__impressions").each(function(){const e=JSON.parse(decodeURIComponent($(this).data("props")));$(this).reactify(i.default,e),$(this).children().unwrap()})},21376:function(e,t){"use strict";
2Object.defineProperty(t,"__esModule",{value:!0}),t.padCount=a,t.recalculateCountPadding=function(e,t){const o=a(e).length,n=(t=t.toString()).length;return o<n?t:o>n?i(t).padStart(o,s):i(t)};const s=" ",i=e=>e.replace(/^0{1}$/,s);function a(e){return s+i(e.toString())}},3027:function(e,t,s){"use strict";var i=s(24994);Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"Impressions",{enumerable:!0,get:function(){return a.default}});var a=i(s(56457))},74267:function(e,t,s){"use strict";var i=s(24994);Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"LabelTitleLink",{enumerable:!0,get:function(){return a.default}});var a=i(s(57351))},57351:function(e,t,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=s(76148),a=s(45169);t.default=e=>{let t=["labelTitleLink","module"].concat(e.className.split(" "));return e.align&&t.push(`is__${e.align}`),e.size&&t.push(`is__${e.size}`),(0,i.h)("a",{href:e.href,className:t.join(" ")},e.label&&(0,i.h)(a.Heading3,{className:"labelTitleLink-label"},e.label),(0,i.h)(a.TextNode,{className:"labelTitleLink-title"},e.title),(0,i.h)(a.Caption,{className:"labelTitleLink-link"},(0,i.h)("span",{className:"link"},e.linkText),e.linkSuffix&&(0,i.h)("span",{className:"link no-u",dangerouslySetInnerHTML:{__html:e.linkSuffix}})))}},98912:function(){"use strict";const e=$(document);e.on("click","[data-leadmagnet-uid]",t=>{const s=t.currentTarget.getAttribute("data-leadmagnet-uid"),i=t.currentTarget.getAttribute("data-link-id");t.preventDefault(),(({uid:t,linkId:s="default"})=>{e.trigger(`leadMagnetShow:${t}`,{linkId:s})})({uid:s,linkId:i})})},36926:function(e,t,s){"use strict";var i=s(24994)(s(98999));
2e.exports={verifySubscription:({email:e,mailingList:t,leadMagnetId:s})=>{const a=`/mailing_lists/${t}/opt_ins/?email=${encodeURIComponent(e)}&leadMagnetId=${encodeURIComponent(s)}`,o={method:"GET",credentials:"include",headers:i.default};return fetch(a,o).then(e=>{if(!e.ok)throw Error(e.statusText);return e})}}},56964:function(e,t,s){"use strict";var i=s(24994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=s(76148),o=i(s(32485)),n=i(s(2733)),r=s(39572),l=s(27384),c=s(45169),d=i(s(32943)),h=s(99232),u=s(38367),p=s(73345),m=s(36926),f=i(s(62515));const{isOnMobile:v}=window.application||{},g="contactForm",b="default",_=e=>e?e.charAt(0).toUpperCase()+e.slice(1):"",y=({id:e,linkId:t})=>[g,_(e),t&&t!==b?`:${t}`:null].filter(Boolean).join("");class S extends a.Component{constructor(e){super(e);const t=(0,h.getTypeFromUrl)(),{id:s,linkId:i}=(e=>{const[t,s]=(e||"").split(":");return{id:t.replace(g,""),linkId:s}})(t),a=!!t,o=!s&&!i&&this.props.isDefault,n=!s&&i&&!!this.props.links[i],r=s&&_(this.props.id)===_(s);this.state={isVisible:a&&(o||n||r),email:this.email,isSubscribed:!1,currentLinkId:i&&e.links[i]?i:b},this.hide=this.hide.bind(this),this.show=this.show.bind(this),this.submit=this.submit.bind(this),this.reachGoal=this.reachGoal.bind(this)}componentDidMount(){this.hideLinks(),this.revealIfSubscribed(),this.setEventListener(),this.focusInputIfVisible()}componentDidUpdate(){this.revealIfSubscribed(),this.focusInputIfVisible()}shouldComponentUpdate(e,t){return this.state.isVisible!==t.isVisible||this.state.isSubscribed!==t.isSubscribed||this.state.email!==t.email}focusInputIfVisible(){this.state.isVisible&&!v&&setTimeout(()=>{var e;return null===(e=this.emailFormInput)||void 0===e?void 0:e.focus()},r.SlideInLayer.ANIMATION_DURATION)}get urlType(){return y({id:this.props.id,linkId:this.state.currentLinkId})}get meta(){return`&leadMagnetName=${this.name||""}&leadMagnetHref=${this.href}&leadMagnetId=${this.id}`}get mailingList(){return this.props.mailingList||"default"}get currentLink(){return this.props.links[this.state.currentLinkId]}get href(){return this.currentLink.href||""}get redirectTo(){return(this.currentLink.redirectTo||this.href).replace("%{email}",encodeURIComponent(this.state.email)).replace("%{href}",encodeURIComponent(this.href))}get name(){return this.currentLink.name||this.props.name}get text(){return this.currentLink.text||this.props.text}get buttonText(){return this.currentLink.buttonText||this.props.buttonText}get idCapitalized(){return this.id?this.id.charAt(0).toUpperCase()+this.id.slice(1):""}get email(){var e;return((null===(e=window.application.user)||void 0===e?void 0:e.email)||n.default.get("email")||"").toLowerCase()}get id(){return this.props.id||""}get uid(){return this.props.uid}get protectedLinks(){return document.querySelectorAll(`[data-leadmagnet-uid="${this.uid}"][data-link-id]`)}setEventListener(){$(document).on(`leadMagnetShow:${this.uid}`,this.show)}hide(){(0,h.removeTypeFromUrl)(),this.setState({isVisible:!1})}show(e,t){const s=(null==t?void 0:t.linkId)||"default";this.setState({isVisible:!0,currentLinkId:s},()=>{(0,h.setTypeToUrl)(this.urlType)})}submit({email:e}){return(0,u.subscribeUser)({email:e,eventType:this.mailingList,eventId:this.id,additionalMeta:this.meta}).then(t=>this.setState({email:e,isSubscribed:t})).then(this.reachGoal).catch(t=>{console.error(t),this.setState({email:e})})}reachGoal(){const{goal:e,subscribedGoal:t}=this.props,s=["LEAD_MAGNET",(this.id+"").toUpperCase(),"SUBSCRIBED"].filter(Boolean).join("_");(0,f.default)(s),t&&(0,f.default)(t),e&&(0,f.default)(e)}redirect(){this.href&&(window.location=this.redirectTo)}revealIfSubscribed(){return this.href?this.state.isSubscribed?this.reveal():this.fetchSubscriptionData().then(e=>this.setState({isSubscribed:e.ok},()=>this.reveal())).catch(e=>console.error(e)):null}reveal(){this.revealLinks(),this.state.isVisible&&(this.hide(),this.redirect())}fetchSubscriptionData(){const{email:e,mailingList:t,id:s}=this;return(0,m.verifySubscription)({email:e,mailingList:t,leadMagnetId:s})}
2hideLinks(){this.protectedLinks.forEach(e=>{const t=e.getAttribute("data-link-id"),s=(({id:e,linkId:t})=>window.location.pathname+"?"+y({id:e,linkId:t}))({id:this.id,linkId:t});e.setAttribute("data-original-href",e.getAttribute("href")),e.setAttribute("href",s)})}revealLinks(){this.protectedLinks.forEach(e=>{const t=e.getAttribute("data-original-href");e.setAttribute("href",t),e.removeAttribute("data-leadmagnet-uid")})}render(e){const{mod:t}=e;return(0,a.h)("div",{className:(0,o.default)("leadbar",{is__visible:this.state.isVisible,[`is__${t}`]:!!t})},(0,a.h)(r.SlideInLayer,{isVisible:this.state.isVisible,setHidden:this.hide},(0,a.h)("div",{className:"module is__boxedDefault is__bleedBackgroundSides is__noMargins textBox"},this.name&&(0,a.h)(c.Heading3,null,this.name),(0,a.h)(l.Cols,{transposeOnMobile:!0,className:"is__desktopDivisionProportions6to10"},(0,a.h)("div",{className:"leadbar-description"},(0,a.h)(c.TextNode,null,(0,p.typograf)(this.text)),e.children),(0,a.h)("div",{className:"leadbar-emailForm"},(0,a.h)(d.default,{email:this.state.email,isSubscribed:this.state.isSubscribed,onSubmit:this.submit,onFormStateSubscribed:this.props.links.default.href?void 0:this.hide,buttonText:this.buttonText,inputRef:e=>this.emailFormInput=e}))))))}}t.default=S},31417:function(e,t,s){"use strict";var i=s(24994)(s(56964));$(".js__leadbar").each((e,t)=>{const s=$(t),a=JSON.parse(s.attr("data-options"));s.reactify(i.default,a),s.children().unwrap()})},13079:function(e,t,s){"use strict";var i=s(24994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=i(s(2733)),o=i(s(17862)),n=s(38367),r=s(36926),l=i(s(62515));t.default=class{constructor(e,t={}){this.el=e,this.options=t,this.renderContents=this.renderContents.bind(this),this.reachGoal=this.reachGoal.bind(this),this.wallInContentsAndRenderLeadBar=this.wallInContentsAndRenderLeadBar.bind(this),this.onFormSubmit=this.onFormSubmit.bind(this)}get meta(){return`&leadMagnetName=${this.options.name||""}&leadMagnetId=${this.leadMagnetId}`}get email(){var e;return((null===(e=window.application.user)||void 0===e?void 0:e.email)||a.default.get("email")||"").toLowerCase()}get mailingList(){return this.options.mailingList||"default"}get leadMagnetId(){return this.options.id}checkSubscription(){const{email:e,mailingList:t,leadMagnetId:s}=this;return(0,r.verifySubscription)({email:e,mailingList:t,leadMagnetId:s})}render(){return this.checkSubscription().then(e=>e.json()).then(e=>{if(e.is_bot)throw new Error("Not a regular user");this.renderContents()}).catch(this.wallInContentsAndRenderLeadBar).catch(e=>console.error(e))}renderContents(){this.el.replaceWith(...this.el.childNodes)}reachGoal(){const{goal:e}=this.options,t=["LEAD_MAGNET_WALL",(this.leadMagnetId+"").toUpperCase(),"SUBSCRIBED"].filter(Boolean).join("_");(0,l.default)(t),e&&(0,l.default)(e)}wallInContentsAndRenderLeadBar(){this.paywallEmbeddedVideos(),this.hideLikes(),this.renderLeadMagnetBar()}paywallEmbeddedVideos(){var e;null!==(e=this.options.mod)&&void 0!==e&&e.includes("noWallAllVideos")||document.querySelectorAll(".embeddedVideo").forEach(e=>{const t=e.querySelector(".embeddedVideoPaywallCover");e.parentNode.replaceChild(t,e)})}hideLikes(){var e;null!==(e=this.options.mod)&&void 0!==e&&e.includes("noLikes")&&document.querySelectorAll(".webpageLikes").forEach(e=>e.remove())}renderLeadMagnetBar(){const e=Object.assign({},this.options,{onSubmit:this.onFormSubmit});$(this.el).reactify(o.default,e)}onFormSubmit({email:e}){return(0,n.subscribeUser)({email:e,eventType:this.mailingList,additionalMeta:this.meta}).then(this.reachGoal).then(()=>window.location.reload()).catch(e=>console.error(e))}}},15960:function(e,t,s){"use strict";var i=s(24994)(s(13079));$(".js__leadMagnetWall").each((e,t)=>{var s;const a=$(t),o=Object.assign({},null===(s=window.leadMagnetWall)||void 0===s?void 0:s.defaults,JSON.parse(a.attr("data-options")));new i.default(t,o).render()})},17862:function(e,t,s){"use strict";var i=s(86019),a=s(24994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=s(76148),n=a(s(2733)),r=s(27384),l=s(45169),c=a(s(32943));class d extends o.Component{constructor(e){super(e),this.state={email:this.email}}get email(){var e;return((null===(e=window.application.user)||void 0===e?void 0:e.email)||n.default.get("email")||"").toLowerCase()}get buttonText(){return this.props.buttonText||i.t("leadMagnet.openLink")}get name(){var e;return this.props.name||(null===(e=document.querySelector("h1"))||void 0===e?void 0:e.innerText)}render(e){return(0,o.h)("div",{className:"leadMagnetWall-bar module is__boxed is__bleedBackgroun
2dSides is__noMargins textBox",id:"leadMagnetWallFooter"},e.name&&(0,o.h)(l.Heading2,{className:"leadMagnetWall-header"},this.name),(0,o.h)(r.Cols,{transposeOnMobile:!0,className:"is__desktopDivisionProportions6to10"},(0,o.h)("div",{className:"leadMagnetWall-description"},(0,o.h)(l.TextNode,null,e.text)),(0,o.h)("div",{className:"leadMagnetWall-emailForm"},(0,o.h)(c.default,{email:this.state.email,buttonText:this.buttonText,onSubmit:e.onSubmit}))))}}t.default=d},96086:function(e,t,s){"use strict";var i=s(86019),a=s(24994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=s(76148),n=s(27384),r=s(45169),l=a(s(25037));const c=({key:e})=>`/lectures/${e}/`,d=e=>({...e,url:c(e)});class h extends o.Component{render(){let{courses:e}=this.props;if(!e||!e.length)return null;e=e.map(d);const t=Array(5).fill("something");return(0,o.h)("div",{className:"lectureFollowingCoursesNavigation"},(0,o.h)(r.Heading2,null,i.t("lectures.navigation.following.title")),(0,o.h)(n.Cols,null,t.map((t,s)=>(0,o.h)(l.default,{item:e[s]}))))}}t.default=h},56769:function(e,t,s){"use strict";var i=s(86019),a=s(24994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=s(76148),n=s(27384),r=s(45169),l=a(s(25037));const c=({slug:e})=>`/lectures/${e}/`,d=e=>({...e,url:c(e)});class h extends o.Component{render(){let{lectures:e}=this.props;if(!e||!e.length)return null;const t=Array(6).fill("something");return e=e.map(d),(0,o.h)("div",{className:"lectureFollowingLecturesNavigation"},(0,o.h)(r.Heading2,null,i.t("lectures.navigation.following.title")),(0,o.h)("div",{className:"horizontalScrollableModule is__fade is__noScrollbar"},(0,o.h)("div",{className:"horizontalScrollableModuleWrapper"},(0,o.h)("div",{className:"horizontalScrollableModuleContent"},(0,o.h)(n.Cols,null,t.map((t,s)=>(0,o.h)(l.default,{item:e[s]})))))))}}t.default=h},25037:function(e,t,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=s(76148),a=s(45169),o=s(66192);const n=[1280,720],r=({cover:e})=>(0,i.h)(o.Image,{src:e,size:n});t.default=({item:e})=>
2{if(!e)return(0,i.h)("div",null);const{url:t,title:s,cover:o,nonRetinaCover:n}=e;return(0,i.h)("div",{className:"lectureFollowingNavigation-item textBox"},(0,i.h)("a",{href:t,className:"media doubleHover no-u"},(0,i.h)(r,{cover:n||o})),(0,i.h)(a.Caption,null,(0,i.h)("a",{href:t,className:"doubleHover no-u",dangerouslySetInnerHTML:{__html:s}})))}},73953:function(e,t,s){"use strict";var i=s(24994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=s(76148),o=s(36192),n=i(s(56769)),r=i(s(96086)),l=i(s(73901));class c extends a.Component{constructor(e){super(e),this.state={followingLectures:[],followingCourses:[],otherCourses:[]},this.pageId=$('meta[name="pageId"]').attr("content"),this.navigationId=$('meta[name="navigationId"]').attr("content")}get navigationApi(){return((this.navigationId||this.pageId)+"/navigation.json").replace("//","/")}componentDidMount(){this.fetchNavigation().then(({assets:e,lectures:t={},courses:s={}})=>this.setState({assets:e,followingLectures:t.following||[],followingCourses:s.following||[],otherCourses:s.other||[]}))}fetchNavigation(){return fetch(this.navigationApi).then(e=>{if(!e.ok)throw Error(e.statusText);return e.json()})}render(){const{assets:e,followingLectures:t,followingCourses:s,otherCourses:i}=this.state;return(0,a.h)("div",{className:"lectureNavigation"},e&&(0,a.h)(o.AssetsNavigation,e),!!t.length&&(0,a.h)(n.default,{lectures:t}),!t.length&&!s.length&&(0,a.h)(l.default,{courses:i}),!t.length&&!!s.length&&(0,a.h)(r.default,{courses:s}))}}t.default=c},60774:function(e,t,s){"use strict";var i=s(24994)(s(73953));$(".js__lectureNavigation").each((e,t)=>{const s=$(t),a=s.next();a.is(".webpageLikes")&&a.after(s);const o=JSON.parse(s.attr("data-options")||null);s.empty().reactify(i.default,o),s.children().unwrap()})},57071:function(e,t,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=s(76148),a=s(66192),o=s(45169);t.default=({cover:e,title:t,duration:s,lectureKey:n,courseKey:r})=>{const l=`/lectures/${r}/${n}/`;return(0,i.h)("a",{className:"lecturePreview no-u",href:l},(0,i.h)(a.Image,{src:e,size:[94,52]}),(0,i.h)(o.Caption,null,(0,i.h)("span",{class:"lecturePreview-title"},t),(0,i.h)("span",{class:"lecturePreview-duration smallcapitals"},s)))}},81485:function(e,t,s){"use strict";var i=s(24994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=s(76148),o=i(s(22046)),n=i(s(53416)),r=i(s(48484)),l=s(99972),c=i(s(15024));class d extends a.Component{constructor(e){super(e),this.lectureKey=e.id.replace("lecture-",""),this.state={prices:{}}}componentDidMount(){this.fetch()}componentDidUpdate(){$(".doubleHover").each(function(){new o.default($(this))})}fetch(){(0,c.default)(this.props.id).then(e=>this.setState({...this.state,prices:e,hasSpecialOffer:e.specialOffer&&e.specialOffer.oneTime})).catch(e=>console.error(e))}isReady(){return!!this.state.prices.oneTime}render(){if(!this.isReady())return null;const{size:e,id:t,content:s}=this.props,i={...this.state,content:s,href:(0,l.lectureHref)(t),lectureKey:this.lectureKey};return"half"===e?(0,a.h)(r.default,i):(0,a.h)(n.default,i)}}t.default=d},70586:function(e,t,s){"use strict";var i=s(24994)(s(81485));$(".js__lectureSpacer").each((e,t)=>{const s=$(t);s.reactify(i.default,s.data())})},22978:function(e,t,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=s(76148);const a={full:{desktop:{video:[154,87],image:[38,74]},laptop:{video:[156,88],image:[38,75]},mobile:{video:[205,117],image:[50,100]}},half:{desktop:{video:[214,121],image:[53,107]},laptop:{video:[195,110],image:[48,94]}}},o={full:["desktop","laptop","mobile"],half:["desktop","laptop"]};t.default=({href:e,lectureKey:t,size:s})=>{const n=o[s],r=a[s],l=`${window.location.protocol}//${window.location.host}`,c=`/lectures/${t}/files/[email protected]`,d=`${l}/lectures/${t}/files/teaser-cover.mp4`;return(0,i.h)("a",{style:{position:"relative"},href:e,className:"lectureSpacer-cover doubleHover no-u"},n.map(e=>(0,i.h)("div",{className:`lectureSpacer-coverMedia module device device__${e}`,style:{width:r[e].video[0],height:r[e].video[1]}},(0,i.h)("div",{className:"lectureSpacer-coverVideoWrapper",style:{backgroundImage:`url(${c})`}}
2,(0,i.h)("video",{autoplay:!0,muted:!0,playsinline:!0,playsInline:!0,loop:!0,src:d,poster:c})),(0,i.h)("div",{className:"image",style:{backgroundImage:`url(${c})`,width:r[e].image[0],height:r[e].image[1]}}))))}},53416:function(e,t,s){"use strict";var i=s(24994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=s(76148),o=s(27384),n=i(s(99963)),r=i(s(22978)),l=i(s(65131));t.default=({href:e,lectureKey:t,prices:s,content:i})=>(0,a.h)(o.Cols,{className:"lectureSpacer",divisionProportions:":11:1",transposeOnMobile:!0},(0,a.h)(r.default,{size:"full",className:"lectureSpacer-cover",lectureKey:t,href:e}),(0,a.h)(n.default,{href:e,className:"lectureSpacer-title",prices:s,content:i}),(0,a.h)(l.default,{className:"lectureSpacer-pricing",prices:s,href:e}))},48484:function(e,t,s){"use strict";var i=s(24994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=s(76148),o=s(27384),n=i(s(75246)),r=i(s(22978));t.default=({href:e,lectureKey:t,prices:s,content:i})=>(0,a.h)(o.Cols,{className:"lectureSpacer is__half device device__desktop device__laptop"},(0,a.h)(r.default,{size:"half",className:"lectureSpacer-cover",lectureKey:t,href:e}),(0,a.h)(n.default,{href:e,className:"lectureSpacer-title",prices:s,content:i}))},73736:function(e,t,s){"use strict";var i=s(86019);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=s(76148),o=s(45169),n=s(73345);t.default=({prices:e,className:t})=>{const s=i.t("subscription.unitsOneTime"),r=i.t(`subscription.subscriptionUnits_${e.renewalPeriod}`),l=i.t(`subscription.prices.defaultLabel_${e.subscriptionPeriod}`),{oneTime:c,previousOneTime:d,isApplicableForDiscount:h}=e,u=(0,n.formatPrice)(c,{currency:s}),p=h&&d!==c;return(0,a.h)(o.Caption,{className:`lectureSpacer-pricing ${t}`},p?(0,a.h)("span",null,l," ",(0,a.h)("s",null,(0,n.formatPrice)(e.previousOneTime))," ",(0,a.h)("span",{className:"lectureSpacer-pricingDiscounted"},u)):(0,a.h)("span",null,`${l} ${u}`),(0,a.h)("span",{className:"lectureSpacer-pricingNextPeriod"},`, затем ${(0,n.formatPrice)(e.subscription)} ${r}`))}},96933:function(e,t,s){"use strict";var i=s(24994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=s(76148),o=i(s(28436));t.default=({title:e,href:t,className:s})=>(0,a.h)(o.default,{isNoVisited:!0,isDoubleHover:!0,className:s,href:t,text:e})},65131:function(e,t,s){"use strict";var i=s(24994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=s(76148),o=i(s(53893));t.default=({prices:e})=>(0,a.h)("div",{className:"lectureSpacer-pricing"},(0,a.h)("div",{className:"device desktop"},(0,a.h)(o.default,{prices:e,size:"pageTitle",unitsSize:"medium"})),(0,a.h)("div",{className:"device laptop"},(0,a.h)(o.default,{prices:e,unitsSize:"medium",size:"title",hasCompactUnitsView:!0})))},99963:function(e,t,s){"use strict";var i=s(24994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=s(76148),o=i(s(32485)),n=s(45169),r=i(s(96933)),l=i(s(73736));t.default=({href:e,content:t,prices:s})=>{const{title:i,sentence:c,humanizedSize:d,authorGenitiveCase:h}=t;return(0,a.h)("div",{className:(0,o.default)("lectureSpacer-title",{is__small:i.length>50})},(0,a.h)("a",{href:e,className:"lectureSpacer-title-link doubleHover no-u"},(0,a.h)("div",{className:"module"},(0,a.h)(n.Heading2,null,i),(0,a.h)(n.TextNode,null,c),(0,a.h)(l.default,{prices:s,className:"device device__mobile"}),(0,a.h)(r.default,{title:`${d} ${h}`,href:e}))))}},75246:function(e,t,s){"use strict";var i=s(24994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=s(76148),o=s(45169),n=i(s(96933)),r=i(s(73736));t.default=({href:e,content:t,prices:s})=>{const{title:i,sentence:l,humanizedSize:c}=t;return(0,a.h)("div",{className:"lectureSpacer-title"},(0,a.h)("a",{href:e,className:"lectureSpacer-title-link doubleHover no-u"},(0,a.h)("div",{className:"module"},(0,a.h)(o.Heading2,null,i),(0,a.h)(o.TextNode,null,l),(0,a.h)(r.default,{prices:s}),(0,a.h)(n.default,{title:c,href:e}))))}},99972:function(e,t,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.lectureHref=void 0;var i=s(15011);t.lectureHref=e=>{const t=(0,i.utmSource)({platform:"Сайт бюро",postType:"Банер",productType:"Лекции",product:e,postDate:new Date});return`/lectures/${e.replace("lecture-","")}/?utm_source=${t}`}},67237:function(e,t,s){"use strict";var i=s(24994);
2Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=s(76148),o=i(s(32485)),n=i(s(643)),r=i(s(25111));class l extends a.Component{constructor(e){super(e),this.state={activeTagKey:e.tags[0].key},this.changeActiveTagKey=this.changeActiveTagKey.bind(this)}changeActiveTagKey(e){this.setState({activeTagKey:e})}get activeTag(){return this.props.tags.find(e=>e.key===this.state.activeTagKey)}get coursesToShow(){return this.activeTag.courses.map(e=>this.props.courses.find(t=>t.key===e)).filter(e=>!!e).slice(0,3)}render(){const e=`--lecturesKeyColor: ${this.activeTag.color};`,t=(0,o.default)("lecturesByTag",`is__${this.coursesToShow.length}`);return(0,a.h)("div",{class:t,style:e},(0,a.h)("div",{className:"lecturesByTag-spacer"}),(0,a.h)("div",{className:"lecturesByTag-in"},(0,a.h)(n.default,{tags:this.props.tags,onChooseTag:this.changeActiveTagKey,activeTagKey:this.activeTag.key}),(0,a.h)("div",{className:"lecturesByTag-container"},this.coursesToShow.map((e,t)=>(0,a.h)(r.default,{course:e,hasLecturesList:t<1})))))}}t.default=l},71570:function(e,t,s){"use strict";var i=s(24994)(s(67237));$(".js__lecturesByTag").each((e,t)=>{const s=$(t),a=JSON.parse(s.attr("data-options")||null);s.empty().reactify(i.default,a),s.children().unwrap()})},25111:function(e,t,s){"use strict";var i=s(24994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=s(76148),o=i(s(94634)),n=s(45169),r=i(s(57071)),l=s(15011),c=s(73345);class d extends a.Component{render(){const{hasLecturesList:e}=this.props,{title:t,key:s,cover:i,authorInstrumentalCase:d,lectures:h}=this.props.course,u=t+` с ${(0,c.withWbrs)(d)}`,p=(0,l.utmSource)({platform:"Сайт бюро",productType:"Лекции",product:s,postDate:new Date}),m=`/lectures/${s}/?utm_source=${p}`,f=(h||[]).filter(e=>!!e.cover);return(0,a.h)("div",{className:"lecturesCourse",style:`background-image: url(${i})`},(0,a.h)("a",{href:m,className:"lecturesCourse-link no-u"},(0,a.h)(n.Heading2,{className:"lecturesCourse-title",html:u})),e&&(0,a.h)("div",{className:"lecturesCourse-lectures"},f.map((e,t)=>(0,a.h)(r.default,(0,o.default)({},e,{courseKey:s,lectureKey:e.key,key:t})))))}}t.default=d},94022:function(){"use strict";let e={threshold:1,rootMargin:"0px"};const t="is__played",s=window.CUSTOM_INTERSECTION_OBSERVER_THRESHOLD||1;e.threshold=s;class i{constructor(t){this.$wrapper=t,this.$previewVideo=t.find(".video.lecturePreviewVideo video"),this.observer=new IntersectionObserver(this.buildObserver,e),this.startObserving()}buildObserver(e){e.forEach(e=>{const s=e.target,i=s.closest(".video");e.isIntersecting&&(s.play(),4===s.readyState&&$(i).addClass(t)),e.isIntersecting||($(i).removeClass(t),s.pause())})}startObserving(){this.$previewVideo.length&&this.$previewVideo.get().forEach(e=>this.observer.observe(e))}}$(".js__lecturesPreview").each(function(){new i($(this))})},643:function(e,t,s){"use strict";var i=s(24994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=s(76148),o=i(s(32485));const n=({title:e,isActive:t,onClick:s,textColor:i})=>(0,a.h)("button",{style:i?`--lecturesTagTextColor: ${i}`:null,class:(0,o.default)("lecturesTags-tag",{is__active:t}),type:"button",onClick:s},e);t.default=({tags:e,activeTagKey:t,onChooseTag:s})=>(0,a.h)("div",{className:"lecturesTags"},(0,a.h)("div",{className:"lecturesTags-in"},e.map(e=>(0,a.h)(n,{title:e.title,textColor:e.textColor,isActive:t===e.key,onClick:()=>s(e.key)}))))},11171:function(e,t,s){"use strict";var i=s(24994);Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"Likely",{enumerable:!0,get:function(){return a.default}});var a=i(s(61547))},61547:function(e,t,s){"use strict";var i=s(86019);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=s(76148);const o=e=>(0,a.h)("span",{className:"likely__caption"},e.caption),n=(e,t)=>()=>(0,a.h)("div",{className:t},(0,a.h)(e,null),(0,a.h)(o,{caption:i.t(`likely.${t}`)})),r=n(()=>(0,a.h)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 27 27"},(0,a.h)("path",{d:"M22.2,5.1L4.4,12c-1.2,0.5-1.2,1.2-0.2,1.5L8.8,15l10.5-6.7c0.7-0.4,0.9-0.1,0.6,0.2l-8.5,7.8l0,0l0,0l0,0l0,0L11,21c0.5,0,0.8-0.2,1-0.5c0.6-0.6,2.1-2.2,2.1-2.2l4.6,3.4c0.8,0.5,1.5,0.2,1.7-0.8l3-14.4C23.7,5.3,23,4.7,22.2,5.1z"})),"telegram"),l=n(()=>(0,a.h)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 27 27"},(0,a.h)("path",{d:"M13.3,20.4h1.5c0,0,0.5,0,0.7-0.3c0.2-0.2,0.2-0.6,0.2-0.6s0-2,0.9-2.3c0.9-0.3,2.1,1.9,3.4,2.8c0.9,0.6,1.7,0.5,1.7,0.5h3.4c0,0,1.7-0.1,0.9-1.5c0-0.1-0.5-1-2.5-2.8c-2.1-1.9-1.8-1.6,0.7-4.9c1.6-2,2.2-3.3,2-3.8s-1.3-0.4-1.3-0.4h-3.8c0,0-0.3,0-0.5,0.1s-0.3,0.4-0.3,0.4s-0.6,1.6-1.4,2.9c-1.7,2.8-2.4,3-2.6,2.8c-0.6-0.4-0.5-1.6-0.5-2.5c0-2.7,0.4-3.9-0.8-4.1c-0.6-0.1-0.9-0.2-1.9-0.2c-1.4,0-2.5,0-3.1,0.3C9.5,7,9.2,7.5,9.4,7.5s0.8,0.1,1.1,0.5c0.4,0.5,0.4,1.7,0.4,1.7s0.2,3.2-0.5,3.6c-0.5,0.3-1.2-0.2-2.7-2.8c-0.8-1.3-1-2-1.3-2.7C6.3,7.7,6.3,7.4,6.1,7.2C5.8,7,5.6,7,5.4,7C4.5,7,1.8,7,1.8,7S1.3,7,1,7.2C0.8,7.4,1,7.8,1,7.8s2.9,6.5,6,9.8C10,20.6,13.3,20.4,13.3,20.4"})),"vkontakte"),c=n(()=>(0,a.h)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 27 27"},(0,a.h)("path",{d:"M12.05689,3.41667A6.92132,6.92132,0,0,0,4.99219,10.
2187a3.93842,3.93842,0,0,0,1.937,3.67044.53625.53625,0,0,0,.79812-.33718l.19277-.823a.50436.50436,0,0,0-.14323-.499,2.69066,2.69066,0,0,1-.73672-2.39653,5.03722,5.03722,0,0,1,4.975-4.57643c3.12027-.05518,5.00867,1.8975,4.3626,5.66614-.68545,3.99861-3.9774,4.86143-4.75694,2.69328a2.00728,2.00728,0,0,1,.02829-1.21247c.17891-.61969.4894-1.59175.64116-2.13062.35887-1.27427.23248-2.45578-.92719-2.74062-.89886-.22077-1.805.38623-2.19719,1.76525a3.88589,3.88589,0,0,0,.22638,2.4543L8.01981,17.405a4.37535,4.37535,0,0,0-.118,1.21957l.12181,2.76261A.236.236,0,0,0,8.468,21.487l1.32992-2.51835a4.37535,4.37535,0,0,0,.36863-.954l.71136-2.7678c2.35839,3.0342,7.31862.59536,7.99979-3.96644C19.651,6.10086,16.68257,3.45868,12.05689,3.41667Z"})),"pinterest"),d=n(()=>(0,a.h)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 27 27"},(0,a.h)("path",{d:"M9.8,21.5c7.5,0,11.7-6.2,11.7-11.5V9.5c0.8-0.6,1.5-1.3,2-2.1C22.8,7.7,22,7.9,21.1,8c0.8-0.5,1.5-1.3,1.8-2.2c-0.8,0.5-1.7,0.8-2.6,1c-0.7-0.8-1.8-1.3-3-1.3c-2.3,0-4.1,1.8-4.1,4c0,0.3,0,0.6,0.1,0.9c-3.4-0.1-6.4-1.7-8.4-4.2C4.5,6.9,4.3,7.5,4.3,8.3c0,1.4,0.7,2.7,1.8,3.4c-0.6-0.1-1.3-0.3-1.8-0.6l0,0c0,2,1.4,3.6,3.3,3.9c-0.4,0.2-0.7,0.3-1.1,0.3c-0.3,0-0.5,0-0.8-0.1c0.5,1.6,2,2.8,3.8,2.8c-1.4,1.1-3.2,1.8-5.1,1.8c-0.3,0-0.6,0-1,0C5.3,20.8,7.5,21.5,9.8,21.5"})),"twitter");t.default=class{shouldComponentUpdate(){return!1}render(e){const t=e.locale||i.locale;return"ru"===t?(0,a.h)("div",{className:"likely"},(0,a.h)(r,{locale:t}),(0,a.h)(l,{locale:t}),(0,a.h)(c,{locale:t}),(0,a.h)(d,{locale:t})):(0,a.h)("div",{className:"likely"},(0,a.h)(c,{locale:t}),(0,a.h)(d,{locale:t}),(0,a.h)(l,{locale:t}),(0,a.h)(r,{locale:t}))}}},48849:function(e,t,s){"use strict";var i=s(24994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=s(76148),o=i(s(43631)),n=i(s(87308));class r extends a.Component{constructor(e){super(e),this.formFieldsStorage=new n.default(e.localStorageKey),this.state={text:e.text||this.localStorageValue},this.handleInput=this.handleInput.bind(this)}get localStorageValue(){return this.formFieldsStorage.get()[this.props.name]}handleInput(e){this.setState({text:e.target.value})}render(){return(0,a.h)(o.default,{value:this.state.text,name:this.props.name,onInput:this.handleInput,minRows:this.props.minRows||5,className:"formTextarea"})}}t.default=r},15254:function(e,t,s){"use strict";var i=s(24994)(s(48849));$(".js__linedTextarea").each(function(){const e=$(this).find("textarea").remove(),t=e.val(),s=e.attr("name"),a=e.attr("data-local-storage-key"),o=e.attr("data-min-rows");$(this).reactify(i.default,{text:t,name:s,localStorageKey:a,minRows:o}),$(this).addClass("linedTextarea")})},28436:function(e,t,s){"use strict";var i=s(24994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=s(76148),o=i(s(32485));t.default=e=>{const t=(0,o.default)("module","linkWithArrow",{is__small:e.isSmall,is__inline:e.isInline,is__wrap:e.isWrap},e.className),s=(0,o.default)("is__noUnderline",{doubleHover:e.isDoubleHover,novisited:e.isNoVisited});return(0,a.h)("div",{className:t},(0,a.h)("a",{href:e.href,className:s},(0,a.h)("span",{className:"linkWithArrow-text"},e.text||e.children),(0,a.h)("span",{className:"linkWithArrow-arrow"},"❱")))}},14923:function(e,t,s){"use strict";var i=s(86019),a=s(24994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=s(76148),n=a(s(32485)),r=a(s(2733)),l=s(27384),c=s(45169),d=s(39572),h=a(s(30933)),u=a(s(62515));const{isOnMobile:p}=window.application||{};class m extends o.Component{constructor(e){super(e),this.state={isVisible:!1,redirectTo:null,name:null,submitGoal:null},this.hide=this.hide.bind(this),this.onLoginEmailSent=this.onLoginEmailSent.bind(this)}hide(){this.setState({isVisible:!1,redirectTo:null,name:null,submitGoal:null})}show(e,t={}){this.setState({isVisible:!0,...t},this.onShow)}componentDidMount(){this.focusLoginInputIfNeeded(),$(document).on("showLoginBar",this.show.bind(this))}componentDidUpdate(){this.focusLoginInputIfNeeded()}focusLoginInputIfNeeded(){this.state.isVisible&&!p&&setTimeout(()=>{var e;return null===(e=this.loginInput)||void 0===e?void 0:e.focus()},d.SlideInLayer.ANIMATION_DURATION)}onLoginEmailSent({email:e}){this.state.redirectTo&&(this.reachGoal("submit"),r.default.set("email",e),window.location.href=this.state.redirectTo)}onShow(){this.reachGoal("show")}reachGoal(e){(0,u.default)(`LOGIN_BAR_${e.toUpperCase()}`),"submit"===e&&(0,u.default)(this.state.submitGoal)}render(){const e=(0,n.default)("loginBar",{is__visible:this.state.isVisible}),t=(0,n.default)("loginBar-header",{is__default:!this.state.name});return(0,o.h)("div",{className:e},(0,o.h)(d.SlideInLayer,{isVisible:this.state.isVisible,setHidden:this.hide},(0,o.h)("div",{className:"holder"}
2,(0,o.h)("div",{className:"module is__boxed is__bleedBackgroundSides textBox"},(0,o.h)(l.Cols,{transposeOnMobile:!0},(0,o.h)("div",{className:"loginBar-description"},(0,o.h)("div",{className:t},(0,o.h)(c.Heading1,{html:this.state.name?this.state.name:i.t("login.heading")}))),(0,o.h)("div",{className:"loginBar-form"},(0,o.h)(h.default,{skipHeading:!0,includeDefaultCaption:!0,inputRef:e=>this.loginInput=e,returnTo:this.state.redirectTo,onLoginEmailSent:this.onLoginEmailSent})))))))}}t.default=m},69492:function(e,t,s){"use strict";var i=s(24994)(s(14923));const a=$(document);if(a.find(".js__loginBar").length&&!window.application.user){a.find(".js__loginBar[href][data-redirect-after-submit]").each((e,t)=>{const s=$(t),i=s.attr("href");s.attr("href","/login/"),s.attr("data-redirect-to",i)}),a.on("click",".js__loginBar",e=>{e.preventDefault();const t=$(e.currentTarget),s={redirectTo:t.attr("data-redirect-to"),name:t.attr("data-name"),submitGoal:t.attr("data-submit-goal")};a.trigger("showLoginBar",s)});const e=$("<div>").appendTo("body");e.reactify(i.default),e.children().unwrap()}},2721:function(e,t,s){"use strict";var i=s(24994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=i(s(32943));class o extends a.default{waitForPreloaderAndHandleResponse(e){e instanceof Error?(this.isLoading=!1,this.cleanUpCurrentLoadingTimeouts(),this.setState({formState:"default"})):super.waitForPreloaderAndHandleResponse()}}t.default=o},83241:function(e,t,s){"use strict";var i=s(86019),a=s(24994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=s(76148),n=a(s(32485)),r=a(s(98999)),l=s(91978),c=a(s(11946)),d=a(s(2721)),h=s(45169);const u="email_sent",p="error",{isOnMobile:m}=window.application||{};class f extends o.Component{constructor(e){super(e),this.state={email:null,requestState:null},this.requestLoginEmail=this.requestLoginEmail.bind(this)}componentDidMount(){m||setTimeout(()=>{var e;return null===(e=this.loginInput)||void 0===e?void 0:e.focus()},100)}get captionText(){if(this.state.requestState===p)return i.t("loginCardForm.error");if(this.state.requestState!==u)return i.t("login.defaultCaption");const e=(0,c.default)(this.state.email);return i.t("loginCardForm.emailSent",{email:e})}requestLoginEmail({email:e}){return(0,l.executeRecaptcha)({action:"login"}).then(t=>this.sendRequest({email:e,token:t})).catch(e=>{const t=e instanceof Error?e:new Error("Card login request failed");throw this.setState({requestState:p}),console.error(t),t})}sendRequest({email:e,token:t}){const s={email:e,token:t};return this.props.cardType&&(s.cardType=this.props.cardType),fetch("/pay/card/preparation/",{method:"POST",headers:r.default,body:JSON.stringify(s)}).then(e=>{if(!e.ok)throw new Error(`Card login request failed with ${e.status}`);return e.json()}).then(({result:t,location:s})=>{if("redirect"===t&&s)window.location.assign(s);else{if(t!==u)throw new Error("Unexpected card login response");this.setState({email:e,requestState:u})}})}render(){return(0,o.h)("div",{className:"loginForm"},(0,o.h)(d.default,{onSubmit:this.requestLoginEmail,inputRef:e=>this.loginInput=e}),(0,o.h)(h.Caption,{className:(0,n.default)("is__visible",{error:this.state.requestState===p}),html:this.captionText}))}}t.default=f},80217:function(e,t,s){"use strict";var i=s(24994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=s(76148),o=i(s(83241)),n=i(s(88821));t.default=({cardType:e,title:t})=>(0,a.h)(n.default,{heading:t},(0,a.h)(o.default,{cardType:e}))},24030:function(e,t,s){"use strict";var i=s(24994)(s(80217));$(".js__loginCardPage").each((e,t)=>{$(t).reactify(i.default,$(t).data())})},88821:function(e,t,s){"use strict";var i=s(86019),a=s(24994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=s(76148),n=s(45169),r=a(s(30933));const{isOnMobile:l}=window.application||{};class c extends o.Component{componentDidMount(){this.focusLoginInputIfNeeded()}focusLoginInputIfNeeded(){l||setTimeout(()=>{var e;return null===(e=this.loginInput)||void 0===e?void 0:e.focus()},100)}render(){const e=this.props.children.length>0;return(0,o.h)("div",{className:"loginPage"},(0,o.h)("div",{className:"loginPage-header"},(0,o.h)(n.Heading1,{html:this.props.heading||i.t("login.heading")})),e?this.props.children:(0,o.h)(r.default,{skipHeading:!0,includeDefaultCaption:!0,inputRef:e=>this.loginInput=e}))}}t.default=c},49282:function(e,t,s){"use strict";var i=s(24994)(s(88821));$(".js__loginPage").each((e,t)=>{$(t).reactify(i.default)})},64489:function(e,t,s){"use strict";var i=s(24994);
2Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=i(s(47733)),o=i(s(96563));t.default=(0,a.default)(o.default.max)},39598:function(e,t,s){"use strict";var i=s(24994),a=i(s(64489));(0,i(s(85702)).default)(".js__maxSpacer",a.default)},21981:function(e,t,s){"use strict";var i=s(24994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=s(76148),o=i(s(43631));class n extends a.Component{constructor(e){super(e)}render(){return(0,a.h)(o.default,{value:this.props.text})}}t.default=n},86538:function(e,t,s){"use strict";var i=s(24994)(s(21981));$(".js__mediaTextarea").each(function(){const e=$(this).find("textarea").remove().val();$(this).reactify(i.default,{text:e})})},51308:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.setTextareaAutosize=void 0,t.setTextareaAutosize=e=>{e.css("height",e[0].scrollHeight+"px"),e.on("input",()=>{e.css("height","auto"),e.css("height",e[0].scrollHeight+"px")})}},35333:function(e,t,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=s(51308),a=s(91978);t.default=class{constructor(e){(0,a.initRecaptcha)(),this.$form=e,this.$inputs=this.$form.find("input, textarea"),this.$submit=this.$form.find('button[type="submit"]'),this.id=this.$form.attr("form-id"),this.formName=this.$form.attr("form-name"),this.submitUrl=this.$form.attr("action"),this.method=this.$form.attr("method"),this.onSuccess=window[this.$form.attr("on-success")],this.onError=window[this.$form.attr("on-error")],this.hasLocalStorageSupport=!0,this.$inputs.on("input",this.handleInput.bind(this)),this.$inputs.on("blur",e=>this.setInputValidity($(e.target))),this.$form.on("submit",this.submit.bind(this)),this.restoreSavedValues(),this.checkTotalValidity(),this.setTextareaAutosize()}setLoading(e=!0){this.isLoading=e,this.$form.toggleClass("is__loading",e)}setInputValidity(e){if(!e.val().length)return;const t=e[0].checkValidity();e.parent().toggleClass("is__invalid",!t)}checkTotalValidity(){const e=this.$inputs.toArray().every(e=>e.checkValidity());this.$inputs.each((e,t)=>{this.setInputValidity($(t))}),this.$submit.prop("disabled",!e)}handleInput(e){this.saveValue($(e.target)),this.setInputValidity($(e.target)),this.checkTotalValidity()}handleSuccess(e){this.$form.addClass("is__success"),this.$form[0].reset(),this.onSuccess&&this.onSuccess(e),this.hasLocalStorageSupport&&this.clearSavedValues()}saveValue(e){if(this.hasLocalStorageSupport)try{localStorage.setItem(`formData-${e.attr("name")}`,e.val())}catch{this.hasLocalStorageSupport=!1}}restoreSavedValues(){if(this.hasLocalStorageSupport)try{this.$inputs.each((e,t)=>{const s=$(t),i=localStorage.getItem(`formData-${s.attr("name")}`);i&&s.val(i)})}catch{this.hasLocalStorageSupport=!1}}clearSavedValues(){this.$inputs.each((e,t)=>{const s=$(t);localStorage.removeItem(`formData-${s.attr("name")}`)})}async submit(e){if(e.preventDefault(),this.isLoading)return;this.setLoading();const t=new FormData(this.$form[0]);t.append("form_id",this.id),t.append("form_name",this.formName);try{const e=await(0,a.executeRecaptcha)();t.append("g-recaptcha-response-data",e);const s=await this.send(t);this.handleSuccess(s)}catch(e){console.warn("ERROR sending form:",e),this.onError&&this.onError(e)}this.setLoading(!1)}send(e){const{submitUrl:t,method:s}=this;return fetch(t,{mode:"no-cors",method:s,body:e}).then(e=>e.text())}setTextareaAutosize(){this.$form.find("textarea").each((e,t)=>{(0,i.setTextareaAutosize)($(t))})}}},37682:function(e,t,s){"use strict";var i=s(24994)(s(35333));$(()=>{$(".js__newForm").each((e,t)=>new i.default($(t)))})},87308:function(e){"use strict";const t=e=>Object.fromEntries(Object.entries(e).filter(([,e])=>""!==e));e.exports=class{constructor(e){this.key=e||((e=(()=>window.productSubscription?window.productSubscription.subscription.product_id:"")())=>`${e}.paybarRememberedFields`)()}save(e){try{localStorage.setItem(this.key,JSON.stringify(t(e)))}catch(e){console.warn("Failed to save remembered fields: ",e)}}clear(){try{localStorage.removeItem(this.key)}catch(e){console.warn("Failed to clear remembered fields: ",e)}}get(){try{const e=localStorage.getItem(this.key);return t(JSON.parse(e)||{})}catch(e){return console.warn("Failed to get remembered fields: ",e),{}}}}},96465:function(e,t,s){"use strict";var i=s(24994);
2Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=s(76148),o=i(s(32485));const n={bookshelf:.61971831,book:.7072072072};class r extends a.Component{constructor(e){super(e),this.$document=$(document),this.isAnimated="animated"===this.props.type,this.animationName=this.isAnimated?"showOverlayShelf":"none",this.translateY=this.isAnimated?"translateY(100%)":"translateY(0)",this.gridSpacing=window.application.gridSpacing,this.need3dCovers="bookshelf"===this.props.product,this.state={parentHeight:"auto",bookHeight:"auto",bookWidth:"auto",maxParentWidth:"none",animationName:this.animationName,translateY:this.translateY}}get isMobile(){return window.application.viewWidth<961}componentDidMount(){this.setParentHeight(),this.$document.on("appResize",()=>{this.updateAnimationName(),this.setParentHeight(),setTimeout(()=>this.setImageSize())})}updateAnimationName(){this.isAnimated&&(this.animationName="none",this.translateY="translateY(0)",this.state.animationName!==this.animationName&&this.state.translateY!==this.translateY&&this.setState({animationName:this.animationName,translateY:this.translateY}))}componentDidUpdate(){this.setImageSize()}setParentHeight(){const e=this.props.mobileHeight&&this.isMobile?this.props.mobileHeight:this.props.height;this.setState({parentHeight:e})}setImageSize(){if(!this.books)return;const e=this.props.resized?this.leadBooksHeightToGrid:this.books.offsetHeight,t=e,s=n[this.props.product]*t,i=s*this.props.books.length;this.state.parentHeight!==e&&this.setState({parentHeight:e}),this.state.bookHeight!==t&&this.state.bookWidth!==s&&this.state.maxParentWidth!==i&&this.setState({bookWidth:s,bookHeight:t,maxParentWidth:i})}get leadBooksHeightToGrid(){return(this.books.offsetHeight/this.gridSpacing).toFixed()*this.gridSpacing}get shelfStyles(){return{height:this.state.parentHeight,maxWidth:this.state.maxParentWidth,animationName:this.state.animationName,transform:this.state.translateY}}get bookImageStyles(){return{height:this.state.bookHeight,width:this.state.bookWidth}}bookStyles(e){return"locked"===this.props.type?`\n        max-width: ${this.state.bookWidth}px;\n        -webkit-mask-image: url(/projects/book-${e}/files/_book-cover-3d.png);\n        mask-image: url(/projects/book-${e}/files/_book-cover-3d.png);\n      `:`max-width: ${this.state.bookWidth}px;`}bookImageSrc(e){const{product:t,productId:s}=this.props;return`${s?`/projects/${s}`:`/projects/book-${e}`}/files/${"bookshelf"===t?"_book-cover-3d.png":"_book-cover-face.jpg"}`}bookHref(e){if(e.cannotRead||this.props.cannotRead)return null;const t=e.hasOnlyDemo||this.props.hasOnlyDemo;return`/books/${e.key}/${t?"demo/":""}`}render(){const{className:e,type:t,cannotRead:s,books:i,shelfRef:n}=this.props,r=(0,o.default)("newPaybarShelf module",e,`is__${t}`,{is__cannotRead:s});return(0,a.h)("div",{className:r,style:this.shelfStyles,ref:e=>this.books=e}
2,(0,a.h)("div",{className:"newPaybarShelf-in",ref:n},(0,a.h)("div",{className:"newPaybarShelf-books"},i.map(e=>(0,a.h)("a",{className:"newPaybarShelf-book no-u",href:this.bookHref(e),style:this.bookStyles(e.key)},(0,a.h)("img",{className:"newPaybarShelf-cover",src:this.bookImageSrc(e.key),style:this.bookImageStyles}))))))}}t.default=r},21201:function(e,t,s){"use strict";var i=s(24994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=s(76148),o=i(s(32485));t.default=({isWide:e,isLarge:t,productId:s})=>{const i=`/projects/${s}/files/3d-covers${e?"-wide":""}${t?"-large":""}.png?v=2`,n=(0,o.default)("newPaybarShelfDummy",{is__wide:e,is__large:t});return(0,a.h)("div",{className:n},(0,a.h)("img",{src:i,alt:""}))}},96414:function(e,t,s){"use strict";var i=s(24994)(s(98999)),a=s(47310);e.exports=class{constructor(){this.savePurchaseIntent=this.savePurchaseIntent.bind(this)}get decoratedData(){return{...this.data||{},meta:(0,a.extractMeta)()}}savePurchaseIntent(){var e;null!==(e=this.data)&&void 0!==e&&e.userEmail&&fetch("/purchase_intents/",{headers:i.default,method:"POST",body:JSON.stringify(this.decoratedData),keepalive:!0}).catch(e=>console.error(e))}start(e){this.data=e,$(window).off("beforeunload.purchaseIntentTracking").on("beforeunload.purchaseIntentTracking",this.savePurchaseIntent)}cancel(){this.data=void 0,$(window).off("beforeunload.purchaseIntentTracking")}}},99232:function(e,t,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getTypeFromUrl=function(){const e=(0,i.urlToParamsArray)(window.location.search).map(({name:e})=>e).find(e=>n.includes(e)||r.test(e));return o[e]||e||null},t.removeTypeFromUrl=function(e=""){const t=c(e);window.history.replaceState({},document.title,d(t))},t.setTypeToUrl=function(e){e=a[e]||e;const t=c(l(e)?e:"");t.push({name:e}),window.history.replaceState({},document.title,d(t))};var i=s(9193);const a={"self:sub":"sub","self:single":"single"},o=Object.entries(a).reduce((e,[t,s])=>(e[s]=t,e),{}),n=["sub","single","upgrade","self","gift","company"],r=/^contactForm[\d,_,\w]*/,l=e=>!n.includes(e)&&!r.test(e);function c(e=""){let t=(0,i.urlToParamsArray)(window.location.search);return e?t.filter(({name:t})=>t!==e):(t=t.filter(e=>l(e.name)),t)}const d=e=>window.location.pathname+(0,i.urlParamsArrayToStr)(e)},69669:function(e,t,s){"use strict";var i=s(24994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=s(76148),o=i(s(94634));t.default=({html:e,...t})=>(0,a.h)("div",(0,o.default)({},t,{className:`notification ${t.className?t.className:""}`,ref:t.getRef}),(0,a.h)("div",{className:"notification-text",dangerouslySetInnerHTML:e?{__html:e}:null},t.children))},97266:function(){"use strict";[...document.querySelectorAll(".notification[data-show-until]")].forEach(e=>{const t=parseInt(e.getAttribute("data-show-until"),10),s=Date.now()/1e3;!Number.isNaN(t)&&t<s&&e.remove()})},93343:function(e,t,s){"use strict";var i=s(24994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=s(76148),o=s(66192),n=i(s(15733));const r={desktop:[16,9],laptop:[16,9],mobile:[158,237]},l=({key:e})=>`/lectures/${e}/`;class c extends a.Component{render(){if(!this.props.course)return null;const{key:e,cover:t,title:s,authorInstrumentalCase:i}=this.props.course,{device:c}=this.props;return(0,a.h)("div",{className:"courseSkinCover courseItem"},(0,a.h)("a",{href:l({key:e}),className:"module doubleHover no-u"},(0,a.h)(o.Image,{className:"courseCover",src:t,size:r[c]}),(0,a.h)(n.default,{title:s,author:i})))}}t.default=c},96170:function(e,t,s){"use strict";var i=s(24994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=s(76148),o=s(27384),n=s(45169),r=s(66192),l=i(s(15733));const c=[1280,720],d={desktop:"2:2",laptop:"4:2",mobile:"1:1"},h=({key:e})=>`/lectures/${e}/`,u=({lecture:e,device:t})=>{if(!e)return null;const{hyphenatedTitle:s,duration:i,cover:l}=e;return(0,a.h)(o.Cols,{className:"lecturesList-item",transposeOnMobile:!0,divisionProportions:d[t]},(0,a.h)(r.Image,{className:"lectureCover is__noMargins",src:l,size:c}),(0,a.h)(n.Caption,null,(0,a.h)("span",null,s),(0,a.h)("span",{className:"lectureDuration"},i)))};class p extends a.Component{get lecturesList(){const{units:e}=this.props.course;return e.map(e=>e.assets.filter(e=>"lecture"===e.type)).flat().slice(0,3)}
2render(){if(!this.props.course)return null;const{key:e,title:t,authorInstrumentalCase:s,units:i}=this.props.course,{device:o}=this.props;return(0,a.h)("div",{className:"courseSkinList cutOffBelow courseItem"},(0,a.h)("a",{href:h({key:e}),className:"module doubleHover no-u"},(0,a.h)(l.default,{title:t,author:s}),i&&(0,a.h)("div",{className:"lecturesList"},this.lecturesList.map(e=>(0,a.h)(u,{lecture:e,device:o})))))}}t.default=p},15733:function(e,t,s){"use strict";var i=s(86019);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=s(76148),o=s(45169);class n extends a.Component{get titleText(){const{title:e,author:t}=this.props;return i.t("lectures.courseTitle",{title:e,author:t})}render(){return(0,a.h)(o.Heading3,{className:"courseTitle",html:this.titleText})}}t.default=n},73901:function(e,t,s){"use strict";var i=s(86019),a=s(24994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=s(76148),n=s(45169),r=s(27384),l=a(s(93343)),c=a(s(96170)),d=a(s(32485));const h=({className:e,divisionProportions:t,children:s})=>(0,o.h)("div",null,(0,o.h)(r.Cols,{className:e,divisionProportions:t},s));class u extends o.Component{render(){const{courses:e}=this.props;if(!e||!e.length)return null;const t=(0,d.default)("device","device__desktop"),s=(0,d.default)("device","device__laptop"),a=(0,d.default)("device","device__mobile");return(0,o.h)("div",null,(0,o.h)(n.Heading2,null,i.t("lectures.navigation.other.title")),(0,o.h)("div",{className:"coursesList is__otherLectures"},(0,o.h)(h,{className:t,divisionProportions:"6:6:4"},(0,o.h)(l.default,{course:e[0],device:"desktop"}),(0,o.h)(l.default,{course:e[1],device:"desktop"}),(0,o.h)(c.default,{course:e[2],device:"desktop"})),(0,o.h)(h,{className:s,divisionProportions:"10:6"},(0,o.h)(l.default,{course:e[0],device:"laptop"}),(0,o.h)(c.default,{course:e[1],device:"laptop"})),(0,o.h)(h,{className:a,divisionProportions:"1:1"},(0,o.h)(l.default,{course:e[0],device:"mobile"}),(0,o.h)(c.default,{course:e[1],device:"mobile"}))))}}t.default=u},74350:function(){"use strict";{class e{constructor(e){this.$frame=e,this.$objects=this.$frame.find(".js__parallaxObject"),this.$document=$(document),this.bindEvents()}init(){this.scrollTop=window.pageYOffset,this.frameHeight=this.$frame.innerHeight();const e=window.application.viewHeight,t=this.$frame.offset().top,s=t<e?e-t:0;this.parallaxStart=Math.max(t-e,0);const i=this.parallaxStart+e+this.frameHeight;this.parallaxEnd=Math.max(i-s,this.frameHeight),this.scrollSpan=this.parallaxEnd-this.parallaxStart,this.collectObjects(),this.setShifts()}bindEvents(){this.$document.on("appReady appResize",this.init.bind(this)),this.$document.on("appScroll",(e,t)=>{this.scrollTop=t,this.setShifts()})}collectObjects(){this.objects=this.$objects.map((e,t)=>{const s=$(t);return{$el:s,maxShift:s.innerHeight()-this.frameHeight}}).get()}setShifts(){if(this.scrollTop<this.parallaxStart)return;if(this.scrollTop>=this.parallaxEnd)return;const e=(this.scrollTop-this.parallaxStart)/this.scrollSpan;this.objects.forEach(t=>{t.$el.css({transform:`translateY(-${t.maxShift*e}px)`})})}}$(".js__parallaxFrame").each(function(){new e($(this))})}},71914:function(){"use strict";$(".image.is__paywalled, .notFoundImage.is__paywalled, a.is__paywalled").on("click",()=>{const e=document.getElementById("paywallFooter"),t=document.getElementById("leadMagnetWallFooter"),s=e||t,i=window.pageYOffset,{viewHeight:a}=window.application,o=i+s.getBoundingClientRect().top-a/2+(e?144:0);$("html, body").animate({scrollTop:o},{duration:300})})},16382:function(e,t,s){"use strict";var i=s(24994)(s(73953));$(".js__prepNavigation").each((e,t)=>{const s=$(t),a=s.next();a.is(".webpageLikes")&&a.after(s),a.is(".navigationPlaceholder")&&a.remove();const o=JSON.parse(s.attr("data-options")||null);s.empty().reactify(i.default,o),s.children().unwrap()})},25033:function(e,t,s){"use strict";var i=s(86019),a=s(24994),o=s(76148),n=a(s(32485)),r=a(s(37011));const l=i.t("subscription.unitsOneTime");class c extends o.Component{get spaceBeforeUnits(){const{hasCompactUnitsView:e,leftUnits:t,spaceTypeBeforeUnits:s}=this.props;return e?'<span class="is__hiddenWhenCompact"> </span>':t?"":"regular"===s?" ":" "}get priceClassNames(){const{className:e,size:t,small:s,large:i,leftUnits:a}=this.props;return(0,n.default)("price",e,{[`is__${t}`]:t,"is__smallSize-legacy":s,"is__largeSize-legacy":i,has__leftUnits:!!a})}get unitsClassNames(){const{unitsSize:e,smallUnits:t,hasCompactUnitsView:s}=this.props;return(0,n.default)("price-units",{[`is__${e}`]:e,"is__smallUnits-legacy":t,is__compact:s})}get units(){const{leftUnits:e,units:t}=this.props;return e?t:t||l}get amount(){if(null!==this.props.amount&&void 0!==this.props.amount)return String(this.props.amount)}render(e){return(0,o.h)("div",{className:this.priceClassNames},e.label&&(0,o.h)(r.default,{html:e.label}),(0,o.h)("div",{className:(0,n.default)("price-amount",{is__highlighted:e.highlighted})},e.leftUnits&&(0,o.h)("span",{className:this.unitsClassNames},e.leftUnits),(0,o.h)("span",{dangerouslySetInnerHTML:{__html:this.amount}}),this.units&&(0,o.h)("span",{className:this.unitsClassNames,dangerouslySetInnerHTML:{__html:`${this.spaceBeforeUnits}${this.units}`}})),e.footnote&&(0,o.h)(r.default,{html:e.footnote}))}}e.exports=c},26478:function(e,t,s){"use strict";var i=s(24994)(s(25033));const a={smallunits:"smallUnits",hascompactunitsview:"hasCompactUnitsView",classname:"
2className"};$(".js__price").each(function(){const e=$(this).data();Object.keys(a).forEach(t=>{void 0!==e[t]&&(e[a[t]]=e[t])}),$(this).reactify(i.default,e),$(this).children().unwrap()})},31914:function(e,t,s){"use strict";var i=s(24994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=s(76148),o=i(s(32485));t.default=e=>(0,a.h)("div",{className:(0,o.default)("pricing",`is__currency${e.currency}`)},(0,a.h)("div",{className:"pricing-in"},e.children))},20270:function(e,t,s){"use strict";var i=s(24994);Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"Product",{enumerable:!0,get:function(){return a.default}}),Object.defineProperty(t,"ProductMenuItem",{enumerable:!0,get:function(){return o.default}});var a=i(s(41305)),o=i(s(83077))},41305:function(e,t,s){"use strict";var i=s(24994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=s(76148),o=i(s(32485)),n=i(s(39315));class r extends a.Component{componentDidMount(){new n.default($(this.wrapperRef))}render(e){const t=(0,o.default)("module","product","js__pageMenu",{[e.className]:e.className,["is__"+e.mod]:!!e.mod});return(0,a.h)("div",{className:t,ref:e=>this.wrapperRef=e},e.name&&(0,a.h)("div",{className:(0,o.default)("product-name",{has__noMenu:!e.children})},(0,a.h)("span",{className:"product-name-inner",dangerouslySetInnerHTML:{__html:e.name}}),e.children&&(0,a.h)("button",{className:"product-menu-toggler"},(0,a.h)("div",{className:"product-menu-toggler-icon"}))),e.children&&(0,a.h)("div",{className:"product-menu"},e.children))}}t.default=r},83077:function(e,t,s){"use strict";var i=s(24994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=s(76148),o=i(s(94634)),n=i(s(32485));const r=e=>(0,a.h)("span",{className:(0,n.default)({is__active:e.isActive})},e.children,e.count>0&&(0,a.h)("span",{class:"product-menu-item-counter"},`  ${e.count}`)),l=e=>(0,a.h)("a",{href:e.link,onClick:e.onClick,className:e.className},e.children,e.count>0&&(0,a.h)("span",{class:"product-menu-item-counter"},`  ${e.count}`));t.default=e=>{const t=(0,n.default)("product-menu-item",{[`is__${e.mod}`]:e.mod,is__disabled:e.isDisabled,[e.className]:e.className});return(0,a.h)("div",{className:t},(e.isActive||e.isDisabled)&&!e.keepActiveItemClickable&&(0,a.h)(r,e),(e.isActive||e.isDisabled)&&e.keepActiveItemClickable&&(0,a.h)(l,(0,o.default)({},e,{className:"is__active"})),!e.isActive&&!e.isDisabled&&(0,a.h)(l,e))}},60056:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.padDigit=t.getTimeLeft=t.EXPIRED_TIME=void 0;const s=t.EXPIRED_TIME={days:0,hours:0,minutes:0,seconds:0};t.getTimeLeft=({from:e,to:t,noDays:i})=>{const a=new Date(e),o=new Date(t);if(a>=o)return s;const n=(o.getTime()-a.getTime())/1e3,r=i?Math.floor(n/60/60):Math.floor(n/60/60%24);return{days:Math.floor(n/60/60/24),hours:r,minutes:Math.floor(n/60%60),seconds:Math.floor(n%60)}},t.padDigit=e=>String(e).padStart(2,"0")},35209:function(e,t,s){"use strict";var i=s(86019),a=s(24994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=s(76148),n=a(s(32485)),r=s(60056);class l extends o.Component{constructor(e){if(super(e),this.sections=["days","hours","minutes"],this.timerDelay=1e3,this.props.hasSeconds&&this.sections.push("seconds"),this.props.noDays){const e=this.sections.indexOf("days");this.sections.splice(e,1)}}componentDidMount(){this.setNextTick()}componentDidUpdate(){this.setNextTick()}componentWillUnmount(){clearTimeout(this.timeout)}get isExpired(){return this.timeLeft===r.EXPIRED_TIME}get timeLeft(){return(0,r.getTimeLeft)({from:new Date,to:this.props.to,noDays:this.props.noDays})}getCaption(e){return i.t(`realtimeCountdown.${e}`,{count:this.timeLeft[e]})}getShortCaption(e){return i.t(`realtimeCountdown.short.${e}`)}setNextTick(){this.isExpired?this.props.onExpiry&&this.props.onExpiry():(clearTimeout(this.timeout),this.timeout=setTimeout(this.tick.bind(this),this.timerDelay))}tick(){this.isTick=!this.isTick,this.forceUpdate()}render(){const{isTextOnly:e,hasSeconds:t,hasShortUnits:s}=this.props,i=(0,n.default)("realtimeCountdown",{is__textOnly:e,is__tick:this.isTick,has__simplifiedDotsAnim:!t});return(0,o.h)("div",{className:i},this.sections.map(t=>(0,o.h)("span",{className:`realtimeCountdown-section realtimeCountdown-${t}`},(0,o.h)("span",{className:"realtimeCountdown-digit"},(0,r.padDigit)(this.timeLeft[t]),(0,o.h)("span",{className:"realtimeCountdown-dots"},":")),!e&&(0,o.h)("small",{className:"realtimeCountdown-caption"},this.getCaption(t)),!e&&s&&(0,o.h)("small",{className:"realtimeCountdownCaption-short"}
2,this.getShortCaption(t)))))}}t.default=l},43982:function(e,t,s){"use strict";var i=s(24994)(s(35209));$(".js__countdown").each(function(){$(this).reactify(i.default,$(this).data("options"))})},72405:function(e,t,s){"use strict";var i=s(86019),a=s(24994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=s(76148),n=a(s(94634)),r=s(45169),l=a(s(74786)),c=s(41051);class d extends o.Component{get students(){return(0,c.getStudentsForFaces)(this.props.students)}get grantStudents(){return(0,c.getGrantStudentsForFaces)(this.students)}render(){return(0,o.h)("div",{className:"schoolFaces"},this.grantStudents.length>0&&(0,o.h)("section",{className:"schoolFaces-section is__large"},(0,o.h)(r.Heading3,null,(0,o.h)("span",{className:"is__highlighted"},i.t("schoolFaces.titleGranted"))),(0,o.h)("div",{className:"schoolFaces-cols"},this.grantStudents.map(e=>(0,o.h)(l.default,e)))),(0,o.h)("section",{className:"schoolFaces-section"},(0,o.h)(r.Heading3,null,i.t("schoolFaces.titleAll",{count:this.students.length})),(0,o.h)("div",{className:"schoolFaces-cols"},this.students.map(e=>(0,o.h)(l.default,(0,n.default)({},e,{canDisplayGrantedTag:!0}))))))}}t.default=d},45735:function(e,t,s){"use strict";var i=s(86019),a=s(24994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=s(76148),n=s(65027),r=s(77817),l=s(73345),c=a(s(74213));class d extends o.Component{reduceTeamMembers(e,t){const s=this.props[`diploma${(0,l.capitalize)(t)}`];if(!s)return e;const i=s.split(", ").filter(e=>e!==this.props.name).map(e=>e.replace(" ",r.NBSP));return[...e,...i]}get teamMembers(){return["designers","editors","managers"].reduce(this.reduceTeamMembers.bind(this),[]).join(", ")}get artDirectorLine(){const e=(this.props.diplomaArtDirector||"").replace(" ",r.NBSP);return`${i.t("schoolFaces.diploma.artDirector",{artDirector:e})}`}get teamLine(){return i.t("schoolFaces.diploma.team",{team:this.teamMembers})}render(){const{diplomaTitle:e,diplomaUrl:t,diplomaScore:s}=this.props;return(0,o.h)("div",{className:"schoolFacesDiploma"},(0,o.h)("p",null,this.teamLine,(0,o.h)("br",null),this.artDirectorLine,!!e&&(0,o.h)("span",{className:"schoolFacesDiploma-project"},(0,o.h)(c.default,{type:"diploma",text:"Диплом"}),(0,o.h)("a",{href:t},e),(0,o.h)("br",null),!!s&&r.NBSP+(0,n.formatScore)(s))))}}t.default=d},48660:function(e,t,s){"use strict";var i=s(86019),a=s(24994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=s(76148),n=a(s(94634)),r=s(45169),l=a(s(74786)),c=s(41051);class d extends o.Component{get students(){return(0,c.getStudentsForFacesLargeOnly)(this.props.students)}render(){return(0,o.h)("div",{className:"schoolFaces"},(0,o.h)("section",{className:"schoolFaces-section is__large"},(0,o.h)(r.Heading3,null,i.t("schoolFaces.titleAbc")),(0,o.h)("div",{className:"schoolFaces-cols"},this.students.map(e=>(0,o.h)(l.default,(0,n.default)({},e,{hasDiploma:!0,canDisplayGrantedTag:!0}))))))}}t.default=d},74786:function(e,t,s){"use strict";var i=s(24994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=s(76148),o=s(45169),n=s(66192),r=i(s(32485)),l=s(73345),c=s(65027),d=s(77817),h=s(41051),u=s(29002),p=i(s(1312)),m=i(s(45735));const f=[1e3,588];class v extends a.Component{get about(){const{job:e,organization:t}=this.props,s=[e,t].filter(e=>!!e).join(", ");return(0,l.capitalize)(s)}get prevWeek(){return(0,h.getPrevWeek)(this.props.weeks)}get lastWeek(){return(0,h.getLastWeek)(this.props.weeks)}get score(){return this.lastWeek?(0,c.formatScore)(this.lastWeek.score):0}get scoreDiff(){return this.props.isCertificationStarted?this.overallScoreDiff:this.lastWeek&&this.prevWeek?this.lastWeek.score-this.prevWeek.score:0}get overallScoreDiff(){return this.lastWeek.score-this.props.weeks[0].score}get rankDiff(){return this.props.isCertificationStarted?this.overallRankDiff:(this.lastWeek||{}).diff}get overallRankDiff(){return this.props.weeks[0].rank-this.lastWeek.rank}get decoratedRankDiff(){const{rankDiff:e}=this;return e?(e>0?d.ARROW_UP:d.ARROW_DOWN)+Math.abs(e):null}get bureausphereLink(){return this.props.englishName?`/burosfera/${this.props.englishName}`:null}render(){const{name:e,enrollmentStatus:t,photo:s,city:i,country:l,hasDiploma:v}=this.props,g=(0,h.isStatusDisabled)(t),b=(0,h.isStatusPaused)(t),_=0!==this.score,y=0!==this.scoreDiff,S=this.rankDiff>0?"inc":"dec",w=(0,r.default)("schoolFacesStudent",`is__rank-${S}`,{is__paused:b,is__disabled:g,is__obfuscated:!this.props.englishName}),C=g?`<s>${e}</s>`:e,k=(0,u.getCountryFlagUrl)(l,i);return(0,a.h)("div",{className:w},(0,a.h)("a",{href:this.bureausphereLink,target:"_blank",className:"schoolFacesStudent-top no-u"},(0,a.h)(n.Image,{className:"schoolFacesStudent-img",src:s,size:f,bordered:!0}
2),(0,a.h)(o.Caption,{className:"schoolFacesStudent-name"},(0,a.h)("span",{className:"pseudoLink",dangerouslySetInnerHTML:{__html:C}}),!g&&!b&&!!this.rankDiff&&(0,a.h)("small",{className:"schoolFacesStudent-rankDiff"},d.NBSP+this.decoratedRankDiff))),(0,a.h)("div",{className:"schoolFacesStudent-bottom"},(0,a.h)(o.Caption,{className:"schoolFacesStudent-about"},(0,a.h)("span",{dangerouslySetInnerHTML:{__html:this.about}}),!!this.about&&!!i&&", ",!!i&&(0,a.h)("span",{className:"nowrap"},i,k&&(0,a.h)("img",{className:"schoolRatingsFlag",src:k,alt:l,title:l}))),(0,a.h)(o.Caption,null,_&&(0,a.h)("span",{className:"schoolFacesStudent-score"},this.score,y&&(0,a.h)("small",{className:"schoolFacesStudent-scoreDiff"},d.THINSP+`${(T=this.scoreDiff)<0?"−":"+"}${(0,c.formatScore)(Math.abs(T))}`)),(0,a.h)(p.default,this.props),v&&!g&&!b&&(0,a.h)(m.default,this.props))));var T}}t.default=v},1312:function(e,t,s){"use strict";var i=s(86019),a=s(24994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=s(76148),n=s(41051),r=a(s(74213));class l extends o.Component{get hasGrantedTag(){return!this.hasPausedTag&&!this.hasFailedTag&&this.props.canDisplayGrantedTag&&this.props.enrollmentGranted}get hasFailedTag(){return(0,n.isStatusDisabled)(this.props.enrollmentStatus)}get hasPausedTag(){return(0,n.isStatusPaused)(this.props.enrollmentStatus)}get hasBlackMarkTag(){return(0,n.isBlackMarked)(this.props.enrollmentStatus)}get hasAnyTags(){return this.hasGrantedTag||this.hasFailedTag||this.hasPausedTag||this.hasBlackMarkTag}render(){return this.hasAnyTags?(0,o.h)("span",{className:"schoolFacesTags"},this.hasGrantedTag&&(0,o.h)(r.default,{type:"granted",text:i.t("schoolRating.tags.grantedFull")}),this.hasFailedTag&&(0,o.h)(r.default,{type:"disabled",text:i.t(`schoolRating.tags.failed.${this.props.gender}`)}),this.hasPausedTag&&(0,o.h)(r.default,{type:"disabled",text:i.t("schoolRating.tags.paused")}),this.hasBlackMarkTag&&(0,o.h)(r.default,{type:"blackMark",text:i.t("schoolRating.tags.blackMark")})):null}}t.default=l},36454:function(){"use strict";{const e="is__active",t="is__opened";class s{constructor(e){this.$box=e,this.$label=this.$box.find(".schoolFeedbackList-label span"),this.$datesBox=this.$box.find(".schoolFeedbackList-dates"),this.$dates=this.$datesBox.find("a"),this.$lists=this.$box.find(".schoolFeedbackList-list"),this._bindEvents()}_bindEvents(){const s=this;this.$label.on("click",e=>{e.stopPropagation(),this.$box.toggleClass(t)}),$(document).on("click",()=>{this.$box.removeClass(t)}),this.$datesBox.on("click",e=>{e.stopPropagation()}),this.$dates.on("click",function(i){i.preventDefault();const a=$(this),o=$(a.attr("href"));s.$dates.removeClass(e),a.addClass(e),s.$lists.removeClass(e),o.addClass(e),s.$box.removeClass(t)})}}$(".js__schoolFeedbackList").each(function(){new s($(this))})}},24009:function(e,t,s){"use strict";var i=s(24994);Object.defineProperty(t,"__esModule",{value:!0}),t.getWeekStartCoords=t.getStepPath=t.getFullWeeksPath=void 0;var a=i(s(85844));const o=3.3;t.getWeekStartCoords=(e,t)=>{const{number:s,rank:i}=t,{colWidth:a,gapWidth:o,rowHeight:n,rowTopOffset:r}=e;return{x:(s-1)*(a+o),y:(1===i?0:(i-1)*n)+r}};const n=(e,t,s,i)=>{const{colWidth:n}=e,{x:r,y:l}=t,c=`M${r},${l} h${i?2*n:n}`;return s?`${((e,t)=>{const s=e.y===t.y,i=Math.abs(e.y-t.y)<15;if(s||i)return((e,t)=>`M${e.x},${e.y} L${t.x},${t.y}`)(e,t);const n=e.y>t.y,r=[e.x,e.y],l=[t.x,t.y],c=[r,[e.x+o,e.y],[e.x+6.6,e.y+o],[t.x-6.6,t.y-o],[t.x-o,t.y],l],d=[r,[e.x+o,e.y],[e.x+6.6,e.y-o],[t.x-6.6,t.y+o],[t.x-o,t.y],l];let h="";return(n?d:c).forEach(e=>h+=e.join(",")+" "),(0,a.default)(h,2)})({...s,x:s.x+n},t)} ${c}`:c};t.getStepPath=n,t.getFullWeeksPath=(e,t)=>{let s="",i=null;return t.forEach(t=>{s+=n(e,t,i),i=t}),s}},41051:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.splitName=t.reduceWeekDisciplinesScore=t.isStatusPaused=t.isStatusDisabled=t.isIntersectContainer=t.isBlackMarked=t.getWeeksWithStudents=t.getStudentsWeekNumbers=t.getStudentsForFacesLargeOnly=t.getStudentsForFaces=t.getSortedWeekStudents=t.getPrevWeek=t.getLastWeekStudentsWithFairRank=t.getLastWeek=t.getGrantStudentsForFaces=void 0;const s=e=>["failed","cancelled","black_marked"].includes(e);t.isStatusDisabled=s;const i=e=>["paused"].includes(e);t.isStatusPaused=i,t.isBlackMarked=e=>["black_marked"].includes(e);const a=(e,t)=>t.number-e.number,o=e=>i(e.enrollmentStatus)?1:-1,n=(e,t)=>{if(!e.weeks.length||!t.weeks.length)return 0;const s=e.weeks.slice(-1)[0].score;return t.weeks.slice(-1)[0].score-s},r=(e,t)=>{const s=e.weeks.slice(-1)[0],i=t.weeks.slice(-1)[0];return s||i?s?i?s.rank-i.rank:1:-1:0},l=(e,t)=>
2{const s=e.name.split(" ")[1],i=t.name.split(" ")[1];return s>i?1:i>s?-1:0},c=(e,t)=>s(e.enrollmentStatus)?1:s(t.enrollmentStatus)?-1:0,d=(e,t)=>i(e.enrollmentStatus)?1:i(t.enrollmentStatus)?-1:0;t.splitName=e=>{const t=e.split(" ",2);return{first:t[0],last:t[1]}},t.getLastWeek=e=>e.slice(-1)[0]||null;const h=e=>e.length<2?null:e.slice(-2)[0];t.getPrevWeek=h;const u=e=>{const t=new Set;return e.forEach(e=>t.add(e.weeks.length)),Array.from(t).sort()};t.getStudentsWeekNumbers=u,t.getWeeksWithStudents=e=>{const t=[],n=[],r=[],l=u(e);return e.forEach(e=>{const{enrollmentStatus:t,weeks:a}=e,o=s(t)||i(t),c=a.length===Math.max(...l);(o&&!c?r:n).push(e)}),l.forEach(e=>{t.push({number:e,students:n.filter(t=>t.weeks.length===e)})}),t.sort(a),r.sort(o),t.push({number:null,students:r}),t.filter(e=>e.students.length>0)},t.getSortedWeekStudents=e=>e.sort(r).sort(c),t.getLastWeekStudentsWithFairRank=e=>{let t=1,i=e.sort(r),a=[];return i.forEach(e=>{const i=!s(e.enrollmentStatus),o=h(e.weeks),n=i?t:void 0;a.push({...e,fairRank:n,fairDiff:o&&n?o.rank-n:void 0}),i&&(t+=1)}),a},t.getStudentsForFaces=e=>e.sort(n).sort(d).sort(c),t.getStudentsForFacesLargeOnly=e=>e.sort(l).sort(d).sort(c),t.getGrantStudentsForFaces=e=>e.filter(({enrollmentGranted:e})=>e).filter(({enrollmentStatus:e})=>!s(e)).filter(({enrollmentStatus:e})=>!i(e)),t.reduceWeekDisciplinesScore=(e,t)=>e+t.score,t.isIntersectContainer=(e,t)=>{const s=e.getBoundingClientRect();return t.getBoundingClientRect().right>s.right}},96169:function(e,t,s){"use strict";var i=s(24994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=s(76148),o=s(70753),n=i(s(32485)),r=s(8818),l=s(41051),c=s(84502),d=i(s(19861)),h=i(s(24713));class u extends a.Component{constructor(e){super(e),this.onClick=this.onClick.bind(this)}componentDidMount(){$(document).on("click",this.onClick)}componentWillUnmount(){$(document).off("click",this.onClick)}onClick(e){!$(e.target).closest(".schoolRatingConnectedStudentItem").length&&this.props.unpinStudent()}get hasManyWeeks(){return(0,l.getStudentsWeekNumbers)(this.props.students).length>1}render(){const e=(0,n.default)("schoolRating",{has__transitions:!(0,r.isOnSafari)(),has__differentWeekStudents:this.hasManyWeeks});return(0,a.h)("div",{className:e},(0,a.h)(d.default,null),(0,a.h)(h.default,null))}}const p={unpinStudent:c.unpinStudent};t.default=(0,o.connect)(({schoolRating:e})=>({students:e.students}),p)(u)},84502:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.pinStudent=function(e){return{type:"PIN_STUDENT",studentUid:e}},t.setActiveStudent=function(e){return{type:"SET_ACTIVE_STUDENT",studentUid:e}},t.setChartParams=function(e){return{type:"SET_CHART_PARAMS",chartParams:e}},t.unpinStudent=function(){return{type:"UNPIN_STUDENT"}},t.unsetActiveStudent=function(){return{type:"UNSET_ACTIVE_STUDENT"}}},19861:function(e,t,s){"use strict";var i=s(24994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=s(76148),o=s(70753),n=i(s(32485)),r=s(84502),l=s(41051),c=i(s(96289)),d=i(s(40632)),h=i(s(78484)),u=s(8818);class p extends a.Component{constructor(e){super(e),this.onResize=this.onResize.bind(this),this.onResizeFinish=this.onResizeFinish.bind(this)}componentDidMount(){this.props.setChartParams(this.params),$(document).on("appResize",this.onResizeFinish),$(window).on("resize",this.onResize)}componentWillUnmount(){$(document).off("appResize",this.onResizeFinish),$(window).off("resize",this.onResize)}onResize(){this.isEmpty||this.state.isResizing||this.setState({isResizing:!0})}onResizeFinish(){this.isEmpty||(this.props.setChartParams(this.params),this.setState({isResizing:!1}))}get params(){const{weeksCount:e}=this.props,t=this.$chart.getBoundingClientRect().width-1,s=(t-12*e)/(e-1);return{$el:this.$chart,totalWidth:t,gapWidth:s,colWidth:12,rowHeight:45,rowTopOffset:5}}get weeks(){return(0,l.getStudentsWeekNumbers)(this.props.students)}get isEmpty(){return!this.weeks.length||this.weeks.every(e=>0===e)}get shouldDisplayGraph(){const e=window.application.viewWidth<u.MIN_DESKTOP_WIDTH,t=!!this.props.chartParams;return!(this.isEmpty||e||!t)}get styles(){if(!this.props.chartParams)return null;
2const{chartParams:{gapWidth:e,colWidth:t}}=this.props;return`\n      --schoolRatingGapWidth: ${e}px;\n      --schoolRatingColWidth: ${t}px;\n    `}render(){const e=(0,n.default)("schoolRatingChart",{is__hidden:this.state.isResizing});return(0,a.h)("div",{className:e,ref:e=>this.$chart=e,style:this.styles},(0,a.h)(d.default,{totalWeeksCount:this.props.weeksCount,weeks:this.weeks,isSticky:!this.isEmpty}),(0,a.h)("div",{className:"schoolRatingChart-content"},this.isEmpty&&(0,a.h)(h.default,null),this.shouldDisplayGraph&&this.props.students.map(e=>(0,a.h)(c.default,e))))}}const m={setChartParams:r.setChartParams,unpinStudent:r.unpinStudent};t.default=(0,o.connect)(({schoolRating:e})=>({weeksCount:e.weeksCount,students:e.students,chartParams:e.chartParams}),m)(p)},78484:function(e,t,s){"use strict";var i=s(86019);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=s(76148),o=s(45169);t.default=()=>(0,a.h)("div",{className:"schoolRatingChartEmpty"},(0,a.h)("p",{className:"schoolRatingChartEmpty-bell"},"🕭"),(0,a.h)(o.Heading2,{className:"schoolRatingChartEmpty-title"},i.t("schoolRating.empty.title")),(0,a.h)(o.Caption,{className:"schoolRatingChartEmpty-caption"},i.t("schoolRating.empty.caption")))},40632:function(e,t,s){"use strict";var i=s(24994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=s(76148),o=i(s(32485));const n=({isActive:e,number:t})=>{const s=(0,o.default)("schoolRatingChartHeader-week",{is__disabled:!e});return(0,a.h)("span",{className:s},t)};class r extends a.Component{get weeks(){const{totalWeeksCount:e,weeks:t}=this.props,s=[],i=Math.max(...t);for(let t=1;t<=e;t+=1){const e=t<=i;s.push((0,a.h)(n,{isActive:e,number:t}))}return s}render(){const e=(0,o.default)("schoolRatingChartHeader",{is__sticky:this.props.isSticky});return(0,a.h)("div",{className:e},this.weeks)}}t.default=r},37028:function(e,t,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=s(76148),a=s(41051);class o extends i.Component{constructor(e){super(e),this.onMouseEnter=this.onMouseEnter.bind(this),this.onMouseLeave=this.onMouseLeave.bind(this),this.onClick=this.onClick.bind(this)}shouldComponentUpdate(e){const{uid:t,activeStudentUid:s}=this.props,{activeStudentUid:i}=e;return t!==s&&t===i||t===s&&t!==i}get lastWeek(){return(0,a.getLastWeek)(this.props.weeks)}get color(){return this.lastWeek&&this.lastWeek.diff?this.lastWeek.diff>0?"color-inc":"color-dec":"color-default"}get isActive(){const{uid:e,activeStudentUid:t}=this.props;return t&&t===e}get isPinned(){const{uid:e,pinnedStudentUid:t}=this.props;return t&&t===e}get isDisabled(){return(0,a.isStatusDisabled)(this.props.enrollmentStatus)}get isFaded(){return this.isDisabled||(0,a.isStatusPaused)(this.props.enrollmentStatus)}onClick(){this.isPinned?this.props.unpinStudent():this.props.pinStudent(this.props.uid)}onMouseEnter(){this.props.setActiveStudent(this.props.uid)}onMouseLeave(){this.props.unsetActiveStudent()}}t.default=o},96289:function(e,t,s){"use strict";var i=s(24994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=s(76148),o=i(s(94634)),n=s(70753),r=i(s(32485)),l=i(s(37028)),c=s(27461),d=i(s(52901)),h=s(25861),u=s(84502),p=s(24009);const m=["activeStudentUid","pinnedStudentUid"];class f extends l.default{constructor(e){super(e),this.onStepMouseEnter=this.onStepMouseEnter.bind(this),this.onStepMouseLeave=this.onStepMouseLeave.bind(this)}shouldComponentUpdate(e){const t=this.props.chartParams,{chartParams:s}=e;return Object.keys(s).some(e=>s[e]!==t[e])||m.some(t=>e[t]!==this.props[t])}get items(){const{name:e,weeks:t,chartParams:s,enrollmentStatus:i}=this.props,n={graph:[],hovers:[],overlay:[]},r=t.length;if(!r)return n;const l=[];let u=null;t.forEach((i,m)=>{const f=m+1,v={...i,number:f},g=f===r,b=f===this.props.weeksCount,_=g&&!b,y=(0,p.getWeekStartCoords)(s,v);if(l.push(y),n.overlay.push((0,a.h)(d.default,(0,o.default)({},v,{coords:y,preventIntersectWith:s.$el,isFinal:b}))),_){const i=t.slice(-1)[0];n.overlay.push((0,a.h)(h.Total,{name:e,lastWeekNumber:r,score:i.score,coords:y,preventIntersectWith:s.$el,onMouseEnter:this.onStepMouseEnter,onMouseLeave:this.onStepMouseLeave}))}n.hovers.push((0,a.h)(c.StepHover,{chartParams:s,coords:y,prevCoords:u,weekNumber:f,onMouseEnter:this.onStepMouseEnter,onMouseLeave:this.onStepMouseLeave})),u=y});
2const m=l.slice(-1)[0],f={...m,x:m.x+s.colWidth};return n.graph.push((0,a.h)(c.WeeksPath,{chartParams:s,stepCoords:l})),n.graph.push((0,a.h)(c.End,{status:i,coords:f})),n.hovers.push((0,a.h)(c.StepHover,{isExtended:!0,chartParams:s,coords:f,weekNumber:r,onMouseEnter:this.onStepMouseEnter,onMouseLeave:this.onStepMouseLeave})),n}onStepMouseEnter(e){$(this.$graph).find(`.js__schoolRatingOverlayWeek[data-week=${e}]`).addClass("is__active")}onStepMouseLeave(){$(this.$graph).find(".js__schoolRatingOverlayWeek.is__active").removeClass("is__active")}render(){const{graph:e,hovers:t,overlay:s}=this.items,i=(0,r.default)("schoolRatingGraph schoolRatingConnectedStudentItem",`is__${this.color}`,{is__active:this.isPinned||this.isActive,is__faded:this.isFaded}),o=this.isPinned||this.isActive;return(0,a.h)("div",{className:i,ref:e=>this.$graph=e,onMouseEnter:this.onMouseEnter,onMouseLeave:this.onMouseLeave,onClick:this.onClick},(0,a.h)("svg",{className:"schoolRatingGraph-graphWrap"},(0,a.h)("g",{className:"schoolRatingGraph-graph"},[...e,...t].map(e=>e))),o&&(0,a.h)("div",{className:"schoolRatingGraphOverlay"},s.map(e=>e)))}}const v={setActiveStudent:u.setActiveStudent,unsetActiveStudent:u.unsetActiveStudent,pinStudent:u.pinStudent,unpinStudent:u.unpinStudent};t.default=(0,n.connect)(({schoolRating:e})=>({activeStudentUid:e.activeStudentUid,pinnedStudentUid:e.pinnedStudentUid,chartParams:e.chartParams,weeksCount:e.weeksCount}),v)(f)},27461:function(e,t,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WeeksPath=t.StepHover=t.End=void 0;var i=s(76148),a=s(24009),o=s(5204),n=s(64091),r=s(59338),l=s(52905),c=s(41051);class d extends i.Component{get d(){const{chartParams:e,stepCoords:t}=this.props;return(0,a.getFullWeeksPath)(e,t)}render(){return(0,i.h)("path",{className:"schoolRatingWeeksPath",d:this.d})}}t.WeeksPath=d;class h extends i.Component{constructor(e){super(e),this.onMouseEnter=this.onMouseEnter.bind(this),this.onMouseLeave=this.onMouseLeave.bind(this)}get d(){const{chartParams:e,coords:t,prevCoords:s,isExtended:i}=this.props;return(0,a.getStepPath)(e,t,s,i)}onMouseEnter(){this.props.onMouseEnter(this.props.weekNumber)}onMouseLeave(){this.props.onMouseLeave()}render(){return(0,i.h)("path",{className:"schoolRatingSvgHover",d:this.d,onMouseEnter:this.onMouseEnter,onMouseLeave:this.onMouseLeave})}}t.StepHover=h;const u=({coords:{x:e,y:t}})=>(0,i.h)("circle",{className:"schoolRatingGraphDot",cx:e,cy:t});class p extends i.Component{render(){const{coords:{x:e,y:t}}=this.props,s=`transform: translate(${e-3.5}px, ${t}px)`;return(0,i.h)("g",{className:"schoolRatingGraphCross",style:s},(0,i.h)(n.CrossIcon,null),(0,i.h)(o.CrossBoldIcon,null))}}class m extends i.Component{render(){const{coords:{x:e,y:t}}=this.props,s=`transform: translate(${e-3.5}px, ${t}px)`;return(0,i.h)("g",{className:"schoolRatingGraphPause",style:s},(0,i.h)(l.PauseIcon,null),(0,i.h)(r.PauseBoldIcon,null))}}t.End=({status:e,coords:t})=>(0,c.isStatusPaused)(e)?(0,i.h)(m,{coords:t}):(0,c.isStatusDisabled)(e)?(0,i.h)(p,{coords:t}):(0,i.h)(u,{coords:t})},25861:function(e,t,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Total=void 0;var i=s(76148),a=s(65027),o=s(41051);class n extends i.Component{constructor(e){super(e),this.onMouseEnter=this.onMouseEnter.bind(this),this.onMouseLeave=this.onMouseLeave.bind(this)}componentDidMount(){if(!this.props.preventIntersectWith)return;const e=(0,o.isIntersectContainer)(this.props.preventIntersectWith,this.$el);e!==this.state.isIntersect&&this.setState({isIntersect:e})}onMouseEnter(){this.props.onMouseEnter(this.props.lastWeekNumber)}onMouseLeave(){this.props.onMouseLeave()}get name(){return(0,o.splitName)(this.props.name).last}render(){const{coords:{x:e,y:t}}=this.props,s=`\n      transform: translate(${e}px, ${t}px)\n      translate(${this.state.isIntersect?"-100%":"18px"}, -9px);\n    `;return(0,i.h)("span",{className:"schoolRatingGraphOverlay-total",style:s,ref:e=>this.$el=e,onMouseEnter:this.onMouseEnter,onMouseLeave:this.onMouseLeave},(0,i.h)("b",null,this.name)," ",(0,a.formatScore)(this.props.score))}}t.Total=n},52901:function(e,t,s){"use strict";var i=s(86019),a=s(24994);
2Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=s(76148),n=a(s(32485)),r=s(65027),l=s(41051);const c=({rank:e,score:t})=>(0,o.h)("span",{className:"schoolRatingGraphOverlayWeek-top"},(0,o.h)("span",{className:"schoolRatingGraphOverlayWeek-rank"},e),(0,o.h)("span",{className:"schoolRatingGraphOverlayWeek-total"},i.t("schoolRating.rating"),(0,o.h)("span",{className:"schoolRatingGraphOverlayWeek-score"},(0,r.formatScore)(t)))),d=({score:e})=>(0,o.h)("span",{className:"schoolRatingGraphOverlayWeek-week"},i.t("schoolRating.weekTotal"),(0,o.h)("span",{className:"schoolRatingGraphOverlayWeek-score"},"+",(0,r.formatScore)(e))),h=({course:e,score:t,met_deadlines:s})=>(0,o.h)("span",{className:(0,n.default)("schoolRatingGraphOverlayWeek-item",{is__failed:!s||0===Number(t)})},i.t(`school.disciplineShortNames.${e}`),(0,o.h)("span",{className:"schoolRatingGraphOverlayWeek-score"},(0,r.formatScore)(t)));class u extends o.Component{componentDidMount(){if(!this.props.preventIntersectWith)return;const e=(0,l.isIntersectContainer)(this.props.preventIntersectWith,this.$content);e!==this.state.isIntersect&&this.setState({isIntersect:e,isCalculated:!0})}render(){const{props:{isFinal:e,number:t,rank:s,score:i,details:a=[],coords:{x:r,y:u}},state:{isCalculated:p,isIntersect:m}}=this,f=(0,n.default)("schoolRatingGraphOverlayWeek js__schoolRatingOverlayWeek",{is__calculated:p,is__left:m,is__final:e}),v=`transform: translate(${r}px, ${u-.5}px);`,g=a.length>0,b=a.reduce(l.reduceWeekDisciplinesScore,0);return(0,o.h)("div",{className:f,style:v,"data-week":t},(0,o.h)("div",{className:"schoolRatingGraphOverlayWeek-content",ref:e=>this.$content=e},(0,o.h)(c,{rank:s,score:i}),g&&(0,o.h)(d,{score:b}),a.map(e=>(0,o.h)(h,e))))}}t.default=u},4301:function(e,t,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;const i=(0,s(54384).combineReducers)({schoolRating:(e={},t)=>{switch(t.type){case"SET_ACTIVE_STUDENT":return{...e,activeStudentUid:t.studentUid};case"UNSET_ACTIVE_STUDENT":return{...e,activeStudentUid:null};case"PIN_STUDENT":return{...e,pinnedStudentUid:t.studentUid};case"UNPIN_STUDENT":return{...e,pinnedStudentUid:null};case"SET_CHART_PARAMS":return{...e,chartParams:t.chartParams};default:return e}}});t.default=i},95164:function(e,t,s){"use strict";var i=s(24994);Object.defineProperty(t,"__esModule",{value:!0}),t.createStore=function(e){const{isProduction:t}=window.application,s=t?void 0:window.__REDUX_DEVTOOLS_EXTENSION__;return(0,a.createStore)(o.default,{schoolRating:{...n,...e,weeksCount:e.weeksCount||n.weeksCount}},s&&s())};var a=s(54384),o=i(s(4301));const n={weeksCount:16,activeStudentUid:null,pinnedStudentUid:null,chartParams:null,students:[]}},39918:function(e,t,s){"use strict";var i=s(86019),a=s(24994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=s(76148),n=s(70753),r=a(s(32485)),l=a(s(74213)),c=s(45169),d=s(73345),h=s(65027),u=s(84502),p=s(41051),m=s(29002),f=a(s(37028)),v=s(77817),g=s(8818);class b extends f.default{constructor(e){super(e),this.checkCompactness=this.checkCompactness.bind(this)}componentDidMount(){this.checkCompactness(),$(document).on("appResize",this.checkCompactness)}componentWillUnmount(){$(document).off("appResize",this.checkCompactness)}get rank(){return this.props.fairRank?this.props.fairRank:this.lastWeek?this.lastWeek.rank:null}get rankDiff(){return Object.prototype.hasOwnProperty.call(this.props,"fairDiff")?this.props.fairDiff:this.lastWeek&&this.lastWeek.diff}get color(){return this.rankDiff?this.rankDiff>0?"color-inc":"color-dec":"color-default"}get diff(){return this.rankDiff?(this.rankDiff>0?v.ARROW_UP:v.ARROW_DOWN)+Math.abs(this.rankDiff):null}get name(){const e=(0,p.splitName)(this.props.name),t=(0,d.capitalize)(e.first),s=(0,d.capitalize)(e.last),i=t[0]+".";return[this.state.isCompact?i:t,s].filter(e=>!!e).join(v.NBSP)}get bureausphereLink(){return this.props.englishName?`/burosfera/${this.props.englishName}`:null}get score(){if(!this.lastWeek||!this.lastWeek.score)return null;const{score:e}=this.lastWeek;return(0,h.formatScore)(e)}get countryFlagSrc(){const{country:e,city:t}=this.props;return(0,m.getCountryFlagUrl)(e,t)}get bottomText(){const{job:e,organization:t,city:s}=this.props,i=[e,t,s].filter(e=>!!e).join(", ");return(0,d.capitalize)(i)}get isUser(){const{user:e}=window.application;return!!e&&Number(e.id)===Number(this.props.uid)}checkCompactness(){if(!this.$topWrap)return;const e=this.$topWrap.scrollWidth>this.$topWrap.clientWidth;e!==this.state.isCompact&&this.setState({isCompact:e})}render(){const{enrollmentStatus:e,enrollmentGranted:t,isNew:s,country:a,weeks:n}=this.props,d=window.application.viewWidth<g.MIN_DESKTOP_WIDTH,h=(0,p.isBlackMarked)(e),u=t||s||h,m=(0,r.default)("schoolRatingStudent schoolRating
2ConnectedStudentItem",`is__${this.color}`,{is__active:this.isPinned||this.isActive,is__faded:this.isFaded,is__disabled:this.isDisabled,is__user:this.isUser,has__hover:n.length>0&&!d,is__obfuscated:!this.props.englishName});return(0,o.h)("div",{className:m,onMouseEnter:this.onMouseEnter,onMouseLeave:this.onMouseLeave,onClick:this.onClick},(0,o.h)(c.Caption,{className:"schoolRatingStudent-top"},(0,o.h)("span",{className:"schoolRatingStudent-topWrap",ref:e=>this.$topWrap=e},!this.isFaded&&this.rank&&(0,o.h)("span",{className:"schoolRatingStudent-rank"},this.rank,this.diff&&(0,o.h)("span",{className:"schoolRatingStudent-diff"},v.THINSP+this.diff),v.NBSP),(0,o.h)("a",{className:"schoolRatingStudent-name",href:this.bureausphereLink,target:"_blank"},this.name),u&&(0,o.h)("span",{className:"schoolRatingStudent-tags"},v.NBSP,t&&(0,o.h)(l.default,{type:"granted",text:i.t("schoolRating.tags.granted")}),s&&(0,o.h)(l.default,{type:"rookie",text:i.t("schoolRating.tags.rookie")}),h&&(0,o.h)(l.default,{type:"blackMark",text:i.t("schoolRating.tags.blackMark")})),this.score&&(0,o.h)("span",{className:"schoolRatingStudent-score"},v.NBSP+this.score))),(0,o.h)(c.Caption,{className:"schoolRatingStudent-bottom"},(0,o.h)("span",{dangerouslySetInnerHTML:{__html:this.bottomText}}),this.countryFlagSrc&&(0,o.h)("img",{src:this.countryFlagSrc,alt:a,title:a,className:"schoolRatingsFlag"})))}}const _={setActiveStudent:u.setActiveStudent,unsetActiveStudent:u.unsetActiveStudent,pinStudent:u.pinStudent,unpinStudent:u.unpinStudent};t.default=(0,n.connect)(({schoolRating:e})=>({activeStudentUid:e.activeStudentUid,pinnedStudentUid:e.pinnedStudentUid}),_)(b)},24713:function(e,t,s){"use strict";var i=s(24994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=s(76148),o=i(s(20509)),n=s(70753),r=s(41051),l=i(s(47428)),c=i(s(16568));class d extends a.Component{get weeksWithStudents(){return(0,r.getWeeksWithStudents)(this.props.students)}get hasManyWeeks(){return this.weeksWithStudents.length>1}render(){return(0,a.h)("div",{className:"schoolRatingStudentsList"},(0,a.h)(l.default,{isSticky:this.hasManyWeeks}),!this.weeksWithStudents.length&&(0,a.h)(c.default,null),this.weeksWithStudents.map(e=>(0,a.h)(o.default,{week:e,hasTitle:this.hasManyWeeks,isLastWeek:e.number===this.props.weeksCount})))}}t.default=(0,n.connect)(({schoolRating:e})=>({weeksCount:e.weeksCount,students:e.students}))(d)},16568:function(e,t,s){"use strict";var i=s(86019);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=s(76148),o=s(45169);t.default=()=>(0,a.h)(o.Caption,{className:"schoolRatingStudentsListEmpty"},i.t("schoolRating.empty.listCaption"))},47428:function(e,t,s){"use strict";var i=s(86019),a=s(24994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=s(76148),n=a(s(32485));class r extends o.Component{constructor(e){super(e),this.state={isPinned:!1,weekNumber:null},this.checkState=this.checkState.bind(this)}componentDidMount(){this.props.isSticky&&(this.checkState(),$(document).on("scroll",this.checkState))}componentWillUnmount(){$(document).off("scroll",this.checkState)}checkState(){this.setPinned(),this.state.isPinned&&this.setWeekNumber()}setPinned(){this.shouldPin!==this.state.isPinned&&(this.setState({isPinned:this.shouldPin}),this.setWeekNumber())}setWeekNumber(){$(".js__schoolRatingWeekAnchor").each((e,t)=>{const s=$(t);if(s[0].getBoundingClientRect().top<45){const e=s.attr("data-week")||"";e!==this.state.weekNumber&&this.setState({weekNumber:e})}})}get shouldPin(){const e=this.$el.parentElement;return!!e&&e.getBoundingClientRect().top<0}get text(){return i.t("schoolRating.weekTitle",{number:this.state.weekNumber})}render(){const e=(0,n.default)("schoolRatingStudentsListHeader",{is__sticky:this.props.isSticky,is__pinned:this.state.isPinned,is__empty:!this.state.weekNumber||this.state.weekNumber<1});return(0,o.h)("div",{className:e,ref:e=>this.$el=e},(0,o.h)("div",{className:"schoolRatingStudentsListHeader-inner"},this.text))}}t.default=r},20509:function(e,t,s){"use strict";var i=s(86019),a=s(24994);
2Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=s(76148),n=a(s(32485)),r=s(45169),l=s(41051),c=a(s(39918));class d extends o.Component{get title(){const{number:e}=this.props.week;return e?i.t("schoolRating.weekTitle",{number:e}):null}get students(){const{week:{students:e},isLastWeek:t}=this.props;return t?(0,l.getLastWeekStudentsWithFairRank)(e):(0,l.getSortedWeekStudents)(e)}render(){const e=(0,n.default)("schoolRatingStudentsListWeek-title","js__schoolRatingWeekAnchor",{is__empty:!this.props.week.number});return(0,o.h)("section",{className:"schoolRatingStudentsListWeek"},this.props.hasTitle&&(0,o.h)(r.Caption,{className:e,"data-week":this.props.week.number},this.title),(0,o.h)("div",{className:"schoolRatingStudentsListWeek-students"},this.students.map(e=>(0,o.h)(c.default,e))))}}t.default=d},61591:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.scrollToSchoolRatingsAnchor=t.replaceSchoolRatingsHash=t.isSchoolRatingsAnchorHash=t.getSchoolRatingsLevelFromHash=t.getSchoolRatingsHash=void 0;const s=e=>`#rating/${e}`;t.getSchoolRatingsHash=s,t.isSchoolRatingsAnchorHash=(e="")=>/^#rating(?:\/\d+)?$/.test(e),t.getSchoolRatingsLevelFromHash=(e="",t=[])=>{const s=e.match(/^#rating\/(\d+)$/);if(!s)return null;const i=Number(s[1]);return t.length&&!t.includes(i)?null:i},t.replaceSchoolRatingsHash=e=>{const t=s(e);window.location.hash!==t&&window.history.replaceState(null,"",t)},t.scrollToSchoolRatingsAnchor=()=>{const e=document.getElementById("rating");e&&"function"==typeof e.scrollIntoView&&e.scrollIntoView()}},29002:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getCountryFlagUrl=t.fetchEnrollmentRating=void 0,t.fetchEnrollmentRating=e=>{const t=window.location.search.replace(/^\?/,"");return fetch(`https://bureau.ru/classroom/events/${e}/reports/race.json${"obfuscated"===t?`?status=${t}`:""}`).then(e=>e.json()).catch(e=>{throw new Error(e)})},t.getCountryFlagUrl=(e,t=null)=>e&&"Россия"!==e?t&&["севастополь","симферополь","керчь","евпатория","феодосия","ялта","херсон","мелитополь","бердянск","мариуполь","донецк","луганск"].includes(t.toLowerCase())?null:`https://bureau.ru/school/i/flags/${e}.png`:null},4249:function(e,t,s){"use strict";var i=s(86019),a=s(24994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=s(76148),n=a(s(32485)),r=a(s(96194)),l=s(45169),c=s(29002),d=s(61591),h=a(s(52627)),u=a(s(8548));const p=[1,2,3];class m extends o.Component{constructor(e){super(e),this.handleHashChange=this.handleHashChange.bind(this);const t=this.getInitialLevel(e);this.state={activeLevel:t,loadedEnrollments:{}}}componentDidMount(){this.props.levels.forEach(({enrollment:e})=>{(0,c.fetchEnrollmentRating)(e).then(t=>{this.setEnrollment(e,{...t,students:t.students.map(r.default)})})}),window.addEventListener("hashchange",this.handleHashChange),this.handleHashChange()}componentWillUnmount(){window.removeEventListener("hashchange",this.handleHashChange)}setEnrollment(e,t){const s={...this.state.loadedEnrollments,[e]:t};this.setState({loadedEnrollments:s})}setLevel(e,{updateHash:t=!0}={}){const s=this.state.activeLevel===e;this.getLevelData(e)&&(s?t&&(0,d.replaceSchoolRatingsHash)(e):this.setState({activeLevel:e},()=>{t&&(0,d.replaceSchoolRatingsHash)(e)}))}getInitialLevel(e){const t=e.levels.map(({number:e})=>e);return(0,d.getSchoolRatingsLevelFromHash)(window.location.hash,t)||e.levels.slice(-1)[0].number}getLevelData(e){return this.props.levels.find(t=>t.number===e)}handleHashChange(){const e=this.props.levels.map(({number:e})=>e),t=(0,d.getSchoolRatingsLevelFromHash)(window.location.hash,e);t&&this.setLevel(t,{updateHash:!1}),(0,d.isSchoolRatingsAnchorHash)(window.location.hash)&&(0,d.scrollToSchoolRatingsAnchor)()}get googleLink(){const e=this.getLevelData(this.state.activeLevel);return e&&e.googleLink?i.t("schoolRating.googleLink",{googleLink:e.googleLink}):null}get levelCaption(){return i.t(`schoolRating.caption_level${this.state.activeLevel}`)||null}get caption(){return[this.levelCaption,this.googleLink].filter(e=>!!e).join(" <br>")}render(){const{activeLevel:e,loadedEnrollments:t}=this.state,s=(this.getLevelData(e)||{}).enrollment,a=(0,n.default)("schoolRatings",`is__level${e}`),r=t[s]||{};return(0,o.h)("div",{className:a},(0,o.h)("div",{className:"schoolRatingInfo"},(0,o.h)(l.Heading2,{className:this.props.headingClassName,html:this.props.title||i.t("schoolRating.defaultTitle")}),(0,o.h)("div",{className:"recycledLinks"},(0,o.h)("div",{className:"recycledLinks-in"},p.map(t=>(0,o.h)(h.default,{key:t,level:t,isActive:e===t,isDisabled:!this.getLevelData(t),onClick:()=>this.setLevel(t)}
2)))),this.caption&&(0,o.h)("p",{dangerouslySetInnerHTML:{__html:this.caption}})),(0,o.h)("div",{className:"schoolRatingInfo-content"},(0,o.h)(u.default,{level:e,students:r.students,weeksCount:r.weeks_count})))}}t.default=m},49022:function(e,t,s){"use strict";var i=s(24994)(s(4249));$(".js__schoolRatings").each((e,t)=>{const s=$(t),a=JSON.parse(s.attr("data-options")||null);s.empty().reactify(i.default,a),s.children().unwrap()})},8548:function(e,t,s){"use strict";var i=s(24994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=s(76148),o=s(70753),n=s(95164),r=i(s(96169)),l=i(s(72405)),c=i(s(48660));const d={1:e=>{const t=(0,n.createStore)(e);return(0,a.h)(o.Provider,{store:t},(0,a.h)(r.default,null))},2:l.default,3:c.default};t.default=({level:e,students:t,weeksCount:s})=>{const i=d[e];return i&&t?(0,a.h)(i,{students:t,weeksCount:s}):(0,a.h)("div",{className:"schoolRatingPreloader"})}},52627:function(e,t,s){"use strict";var i=s(86019),a=s(24994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=s(76148),n=a(s(32485));t.default=({level:e,isActive:t,isDisabled:s,onClick:a})=>{const r=(0,n.default)("recycledLinks-item",{is__active:t,is__disabled:s});return(0,o.h)("span",{className:r,onClick:a},i.t("schoolRating.level",{level:e}))}},14314:function(e,t,s){"use strict";var i=s(24994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=s(76148),o=i(s(32485)),n=s(73345),r=s(263),l=s(36189),c=s(63229),d=s(45169),h=i(s(28436)),u=i(s(358)),p=i(s(4323)),m=i(s(67518)),f=s(54046);class v extends a.Component{constructor(e){super(e),this.state={currentScore:{score:"",endsAt:""},enrollDate:""},this.isFull="full"===e.size,this.schoolLink=(0,l.getSchoolLink)(e.schoolKey)}componentDidMount(){(0,l.fetchSchoolData)().then(e=>this.setState({...e})).catch(e=>console.error(e))}get isX2(){return this.props.classes.includes("is__x2")}render(e){if(!this.state.enrollDate)return null;const t=(0,c.moscowifyLocal)(new Date(this.state.currentScore.endsAt)),s=e.endsAt||(0,n.birmanize)(t,{format:"dateOnly"}),i=e.score||(0,n.formatNumber)(this.state.currentScore.score),l=i.split(",")||[],v=(0,o.default)("schoolEnrollDeadlineScoreSpacer",e.classes,{is__full:this.isFull,[`is__${e.schoolKey}`]:e.schoolKey});return(0,a.h)("div",{className:v},(0,a.h)("div",{className:"device laptop desktop"},(0,a.h)("div",{className:"schoolEnrollDeadlineScoreSpacer-cols"},(0,a.h)("div",{className:"schoolEnrollDeadlineScoreSpacer-countdownWrapper"},(0,a.h)("a",{href:this.schoolLink,className:"schoolEnrollDeadlineScoreSpacer-countdown novisited doubleHover is__noUnderline"},(0,a.h)(f.DeadlineScoreStickerIcon,null),i&&s&&(0,a.h)("div",{className:"schoolEnrollDeadlineScoreSpacer-countdownScore"},l[0],(0,a.h)("span",null,","),l[1]||"0"),i&&s&&(0,a.h)(d.Caption,{className:"schoolEnrollDeadlineScoreSpacer-countdownDays"},"балла за срок",(0,a.h)("br",null),"до ",s))),(0,a.h)("div",{className:"schoolEnrollDeadlineScoreSpacer-text"},(0,a.h)(u.default,{href:this.schoolLink,title:r.schoolEnrollDeadlineScoreSpacer.title[e.schoolKey],isX2:this.isX2}),(0,a.h)("div",{className:"schoolEnrollDeadlineScoreSpacer-undertitle"},(0,a.h)("div",{className:"schoolEnrollDeadlineScoreSpacer-about"},(0,a.h)(d.TextNode,null,(0,a.h)("b",null,"В пн станет дороже.")," Раньше учёба — ниже стоимость ",(0,a.h)("br",{className:"device laptop"}),"и выше шанс на бесплатное место. ",(0,a.h)("br",{class:"device desktop"}),(0,a.h)(h.default,{href:this.schoolLink,text:"Программа",isInline:!0,isDoubleHover:!0}))),(0,a.h)(m.default,{schoolLink:this.schoolLink,isGift:e.isGift}))))),(0,a.h)("div",{className:"device mobile"},(0,a.h)("div",{className:"schoolEnrollDeadlineScoreSpacer-cols"},(0,a.h)(p.default,{schoolKey:e.schoolKey,href:this.schoolLink}),(0,a.h)(u.default,{href:this.schoolLink,title:r.schoolEnrollDeadlineScoreSpacer.title[e.schoolKey],isX2:this.isX2})),(0,a.h)(d.TextNode,null,"Раньше учёба — ниже стоимость и выше шанс на бесплатное место. ",(0,a.h)(h.default,{href:this.schoolLink,text:"Программа",isInline:!0})),(0,a.h)("div",{className:"schoolEnrollDeadlineScoreSpacer-mobileButtons"},(0,a.h)("div",{className:"schoolEnrollDeadlineScoreSpacer-countdown"},(0,a.h)("div",{className:"schoolEnrollDeadlineScoreSpacer-countdownScore"},l[0],",",l[1]||"0"," балла"),(0,a.h)(d.Caption,{className:"schoolEnrollDeadlineScoreSpacer-countdownDays"},"до ",s)),(0,a.h)(m.default,{schoolLink:this.schoolLink,isGift:e.isGift}))))}}t.default=v},69619:function(e,t,s){"use strict";var i=s(24994)(s(14314));$(".js__schoolEnrollDeadlineScoreSpacer").each(function(){$(this).reactify(i.default,$(this).data()),$(this).children().unwrap()})},54848:function(e,t,s){"use strict";var i=s(24994);
2Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=s(76148),o=i(s(32485)),n=s(263),r=s(36189),l=s(38367),c=s(73345),d=s(45169),h=i(s(28436)),u=i(s(358)),p=i(s(32943)),m=i(s(4323));const f={designers:"designersFunicularIcon",editors:"editorsEscalatorIcon",managers:"managersCartIcon"};class v extends a.Component{constructor(e){super(e);const{email:t,isSubscribed:s}=(0,l.getStoredEmail)(e.eventType);this.state={noReturnDate:"",email:t,isSubscribed:s},this.isFull="full"===e.size,this.isHalf="half"===e.size,this.schoolLink=(0,r.getSchoolLink)(e.schoolKey),this.hasKey=e.schoolKey,this.subscribe=this.subscribe.bind(this)}componentDidMount(){(0,r.fetchSchoolData)().then(e=>this.setState({...e})).catch(e=>console.error(e))}subscribe({email:e}){return(0,l.subscribeUser)({email:e,eventType:this.props.eventType,eventId:1}).then(e=>this.setState({isSubscribed:e}))}render(e){const t=e.schoolKey||"default",s=(0,o.default)("schoolEnrollEndedSpacer",{is__full:this.isFull,is__half:this.isHalf,is__default:!this.hasKey,[`is__${e.schoolKey}`]:this.hasKey}),i=`Занятия с ${(0,c.birmanize)(this.state.noReturnDate,{format:"dateOnly"})}`,r=`${n.schoolEnrollEndedSpacer.title[t]}<span class="device desktop">. ${i}</span>`,l=e.schoolKey.length?n.schoolEnrollEndedSpacer.text:n.schoolEnrollEndedSpacer.textDefault;return(0,a.h)("div",{className:s},(0,a.h)("div",{className:"device laptop desktop"},(0,a.h)("div",{className:"schoolEnrollEndedSpacer-cols"},e.schoolKey&&(0,a.h)(m.default,{iconKey:f[e.schoolKey],href:this.schoolLink}),(0,a.h)("div",{className:"schoolEnrollEndedSpacer-text"},(0,a.h)(u.default,{href:this.schoolLink,title:r}),(0,a.h)("div",{className:"schoolEnrollEndedSpacer-undertitle"},(0,a.h)("div",{className:"schoolEnrollEndedSpacer-about"},(0,a.h)(d.TextNode,null,(0,a.h)("span",{dangerouslySetInnerHTML:{__html:l}})," ",this.hasKey&&(0,a.h)(h.default,{href:this.schoolLink,text:"Программа",isInline:!0,isDoubleHover:!0}))),(0,a.h)(p.default,{email:this.state.email,onSubmit:this.subscribe,className:"schoolEnrollEndedSpacer-form",isSubscribed:this.state.isSubscribed,thinButton:!0}))))),(0,a.h)("div",{className:"device mobile"},(0,a.h)("div",{className:"schoolEnrollOpenSpacer-cols"},e.schoolKey&&(0,a.h)(m.default,{iconKey:f[e.schoolKey],href:this.schoolLink}),(0,a.h)(u.default,{href:this.schoolLink,title:n.schoolEnrollEndedSpacer.title[t]})),(0,a.h)(d.TextNode,null,(0,a.h)("span",{dangerouslySetInnerHTML:{__html:l}})," ",this.hasKey&&(0,a.h)(h.default,{href:this.schoolLink,text:"Программа",isInline:!0,isDoubleHover:!0})),(0,a.h)(p.default,{email:this.state.email,onSubmit:this.subscribe,className:"schoolEnrollEndedSpacer-form",isSubscribed:this.state.isSubscribed,thinButton:!0})))}}t.default=v},2829:function(e,t,s){"use strict";var i=s(24994)(s(54848));$(".js__schoolEnrollEndedSpacer").each(function(){$(this).reactify(i.default,$(this).data()),$(this).children().unwrap()})},81733:function(e,t,s){"use strict";var i=s(24994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=s(76148),o=i(s(32485)),n=s(263),r=s(36189),l=s(45169),c=i(s(28436)),d=i(s(358)),h=i(s(4323)),u=i(s(67518)),p=s(60654);const m={designers:"designersFunicularIcon",editors:"editorsEscalatorIcon",managers:"managersCartIcon"};class f extends a.Component{constructor(e){super(e),this.state={enrollDate:"",noReturnDate:""},this.isFull="full"===e.size,this.schoolLink=(0,r.getSchoolLink)(e.schoolKey)}componentDidMount(){(0,r.fetchSchoolData)().then(e=>this.setState({...e})).catch(e=>console.error(e))}get isX2(){return this.props.classes.includes("is__x2")}render(e){const t=(0,o.default)("schoolEnrollEndingSpacer",e.classes,{is__full:this.isFull,[`is__${e.schoolKey}`]:e.schoolKey});return(0,a.h)("div",{className:t},(0,a.h)("div",{className:"device laptop desktop"},(0,a.h)("div",{className:"schoolEnrollEndingSpacer-cols"},(0,a.h)("a",{href:this.schoolLink,className:"schoolEnrollEndingSpacer-countdown novisited doubleHover is__noUnderline"},this.state.noReturnDate&&(0,a.h)(p.Countdown,{enrollEndDate:this.state.noReturnDate})),(0,a.h)("div",{className:"schoolEnrollEndingSpacer-text textBox"},(0,a.h)(d.default,{href:this.schoolLink,title:n.schoolEnrollEndingSpacer.title[e.schoolKey],isX2:this.isX2}),(0,a.h)("div",{className:"schoolEnrollEndingSpacer-undertitle"},(0,a.h)("div",{className:"schoolEnrollEndingSpacer-about"},(0,a.h)(l.TextNode,null,n.schoolEnrollEndingSpacer.text,(0,a.h)("br",{className:"device desktop"})," Начало занятий в любой день. ",(0,a.h)(c.default,{href:this.schoolLink,text:"Программа",isInline:!0,isDoubleHover:!0}))),(0,a.h)(u.default,{schoolLink:this.schoolLink,isGift:e.isGift}))))),(0,a.h)("div",{className:"device mobile"},(0,a.h)("div",{className:"schoolEnrollEndingSpacer-cols"},(0,a.h)(h.default,{iconKey:m[e.schoolKey],href:this.schoolLink}),(0,a.h)(d.default,{href:this.schoolLink,title:n.schoolEnrollEndingSpacer.title[e.schoolKey],isX2:this.isX2})),(0,a.h)(l.TextNode,null,n.schoolEnrollEndingSpacer.text," Начало занятий в любой день. ",(0,a.h)(c.default,{href:this.schoolLink,text:"Программа",isInline:!0})),(0,a.h)("div",{className:"schoolEnrollEndingSpacer-mobileButtons"},this.state.noReturnDate&&(0,a.h)(p.CountdownMobile,{enrollEndDate:this.state.noReturnDate}),(0,a.h)(u.default,{schoolLink:this.schoolLink,isGift:e.isGift}))))}}t.default=f},63538:function(e,t,s){"use strict";var i=s(24994)(s(81733));$(".js__schoolEnrollEndingSpacer").each(function(){$(this).reactify(i.default,$(this).data()),$(this).children().unwrap()})},80926:function(e,t,s){"use strict";var i=s(24994);
2Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=s(76148),o=i(s(32485)),n=s(263),r=s(36189),l=s(38367),c=s(45169),d=i(s(28436)),h=i(s(358)),u=i(s(32943)),p=i(s(4323));const m={designers:"designersChaletIcon",editors:"editorsMushroomIcon",managers:"managersLegoIcon"};class f extends a.Component{constructor(e){super(e);const{email:t,isSubscribed:s}=(0,l.getStoredEmail)(e.eventType);this.state={email:t,isSubscribed:s},this.isFull="full"===e.size,this.isHalf="half"===e.size,this.schoolLink=(0,r.getSchoolLink)(e.schoolKey),this.subscribe=this.subscribe.bind(this)}subscribe({email:e}){return(0,l.subscribeUser)({email:e,eventType:this.props.eventType,eventId:1}).then(e=>this.setState({isSubscribed:e}))}render(e){const t=(0,o.default)("schoolEnrollMarksSpacer",{is__full:this.isFull,is__half:this.isHalf,[`is__${e.schoolKey}`]:e.schoolKey});return(0,a.h)("div",{className:t},(0,a.h)("div",{className:"device laptop desktop"},(0,a.h)("div",{className:"schoolEnrollMarksSpacer-cols"},(0,a.h)(p.default,{iconKey:m[e.schoolKey],href:this.schoolLink}),(0,a.h)("div",{className:"schoolEnrollMarksSpacer-text"},(0,a.h)(h.default,{href:this.schoolLink,title:n.schoolEnrollMarksSpacer.title[e.schoolKey]}),(0,a.h)("div",{className:"schoolEnrollMarksSpacer-undertitle"},(0,a.h)("div",{className:"schoolEnrollMarksSpacer-about"},(0,a.h)(c.TextNode,null,(0,a.h)("span",{dangerouslySetInnerHTML:{__html:n.schoolEnrollMarksSpacer.text}})," ",(0,a.h)(d.default,{href:this.schoolLink,text:"Программа",isInline:!0,isDoubleHover:!0}))),(0,a.h)(u.default,{email:this.state.email,onSubmit:this.subscribe,className:"schoolEnrollMarksSpacer-form",isSubscribed:this.state.isSubscribed,thinButton:!0}))))),(0,a.h)("div",{className:"device mobile"},(0,a.h)("div",{className:"schoolEnrollOpenSpacer-cols"},(0,a.h)(p.default,{iconKey:m[e.schoolKey],href:this.schoolLink}),(0,a.h)(h.default,{href:this.schoolLink,title:n.schoolEnrollMarksSpacer.title[e.schoolKey]})),(0,a.h)(c.TextNode,null,(0,a.h)("span",{dangerouslySetInnerHTML:{__html:n.schoolEnrollMarksSpacer.text}})," ",(0,a.h)(d.default,{href:this.schoolLink,text:"Программа",isInline:!0,isDoubleHover:!0})),(0,a.h)(u.default,{email:this.state.email,onSubmit:this.subscribe,className:"schoolEnrollMarksSpacer-form",isSubscribed:this.state.isSubscribed,thinButton:!0})))}}t.default=f},24847:function(e,t,s){"use strict";var i=s(24994)(s(80926));$(".js__schoolEnrollMarksSpacer").each(function(){$(this).reactify(i.default,$(this).data()),$(this).children().unwrap()})},31845:function(e,t,s){"use strict";var i=s(24994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=s(76148),o=i(s(32485)),n=s(73345),r=s(263),l=s(36189),c=s(45169),d=i(s(28436)),h=i(s(358)),u=i(s(4323)),p=i(s(67518));const m={designers:"designersFunicularIcon",editors:"editorsEscalatorIcon",managers:"managersCartIcon"};class f extends a.Component{constructor(e){super(e),this.state={enrollDate:""},this.isFull="full"===e.size,this.schoolLink=(0,l.getSchoolLink)(e.schoolKey)}componentDidMount(){(0,l.fetchSchoolData)().then(e=>this.setState({...e})).catch(e=>console.error(e))}get currentPrice(){return this.state.currentPrice?(0,n.formatPrice)(this.state.currentPrice.total):"65 000"}get maxPrice(){return this.state.currentPrice?(0,n.formatPrice)(this.state.currentPrice.max):"87 000"}get isX2(){return this.props.classes.includes("is__x2")}render(e){const t=(0,o.default)("schoolEnrollOpenSpacer",e.classes,{is__full:this.isFull,[`is__${e.schoolKey}`]:e.schoolKey});return(0,a.h)("div",{className:t},(0,a.h)("div",{className:"device laptop desktop"},(0,a.h)("div",{className:"schoolEnrollOpenSpacer-cols"},(0,a.h)(u.default,{iconKey:m[e.schoolKey],href:this.schoolLink}),(0,a.h)("div",{className:"schoolEnrollOpenSpacer-text"},(0,a.h)(h.default,{href:this.schoolLink,title:r.schoolEnrollOpenSpacer.title[e.schoolKey],isX2:this.isX2}),(0,a.h)("div",{className:"schoolEnrollOpenSpacer-undertitle"},(0,a.h)("div",{className:"schoolEnrollOpenSpacer-about"},(0,a.h)(c.TextNode,null,"До воскресенья оценка за срок максимальная, а стоимость минимальная: ",(0,a.h)("s",null,this.maxPrice)," ",(0,a.h)("nobr",null,this.currentPrice," ₽"),". ",(0,a.h)("br",{className:"device desktop"}),"Начало в любой день. ",(0,a.h)(d.default,{href:this.schoolLink,text:"Программа",isInline:!0,isDoubleHover:!0}))),(0,a.h)(p.default,{schoolLink:this.schoolLink,isGift:e.isGift}))))),(0,a.h)("div",{className:"device mobile"},(0,a.h)("div",{className:"schoolEnrollOpenSpacer-cols"},(0,a.h)(u.default,{iconKey:m[e.schoolKey],href:this.schoolLink}),(0,a.h)(h.default,{href:this.schoolLink,title:r.schoolEnrollOpenSpacer.title[e.schoolKey],isX2:this.isX2})),(0,a.h)(c.TextNode,null,"До воскресенья оценка за срок максимальная, а стоимость минимальная: ",(0,a.h)("s",null,this.maxPrice)," ",(0,a.h)("nobr",null,this.currentPrice," ₽"),"."),(0,a.h)("div",{className:"schoolEnrollOpenSpacer-mobileButtons"},(0,a.h)("div",null,(0,a.h)(c.TextNode,null,(0,a.h)(d.default,{href:this.schoolLink,text:"Программа",isInline:!0}))),(0,a.h)(p.default,{schoolLink:this.schoolLink,isGift:e.isGift}))))}}t.default=f},25490:function(e,t,s){"use strict";var i=s(24994)(s(31845));$(".js__schoolEnrollOpenSpacer").each(function(){$(this).reactify(i.default,$(this).data()),$(this).children().unwrap()})},93473:function(e,t,s){"use strict";var i=s(24994);
2Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=s(76148),o=i(s(32485)),n=s(263),r=s(36189),l=s(38367),c=s(45169),d=i(s(28436)),h=i(s(358)),u=i(s(32943)),p=i(s(4323));const m={designers:"designersFunicularIcon",editors:"editorsEscalatorIcon",managers:"managersCartIcon"};class f extends a.Component{constructor(e){super(e);const{email:t,isSubscribed:s}=(0,l.getStoredEmail)(e.eventType);this.state={email:t,isSubscribed:s},this.isFull="full"===e.size,this.isHalf="half"===e.size,this.schoolLink=(0,r.getSchoolLink)(e.schoolKey),this.subscribe=this.subscribe.bind(this)}subscribe({email:e}){return(0,l.subscribeUser)({email:e,eventType:this.props.eventType,eventId:1}).then(e=>this.setState({isSubscribed:e}))}render(e){const t=(0,o.default)("schoolEnrollSoonSpacer",{is__full:this.isFull,is__half:this.isHalf,[`is__${e.schoolKey}`]:e.schoolKey});return(0,a.h)("div",{className:t},(0,a.h)("div",{className:"device laptop desktop"},(0,a.h)("div",{className:"schoolEnrollSoonSpacer-cols"},(0,a.h)(p.default,{iconKey:m[e.schoolKey],href:this.schoolLink}),(0,a.h)("div",{className:"schoolEnrollSoonSpacer-text"},(0,a.h)(h.default,{href:this.schoolLink,title:n.schoolEnrollSoonSpacer.title[e.schoolKey]}),(0,a.h)("div",{className:"schoolEnrollSoonSpacer-undertitle"},(0,a.h)("div",{className:"schoolEnrollSoonSpacer-about"},(0,a.h)(c.TextNode,null,(0,a.h)("span",{dangerouslySetInnerHTML:{__html:n.schoolEnrollSoonSpacer.text}})," ",(0,a.h)(d.default,{href:this.schoolLink,text:"Программа",isInline:!0,isDoubleHover:!0}))),(0,a.h)(u.default,{email:this.state.email,onSubmit:this.subscribe,className:"schoolEnrollSoonSpacer-form",isSubscribed:this.state.isSubscribed,thinButton:!0}))))),(0,a.h)("div",{className:"device mobile"},(0,a.h)("div",{className:"schoolEnrollOpenSpacer-cols"},(0,a.h)(p.default,{iconKey:m[e.schoolKey],href:this.schoolLink}),(0,a.h)(h.default,{href:this.schoolLink,title:n.schoolEnrollSoonSpacer.title[e.schoolKey]})),(0,a.h)(c.TextNode,null,(0,a.h)("span",{dangerouslySetInnerHTML:{__html:n.schoolEnrollSoonSpacer.text}})," ",(0,a.h)(d.default,{href:this.schoolLink,text:"Программа",isInline:!0,isDoubleHover:!0})),(0,a.h)(u.default,{email:this.state.email,onSubmit:this.subscribe,className:"schoolEnrollSoonSpacer-form",isSubscribed:this.state.isSubscribed,thinButton:!0})))}}t.default=f},63398:function(e,t,s){"use strict";var i=s(24994)(s(93473));$(".js__schoolEnrollSoonSpacer").each(function(){$(this).reactify(i.default,$(this).data()),$(this).children().unwrap()})},47599:function(e,t,s){"use strict";var i=s(24994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=s(76148),o=i(s(32485)),n=s(263),r=i(s(358)),l=s(45169),c=i(s(28436)),d=s(52297),h=s(70556);const u="/school/projects/";t.default=e=>{const t=(0,o.default)("schoolGraduatedSpacer",{is__full:"full"===e.size,is__half:"half"===e.size});return(0,a.h)("div",{className:t},(0,a.h)("div",{className:"schoolGraduatedSpacer-leftTrumpet"},(0,a.h)(d.LeftTrumpetIcon,null)),(0,a.h)("div",{className:"schoolGraduatedSpacer-rightTrumpet"},(0,a.h)(h.RightTrumpetIcon,null)),(0,a.h)(r.default,{href:u,title:e.title}),(0,a.h)(l.TextNode,{className:"schoolGraduatedSpacer-caption"},(0,a.h)(c.default,{href:u,text:n.schoolGraduatedSpacer.caption,isInline:!0,isDoubleHover:!0,isNoVisited:!0,isWrap:!0})))}},41584:function(e,t,s){"use strict";var i=s(24994)(s(47599));$(".js__schoolGraduatedSpacer").each(function(){$(this).reactify(i.default,$(this).data()),$(this).children().unwrap()})},95399:function(e,t,s){"use strict";var i=s(24994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=s(76148),o=i(s(32485)),n=s(36189),r=s(73345),l=s(263),c=s(45169),d=i(s(358)),h=i(s(9282));const u=e=>{const t=(e=>{const t=(new Date).getTime();return 1+((new Date(e).getTime()-t)/864e5|0)})(e.endDate),s=(0,r.pluralize)(t,"день","дня","дней");return(0,a.h)("div",{className:"schoolPrepsDeadlineDaysSpacer-plot"},(0,a.h)("a",{href:e.link,className:"novisited doubleHover is__noUnderline"},(0,a.h)(h.default,{number:t,caption:`${s}, чтобы успеть`,mobileCaption:`${s}, чтобы<br />успеть`})),(0,a.h)("div",{className:"schoolPrepsDeadlineDaysSpacer-text"},(0,a.h)("div",{className:"device laptop desktop"},(0,a.h)(d.default,{href:e.link,title:l.schoolPrepsDeadlineDaysSpacer.title})),(0,a.h)("div",{className:"device mobile"},(0,a.h)(d.default,{href:e.link,title:l.schoolPrepsDeadlineDaysSpacer.titleMobile})),(0,a.h)(c.TextNode,null,(0,a.h)("span",{className:"device laptop desktop",dangerouslySetInnerHTML:{__html:l.schoolPrepsDeadlineDaysSpacer.text}}),(0,a.h)("span",{className:"device mobile",dangerouslySetInnerHTML:{__html:l.schoolPrepsDeadlineDaysSpacer.textMobile}}),": ",(0,a.h)("a",{href:e.link,className:"schoolPrepsDeadlineDaysSpacer-programLink novisited"},"программа"))))},p=e=>{const t=e.isGift?"Подарить":"Записаться",s=`${e.link}&${e.isGift?"gift":"self"}`;return(0,a.h)("div",{className:"schoolPrepsDeadlineDaysSpacer-action"},(0,a.h)("a",{href:s,className:"schoolPrepsDeadlineDaysSpacer-button button is__thin"},t," за ",e.currentPrice," ₽"),(0,a.h)(c.Caption,null,(0,a.h)("span",{class:"device laptop desktop"},"Раньше занятия — ниже цена."),(0,a.h)("br",{class:"device laptop desktop"}),"В пн цена повысится до ",e.nextPrice," ₽"))};class m extends a.Component{constructor(e){super(e),this.state={currentPrice:"",nextPrice:""},this.link=(0,n.getPrepLink)(),this.isFull="full"===e.size,this.isHalf="half"===e.size}componentDidMount(){(0,n.fetchSchoolData)().then(e=>this.setState({currentPrice:e.currentPrepPrice.price,nextPrice:e.currentPrepPrice.nextPrice})).catch(e=>console.error(e))}render(e){const t=(0,o.default)("schoolPrepsDeadlineDaysSpacer",{is__full:this.isFull,is__half:this.isHalf});return(0,a.h)("div",{className:t},(0,a.h)("div",{className:"schoolPrepsDeadlineDaysSpacer-cols"},(0,a.h)(u,{link:this.link,endDate:e.endDate}),""!==this.state.currentPrice&&(0,a.h)(p,{link:this.link,currentPrice:this.state.currentPrice,nextPrice:this.state.nextPrice,isGift:e.isGift})))}}t.default=m},49064:function(e,t,s){"use strict";var i=s(24994)(s(95399));$(".js__schoolPrepsDeadlineDaysSpacer").each(function(){$(this).reactify(i.default,$(this).data()),$(this).children().unwrap()})},28521:function(e,t,s){"use strict";var i=s(24994);
2Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=s(76148),o=i(s(32485)),n=s(36189),r=s(263),l=s(73345),c=s(63229),d=s(45169),h=i(s(358)),u=i(s(9282));const p=e=>{const t=(0,c.moscowifyLocal)(new Date(e.endsAt)),s=(0,l.birmanize)(t,{format:"dateOnly"}),i=e.currentScore.toString().replace(".","<span>,</span>");return(0,a.h)("div",{className:"schoolPrepsDeadlineScoreSpacer-plot"},(0,a.h)("a",{href:e.link,className:"novisited doubleHover is__noUnderline"},(0,a.h)(u.default,{number:i,caption:`Макс. балл<br />до ${s}`,mobileCaption:`Макс. балл<br />до ${s}`})),(0,a.h)("div",{className:"schoolPrepsDeadlineScoreSpacer-text"},(0,a.h)(h.default,{href:e.link,title:r.schoolPrepsDeadlineScoreSpacer.title}),(0,a.h)(d.TextNode,null,r.schoolPrepsDeadlineScoreSpacer.text,(0,a.h)("span",{className:"device mobile"},": ",(0,a.h)("a",{href:e.link,className:"schoolPrepsDeadlineScoreSpacer-programLink novisited"},"программа")))))},m=e=>{const t=e.isGift?"Подарить":"Записаться",s=`${e.link}&${e.isGift?"gift":"self"}`,i=e.isCouponApplied?`Успейте до ${o=e.couponValidUntil,(0,l.birmanize)((0,c.moscowifyLocal)(new Date(1e3*o)))}`:`В пн цена повысится до ${e.nextPrice} ₽`;var o;return(0,a.h)("div",{className:"schoolPrepsDeadlineScoreSpacer-action"},(0,a.h)("a",{href:s,className:"schoolPrepsDeadlineScoreSpacer-button button is__thin is__transparent"},t," за ",e.currentPrice," ₽"),(0,a.h)(d.Caption,null,i))};class f extends a.Component{constructor(e){super(e),this.state={currentPrice:"",nextPrice:"",currentScore:"",endsAt:""},this.link=(0,n.getPrepLink)()}componentDidMount(){(0,n.fetchSchoolData)().then(e=>this.setState({currentPrice:e.currentPrepPrice.price,nextPrice:e.currentPrepPrice.nextPrice,currentScore:e.currentPrepScore.score,endsAt:e.currentPrepScore.endsAt,isCouponApplied:e.currentPrepPrice.isCouponApplied,couponValidUntil:e.currentPrepPrice.couponValidUntil})).catch(e=>console.error(e))}render(){const{size:e,isGift:t}=this.props,s=(0,o.default)("schoolPrepsDeadlineScoreSpacer",{is__full:"full"===e,is__half:"half"===e});return(0,a.h)("div",{className:s},(0,a.h)("div",{className:"schoolPrepsDeadlineScoreSpacer-cols"},(0,a.h)(p,{link:this.link,currentScore:this.state.currentScore,endsAt:this.state.endsAt}),""!==this.state.currentPrice&&(0,a.h)(m,{isGift:t,link:this.link,currentPrice:this.state.currentPrice,nextPrice:this.state.nextPrice,isCouponApplied:this.state.isCouponApplied,couponValidUntil:this.state.couponValidUntil})))}}t.default=f},17537:function(e,t,s){"use strict";var i=s(24994)(s(28521));$(".js__schoolPrepsDeadlineScoreSpacer").each(function(){$(this).reactify(i.default,$(this).data()),$(this).children().unwrap()})},67518:function(e,t,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=s(76148);t.default=e=>{const t=`${e.schoolLink}&${e.isGift?"gift":"self"}`,s=e.isGift?"Подарить":"Поступить";return(0,i.h)("div",{className:"schoolSpacerEnrollButton-buttonWrapper"},(0,i.h)("a",{href:t,className:"button schoolSpacerEnrollButton-button"},s))}},4323:function(e,t,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=s(76148),a=s(35570),o=s(82957),n=s(73137),r=s(25758),l=s(1875),c=s(49090),d=s(54948),h=s(71852),u=s(98681);const p={designersFunicularIcon:a.DesignersFunicularIcon,editorsEscalatorIcon:o.EditorsEscalatorIcon,managersCartIcon:n.ManagersCartIcon,designersChaletIcon:r.DesignersChaletIcon,editorsMushroomIcon:l.EditorsMushroomIcon,managersLegoIcon:c.ManagersLegoIcon,designersBellIcon:d.DesignersBellIcon,editorsBellIcon:h.EditorsBellIcon,managersMegaphoneIcon:u.ManagersMegaphoneIcon};t.default=e=>{const t=p[e.iconKey];return(0,i.h)("a",{href:e.href,className:"schoolSpacerIcon doubleHover is__noUnderline"},(0,i.h)(t,null))}},358:function(e,t,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=s(76148);t.default=e=>{const t=e.isX2?' <span class="badgeX2"></span>':"",s={__html:`${e.title}${t}`};return(0,i.h)("div",{className:"schoolSpacerTitle-wrapper"},(0,i.h)("a",{href:e.href,className:"schoolSpacerTitle doubleHover is__noUnderline",dangerouslySetInnerHTML:s}))}},36189:function(e,t,s){"use strict";var i=s(24994)(s(98999)),a=s(15011);e.exports={fetchSchoolData:()=>fetch("/school/enrollData/",{method:"GET",headers:i.default,credentials:"include"}).then(e=>e.json()),getSchoolLink:e=>e.length?`/school/${e}/enroll/?utm_source=${(0,a.utmSource)({platform:"Сайт бюро",postType:"Банер",productType:"Школа",product:e,postDate:new Date})}`:"",getPrepLink:()=>`/school/prep/?utm_source=${(0,a.utmSource)({platform:"Сайт бюро",postType:"Банер",productType:"Школа",product:"prep",postDate:new Date})}`}},263:function(e){"use strict";e.exports={schoolEnrollSoonSpacer:{title:{designers:'Скоро набор<br class="device mobile"> в Школу дизайнеров',editors:'Скоро набор<br class="device mobile"> в Школу редакторов',managers:'Скоро набор<br class="device mobile"> в Школу руководителей'},text:"Оставьте почту, и мы напишем вам, когда откроется набор."},schoolEnrollOpenSpacer:{title:{designers:'Новый набор<br class="device mobile"> в Школу дизайнеров',editors:'Новый набор<br class="device mobile"> в Школу редакторов',managers:'Новый набор<br class="device mobile"> в Школу руководителей'},text:"Десять бесплатных мест для лучших студентов."},schoolEnrollDeadlineScoreSpacer:{title:{designers:'Идёт набор<br class="device mobile"> в Школу дизайнеров',editors:'Идёт набор<br class="device mobile"> в Школу редакторов',managers:'Идёт набор<br class="device mobile"> в Школу руководителей'},text:"Раньше сдадите — выше шанс на бесплатное место."},schoolEnrollEndingSpacer:{title:{designers:'Конец набора<br class="device mobile"> в Школу дизайнеров',editors:'Конец набора<br class="device mobile"> в Школу редакторов',managers:'Конец набора<br class="device mobile"> в Школу руководителей'},text:"Раньше учёба — ниже стоимость и выше шанс на бесплатное место."},schoolEnrollEndedSpacer:{title:{designers:'Набор в Школу<br class="device mobile"> дизайнеров закрыт',editors:'Набор в Школу<br class="device mobile"> редакторов закрыт',managers:'Набор в Школу<br class="device mobile"> руководителей закрыт',default:"Итоги набора в Школу бюро"},text:'<b class="device laptop desktop">Опоздавшим:</b><span class="device mobile">Опоздавшим:</span> оставьте почту, и мы напишем, если будут места.',textDefault:'<b class="device laptop desktop">Опоздавшим:</b><span class="device mobile">Опоздавшим:</span> оставьте почту, и мы напишем, если будут свободные места.'},schoolEnrollMarksSpacer:{title:{designers:'<span class="device mobile laptop">Итоги набора <br class="device mobile">в Школу дизайнеров</span><span class="device desktop">Оценки и результаты набора Школы дизайнеров</span>',editors:'<span class="device mobile laptop">Итоги набора <br class="device mobile">в Школу редакторов</span><span class="device desktop">Оценки и результаты набора Школы редакторов</span>
2',managers:'<span class="device mobile laptop">Итоги набора <br class="device mobile">в Школу руководителей</span><span class="device desktop">Оценки и результаты набора Школы руководителей</span>'},text:"Оставьте почту, и мы напишем вам, когда откроется набор."},schoolStartedSpacer:{title:{designers:'Старт занятий <span class="device desktop">на первой ступени Школы</span><br class="device mobile"><span class="device mobile laptop">в Школе</span> дизайнеров',editors:'Старт занятий <span class="device desktop">на первой ступени Школы</span><br class="device mobile"><span class="device mobile laptop">в Школе</span> редакторов',managers:'Старт занятий <span class="device desktop">на первой ступени Школы</span><br class="device mobile"><span class="device mobile laptop">в Школе</span> руководителей'},text:"Оставьте почту, и мы напишем вам, когда откроется набор."},schoolPrepsDeadlineScoreSpacer:{title:"Подготовительные курсы",text:"Школы бюро"},schoolPrepsDeadlineDaysSpacer:{title:"Идёт запись",titleMobile:"Подготовительные курсы",text:"Заработанный балл будет действовать в ближайшем потоке школы. Подготовительные курсы",textMobile:"Школы бюро"},schoolGraduatedSpacer:{caption:"Дипломы выпускников Школы бюро"}}},42093:function(e,t,s){"use strict";var i=s(24994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=s(76148),o=i(s(32485)),n=s(263),r=s(36189),l=s(38367),c=s(45169),d=i(s(28436)),h=i(s(358)),u=i(s(32943)),p=i(s(4323));const m={designers:"designersBellIcon",editors:"editorsBellIcon",managers:"managersMegaphoneIcon"};class f extends a.Component{constructor(e){super(e);const{email:t,isSubscribed:s}=(0,l.getStoredEmail)(e.eventType);this.state={email:t,isSubscribed:s},this.isFull="full"===e.size,this.isHalf="half"===e.size,this.schoolLink=(0,r.getSchoolLink)(e.schoolKey),this.subscribe=this.subscribe.bind(this)}subscribe({email:e}){return(0,l.subscribeUser)({email:e,eventType:this.props.eventType,eventId:1}).then(e=>this.setState({isSubscribed:e}))}render(e){const t=(0,o.default)("schoolStartedSpacer",{is__full:this.isFull,is__half:this.isHalf,[`is__${e.schoolKey}`]:e.schoolKey});return(0,a.h)("div",{className:t},(0,a.h)("div",{className:"device laptop desktop"},(0,a.h)("div",{className:"schoolStartedSpacer-cols"},(0,a.h)(p.default,{iconKey:m[e.schoolKey],href:this.schoolLink}),(0,a.h)("div",{className:"schoolStartedSpacer-text"},(0,a.h)(h.default,{href:this.schoolLink,title:n.schoolStartedSpacer.title[e.schoolKey]}),(0,a.h)("div",{className:"schoolStartedSpacer-undertitle"},(0,a.h)("div",{className:"schoolStartedSpacer-about"},(0,a.h)(c.TextNode,null,(0,a.h)("span",{dangerouslySetInnerHTML:{__html:n.schoolStartedSpacer.text}})," ",(0,a.h)(d.default,{href:this.schoolLink,text:"Программа",isInline:!0,isDoubleHover:!0}))),(0,a.h)(u.default,{email:this.state.email,onSubmit:this.subscribe,className:"schoolStartedSpacer-form",isSubscribed:this.state.isSubscribed,thinButton:!0}))))),(0,a.h)("div",{className:"device mobile"},(0,a.h)("div",{className:"schoolEnrollOpenSpacer-cols"},(0,a.h)(p.default,{iconKey:m[e.schoolKey],href:this.schoolLink}),(0,a.h)(h.default,{href:this.schoolLink,title:n.schoolStartedSpacer.title[e.schoolKey]})),(0,a.h)(c.TextNode,null,(0,a.h)("span",{dangerouslySetInnerHTML:{__html:n.schoolStartedSpacer.text}})," ",(0,a.h)(d.default,{href:this.schoolLink,text:"Программа",isInline:!0,isDoubleHover:!0})),(0,a.h)(u.default,{email:this.state.email,onSubmit:this.subscribe,className:"schoolStartedSpacer-form",isSubscribed:this.state.isSubscribed,thinButton:!0})))}}t.default=f},56922:function(e,t,s){"use strict";var i=s(24994)(s(42093));$(".js__schoolStartedSpacer").each(function(){$(this).reactify(i.default,$(this).data()),$(this).children().unwrap()})},35672:function(e,t,s){"use strict";var i=s(24994),a=s(95901),o=i(s(46844));$(".js__schoolStudentFeedbackSpacer").each((e,t)=>{const s=$(t),i=$(t).data("template"),n=a.spacerFonts[i]||{},r=new FontFace(n.name,(l=n.fileName,`url(${o.default}/${l})`));var l;document.fonts.add(r),r.load().then(()=>s.addClass("is__ready"))})},95901:function(e,t){"use strict";
2Object.defineProperty(t,"__esModule",{value:!0}),t.spacerFonts=void 0,t.spacerFonts={austin:{name:"Austin",fileName:"austin-cy.woff2"},rightGrotesk:{name:"Right Grotesk",fileName:"right-grotesk-tall-fine.woff2"},gilroy:{name:"Gilroy",fileName:"gilroy-black.woff2"},bebasNeue:{name:"Bebas Neue",fileName:"bebas-neue-book.woff2"},drukXCondensed:{name:"Druk XCondensed",fileName:"druk-xcondensed-cyr-super-italic.woff2"}}},9282:function(e,t,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=s(76148),a=s(45169);t.default=e=>(0,i.h)("div",{className:"tiltedSquareNumber-wrapper"},(0,i.h)("div",{className:"tiltedSquareNumber"},e.number&&(0,i.h)("div",{className:"tiltedSquareNumber-numberWrapper"},(0,i.h)("div",{className:"tiltedSquareNumber-number",dangerouslySetInnerHTML:{__html:e.number}})),e.number&&(0,i.h)(a.Caption,{html:e.caption})),e.mobileCaption&&(0,i.h)(a.Caption,{className:"tiltedSquareNumber-mobileCaption",html:e.mobileCaption}))},28460:function(e,t,s){"use strict";var i=s(24994);Object.defineProperty(t,"__esModule",{value:!0}),t.requestTaskResultWithdrawal=t.markTaskResultOk=t.fetchTaskResultsReview=t.cancelTaskResultWithdrawal=void 0;var a=i(s(98999));const o="/classroom/school/level1/task_results",n=(e,t={})=>fetch(e,{credentials:"include",headers:a.default,...t}).then(async e=>{if(e.ok)return e;const t=new Error(e.statusText||"Request failed");throw t.status=e.status,t});t.fetchTaskResultsReview=()=>n(o).then(e=>e.json()),t.markTaskResultOk=e=>n(`${o}/${e}/ok`,{method:"POST"}).then(()=>{}),t.requestTaskResultWithdrawal=e=>n(`${o}/${e}/withdrawal`,{method:"POST"}).then(e=>e.json()),t.cancelTaskResultWithdrawal=e=>n(`${o}/${e}/withdrawal`,{method:"DELETE"}).then(()=>{})},5953:function(e,t,s){"use strict";var i=s(24994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=s(76148),o=i(s(94634)),n=i(s(42404)),r=s(73345),l=s(45169),c=i(s(35209)),d=s(63229),h=s(28460);const u={designers:"ШД",editors:"ШР",managers:"ШРук"},p=e=>{const t=u[e.school_key]||e.school_key;return[e.enrollment_key&&`${e.enrollment_key} поток`,t].filter(Boolean).join(" ")},m=({result:e})=>(0,a.h)("a",{href:e.task.url},e.task.title),f=({result:e})=>{const t=e.task.url+"results/#"+(e.student.english_name||`r${e.works[0].id}`);return(0,a.h)("a",{href:t},"В кабинете")},v=({url:e})=>(0,a.h)("div",null,(0,a.h)("a",{href:e,target:"_blank",rel:"noreferrer",className:"image is__img media"},(0,a.h)("img",{src:e,loading:"lazy"}))),g=({url:e})=>(0,a.h)(l.TextNode,null,(0,a.h)("a",{href:e,target:"_blank",rel:"noreferrer"},(0,n.default)(e))),b=({result:e})=>{if(!e.works||!e.works.length)return null;const t=e.works.filter(({type:e})=>e.startsWith("image")),s=e.works.filter(({type:e})=>!e.startsWith("image")),i=t.map(({id:e})=>e).join("-");return(0,a.h)(l.Ul,{className:"schoolTaskResultsReview-works noIndent"},!!t.length&&(0,a.h)("li",{key:i},(0,a.h)("div",{className:"module schoolTaskResultsReview-images"},t.map(e=>(0,a.h)(v,e)))),s.map(e=>(0,a.h)("li",{key:e.id},(0,a.h)(g,(0,o.default)({_:!0},e)))))},_=({isPending:e,onReturn:t,onWithdrawal:s,onWithdrawalExpiry:i,onOk:o,result:n})=>"withdrawal_pending"===n.status?(0,a.h)("div",{className:"schoolTaskResultsReview-actions"},n.undo_until&&(0,a.h)(c.default,{to:n.undo_until,isTextOnly:!0,noDays:!0,hasSeconds:!0,onExpiry:i}),(0,a.h)("button",{className:"button is__thin",disabled:e,type:"button",onClick:t},"Вернуть работу")):(0,a.h)("div",{className:"schoolTaskResultsReview-actions"},(0,a.h)("button",{className:"button is__thin",disabled:e,type:"button",onClick:o},"ОК"),(0,a.h)("button",{className:"button is__thin",disabled:e,type:"button",onClick:s},"Снять работу")),y=({isPending:e,onReturn:t,onWithdrawal:s,onWithdrawalExpiry:i,onOk:o,result:n})=>(0,a.h)("li",{className:"schoolTaskResultsReview-result"},(0,a.h)(l.TextNode,null,(0,a.h)(m,{result:n}),"."," ",n.task.deadline&&`Дедлайн: ${(0,r.birmanize)((0,d.moscowifyLocal)(new Date(n.task.deadline)),{format:"fullMonthDateAndTime"})}
2. `,n.uploaded_at&&`Загрузка: ${(0,r.birmanize)((0,d.moscowifyLocal)(new Date(n.uploaded_at)),{format:"atTime"})}`,"."," ",(0,a.h)(f,{result:n})),(0,a.h)(b,{result:n}),(0,a.h)(_,{result:n,isPending:e,onOk:o,onReturn:t,onWithdrawal:s,onWithdrawalExpiry:i}));class S extends a.Component{constructor(e){super(e),this.state={isLoading:!0,pendingIds:[],results:[]}}componentDidMount(){this.loadResults()}async loadResults(){this.setState({isLoading:!0});const e=await(0,h.fetchTaskResultsReview)();this.setState({results:e,isLoading:!1})}setPending(e,t){this.setState(({pendingIds:s})=>({pendingIds:t?s.concat(e):s.filter(t=>t!==e)}))}removeResult(e){this.setState(({results:t})=>({results:t.filter(t=>t.id!==e)}))}updateResult(e,t){this.setState(({results:s})=>({results:s.map(s=>s.id===e?{...s,...t}:s)}))}async withResultRequest(e,t){this.setPending(e,!0);try{await t()}catch(e){if(404===e.status)return void await this.loadResults();throw e}finally{this.setPending(e,!1)}}handleOk(e){this.withResultRequest(e.id,async()=>{await(0,h.markTaskResultOk)(e.id),this.removeResult(e.id)})}handleWithdrawal(e){this.withResultRequest(e.id,async()=>{const{undo_until:t}=await(0,h.requestTaskResultWithdrawal)(e.id);this.updateResult(e.id,{status:"withdrawal_pending",undo_until:t})})}handleReturn(e){this.withResultRequest(e.id,async()=>{await(0,h.cancelTaskResultWithdrawal)(e.id),this.updateResult(e.id,{status:"new",undo_until:null})})}renderGroup(e){return(0,a.h)("div",{className:"schoolTaskResultsReview-group textBox bureausans",key:e.key},(0,a.h)(l.Heading2,null,(0,a.h)("a",{href:(t=e.student,`/dossier/cp/${t.uid}/`)},e.student.name),p(e.enrollment)&&`, ${p(e.enrollment)}`),(0,a.h)(l.Ul,{className:"schoolTaskResultsReview-results"},e.results.map(e=>(0,a.h)(y,{key:e.id,result:e,isPending:this.state.pendingIds.includes(e.id),onOk:()=>this.handleOk(e),onReturn:()=>this.handleReturn(e),onWithdrawal:()=>this.handleWithdrawal(e),onWithdrawalExpiry:()=>this.removeResult(e.id)}))));var t}render(){const{isLoading:e,results:t}=this.state;return e?(0,a.h)("div",{className:"schoolTaskResultsReview-message"},"Загружаем сдачи"):t.length?(0,a.h)("div",{className:"schoolTaskResultsReview"},(e=>e.reduce((e,t)=>{const s=(e=>[e.student.uid||e.student.id,e.enrollment.id].filter(Boolean).join("-"))(t);let i=e.find(e=>e.key===s);return i||(i={key:s,student:t.student,enrollment:t.enrollment,results:[]},e.push(i)),i.results.push(t),e},[]))(t).map(e=>this.renderGroup(e))):(0,a.h)("div",{className:"schoolTaskResultsReview-message"},"Непроверенных сдач нет")}}t.default=S},46694:function(e,t,s){"use strict";var i=s(24994)(s(5953));$(".js__schoolTaskResultsReview").each((e,t)=>{$(t).empty().reactify(i.default)})},36414:function(e,t,s){"use strict";s(86019).translations.ru.schoolTest={results:{heading:'<span class="sign">✓ </span>Тест сдан',regular:{metDeadline:{hasErrors:'<div class="textNode is__firstChild is__lastChild"><p>Вы правильно ответили на %{correctQuestionsCount} %{correctQuestionsPlural} из %{totalQuestionsCount}, успели к дедлайну и заработали <b>%{score} %{scorePlural}</b> из <b>%{maxScore}</b>. Мы просим вас не обсуждать с другими студентами, как вы ответили на вопросы теста. Чтобы не провоцировать обсуждение, мы скрыли вопросы и ответы — вы увидите их после дедлайна.</p></div>',hasNoErrors:'<div class="textNode is__firstChild is__lastChild"><p>Вы успели к дедлайну, ответили правильно на все вопросы и заработали максимальные <b>%{score} %{scorePlural}</b>. От души поздравляем и желаем вам дальнейших успехов в школе!  Мы просим вас не обсуждать с другими студентами, как вы ответили на вопросы теста. Чтобы не провоцировать обсуждение, мы скрыли вопросы и ответы — вы увидите их после дедлайна.</p></div>'},missedDeadline:{hasErrors:'<div class="textNode is__firstChild is__lastChild"><p>Вы правильно ответили на %{correctQuestionsCount} %{correctQuestionsPlural} из %{totalQuestionsCount}. К сожалению, вы не успели к дедлайну и заработали <b>%{score} %{scorePlural}</b> из <b>%{maxScore}</b>. Напоминаем, что по правилам после трёх сорванных дедлайнов студенты отчисляются из школы.  Мы просим вас не обсуждать с другими студентами, как вы ответили на вопросы теста. Чтобы не провоцировать обсуждение, мы скрыли вопросы и ответы — вы увидите их после дедлайна.</p></div>',hasNoErrors:'<div class="textNode is__firstChild is__lastChild"><p>
2Вы ответили правильно на все вопросы, но, к сожалению, не успели к дедлайну и заработали только <b>%{score} %{scorePlural}</b> из <b>%{maxScore}</b>. Напоминаем, что по правилам после трёх сорванных дедлайнов студенты отчисляются из школы.  Мы просим вас не обсуждать с другими студентами, как вы ответили на вопросы теста. Чтобы не провоцировать обсуждение, мы скрыли вопросы и ответы — вы увидите их после дедлайна.</p></div>'}},bonus:{metDeadline:{hasErrors:'<div class="textNode is__firstChild is__lastChild"><p>Вы правильно ответили на %{correctQuestionsCount} %{correctQuestionsPlural} из %{totalQuestionsCount} и заработали <b>%{score} %{scorePlural}</b> из <b>%{maxScore}</b>. Мы просим вас не обсуждать с другими студентами, как вы ответили на вопросы теста в прошлый раз и теперь. Чтобы не провоцировать обсуждение исправлений и обновлённых тестов, мы скрываем вопросы и ответы после сдачи теста.</p></div>',hasNoErrors:'<div class="textNode is__firstChild"><p>Вы ответили правильно на все вопросы и заработали максимальные <b>%{score} %{scorePlural}</b>. От души поздравляем и желаем вам дальнейших успехов в школе!</p></div><div class="textNode is__lastChild"><p>Мы просим вас не обсуждать с другими студентами, как вы ответили на вопросы теста в прошлый раз и теперь. Чтобы не провоцировать обсуждение исправлений и обновлённых тестов, мы скрываем вопросы и ответы после сдачи теста.</p></div>'},missedDeadline:{hasErrors:'<div class="textNode is__firstChild is__lastChild"><p>Вы правильно ответили на %{correctQuestionsCount} %{correctQuestionsPlural} из %{totalQuestionsCount}. К сожалению, вы не успели к дедлайну и заработали <b>%{score} %{scorePlural}</b> из <b>%{maxScore}</b>. Напоминаем, что по правилам после трёх сорванных дедлайнов студенты отчисляются из школы.</p></div>',hasNoErrors:'<div class="textNode is__firstChild is__lastChild"><p>Вы ответили правильно на все вопросы, но, к сожалению, не успели к дедлайну и заработали только <b>%{score} %{scorePlural}</b> из <b>%{maxScore}</b>. Напоминаем, что по правилам после трёх сорванных дедлайнов студенты отчисляются из школы.</p></div>'}},factoid:"%{scorePlural} из %{maxScore}",cannotSubmit:{heading:'<span class="sign">× </span>Тест не сдан'}}}},60508:function(e,t,s){"use strict";var i=s(86019),a=s(24994),o=s(73345),n=s(65027),r=a(s(93922)),l=a(s(66391)),c=a(s(5012)),d=a(s(28916)),h=a(s(19443)),u=a(s(20946)),p=a(s(75271));const m="is__loading";class f{constructor(e){this.$el=e,this.$submit=this.$el.find(".js__check"),this.$results=this.$el.find(".js__results"),this.$factoidResults=this.$el.find(".js__schoolTestResult-factoid"),this.$resultsStatus=this.$el.find(".js__schoolTestResult-heading h2, .js__schoolTestResult-status"),this.id=this.$el.data("id"),this.revision=this.$el.data("revision"),this.testData=(0,u.default)(window.SCHOOL_TEST_DATA||{}),this.testResult=this.testData.result,this.testAbilities=this.testData.abilities,this.loadState(),this.init(),this.bindEvents(),this.render()}get isDone(){return!!this.testResult||!this.testAbilities.can_submit_answers||this.questions.every(e=>e.isDone)}
2get isBonus(){return/^bonus\//.test(this.id)}get state(){return this.currentState}loadState(){if(this.testResult){const e=(this.testResult.answers||[]).map(e=>[this.id,e].join("."));return void(this.currentState=new c.default({answers:e}))}this.currentState=window.application.state}init(){this.questions=this.buildQuestions(),this.questions.forEach(e=>e.init())}buildQuestions(){return this.$el.find(".js__question").map((e,t)=>new l.default($(t),this)).get()}bindEvents(){this.$submit.on("click",this.submit.bind(this)),this.$el.on("answerChecked",this.toggleSubmit.bind(this)),this.$el.on("click",".js__schoolTest-appealLink",p.default),window.application.user&&window.application.user.isStaff&&(0,r.default)([49,50,51,52],this.expose.bind(this)),setTimeout(()=>this.$el.trigger("appHighlight"),300)}render(){this.testResult&&(this.displayResults(this.testResult),this.syncQuestionsState(this.testResult),this.reveal(this.testResult)),this.testAbilities.can_submit_answers||this.testResult?this.toggleSubmit():this.failTest()}failTest(){this.questions.forEach(e=>e.lock()),this.displayDeadlineFail(),this.fail()}reveal(e){this.$el.addClass("is__revealed"),e.score===e.max_score&&($(".confetti").addClass("is__visible"),new Confetti)}fail(){this.$el.addClass("is__failed")}expose(){this.$el.toggleClass("is__exposed")}setQuestionsDisplay(){this.testAbilities.can_display_incorrect_questions||this.$el.toggleClass("is__questionsHidden")}toggleSubmit(){this.$submit.attr("disabled",!this.isDone)}submit(){return new d.default(this).submit({onBeforeLoad:this.onBeforeLoad.bind(this),onAfterLoad:this.onAfterLoad.bind(this)}).then(this.handleSubmitResult.bind(this)).catch(this.handleSubmitError.bind(this))}onBeforeLoad(){this.$submit.attr("disabled",!0),this.$el.addClass(m)}onAfterLoad(){this.$submit.attr("disabled",!1),this.$el.removeClass(m)}handleSubmitResult(e){this.testResult=e,this.loadState(),this.render()}handleSubmitError(e){console.error("Something went wrong",e)}formattedResults(e){return new h.default({results:e,test:this}).html()}formatFactoidResults(e){const t=(0,o.wrapFractionalPart)((0,n.formatScore)(e.score)).replace(/,/,'<span class="comma">,</span>'),s=i.t("schoolTest.results.factoid",{maxScore:(0,n.formatMaxScore)(e.max_score),scorePlural:(0,o.pluralize)(e.score,"балл","балла","баллов")});this.$factoidResults.find(".factoid-number").html(t),this.$factoidResults.find(".caption-text").text(s)}displayResults(e){this.setQuestionsDisplay(),this.$results.html(this.formattedResults(e)),this.formatFactoidResults(e),this.$resultsStatus.addClass("is__success").html(i.t("schoolTest.results.heading"))}displayDeadlineFail(){this.setQuestionsDisplay(),this.$results.remove(),this.$resultsStatus.addClass("is__failed").html(i.t("schoolTest.results.cannotSubmit.heading"))}syncQuestionsState({incorrect_question_ids:e}){const t=e.map(e=>[this.id,e].join("."));this.questions.forEach(e=>e.reload()),this.questions.forEach(e=>e.lock()),this.questions.filter(e=>t.includes(e.id)).forEach(e=>e.markAsIncorrect())}}$(".js__schoolTest:not(.is__training)").each(function(){new f($(this))})},89921:function(e){"use strict";const t="is__checked";e.exports=class{constructor(e,t){this.$el=e,this.question=t,this.test=t.test,this.id=this.question.id+"."+this.$el.data("id"),this.isRight=parseInt(this.$el.data("correct"),10),this.$el.attr("data-log-id",this.id),this._bindEvents()}init(){this.state.getAnswers().indexOf(this.id)>-1&&this.toggle()}get state(){return this.test.state}get isCorrect(){return this.isRight?this.isChecked:!this.isChecked}get sameAnswers(){return this.question.answers.filter(e=>e.id===this.id)}toggle(){const e=!this.isChecked;this.sameAnswers.forEach(s=>{s.isChecked=e,s.$el.toggleClass(t,s.isChecked)}),this._record(),this.$el.trigger("answerChecked")}lock(){this.$el.off("click.answer")}reset(){this.sameAnswers.forEach(e=>{e.isChecked=!1,e.$el.removeClass(t)}),this._record(),this._bindEvents()}reload(){this.reset(),this.init()}_record(){this.isChecked?this.state.addAnswer(this.id):this.state.removeAnswer(this.id)}_bindEvents(){this.$el.off("click.answer").on("click.answer",this.toggle.bind(this))}}},28916:function(e,t,s){"use strict";var i=s(24994);
2Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=i(s(98999));t.default=class{constructor(e){this.test=e,this.testId=this.test.id,this.revision=this.test.revision}get state(){return this.test.state}get answers(){return this.test.questions.map(e=>e.visibleAnswers.filter(e=>e.isChecked)).map(e=>e.map(e=>e.id.replace(this.testId+".",""))).reduce((e,t)=>e.concat(t),[])}get resultsApiUrl(){const[e,t]=this.testId.split("/"),{eventId:s}=window.classroom||{};return`/classroom/${e}/${s}/tests/${t}/results/`}submit({onBeforeLoad:e,onAfterLoad:t}){return e(),fetch(this.resultsApiUrl,{method:"POST",headers:a.default,credentials:"include",body:JSON.stringify({answers:this.answers,revision:this.revision})}).then(e=>{if(t(),!e.ok)throw Error(e.statusText);return e.json()})}}},66391:function(e,t,s){"use strict";const i=s(89921);e.exports=class{constructor(e,t){this.$el=e,this.test=t,this.id=this.test.id+"."+this.$el.data("id"),this.answers=[],this._fillInAnswers()}init(){this.answers.forEach(e=>e.init()),window.location.hash==="#"+this.$el.attr("id")&&this.$el.addClass("is__highlightMark")}get visibleAnswers(){return this.answers.filter(e=>!!e.$el[0].offsetParent)}get isCorrect(){return this.visibleAnswers.every(e=>e.isCorrect)}get isDone(){return this.visibleAnswers.some(e=>e.isChecked)}get score(){const e=this.answers.filter(e=>e.isRight).length,t=this.answers.filter(e=>e.isRight&&e.isChecked).length,s=this.answers.filter(e=>!e.isRight&&e.isChecked).length,i=this.maxScore/e,a=t*i-s*i;return a<=0?0:a}get maxScore(){return this.test.MAX_QUESTION_SCORE}_fillInAnswers(){this.$el.find(".js__answer").each((e,t)=>{this.answers.push(new i($(t),this))})}lock(){this.answers.forEach(e=>e.lock())}reset(){this.answers.forEach(e=>e.reset())}reload(){this.answers.forEach(e=>e.reload())}markAsIncorrect(){this.$el.addClass("is__incorrect")}}},5012:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,t.default=class{constructor({answers:e}){this.answers=e}getAnswers(){return this.answers}addAnswer(){}removeAnswer(e){window.application.state.removeAnswer(e)}}},19443:function(e,t,s){"use strict";var i=s(86019);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=s(73345),o=s(65027);t.default=class{constructor({results:e,test:t}){this.results=e,this.test=t}get score(){return this.results.score}get maxScore(){return this.results.max_score}get correctQuestionsCount(){return this.results.correct_questions_count}get totalQuestionsCount(){return this.results.total_questions_count}get isMissedDeadline(){return this.results.missed_deadline}html(){const e=this.score,t=this.maxScore,s=["schoolTest","results",this.test.isBonus?"bonus":"regular",this.isMissedDeadline?"missedDeadline":"metDeadline",e===t?"hasNoErrors":"hasErrors"].join(".");return i.t(s,{score:(0,o.formatScore)(e),scorePlural:(0,a.pluralize)(e,"балл","балла","баллов"),maxScore:(0,o.formatMaxScore)(t),correctQuestionsCount:this.correctQuestionsCount,correctQuestionsPlural:(0,a.pluralize)(this.correctQuestionsCount,"вопрос","вопроса","вопросов"),totalQuestionsCount:this.totalQuestionsCount})}}},20946:function(e){"use strict";const t={school_test_missed_everything:{abilities:{can_submit_answers:!1},result:null},school_test_passed_flawlessly:{abilities:{can_submit_answers:!0},result:{score:45.35,max_score:45.35,missed_deadline:!1,answers:["ded31705c6da8e23fb3d251640db1d4e.3","90b4e7aa7c29700869e89bb2267207e9.1","21d02c1559b89f16a9130cea76949aee.0","85205c14cde6466b2e0c149f75b3a1fc.2","571ec553ca67df5fe67035d2572540e5.5","cec65cf43c42624ef5c055e1be13afbc.2","76af6d6c4461eccf69891d2913d7fa8c.1","b96bfb012f9493946df4326785fb74b7.2","43492b349a9c55b55ebd0afd2834fba1.0","b9b0e352d24826818b3b7f1ec4544fdc.3","76af6d6c4461eccf69891d2913d7fa8c.0","854d91cb472fa43383c8472e29960953.1","83592cad3f115cc1d6535222c1cafa43.0","b9b0e352d24826818b3b7f1ec4544fdc.1","854d91cb472fa43383c8472e29960953.0","fab0c216b4f71ae9ead293f005e180fc.2","21d02c1559b89f16a9130cea76949aee.1","3bec197e0c392b3cbffc3609758d6249.0","63ee06d8d2d041afbd2024c7f5a3b9cb.0","571ec553ca67df5fe67035d2572540e5.1","cfb537aa2c3a8f5a13ade957d9d487b2.1","90b4e7aa7c29700869e89bb2267207e9.2","4007d3c2de8f1bc32965793f878187c5.0","4ac39285576562813ecbfeae85e4ced7.4","9abb6770f05d81d171dfb2ec73b5d6cd.3","21d02c1559b89f16a9130cea76949aee.3","ded31705c6da8e23fb3d251640db1d4e.4","a4ef988e89192b823aa6c0d0878d8460.2","571ec553ca67df5fe67035d2572540e5.3","cb1b70e78b738aea39c7eeeea56ac4a0.3","cec65cf43c42624ef5c055e1be13afbc.4","aecf0cf62f8a20c8ec7721b4ac9b99c1.3","e496090d29f51e18a18189db85e85fdd.0","7bced728a03367d8598f134d3476fd75.4","61729cf129ec409e868da47fa2761e2d.5","61729cf129ec409e868da47fa2761e2d.2","e496090d29f51e18a18189db85e85fdd.1","cec65cf43c42624ef5c055e1be13afbc.3","cfb537aa2c3a8f5a13ade957d9d487b2.2","4007d3c2de8f1bc32965793f878187c5.2","e0f8ab3252abccb9db33c1b06f6cbe8a.0","9abb6770f05d81d171dfb2ec73b5d6cd.2","85205c14cde6466b2e0c149f75b3a1fc.1","aecf0cf62f8a20c8ec7721b4ac9b99c1.2","43492b349a9c55b55ebd0afd2834fba1.2","e496090d29f51e18a18189db85e85fdd.3","bcd0e0e6f09d7681ec101b72c4259dd7.0","63ee06d8d2d041afbd2024c7f5a3b9cb.2","63ee06d8d2d041afbd2024c7f5a3b9cb.1","61729cf129ec409e868da47fa2761e2d.1","854d91cb472fa43383c8472e29960953.2","7bced728a03367d8598f134d3476fd75.0","3bec197e0c392b3cbffc3609758d6249.3","a4ef988e89192b823aa6c0d0878d8460.3","aecf0cf62f8a20c8ec7721b4ac9b99c1.0","61729cf129ec409e868da47fa2761e2d.0","90b4e7aa7c29700869e89bb2267207e9.3","21d02c1559b89f16a9130cea76949aee.2","83592cad3f115cc1d6535222c1cafa43.4","ded31705c6da8e23fb3d251640db1d4e.1","7bced728a03367d8598f134d3476fd75.1","a4ef988e89192b823aa6c0d0878d8460.
21","76af6d6c4461eccf69891d2913d7fa8c.2","cec65cf43c42624ef5c055e1be13afbc.1","aecf0cf62f8a20c8ec7721b4ac9b99c1.1","85205c14cde6466b2e0c149f75b3a1fc.0","e0f8ab3252abccb9db33c1b06f6cbe8a.1","bcd0e0e6f09d7681ec101b72c4259dd7.1","cb1b70e78b738aea39c7eeeea56ac4a0.2","cfb537aa2c3a8f5a13ade957d9d487b2.3","b9b0e352d24826818b3b7f1ec4544fdc.0","9abb6770f05d81d171dfb2ec73b5d6cd.1","4ac39285576562813ecbfeae85e4ced7.0","61729cf129ec409e868da47fa2761e2d.4","4007d3c2de8f1bc32965793f878187c5.1","e0f8ab3252abccb9db33c1b06f6cbe8a.3","83592cad3f115cc1d6535222c1cafa43.5","4ac39285576562813ecbfeae85e4ced7.2","e0f8ab3252abccb9db33c1b06f6cbe8a.4","571ec553ca67df5fe67035d2572540e5.6","b96bfb012f9493946df4326785fb74b7.0","ded31705c6da8e23fb3d251640db1d4e.2","b9b0e352d24826818b3b7f1ec4544fdc.2","e496090d29f51e18a18189db85e85fdd.4","a4ef988e89192b823aa6c0d0878d8460.0","43492b349a9c55b55ebd0afd2834fba1.1","7bced728a03367d8598f134d3476fd75.3","e496090d29f51e18a18189db85e85fdd.2","b96bfb012f9493946df4326785fb74b7.1","cfb537aa2c3a8f5a13ade957d9d487b2.0","fab0c216b4f71ae9ead293f005e180fc.4","61729cf129ec409e868da47fa2761e2d.3","7bced728a03367d8598f134d3476fd75.2","cb1b70e78b738aea39c7eeeea56ac4a0.1"],incorrect_question_ids:[]}}};e.exports=e=>{if(!/localhost|\.artgorbunov|\.bureau/.test(window.location.hostname))return e;let s={};const i=window.location.search.replace("?","");return Object.keys(t).forEach(e=>{var a;i===e&&(a=t[e],s=JSON.parse(JSON.stringify(a)))}),{...e,...s}}},34385:function(e,t,s){"use strict";var i=s(86019);const a=s(66391),{formatNumber:o}=s(73345),n="is__revealed is__exposed";i.translations.ru.schoolTrainingTest={questionResults:{one:"Вы правильно ответили<br>на <b>%{count}</b> вопрос из <b>%{total}</b>.",few:"Вы правильно ответили<br>на <b>%{count}</b> вопроса из <b>%{total}</b>.",many:"Вы правильно ответили<br>на <b>%{count}</b> вопросов из <b>%{total}</b>.",other:"Вы правильно ответили<br>на <b>%{count}</b> вопросов из <b>%{total}</b>."},flawlessVictory:"Вы правильно ответили на все вопросы. От души поздравляем<br> и желаем вам дальнейших успехов в школе!"};class r{constructor(e){this.MAX_QUESTION_SCORE=1.5,this.$el=e,this.$submit=this.$el.find(".js__check"),this.$reset=this.$el.find(".js__reset"),this.$results=this.$el.find(".js__results p"),this.id=this.$el.data("id"),this.state=window.application.state,this.correctCounter=0,this.questions=[],this._fillInQuestions(),this._init(),this._bindEvents()}check(){this.isDone&&(this.$results.html(this._formattedResults()),this.$el.addClass(n),this.questions.forEach(e=>e.lock()))}reset(){this.$el.removeClass(n),this.questions.forEach(e=>e.reset()),this._toggleSubmit(),this._scrollToTop()}get isDone(){return this.questions.every(e=>e.isDone)}get score(){return this.questions.reduce((e,t)=>e+t.score,0)}get fullScore(){return this.questions.length*this.MAX_QUESTION_SCORE}_fillInQuestions(){this.$el.find(".js__question").each((e,t)=>{this.questions.push(new a($(t),this))})}_bindEvents(){this.$submit.on("click",this.check.bind(this)),this.$reset.on("click",this.reset.bind(this)),this.$el.on("answerChecked",this._toggleSubmit.bind(this))}_init(){this.questions.forEach(e=>e.init()),this.check()}_toggleSubmit(){this.$submit.attr("disabled",!this.isDone)}_scrollToTop(){$("html, body").animate({scrollTop:0},300)}_formattedResults(){const e=this.questions.filter(e=>e.isCorrect).length,t=this.questions.length;return t===e?this._formatFlawlessVictory():((e,t)=>i.t("schoolTrainingTest.questionResults",{count:e,total:t}))(e,t)}_formatFlawlessVictory(){return e=this.score,i.t("schoolTrainingTest.flawlessVictory",{score:o(e)});var e}}$(".js__schoolTest.is__training").each(function(){new r($(this))})},75271:function(e){"use strict";const t="is__highlightMark";e.exports=e=>{e.preventDefault();const s=e.target.href.split("#").pop(),i=document.getElementById(s);i&&($(`.question.${t}`).removeClass(t),$(i).addClass(t).trigger("appHighlight"),i.scrollIntoView())}},67269:function(e,t,s){"use strict";var i=s(24994);
2Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=s(76148),o=i(s(32485));class n extends a.Component{constructor(e){super(e),this.state={hitLeftBoundary:!0,hitRightBoundary:!1},this.scrollLeft=this.scrollLeft.bind(this),this.scrollRight=this.scrollRight.bind(this),this.checkScrollBoundaries=this.checkScrollBoundaries.bind(this),$(document).on("appResize",this.checkScrollBoundaries)}componentDidMount(){this.checkScrollBoundaries()}scrollLeft(){this.checkScrollBoundaries(),this.scrollShaftBy(-this.scrollStep)}scrollRight(){this.checkScrollBoundaries(),this.scrollShaftBy(this.scrollStep)}checkScrollBoundaries(){const e=this.shaftEl,t=!e||0===e.scrollLeft,s=e.scrollWidth-(e.scrollLeft+e.offsetWidth)<5;return this.setState({hitLeftBoundary:t,hitRightBoundary:s})}scrollShaftBy(e){$(this.shaftEl).animate({scrollLeft:this.shaftEl.scrollLeft+e})}get scrollStep(){return 300}render(e){const t=(0,o.default)("scrollingSelector-overflow","module",{has__hitLeftBoundary:this.state.hitLeftBoundary,has__hitRightBoundary:this.state.hitRightBoundary});return(0,a.h)("div",{className:`scrollingSelector-wrapper module ${e.className||""}`},(0,a.h)("div",{className:t},(0,a.h)("span",{className:"scrollingSelector-prevButton",onClick:this.scrollLeft},"←"),(0,a.h)("span",{className:"scrollingSelector-nextButton",onClick:this.scrollRight},"→"),(0,a.h)("div",{className:"scrollingSelector-shaft",ref:e=>this.shaftEl=e,onScroll:this.checkScrollBoundaries},(0,a.h)("div",{className:"scrollingSelector"},e.children))))}}t.default=n},36190:function(){"use strict";{const e="is__active";class t{constructor(e){this.$el=e,this.selectorGroup=this.$el.data("selector-group"),this.$selectorControls=this.$el.find(".js__selectorControl"),this.$selectorItems=$(".js__selectorItem").filter(`[data-selector-group=${this.selectorGroup}]`),this.selectorControlsIds=this.$selectorControls.map((e,t)=>$(t).data("selector-id")).get(),this.selectorItemsIds=this.$selectorItems.map((e,t)=>$(t).data("selector-id")).get(),this.currentId=this.selectorControlsIds[0],this.setActivePair(),this.bindEvents()}bindEvents(){this.$selectorControls.click(e=>{this.currentId=$(e.target).data("selector-id"),this.setActivePair(),e.preventDefault()}),this.$selectorItems.click(e=>{let t=(this.selectorItemsIds.indexOf(this.currentId)+1)%this.selectorItemsIds.length;this.currentId=this.selectorItemsIds[t],this.setActivePair(),e.preventDefault()})}setActivePair(){this.$selectorControls.add(this.$selectorItems).removeClass(e).filter(`[data-selector-id=${this.currentId}]`).addClass(e)}}$(".js__selector").each(function(){new t($(this))})}},39572:function(e,t,s){"use strict";var i=s(24994);Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"SlideInLayer",{enumerable:!0,get:function(){return a.default}});var a=i(s(35753))},35753:function(e,t,s){"use strict";var i=s(24994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=s(76148),o=i(s(32485));class n extends a.Component{static ANIMATION_DURATION=400;constructor(e){super(e),this.onOverlayClick=this.onOverlayClick.bind(this),this.onEscape=this.onEscape.bind(this)}componentDidMount(){this.setEventListener()}onOverlayClick(e){e.target===this.$overlayBg&&(e.preventDefault(),this.props.setHidden())}setEventListener(){$(document).on("keydown",this.onEscape)}onEscape({keyCode:e}){27===e&&this.props.setHidden()}render(e){const t=(0,o.default)("slideInLayer",e.className);return(0,a.h)("div",{className:t},(0,a.h)("div",{className:"slideInLayer-box"},e.children),(0,a.h)("div",{className:"slideInLayer-overlay"},(0,a.h)("div",{className:"slideInLayer-bgClickHandler",onMouseDown:this.onOverlayClick,onTouchStart:this.onOverlayClick,ref:e=>this.$overlayBg=e})))}}t.default=n},47733:function(e,t,s){"use strict";var i=s(24994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=s(76148),o=i(s(32485)),n=s(45169);const r=({baseClass:e,Icon:t,iconMode:s})=>{const i=(0,o.default)(`${e}-icon`,"socialSpacer-icon",{socialSpacerIcon__monoPath:"monoPath"===s,socialSpacerIcon__dualLayers:"dualLayers"===s||"dualLayersInvertedCompact"===s,socialSpacerIcon__dualLayersInvertedCompact:"dualLayersInvertedCompact"===s});return(0,a.h)("div",{className:i},(0,a.h)(t,null))},l=({className:e,config:t})=>{const{baseClass:s,url:i,title:l,compactDescription:c,compactHandle:d,buttonLabel:h,Icon:u,iconMode:p,iconSizeMode:m}=t,f=(0,o.default)(s,"socialSpacer",{socialSpacerSize__largeFullIcon:"largeFull"===m},"module","banner-debug",e);return(0,a.h)("div",{className:f},(0,a.h)(n.Heading3,null,(0,a.h)(r,{baseClass:s,Icon:u,iconMode:p}),l),(0,a.h)(n.TextNode,null,c),(0,a.h)("div",{className:`${s}-cols socialSpacer-cols`},d&&(0,a.h)("div",{className:`${s}-left socialSpacer-left`},(0,a.h)(n.TextNode,{className:`${s}-name socialSpacer-name`},(0,a.h)("a",{className:d.linkClassName,href:d.href},d.label))),(0,a.h)("div",{className:`${s}-buttonWrapper socialSpacer-buttonWrapper`},(0,a.h)("a",{href:i,className:`button ${s}-button socialSpacer-button`},h))))},c=({className:e,config:t})=>{const{baseClass:s,url:i,title:n,fullUndertitle:c,Icon:d,iconMode:h,iconSizeMode:u}=t,p=(0,o.default)(s,"socialSpacer",{socialSpacerSize__largeFullIcon:"largeFull"===u},"module","device","device__laptop","device__desktop","banner-debug",e);return(0,a.h)("div",null,(0,a.h)("a",{href:i,className:p},(0,a.h)(r,{baseClass:s,Icon:d,iconMode:h}),(0,a.h)("div",{className:`${s}-titleWrapper socialSpacer-titleWrapper`},(0,a.h)("div",{className:`${s}-title socialSpacer-title`},n)),(0,a.h)("div",{className:`${s}-undertitle socialSpacer-undertitle`},c)),(0,a.h)(l,{className:`${e} device device__mobile`,config:t}))};t.default=e=>function(t={}){const s="half"===t.size,i="full"===t.size,n=(0,o.default)({is__half:s,is__full:i});return i?(0,a.h)(c,{className:n,config:e}):(0,a.h)(l,{className:n,config:e})}},85702:function(e,t){"use strict";
2Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,t.default=(e,t,s=!0)=>{$(e).each(function(){$(this).reactify(t,$(this).data()),s&&$(this).children().unwrap()})}},96563:function(e,t,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=s(76148),a=s(45169),o=s(39725),n=s(55631),r=s(35988),l=s(79118),c=s(93058);const d="Новости, свежие советы, лекции, анонсы курсов, наборов в школы, книг и проектов",h="Новости, советы, курсы, лекции, школы, книги и проекты: ",u={zen:{baseClass:"zenSpacer",title:"Дзен бюро",url:"https://dzen.ru/bureau",compactDescription:d,compactHandle:{href:"https://dzen.ru/bureau",label:"bureau",linkClassName:"novisited"},buttonLabel:"Присоединиться",fullUndertitle:(0,i.h)(a.TextNode,null,h,(0,i.h)("span",{className:"link"},"bureau")),iconMode:"monoPath",Icon:c.ZenIcon},max:{baseClass:"maxSpacer",title:"Бюро в Максе",url:"https://max.ru/channel_bureau",compactDescription:d,compactHandle:null,buttonLabel:"Присоединиться",fullUndertitle:(0,i.h)(a.TextNode,null,"Новости, советы, курсы, лекции, школы, книги и проекты","  ",(0,i.h)("span",{className:"linkWithArrow is__inline"},(0,i.h)("span",{className:"linkWithArrow-text"},"Присоединиться"),(0,i.h)("span",{className:"linkWithArrow-arrow"},"❱"))),iconMode:"monoPath",Icon:o.MaxIcon},youtube:{baseClass:"youtubeSpacer",title:"Ютуб бюро",url:"https://www.youtube.com/bureaugorbunov",compactDescription:"Видеосоветы, лекции, вебинары, разборы, анонсы курсов, книг и наборов в школы",compactHandle:{href:"https://www.youtube.com/bureaugorbunov",label:"bureaugorbunov"},buttonLabel:"Подписаться",fullUndertitle:(0,i.h)(a.TextNode,null,"Видеосоветы, лекции, вебинары, разборы, анонсы",(0,i.h)("span",{className:"device laptop"},": "),(0,i.h)("span",{className:"device desktop"}," курсов, книг и наборов в школы: "),(0,i.h)("span",{className:"link"},"bureaugorbunov")),iconMode:"dualLayers",iconSizeMode:"largeFull",Icon:l.YoutubeIcon},telegram:{baseClass:"telegramSpacer",title:"Телеграм бюро",url:"tg://resolve?domain=bureaugorbunov",compactDescription:d,compactHandle:{href:"tg://resolve?domain=bureaugorbunov",label:"@bureaugorbunov"},buttonLabel:"Присоединиться",fullUndertitle:(0,i.h)(a.TextNode,null,h,(0,i.h)("span",{className:"link"},"@bureaugorbunov")),iconMode:"dualLayers",iconSizeMode:"largeFull",Icon:n.TelegramInCircleIcon},vk:{baseClass:"vkSpacer",title:"Вконтакте бюро",url:"https://vk.com/burosfera",compactDescription:d,compactHandle:{href:"https://vk.com/burosfera",label:"burosfera"},buttonLabel:"Вступить",fullUndertitle:(0,i.h)(a.TextNode,null,h,(0,i.h)("span",{className:"link"},"burosfera")),iconMode:"dualLayers",iconSizeMode:"largeFull",Icon:r.VkIcon}};t.default=u},89604:function(e,t,s){"use strict";var i=s(24994);Object.defineProperty(t,"__esModule",{value:!0}),t.fetchSovietFiles=function(e){return fetch(`/pages/soviet/${e}/index_draft/files`,{method:"GET",headers:a.default}).then(e=>e.json())};var a=i(s(87021))},69096:function(e){"use strict";const t={headerTemplate:"default",isTitleHidden:!1,titleSize:"",isQuestionHidden:!1,questionStyle:"default",hasQuestionCols:!1,headerTemplateRequiresImage:!1,questionMinimumLines:null,isHangingTitle:!1};e.exports={headerTemplate1:{...t,titleSize:"large",isQuestionHidden:!0},headerTemplate21:{...t,titleSize:"large"},headerTemplate2:{...t,headerTemplate:"center",titleSize:"largest",isQuestionHidden:!0},headerTemplate3:{...t,headerTemplate:"center",titleSize:"largest",questionStyle:"sans"},headerTemplate4:{...t,headerTemplate:"center",titleSize:"largest",hasQuestionCols:!0,questionMinimumLines:"five"},headerTemplate5:{...t,headerTemplate:"leftWide",hasQuestionCols:!0,questionMinimumLines:"five"},headerTemplate6:{...t,headerTemplate:"leftNarrow",questionMinimumLines:"three"},headerTemplate7:{...t,questionMinimumLines:"three"},headerTemplate8:{...t,titleSize:"large",questionStyle:"large",questionMinimumLines:"two"},headerTemplate9:{...t,headerTemplate:"leftHalfPage",titleSize:"large",questionMinimumLines:"five",isHangingTitle:!0},headerTemplate10:{...t,isTitleHidden:!0,questionStyle:"large",questionMinimumLines:"three"},headerTemplate11:{...t,headerTemplate:"leftWide",isTitleHidden:!0,hasQuestionCols:!0,questionMinimumLines:"five"},headerTemplate12:{...t,titleSize:"large",isQuestionHidden:!0,headerTemplateRequiresImage:!0,questionMinimumLines:"three"},headerTemplate13:{...t,headerTemplate:"leftWide",headerTemplateRequiresImage:!0,titleSize:"large",questionMinimumLines:"three"},headerTemplate19:{...t,headerTemplate:"leftHalfPage",headerTemplateRequiresImage:!0,titleSize:"large",questionMinimumLines:"five",isHangingTitle:!0},headerTemplate20:{...t,headerTemplate:"leftNarrowWithTitleTemplate",headerTemplateRequiresImage:!0,questionMinimumLines:"five",hasQuestionCols:!0,isHangingTitle:!0},headerTemplate17:{...t,isTitleHidden:!0,questionStyle:"sans",headerTemplateRequiresImage:!0,questionMinimumLines:"three"},headerTemplate18:{...t,headerTemplate:"leftWide",isTitleHidden:!0,hasQuestionCols:!0,headerTemplateRequiresImage:!0,questionMinimumLines:"five"},headerTemplate22:{...t,headerTemplate:"imageLeft",headerTemplateRequiresImage:!0,titleSize:"largest",isQuestionHidden:!0},headerTemplate15:{...t,headerTemplate:"imageLeft",headerTemplateRequiresImage:!0,questionMinimumLines:"three"},headerTemplate23:{...t,headerTemplate:"imageLeft",headerTemplateRequiresImage:!0,isTitleHidden:!0,questionStyle:"heading",questionMinimumLines:"five"},headerTemplate26:{...t,headerTemplate:"imageLeft",headerTemplateRequiresImage:!0,isTitleHidden:!0,questionMinimumLines:"five"},headerTemplate24:{...t,headerTemplate:"imageRight",headerTemplateRequiresImage:!0,titleSize:"largest",isQuestionHidden:!0},headerTemplate14:{...t,headerTemplate:"imageRight",headerTemplateRequiresImage:!0,questionMinimumLines:"three"},headerTemplate25:{...t,headerTemplate:"imageRight",headerTemplateRequiresImage:!0,isTitleHidden:!0,questionStyle:"heading",questionMinimumLines:"five"},headerTemplate27:{...t,headerTemplate:"imageRight",headerTemplateRequiresImage:!0,isTitleHidden:!0,questionMinimumLines:"five"},headerTemplate28:{...t,headerTemplate:"imageLeftNarrow",titleSize:"largest",isQuestionHidden:!0,headerTemplateRequiresImage:!0},headerTemplate29:{...t,headerTemplate:"imageLeftNarrow",headerTemplateRequiresImage:!0,questionMinimumLines:"five"},headerTemplate30:{...t,headerTemplate:"imageRightNarrowWithTitle",titleSize:"largest",isQuestionHidden:!0,headerTemplateRequiresImage:!0},headerTemplate16:{...t,headerTemplate:"imageRightNarrow",headerTemplateRequiresImage:!0,questionMinimumLines:"three"}}},58157:function(e,t,s){"use strict";var i=s(24994);
2Object.defineProperty(t,"__esModule",{value:!0}),t.saveDraftWithDebounce=t.saveDraftInstantly=t.saveDraftAnd=t.createSovietDraftAutosave=void 0;var a=i(s(75719)),o=i(s(87021)),n=i(s(99731)),r=s(33876);const l=({soviet:e})=>({sovietId:e.id,answer_new_draft:e.text,questioner_name:e.questionerName,questioner_email:e.questionerEmail,publish_at:e.publishAt,tags:e.tags,meta_draft:{title:e.title,main_think:e.mainThink,question:e.question,header_text_color:e.headerTextColor,header_template:e.selectedHeaderTemplate,author:e.authorName,important:e.isImportant,lecture:e.isLecture,kicker:e.kicker||(0,r.defaultKicker)(e.authorGenitiveName)}}),c=(e,t={})=>{const s={...l(e),...t};return fetch(`/soviet/advices/${s.sovietId}`,{method:"PUT",headers:o.default,body:JSON.stringify(s)})};t.saveDraftInstantly=c;const d=JSON.parse,h=JSON.stringify,u=({value:e,...t})=>c(d(e),t);t.saveDraftWithDebounce=(0,a.default)(300,c),t.saveDraftAnd=({context:e})=>{const{store:t}=e;return t.sovietDraftAutosave?t.sovietDraftAutosave.flush():c(t.getState())},t.createSovietDraftAutosave=({initialState:e,serverRevision:t,storageKey:s,onConflict:i=()=>window.location.reload()})=>{const o=new n.default({storageKey:s,initialValue:h(e),serverRevision:t,flush:u,onServerValue:i,valueFromResponse:t=>h(t.draft||e)}),r=d(o.value),c=(0,a.default)(300,()=>o.flush());let p=h(l(r));const m={initialState:r,connect(e){e.sovietDraftAutosave=m,e.subscribe(()=>(e=>{const t=h(l(e));t!==p&&(p=t,o.update(h(e)),c())})(e.getState())),o.hasRestoredValue&&o.flush()},flush(){return o.flush().then(e=>o.hasUnsavedChanges||e&&e.conflict?Promise.reject():e)}};return m}},18699:function(e,t,s){"use strict";var i=s(24994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=s(76148),o=s(70753),n=i(s(32485)),r=s(27384),l=i(s(23528)),c=i(s(35613)),d=i(s(91652)),h=i(s(17584)),u=i(s(38760)),p=i(s(29792)),m=i(s(47186)),f=i(s(75620)),v=i(s(97185)),g=i(s(79660)),b=i(s(26106)),_=i(s(69972)),y=i(s(77800)),S=i(s(19078)),w=i(s(89272)),C=i(s(62396)),k=s(76604);class T extends a.Component{constructor(e){super(e)}get wrapperClasses(){return(0,n.default)("sovietEditor",{is__preview:this.props.isPreview,is__editor:this.props.isEditor,is__broken:this.props.isBroken,is__unicorn:this.props.isUnicorn,is__filesPanelVisible:this.props.isFilesPanelVisible})}get editorStyles(){return`:root {\n      --keyColor: ${this.props.keyColor};\n      --keyUnderlineColor: ${this.props.keyUnderlineColor};\n      --linkColor: ${this.props.keyColor};\n      --linkVisitedColor: ${this.props.keyColor};\n      --linkUnderlineColor: ${this.props.keyUnderlineColor};\n      --linkVisitedUnderlineColor: ${this.props.keyUnderlineColor};\n      --focusColor: ${this.props.textColor};\n      --sovietHeaderBackground: ${this.props.bgColor};\n    }`}render(e){return(0,a.h)("div",{className:this.wrapperClasses},(0,a.h)("style",null,this.editorStyles),(0,a.h)(l.default,null),!e.isEditor&&(0,a.h)(r.Cols,{className:"sovietUndersplash",transposeOnMobile:"true",divisionProportions:"6:10"},(0,a.h)(c.default,e),(0,a.h)("div",{className:"module device device__laptop device__desktop"},(0,a.h)(d.default,{isImpressionsDisabled:!e.isUnicorn,isDisabled:e.isPreview||!e.isUnicorn&&e.isBroken}))),e.isEditor&&(0,a.h)("div",{className:"sovietUndersplash"},(0,a.h)(r.Cols,{className:"sovietUndersplash-fieldset"},(0,a.h)("div",{className:"module sovietUndersplash-left"},(0,a.h)(v.default,null),(0,a.h)(g.default,null),(0,a.h)(b.default,null)),(0,a.h)("div",{className:"module sovietUndersplash-right  device device__laptop device__desktop"},(0,a.h)(_.default,null),(0,a.h)(y.default,null))),(0,a.h)("div",{className:"sovietUndersplash-fieldset"},(0,a.h)(S.default,null)),(0,a.h)(C.default,null)),e.isEditor&&(0,a.h)(h.default,null),e.isEditor&&(0,a.h)(w.default,null),(0,a.h)("div",{className:"sovietButtonsDeck"},e.isEditor&&(0,a.h)(u.default,{filesCount:(this.props.files||[]).length,toggleFilesPanelVisibility:this.props.toggleFilesPanelVisibility}),(e.isEditor||e.isPreview)&&(0,a.h)(f.default,null)),e.isEditor&&(0,a.h)(p.default,null),e.isEditor&&(0,a.h)(m.default,null))}}const N={toggleFilesPanelVisibility:k.toggleFilesPanelVisibility};t.default=(0,o.connect)(({soviet:e})=>({id:e.id,isPreview:e.isPreview,isEditor:e.isEditor,isUnicorn:e.isUnicorn,isBroken:e.isBroken,isPublished:e.isPublished,isFilesPanelVisible:e.isFilesPanelVisible,authorAvatarUrl:e.authorAvatarUrl,authorArchiveUrl:e.authorArchiveUrl,authorName:e.authorName,authorGenitiveName:e.authorGenitiveName,authorCaption:e.authorCaption,keyColor:e.keyColor,keyUnderlineColor:e.keyUnderlineColor,bgColor:e.bgColor,files:e.files,url:e.url}),N)(T)},37172:function(e,t,s){"use strict";
2var i=s(24994),a=s(76148),o=s(70753),n=i(s(18699)),r=s(3988),l=s(72822),c=i(s(69096));{const e=e=>(0,a.h)(o.Provider,{store:(0,l.createStore)(e)},(0,a.h)(n.default,null));$(".js__soviet").each(function(){const t=(0,r.mergeState)(l.DEFAULT_STATE,window.soviet||{}),s=c.default[t.forcedHeaderTemplate]||{},i=(0,r.mergeState)(t,s),a=$(this);a.empty(),a.reactify(e,i)})}},76604:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.setAuthor=function(e){return{type:"SET_AUTHOR",...e}},t.setCanPublish=function(e){return{type:"SET_CAN_PUBLISH",canPublish:e}},t.setFiles=function(e){return{type:"SET_FILES",files:e}},t.setFilesAndOpenFilesPanel=function(e){return{type:"SET_FILES_AND_OPEN_FILES_PANEL",files:e}},t.setFilesUploadError=function(){return{type:"SET_FILES_UPLOAD_ERROR"}},t.setHasPublicationApprovalError=function(){return{type:"SET_HAS_PUBLICATION_APPROVAL_ERROR"}},t.setHeaderImage=function(e,t){return{type:"SET_HEADER_IMAGE",headerImageUrl:e,headerImageSize:t}},t.setHeaderImageToNone=function(){return{type:"SET_HEADER_IMAGE_TO_NONE"}},t.setHeaderImageUploadError=function(){return{type:"SET_HEADER_IMAGE_UPLOAD_ERROR"}},t.setHeaderTemplate=function(e){return{type:"SET_HEADER_TEMPLATE",...e}},t.setHeaderTextColor=function(e){return{type:"SET_HEADER_TEXT_COLOR",headerTextColor:e}},t.setIsProcessing=function(){return{type:"SET_IS_PROCESSING"}},t.setIsPublicationApproved=function(e){return{type:"SET_PUBLICATION_APPROVED",isPublicationApproved:e}},t.setKicker=function(e){return{type:"SET_KICKER",kicker:e}},t.setMainThink=function(e){return{type:"SET_MAIN_THINK",mainThink:e}},t.setPublishAt=function(e){return{type:"SET_PUBLISH_AT",publishAt:new Date(e).toISOString()}},t.setQuestion=function(e){return{type:"SET_QUESTION",question:e}},t.setQuestionerName=function(e){return{type:"SET_QUESTIONER_NAME",questionerName:e}},t.setSovietText=function(e){return{type:"SET_SOVIET_TEXT",text:e}},t.setTags=function(e){return{type:"SET_TAGS",tags:e}},t.setTitle=function(e){return{type:"SET_TITLE",title:e}},t.setType=function({isImportant:e,isLecture:t}){return{type:"SET_TYPE",isImportant:e,isLecture:t}},t.toggleFilesPanelVisibility=function(){return{type:"TOGGLE_FILES_PANEL_VISIBILITY"}}},97185:function(e,t,s){"use strict";var i=s(24994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=s(76148),o=s(70753),n=i(s(32485)),r=s(67697),l=i(s(92566)),c=s(76604);const d=e=>e.includes(".")?e:e.split(" ")[1]||e;class h extends r.ExtendableDropdown{constructor(e){super(e),this.wrapperClassName="sovietAuthorSelector",this.setAuthor=this.setAuthor.bind(this)}setAuthor(e,t){e.preventDefault(),e.stopPropagation(),this.props.setAuthor({authorName:t,authorGenitiveName:l.default[t].authorGenitiveName,authorAvatarUrl:l.default[t].authorAvatarUrl,authorArchiveUrl:l.default[t].authorArchiveUrl,authorCaption:l.default[t].authorCaption,authorTemplate:l.default[t].authorTemplate,keyColor:l.default[t].keyColor,keyUnderlineColor:l.default[t].keyUnderlineColor,bgColor:l.default[t].bgColor}),this.hide()}get currentItem(){const{authorName:e}=this.props,t={backgroundImage:`url(${l.default[e].authorAvatarUrl})`};return(0,a.h)("div",{className:"sovietAuthorSelector-current",style:t},d(e))}get dropdownItems(){return Object.keys(l.default).filter(e=>l.default[e].weekDay.length).map(e=>{const t=(0,n.default)("dropdown-item",{is__active:this.props.authorName===e});return(0,a.h)("div",{className:t,onClick:t=>this.setAuthor(t,e)},d(e))})}}const u={setAuthor:c.setAuthor};t.default=(0,o.connect)(({soviet:e})=>({authorName:e.authorName}),u)(h)},432:function(e,t,s){"use strict";var i=s(24994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=s(76148),o=i(s(94634)),n=s(70753),r=i(s(32485)),l=s(76604),c=i(s(54915)),d=s(73345),h=s(63229),u=s(58157),p=i(s(87021));const m=({children:e,...t})=>{const s=(0,r.default)("sovietCalendarPopupContainer-dropdownItem","dropdown-item",{is__disabled:t.disabled});return(0,a.h)("div",{className:s},(0,a.h)("button",(0,o.default)({className:"button is__noBorder is__thin"},t),e))};class f extends a.Component{constructor(e){super(e),this.publishSoviet=this.publishSoviet.bind(this),this.previewSoviet=this.previewSoviet.bind(this),this.redirectToPublishedSoviet=this.redirectToPublishedSoviet.bind(this),this.unpublishSoviet=this.unpublishSoviet.bind(this),this.preventParentBlur=this.preventParentBlur.bind(this),this.afterClick=this.afterClick.bind(this)}
2publishSoviet(){this.sendPublicationApprovalRequest("PUT").then(e=>{e.ok?e.json().then(this.redirectToPublishedSoviet).catch(this.props.setHasPublicationApprovalError):this.props.setHasPublicationApprovalError()}).catch(this.props.setHasPublicationApprovalError)}unpublishSoviet(){this.sendPublicationApprovalRequest("DELETE").then(e=>{204===e.status?this.props.setIsPublicationApproved(!1):this.props.setHasPublicationApprovalError()}).catch(this.props.setHasPublicationApprovalError)}previewSoviet(){this.props.setIsProcessing(),(0,u.saveDraftAnd)({context:this.context}).then(()=>window.location=`/soviet/${this.props.slug}/preview/`)}sendPublicationApprovalRequest(e){return this.props.canPublish?(this.props.setIsProcessing(),"DELETE"===e?this.fetchPublicationApproval(e):(0,u.saveDraftAnd)({context:this.context}).then(()=>this.fetchPublicationApproval(e))):Promise.reject()}fetchPublicationApproval(e){return fetch(this.publicationApprovalUrl,{method:e,headers:p.default,credentials:"include"})}get publicationApprovalUrl(){return`/soviet/advices/${this.props.sovietId}/publication_approval`}get calendarHeading(){if(this.props.publishAt){const e=(0,h.moscowifyLocal)((0,h.datify)(this.props.publishAt)),t=(0,d.birmanize)(e,{format:"dateYearOnly"});return this.props.hasPublishDateError?`Дата занята: ${t}`:`Дата публикации: ${t}`}return"Дата публикации"}redirectToPublishedSoviet(e){window.location=`/soviet/${e.slug}/`}preventParentBlur(e){e.preventDefault()}afterClick(){this.props.afterClick&&this.props.afterClick()}render(e){const{isVerbose:t=!1}=this.props,s="Посмотреть "+(t?"совет":""),i=e.isPreview?"Опубликовать":s,o=e.isPublicationApproved?"Снять с публикации":"Не опубликован",n=e.isPreview?this.publishSoviet:this.previewSoviet,l=(0,r.default)("sovietCalendarPopupContainer",{has__error:e.hasPublishDateError});return(0,a.h)("div",{className:l,onClick:this.afterClick},(0,a.h)(c.default,{heading:this.calendarHeading}),(0,a.h)(m,{onClick:n,onMouseDown:this.preventParentBlur,disabled:e.isPublishingOrUnpublishing},i),(0,a.h)(m,{onClick:this.unpublishSoviet,onMouseDown:this.preventParentBlur,disabled:e.isPublishingOrUnpublishing||!e.isPublicationApproved},o))}}const v={setIsProcessing:l.setIsProcessing,setHasPublicationApprovalError:l.setHasPublicationApprovalError,setIsPublicationApproved:l.setIsPublicationApproved};t.default=(0,n.connect)(({soviet:e})=>({sovietId:e.id,slug:e.slug,isPreview:e.isPreview,canPublish:e.canPublish,isPublishingOrUnpublishing:e.isPublishingOrUnpublishing,isPublicationApproved:e.isPublicationApproved,publishAt:e.publishAt}),v)(f)},81341:function(e,t,s){"use strict";var i=s(24994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=s(76148),o=s(70753),n=i(s(32485)),r=i(s(87021)),l=s(89604),c=s(76604),d=s(66192),h=i(s(12177));class u extends a.Component{constructor(e){super(e),this.handleFileDelete=this.handleFileDelete.bind(this),this.insertFile=this.insertFile.bind(this)}handleFileDelete(){this.setState({isDeleted:!0},this.deleteFile)}deleteFile(){fetch(`/pages/soviet/${this.props.sovietId}/index_draft/files/${this.props.file.id}`,{method:"DELETE",headers:r.default}).then(e=>{e.ok?this.refreshFilesList():this.setState({isDeleted:!1})})}refreshFilesList(){(0,l.fetchSovietFiles)(this.props.sovietId).then(this.props.setFiles)}get isFileImage(){return this.props.file.width&&this.props.file.height}get imageCode(){return`+image({src: '${this.props.file.name}'})`}get fileCode(){return`a(href="${this.props.file.name}") ${this.props.file.name}`}insertFile(){const e=this.isFileImage?this.imageCode:this.fileCode;$(document).trigger("sovietInsertFile",{code:e})}render(e){const t=[e.file.width,e.file.height],s=(0,n.default)("sovietFile",{is__deleted:this.state.isDeleted});return(0,a.h)("div",{className:s},(0,a.h)("div",{className:"sovietFile-wrapper",onClick:this.insertFile},this.isFileImage&&(0,a.h)(d.Image,{src:e.file.url,size:t,style:{width:t[0]/t[1]*70+"px"}}),this.isFileImage&&(0,a.h)("div",{className:"sovietFile-hint"},e.file.name),!this.isFileImage&&(0,a.h)("div",{className:"sovietFile-placeholder"},e.file.name)),(0,a.h)(h.default,{onClick:this.handleFileDelete}))}}const p={setFiles:c.setFiles};t.default=(0,o.connect)(({soviet:e})=>({sovietId:e.id}),p)(u)},38760:function(e,t,s){"use strict";
2Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=s(76148),a=s(79538);class o extends i.Component{constructor(e){super(e),this.toggleFilesPanel=this.toggleFilesPanel.bind(this)}toggleFilesPanel(){this.props.toggleFilesPanelVisibility()}render(){return(0,i.h)("a",{className:"sovietFilesButton button",onClick:this.toggleFilesPanel},(0,i.h)(a.AttachmentIcon,null),!!this.props.filesCount&&(0,i.h)("span",{class:"sovietFilesButton-count badge"},this.props.filesCount))}}t.default=o},29792:function(e,t,s){"use strict";var i=s(24994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=s(76148),o=s(70753),n=s(89604),r=s(76604),l=s(45169),c=i(s(81341)),d=s(76924);class h extends a.Component{constructor(e){super(e),this.handleFileAttachment=this.handleFileAttachment.bind(this)}componentDidMount(){(0,n.fetchSovietFiles)(this.props.id).then(this.props.setFiles)}handleFileAttachment(e){const t=Object.values(e.target.files);$(document).trigger("appDrop.sovietFilesUpload",{files:t}),e.target.value=""}filesList(){return this.props.files&&this.props.files.length?this.props.files.map(e=>(0,a.h)(c.default,{key:e.id,file:e})):null}render(){return(0,a.h)("div",{className:"sovietFilesPanel"},(0,a.h)("div",{className:"sovietFilesPanel-shaftWrapper"},(0,a.h)("div",{className:"sovietFilesPanel-shaft"},(0,a.h)("div",{className:"sovietFilesPanel-new"},(0,a.h)(d.NewImageIcon,null),(0,a.h)("input",{type:"file",onChange:this.handleFileAttachment,multiple:"true"})),this.filesList(),(0,a.h)("div",{className:"sovietFilesPanel-buffer"}))),(0,a.h)(l.Caption,{className:"sovietFilesPanel-hint"},"Перетаскивайте файлы прямо в браузер.",(0,a.h)("br",null),"Клик в картинку добавит её код в нужное место совета."))}}const u={setFiles:r.setFiles};t.default=(0,o.connect)(({soviet:e})=>({id:e.id,files:e.files}),u)(h)},47186:function(e,t,s){"use strict";var i=s(24994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=s(76148),o=s(70753),n=i(s(40963)),r=i(s(22443)),l=s(89604),c=s(76604);class d extends a.Component{constructor(e){super(e),this.handleUploadError=this.handleUploadError.bind(this),this.dropCounter=0}componentDidMount(){const e=$(document);e.on("appDragStart.sovietFilesUpload",()=>this.setState({isDragOver:!0})),e.on("appDragEnd.sovietFilesUpload",()=>this.setState({isDragOver:!1})),e.on("appDrop.sovietFilesUpload",(e,t)=>this.handleDrop(t.files))}componentWillUnmount(){$(document).off("appDragStart.sovietFilesUpload appDragEnd.sovietFilesUpload appDrop.sovietFilesUpload")}render(){return(0,a.h)("div",{className:"sovietFilesUploader "+(this.state.isDragOver?"is__dragOver":"")},(0,a.h)(n.default,{file:this.state.uploadingFileName,loaded:this.state.uploadingFileLoaded,total:this.state.uploadingFileTotal,isActive:this.state.isUploading,isFailed:this.props.hasFilesUploadError}))}handleDrop(e){this.batchUpload(e)}batchUpload(e){e.length?this.uploadFile(e.pop()).then(()=>this.batchUpload(e)).catch(this.handleUploadError):(0,l.fetchSovietFiles)(this.props.id).then(e=>{this.setState({isUploading:!1},()=>{this.props.setFilesAndOpenFilesPanel(e)})})}uploadFile(e){this.setState({isUploading:!0,uploadingFileName:e.name,uploadingFileTotal:e.size});const t=new FormData;return t.append("file",e),new Promise((e,s)=>{$.ajax({url:`/pages/soviet/${this.props.id}/index_draft/files`,data:t,contentType:!1,processData:!1,headers:r.default,type:"POST",xhr:this.handleProgressUpdate.bind(this),success:t=>e(t),error:e=>s(e)})})}handleProgressUpdate(){const e=new window.XMLHttpRequest;return e.upload.addEventListener("progress",e=>{e.lengthComputable&&this.setState({uploadingFileLoaded:e.loaded})},!1),e}handleUploadError(){this.props.setFilesUploadError()}}const h={setFilesAndOpenFilesPanel:c.setFilesAndOpenFilesPanel,setFilesUploadError:c.setFilesUploadError};t.default=(0,o.connect)(({soviet:e})=>({id:e.id,hasFilesUploadError:e.hasFilesUploadError}),h)(d)},13129:function(e,t,s){"use strict";var i=s(24994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;
2var a=s(76148),o=s(70753),n=s(76604),r=s(66192),l=i(s(12177)),c=i(s(87021));class d extends a.Component{constructor(e){super(e),this.handleClick=this.handleClick.bind(this)}handleClick(){fetch(`/soviet/advices/${this.props.id}/header_image`,{method:"DELETE",headers:c.default}).then(e=>{e.ok&&this.props.setHeaderImageToNone()})}render(e){if(!e.headerImageUrl)return null;const t=e.questionImageUrl&&e.questionImageUrl===e.headerImageUrl;return(0,a.h)("div",{className:"sovietHeaderImage-wrapper"},(0,a.h)(r.Image,{src:e.headerImageUrl,size:e.headerImageSize,bordered:"true",className:"sovietHeaderImage"}),e.isEditor&&!t&&(0,a.h)(l.default,{onClick:this.handleClick}))}}const h={setHeaderImageToNone:n.setHeaderImageToNone};t.default=(0,o.connect)(({soviet:e})=>({id:e.id,isEditor:e.isEditor,questionImageUrl:e.questionImageUrl,headerImageUrl:e.headerImageUrl,headerImageSize:e.headerImageSize}),h)(d)},47224:function(e,t,s){"use strict";var i=s(24994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=s(76148),o=s(70753),n=i(s(13129));class r extends a.Component{constructor(e){super(e),this.handleFileAttachment=this.handleFileAttachment.bind(this)}handleFileAttachment(e){const t=[e.target.files[0]];$(document).trigger("headerImageUpload",{files:t}),e.target.value=""}render(e){return e.headerTemplateRequiresImage&&(e.isEditor||e.headerImageUrl)?e.headerImageUrl?(0,a.h)(n.default,{src:e.headerImageUrl,size:e.headerImageSize}):(0,a.h)("div",{className:"sovietHeaderImagePlaceholder module"},(0,a.h)("label",{htmlFor:"headerImageUploadPlaceholder"},(0,a.h)("span",{className:"device laptop desktop"},"Загрузите обложку или перетащите картинку сюда"),(0,a.h)("span",{className:"device mobile"},"Загрузить обложку")),(0,a.h)("input",{type:"file",id:"headerImageUploadPlaceholder",accept:"image/jpeg,image/png,image/gif",onChange:this.handleFileAttachment})):null}}t.default=(0,o.connect)(({soviet:e})=>({isEditor:e.isEditor,headerImageUrl:e.headerImageUrl,headerImageSize:e.headerImageSize,headerTemplateRequiresImage:e.headerTemplateRequiresImage}))(r)},77800:function(e,t,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=s(76148);class a extends i.Component{constructor(e){super(e),this.handleFileAttachment=this.handleFileAttachment.bind(this)}handleFileAttachment(e){const t=[e.target.files[0]];$(document).trigger("headerImageUpload",{files:t}),e.target.value=""}render(){return(0,i.h)("div",{className:"button is__thin is__medium sovietUploadButton"},(0,i.h)("input",{type:"file",id:"sovietUploadButton",accept:"image/jpeg,image/png,image/gif",onChange:this.handleFileAttachment}),(0,i.h)("label",{htmlFor:"sovietUploadButton"},"Загрузить обложку"))}}t.default=a},58679:function(e,t,s){"use strict";var i=s(24994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=s(76148),o=s(70753),n=s(76604),r=i(s(40963)),l=i(s(22443)),c=s(92445);class d extends a.Component{constructor(e){super(e),this.displayHeaderImage=this.displayHeaderImage.bind(this),this.handleUploadError=this.handleUploadError.bind(this),this.dropCounter=0}componentDidMount(){$(document).on("headerImageUpload",(e,t)=>this.handleDrop(t.files))}componentWillUnmount(){$(document).off("headerImageUpload")}render(){return(0,a.h)("div",{className:"sovietHeaderImageUploader"},(0,a.h)(r.default,{file:this.state.uploadingFileName,loaded:this.state.uploadingFileLoaded,total:this.state.uploadingFileTotal,isActive:this.state.isUploading}))}handleDrop(e){(0,c.isValidImageUpload)(e)&&this.upload(e)}upload(e){this.uploadHeaderImage(e[0]).then(this.displayHeaderImage).catch(this.handleUploadError).then(()=>this.setState({isUploading:!1}))}uploadHeaderImage(e){this.setState({isUploading:!0,uploadingFileName:e.name,uploadingFileTotal:e.size});const t=new FormData;return t.append("image",e),new Promise((e,s)=>{$.ajax({url:`/soviet/advices/${this.props.id}/header_image`,data:t,contentType:!1,processData:!1,headers:l.default,type:"PUT",xhr:this.handleProgressUpdate.bind(this),success:t=>e(t),error:e=>s(e)})})}handleProgressUpdate(){const e=new window.XMLHttpRequest;return e.upload.addEventListener("progress",e=>{e.lengthComputable&&this.setState({uploadingFileLoaded:e.loaded})},!1),e}displayHeaderImage(e){this.props.setHeaderImage(e.url,e.size)}handleUploadError(){this.props.setHeaderImageUploadError()}}const h={setHeaderImage:n.setHeaderImage,setHeaderImageUploadError:n.setHeaderImageUploadError};t.default=(0,o.connect)(({soviet:e})=>({id:e.id}),h)(d)},19529:function(e,t,s){"use strict";var i=s(24994);
2Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=s(76148),o=s(70753),n=i(s(32485)),r=s(76604),l=i(s(69096)),c=i(s(42879)),d=i(s(67269)),h=s(66275);class u extends a.Component{constructor(e){super(e)}selectorItems(){return Object.keys(l.default).map(e=>{const t={selectedHeaderTemplate:e,...l.default[e]},s=c.default[e];return(0,a.h)(h.IconSelectorItem,{className:(0,n.default)({is__active:this.props.selectedHeaderTemplate===e}),onClick:()=>this.props.setHeaderTemplate(t)},(0,a.h)(s,null))})}render(){return(0,a.h)(d.default,{className:"sovietHeaderTemplateSelector"},(0,a.h)(h.IconSelector,null,this.selectorItems()))}}const p={setHeaderTemplate:r.setHeaderTemplate};t.default=(0,o.connect)(({soviet:e})=>({selectedHeaderTemplate:e.selectedHeaderTemplate,headerTemplate:e.headerTemplate,isTitleHidden:e.isTitleHidden,titleSize:e.titleSize,isQuestionHidden:e.isQuestionHidden,questionStyle:e.questionStyle,hasQuestionCols:e.hasQuestionCols}),p)(u)},42879:function(e,t,s){"use strict";var i=s(76148);e.exports={headerTemplate1:()=>(0,i.h)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 43 43"},(0,i.h)("path",{class:"icon-title",d:"M38,15v2H5V15ZM5,22H38V20H5Zm0,5H26V25H5Z"})),headerTemplate2:()=>(0,i.h)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 43 43"},(0,i.h)("path",{class:"icon-title",d:"M38,15v2H5V15ZM5,22H38V20H5Zm6,5H32V25H11Z"})),headerTemplate3:()=>(0,i.h)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 43 43"},(0,i.h)("path",{class:"icon-title",d:"M38,14v2H5V14ZM11,21H32V19H11Z"}),(0,i.h)("path",{class:"icon-text",d:"M38,25v1H5V25ZM9,29H34V28H9Z"})),headerTemplate4:()=>(0,i.h)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 43 43"},(0,i.h)("path",{class:"icon-title",d:"M36,8v2H7V8ZM11,15H32V13H11Z"}),(0,i.h)("path",{class:"icon-text",d:"M7,19H20v1H7ZM7,29H20V28H7ZM23,19v1H36V19Zm0,7H36V25H23ZM7,23H20V22H7Zm0,9H20V31H7Zm16-9H36V22H23Zm0,6H36V28H23Zm0,3H36V31H23ZM7,26H20V25H7Zm0,9H20V34H7Zm16,0H36V34H23Z"})),headerTemplate5:()=>(0,i.h)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 43 43"},(0,i.h)("path",{class:"icon-title",d:"M38,8v2H12V8ZM12,15H32V13H12Z"}),(0,i.h)("path",{class:"icon-text",d:"M12,19H23v1H12Zm0,10H23V28H12ZM27,19v1H38V19Zm0,7H38V25H27ZM12,23H23V22H12Zm0,9H23V31H12Zm15-9H38V22H27Zm0,6H38V28H27Zm0,3H38V31H27ZM12,26H23V25H12Zm0,9H23V34H12Zm15,0h7V34H27Z"})),headerTemplate6:()=>(0,i.h)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 43 43"},(0,i.h)("path",{class:"icon-title",d:"M38,8v2H12V8ZM12,15H32V13H12Z"}),(0,i.h)("path",{class:"icon-text",d:"M38,19v1H12V19ZM12,29H38V28H12Zm0-6H38V22H12Zm0,9H38V31H12Zm0-6H38V25H12Zm0,9H30V34H12Z"})),headerTemplate7:()=>(0,i.h)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 43 43"},(0,i.h)("path",{class:"icon-title",d:"M31,8v2H5V8ZM5,15H25V13H5Z"}),(0,i.h)("path",{class:"icon-text",d:"M31,19v1H5V19ZM5,29H31V28H5Zm0-6H31V22H5Zm0,9H31V31H5Zm0-6H31V25H5Zm0,9H23V34H5Z"})),headerTemplate8:()=>(0,i.h)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 43 43"},(0,i.h)("path",{class:"icon-title",d:"M31,8v2H5V8ZM5,15H25V13H5Z"}),(0,i.h)("path",{class:"icon-text",d:"M38,19v1H5V19ZM5,29H38V28H5Zm0-6H38V22H5Zm0,9H38V31H5Zm0-6H38V25H5Zm0,9H30V34H5Z"})),headerTemplate9:()=>(0,i.h)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 43 43"},(0,i.h)("path",{class:"icon-title",d:"M19,8v2H5V8ZM5,15H19V13H5Zm0,5H15V18H5Z"}),(0,i.h)("path",{class:"icon-text",d:"M38,8V9H23V8ZM23,18H38V17H23Zm0,9H38V26H23Zm0-15H38V11H23Zm0,9H38V20H23Zm0,9H38V29H23Zm0-15H38V14H23Zm0,9H38V23H23Zm0,9H34V32H23Z"})),headerTemplate10:()=>(0,i.h)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 43 43"},(0,i.h)("path",{class:"icon-text",d:"M38,8V9H5V8ZM5,18H38V17H5Zm0,9H38V26H5ZM5,12H38V11H5Zm0,9H38V20H5Zm0,9H38V29H5ZM5,15H38V14H5Zm0,9H38V23H5Zm0,9H30V32H5Z"})),headerTemplate11:()=>(0,i.h)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 43 43"},(0,i.h)("path",{class:"icon-text",d:"M12,8H23V9H12Zm0,10H23V17H12Zm0,9H23V26H12ZM27,8V9H38V8Zm0,7H38V14H27ZM12,12H23V11H12Zm0,9H23V20H12Zm0,9H23V29H12ZM27,12H38V11H27Zm0,6H38V17H27Zm0,9H38V26H27Zm0-6H38V20H27Zm0,9H38V29H27ZM12,15H23V14H12Zm0,9H23V23H12Zm0,9H23V32H12Zm15-9H38V23H27Zm0,9h7V32H27Z"})),headerTemplate12:()=>(0,i.h)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 43 43"},(0,i.h)("path",{class:"icon-title",d:"M38,28v2H5V28ZM5,35H30V33H5Z"}),(0,i.h)("path",{class:"icon-text",d:"M38,24H5V8H38ZM6,23H37V9H6Z"})),headerTemplate13:()=>(0,i.h)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 43 43"},(0,i.h)("rect",{class:"icon-title",x:"12",y:"23",width:"26",height:"2"}),(0,i.h)("path",{class:"icon-text",d:"M5,8V19H38V8ZM37,18H6V9H37ZM12,28H38v1H12Zm0,3H38v1H12Zm0,3H30v1H12Z"})),headerTemplate14:()=>(0,i.h)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 43 43"},(0,i.h)("path",{class:"icon-title",d:"M20,8v2H5V8ZM5,15H15V13H5Z"}),(0,i.h)("path",{class:"icon-text",d:"M24,8V35H38V8ZM37,34H25V9H37ZM5,19H20v1H5Zm0,9H20v1H5Zm0-6H20v1H5Zm0,9H20v1H5Zm0-6H20v1H5Zm0,9H16v1H5Z"})),headerTemplate15:()=>(0,i.h)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 43 43"},(0,i.h)("path",{class:"icon-title",d:"M38,8v2H23V8ZM23,15H33V13H23Z"}
2),(0,i.h)("path",{class:"icon-text",d:"M5,35H19V8H5ZM6,9H18V34H6ZM38,19v1H23V19ZM23,28H38v1H23Zm0-6H38v1H23Zm0,9H38v1H23Zm0-6H38v1H23Zm0,9H34v1H23Z"})),headerTemplate16:()=>(0,i.h)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 43 43"},(0,i.h)("path",{class:"icon-title",d:"M26,8v2H5V8ZM5,15H21V13H5Z"}),(0,i.h)("path",{class:"icon-text",d:"M30,8V35h8V8Zm7,26H31V9h6ZM5,19H26v1H5Zm0,9H26v1H5Zm0,6H18v1H5ZM5,22H26v1H5Zm0,9H26v1H5Zm0-6H26v1H5Z"})),headerTemplate17:()=>(0,i.h)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 43 43"},(0,i.h)("path",{class:"icon-text",d:"M5,28H38v1H5ZM38,8V25H5V8ZM37,9H6V24H37ZM5,32H38V31H5Zm0,3H30V34H5Z"})),headerTemplate18:()=>(0,i.h)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 43 43"},(0,i.h)("path",{class:"icon-text",d:"M38,8H5V25H38ZM37,24H6V9H37ZM12,28H23v1H12Zm26,0v1H27V28ZM27,34h7v1H27ZM12,31H23v1H12Zm15,0H38v1H27ZM12,34H23v1H12Z"})),headerTemplate19:()=>(0,i.h)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 43 43"},(0,i.h)("path",{class:"icon-title",d:"M5,23H19v2H5Zm0,7H15V28H5Z"}),(0,i.h)("path",{d:"M5,8V19H38V8ZM37,18H6V9H37ZM23,23H38v1H23Zm0,3H38v1H23Zm0,3H38v1H23Zm0,3H38v1H23Zm0,3H34v1H23Z",class:"icon-text"})),headerTemplate20:()=>(0,i.h)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 43 43"},(0,i.h)("path",{class:"icon-title",d:"M5,23h7v2H5Zm0,7h7V28H5Z"}),(0,i.h)("path",{d:"M5,8V19H38V8ZM37,18H6V9H37ZM16,23h9v1H16Zm0,3h9v1H16Zm0,3h9v1H16Zm0,3h9v1H16Zm0,3h9v1H16ZM29,23h9v1H29Zm0,3h9v1H29Zm0,3h9v1H29Zm0,3h9v1H29Zm0,3h7v1H29Z",class:"icon-text"})),headerTemplate21:()=>(0,i.h)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 43 43"},(0,i.h)("path",{class:"icon-title",d:"M38,14v2H5V14ZM5,21H26V19H5Z"}),(0,i.h)("path",{d:"M38,25v1H5V25ZM5,29H30V28H5Z",class:"icon-text"})),headerTemplate22:()=>(0,i.h)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 43 43"},(0,i.h)("path",{class:"icon-text",d:"M19,35H5V8H19ZM6,34H18V9H6Z"}),(0,i.h)("path",{d:"M23,8H38v2H23Zm0,10H38v2H23Zm0-5H38v2H23Zm0,10H33v2H23Z",class:"icon-title"})),headerTemplate23:()=>(0,i.h)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 43 43"},(0,i.h)("path",{class:"icon-text",d:"M19,35H5V8H19ZM6,34H18V9H6ZM23,8H38V9H23Zm0,3H38v1H23Zm0,3H38v1H23Zm0,3H38v1H23Zm0,3H38v1H23Zm0,3H38v1H23Zm0,3H38v1H23Zm0,3H34v1H23Z"})),headerTemplate24:()=>(0,i.h)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 43 43"},(0,i.h)("path",{class:"icon-text",d:"M38,35H24V8H38ZM25,34H37V9H25Z"}),(0,i.h)("path",{d:"M5,8H20v2H5ZM5,18H20v2H5Zm0-5H20v2H5ZM5,23H15v2H5Z",class:"icon-title"})),headerTemplate25:()=>(0,i.h)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 43 43"},(0,i.h)("path",{class:"icon-text",d:"M38,35H24V8H38ZM25,34H37V9H25ZM5,8H20V9H5Zm0,3H20v1H5Zm0,3H20v1H5Zm0,3H20v1H5Zm0,3H20v1H5Zm0,3H20v1H5Zm0,3H20v1H5Zm0,3H16v1H5Z"})),headerTemplate26:()=>(0,i.h)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 43 43"},(0,i.h)("path",{class:"icon-text",d:"M19,35H5V8h14V35z M6,34h12V9H6V34z"}),(0,i.h)("path",{class:"icon-text",d:"M23,18h15v0.5H23V18z M23,20.5h15V20H23V20.5z M23,22.5h15V22H23V22.5z M23,16.5h15V16H23V16.5z M23,14.5h15V14 H23V14.5z M23,8v0.5h15V8H23z M23,10.5h15V10H23V10.5z M23,12.5h15V12H23V12.5z M23,34.5h11V34H23V34.5z M23,24.5h15V24H23V24.5z M23,26.5h15V26H23V26.5z M23,28.5h15V28H23V28.5z M23,30.5h15V30H23V30.5z M23,32.5h15V32H23V32.5z"})),headerTemplate27:()=>(0,i.h)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 43 43"},(0,i.h)("path",{class:"icon-text",d:"M38,35H24V8h14V35z M25,34h12V9H25V34z"}),(0,i.h)("path",{class:"icon-text",d:"M5,18h15v0.5H5V18z M5,20.5h15V20H5V20.5z M5,22.5h15V22H5V22.5z M5,16.5h15V16H5V16.5z M5,14.5h15V14H5V14.5z M5,8v0.5h15V8H5z M5,10.5h15V10H5V10.5z M5,12.5h15V12H5V12.5z M5,34.5h11V34H5V34.5z M5,24.5h15V24H5V24.5z M5,26.5h15V26H5V26.5z M5,28.5h15V28H5V28.5z M5,30.5h15V30H5V30.5z M5,32.5h15V32H5V32.5z"})),headerTemplate28:()=>(0,i.h)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 43 43"},(0,i.h)("path",{class:"icon-text",d:"M5 8V35H13V8H5ZM12 34H6V9H12V34Z"}),(0,i.h)("path",{class:"icon-title",d:"M38 8H17V10H38V8ZM38 13H17V15H38V13ZM17 18H38V20H17V18ZM33 23H17V25H33V23Z"})),headerTemplate29:()=>(0,i.h)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 43 43"},(0,i.h)("path",{class:"icon-title",d:"M39 8H18V10H39V8ZM34 13H18V15H34V13Z"}),(0,i.h)("path",{class:"icon-text",d:"M6 35V8H14V35H6ZM7 34H13V9H7V34ZM18 19H39V20H18V19ZM18 22H39V23H18V22ZM39 25H18V26H39V25ZM18 28H39V29H18V28ZM39 31H18V32H39V31ZM18 34H31V35H18V34Z"})),headerTemplate30:()=>(0,i.h)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 43 43"},(0,i.h)("path",{class:"icon-title",d:"M5 8H26V10H5V8ZM5 13H26V15H5V13ZM26 18H
25V20H26V18ZM5 23H21V25H5V23Z"}),(0,i.h)("path",{class:"icon-text",d:"M30 8V35H38V8H30ZM37 34H31V9H37V34Z"}))}},61827:function(e,t,s){"use strict";var i=s(24994),a=s(76148),o=s(27384),n=i(s(47224)),r=i(s(97388)),l=s(95916);const c=({column:e})=>(0,a.h)("div",{className:"sovietSplash-plot"},(0,a.h)(l.SovietSplashColumn,{column:e}),(0,a.h)(n.default,null),(0,a.h)(r.default,null));e.exports={default:c,leftWide:({column:e})=>(0,a.h)("div",null,(0,a.h)(n.default,null),(0,a.h)(o.Cols,{divisionProportions:"4:12",className:"sovietSplash-plot"},(0,a.h)("div",{className:"sovietSplash-leftColumn"},(0,a.h)(l.SovietSplashColumn,{column:e})),(0,a.h)("div",{className:"module"},(0,a.h)(r.default,null)))),leftNarrow:({column:e})=>(0,a.h)("div",null,(0,a.h)(n.default,null),(0,a.h)(o.Cols,{divisionProportions:"3:13",className:"sovietSplash-plot"},(0,a.h)("div",{className:"sovietSplash-leftColumn"},(0,a.h)(l.SovietSplashColumn,{column:e})),(0,a.h)("div",{className:"module"},(0,a.h)(r.default,null)))),leftNarrowWithTitleTemplate:e=>(0,a.h)(c,e),leftRight:({column:e})=>(0,a.h)("div",{className:"sovietSplash-leftRightWrapper"},(0,a.h)(n.default,null),(0,a.h)(o.Cols,{divisionProportions:"3:9",className:"sovietSplash-plot"},(0,a.h)("div",{className:"sovietSplash-leftColumn"},(0,a.h)(l.SovietSplashColumn,{column:e})),(0,a.h)("div",{className:"module"},(0,a.h)(r.default,null)))),leftHalfPage:e=>(0,a.h)(c,e),imageLeft:({column:e})=>(0,a.h)(o.Cols,{className:"sovietSplash-plot"},(0,a.h)(n.default,null),(0,a.h)("div",{className:"module"},(0,a.h)(l.SovietSplashColumn,{column:e}),(0,a.h)(r.default,null))),imageLeftNarrow:({column:e})=>(0,a.h)(o.Cols,{divisionProportions:"5:11",className:"sovietSplash-plot"},(0,a.h)(n.default,null),(0,a.h)("div",{className:"module"},(0,a.h)(l.SovietSplashColumn,{column:e}),(0,a.h)(r.default,null))),imageRight:({column:e})=>(0,a.h)(o.Cols,{className:"sovietSplash-plot",divisionProportions:"7:1:8"},(0,a.h)("div",{className:"module"},(0,a.h)(l.SovietSplashColumn,{column:e}),(0,a.h)(r.default,null)),(0,a.h)("div",null),(0,a.h)(n.default,null)),imageRightNarrow:({column:e})=>(0,a.h)(o.Cols,{divisionProportions:"11:5",className:"sovietSplash-plot"},(0,a.h)("div",{className:"module"},(0,a.h)(l.SovietSplashColumn,{column:e}),(0,a.h)(r.default,null)),(0,a.h)(n.default,null)),imageRightNarrowWithTitle:({column:e})=>(0,a.h)(o.Cols,{className:"sovietSplash-plot",divisionProportions:"10:1:5"},(0,a.h)("div",{className:"module"},(0,a.h)(l.SovietSplashColumn,{column:e}),(0,a.h)(r.default,null)),(0,a.h)("div",null),(0,a.h)(n.default,null))}},89272:function(e,t,s){"use strict";var i=s(24994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=s(76148),o=s(70753),n=i(s(43631)),r=s(76604);class l extends a.Component{constructor(e){super(e),this.handleInput=this.handleInput.bind(this)}handleInput(e){this.props.setKicker(e.target.value)}render(){return(0,a.h)("div",{className:"sovietKickerInput"},(0,a.h)("label",{htmlFor:"sovietKickerInput"},"Подводка для соцсетей"),(0,a.h)(n.default,{className:"input is__fullWidth sovietKickerInput-text",id:"sovietKickerInput",placeholder:"Подводка для соцсетей",value:this.props.kicker,onInput:this.handleInput}))}}const c={setKicker:r.setKicker};t.default=(0,o.connect)(({soviet:{kicker:e}})=>({kicker:e}),c)(l)},19078:function(e,t,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=s(76148),a=s(70753),o=s(76604);class n extends i.Component{constructor(e){super(e),this.handleInput=this.handleInput.bind(this)}handleInput(e){this.props.setMainThink(e.target.value)}render(){return(0,i.h)("input",{className:"input is__padded is__medium is__fullWidth sovietMainThink-text",placeholder:"Главная мысль",value:this.props.mainThink,onInput:this.handleInput})}}const r={setMainThink:o.setMainThink};t.default=(0,a.connect)(({soviet:e})=>({mainThink:e.mainThink}),r)(n)},79660:function(e,t,s){"use strict";var i=s(24994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=s(76148),o=s(70753),n=s(67697),r=i(s(15376)),l=i(s(432)),c=s(38757),d=s(63229),h=i(s(3687)),u=s(76604);const p=e=>(0,c.parseDate)(e).isValid,m=e=>(0,d.setTimeToMidnightByMoscow)((0,d.removeTimezoneOffset)(e)).toISOString();class f extends a.Component{constructor(e){super(e);const t=(0,h.default)((0,d.moscowifyLocal)((0,d.datify)(this.props.publishAt)));this.state={isDropdownOpen:!1,isValid:p(t),value:t},this.handleInput=this.handleInput.bind(this),this.handleBlur=this.handleBlur.bind(this),this.handleFocus=this.handleFocus.bind(this),this.blur=this.blur.bind(this),this.buildInputRef=this.buildInputRef.bind(this)}handleInput({value:e}){this.setState({value:e})}componentWillReceiveProps({publishAt:e}){const{value:t}=this.state;if(p(t)){const s=(0,c.parseDate)(t).value,i=(0,d.addTimezoneOffset)((0,d.moscowify)(new Date(e)));e!==m(s)&&this.setState({value:(0,h.default)(i,this.state.value)})}}handleFocus(){this.setState({isDropdownOpen:!0})}handleBlur(){const{value:e}=this.state,t=p(e);if(t){const t=(0,c.parseDate)(e).value;this.props.publishAt!==m(t)&&this.props.setPublishAt(m(t))}this.setState({isValid:t,isDropdownOpen:!1})}blur(){this.input.el.blur()}buildInputRef(e){this.input=e}render(){const{isValid:e,value:t}=this.state;return(0,a.h)("div",{className:"sovietPublishAtSelector"},(0,a.h)(r.default,{isComboBox:!0,isOpen:this.state.isDropdownOpen,currentItem:(0,a.h)(n.FormInput,{className:"sovietPublishAtSelector-input is__medium is__padded",onInput:this.handleInput,onFocus:this.handleFocus,onBlur:this.handleBlur,value:t,validate:p,isValid:e,ref:this.buildInputRef,required:!0})},(0,a.h)(l.default,{afterClick:this.blur,isVerbose:!0})))}}const v={setPublishAt:u.setPublishAt};t.default=(0,o.connect)(({soviet:e})=>({publishAt:e.publishAt}),v)(f)},75620:function(e,t,s){"use strict";var i=s(24994);
2Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=s(76148),o=s(70753),n=i(s(32485)),r=s(76604),l=s(20690),c=s(65448),d=s(73345),h=s(63229),u=i(s(44015)),p=i(s(432)),m=s(58157),f=i(s(87021));class v extends a.Component{constructor(e){super(e),this.state={isDropdownOpened:!1,isCurrentDateEngaged:!1},this.publishSoviet=this.publishSoviet.bind(this),this.previewSoviet=this.previewSoviet.bind(this),this.redirectToPublishedSoviet=this.redirectToPublishedSoviet.bind(this),this.toggleDropdown=this.toggleDropdown.bind(this),this.hideDropdownOnDocumentClick=this.hideDropdownOnDocumentClick.bind(this),this.bindButtonRef=this.bindButtonRef.bind(this),this.hideDropdown=this.hideDropdown.bind(this),this.onEsc=this.onEsc.bind(this),this.checkPublicationApprovalErrorCode=this.checkPublicationApprovalErrorCode.bind(this)}componentDidMount(){document.addEventListener("click",this.hideDropdownOnDocumentClick),document.addEventListener("keydown",this.onEsc),$(document).on("enableFocusMode",this.hideDropdown)}componentWillUnmount(){document.removeEventListener("click",this.hideDropdownOnDocumentClick),document.removeEventListener("keydown",this.onEsc),$(document).off("enableFocusMode",this.hideDropdown)}componentWillReceiveProps({hasPublicationApprovalError:e}){e||this.setState({isCurrentDateEngaged:!1})}publishSoviet(){this.sendPublicationApprovalRequest("PUT").then(e=>{e.ok?e.json().then(this.redirectToPublishedSoviet).catch(this.props.setHasPublicationApprovalError):409===e.status?e.json().then(this.checkPublicationApprovalErrorCode):this.props.setHasPublicationApprovalError()}).catch(this.props.setHasPublicationApprovalError)}checkPublicationApprovalErrorCode(e){const t=(e.errors||[])[0]||{};/unable_to_publish/.test(t.code)&&this.setState({isCurrentDateEngaged:!0}),this.props.setHasPublicationApprovalError()}previewSoviet(){const{slug:e}=this.props;return this.props.setIsProcessing(),(0,m.saveDraftAnd)({context:this.context}).then(()=>window.location=`/soviet/${e}/preview/`)}sendPublicationApprovalRequest(e){return this.props.canPublish?(this.props.setIsProcessing(),"DELETE"===e?this.fetchPublicationApproval(e):(0,m.saveDraftAnd)({context:this.context}).then(()=>this.fetchPublicationApproval(e))):Promise.reject()}fetchPublicationApproval(e){return fetch(this.publicationApprovalUrl,{method:e,headers:f.default,credentials:"include"})}get publicationApprovalUrl(){return`/soviet/advices/${this.props.sovietId}/publication_approval`}redirectToPublishedSoviet(e){window.location=`/soviet/${e.slug}/`}toggleDropdown(){this.setState({isDropdownOpened:!this.state.isDropdownOpened})}hideDropdown(){this.setState({isDropdownOpened:!1})}hideDropdownOnDocumentClick(e){this.currentEl.contains(e.target)||this.setState({isDropdownOpened:!1})}onEsc(e){"Escape"===e.key&&this.hideDropdown()}bindButtonRef(e){this.currentEl=e}get date(){return(0,h.moscowifyLocal)((0,h.datify)(this.props.publishAt))}get publishText(){const e=(new Date).getFullYear()===this.date.getFullYear()?"dateOnly":"dateYearOnly";return`\n      Опубликовать ${(0,d.birmanize)(this.date,{format:e})}<span class="is__hiddenOnNarrowMobile">,\n        <span class="smallcapitals">${(0,d.birmanize)(this.date,{format:"weekDay"})}</span>\n      </span>\n      `.trim()}render(e){const{isDropdownOpened:t,isCurrentDateEngaged:s}=this.state,i=e.isPreview?this.publishText:"Посмотреть",o=e.isPreview?this.publishSoviet:this.previewSoviet,r=`${(0,d.birmanize)(this.date,{format:"dateOnly"})} занято`,c=s&&e.hasPublicationApprovalError,h=e.isPublishingOrUnpublishing||c,m=(0,n.default)("sovietPublish-buttonWrapper",{has__failed:e.hasPublicationApprovalError}),f=(0,n.default)("sovietPublish-publishButton","sticky","button",{has__error:c}),v=(0,n.default)("button","sticky","sovietPublish-dropdownButton",{is__disabled:h}),g=e.isPreview&&c?r:i;return(0,a.h)("div",{className:"sovietPublish-container",ref:this.bindButtonRef},(0,a.h)("div",{className:m},(0,a.h)("button",{onClick:o,className:f,disabled:h},(0,a.h)("span",{dangerouslySetInnerHTML:{__html:g}})),(0,a.h)("button",{className:v,onClick:this.toggleDropdown},(0,a.h)("div",{className:"sovietPublish-dropdownIconWrapper"},(0,a.h)(l.DropdownIcon,null)))),(0,a.h)(u.default,{if:t},(0,a.h)("div",{className:"sovietPublish-dropdown"},(0,a.h)(p.default,{toggleDropdown:this.toggleDropdown,hasPublishDateError:c}))))}}const g={setIsProcessing:r.setIsProcessing,setHasPublicationApprovalError:r.setHasPublicationApprovalError,setIsPublicationApproved:r.setIsPublicationApproved};t.default=(0,o.connect)(({soviet:e})=>({sovietId:e.id,slug:e.slug,isPreview:e.isPreview,canPublish:e.canPublish,isPublishingOrUnpublishing:e.isPublishingOrUnpublishing,hasPublicationApprovalError:e.hasPublicationApprovalError,isPublicationApproved:e.isPublicationApproved,publishAt:e.publishAt,isCurrentDateEngaged:(0,c.isDateEngaged)((0,c.omitSelectedDate)(e.engagedDates,e.id),new Date(e.publishAt))}),g)(v)},54459:function(e,t,s){"use strict";var i=s(24994);
2Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=s(76148),o=s(70753),n=i(s(43631)),r=s(76604),l=s(27384);const c=" ​";class d extends a.Component{constructor(e){super(e),this.handleInput=this.handleInput.bind(this),this.handleCol1Input=this.handleCol1Input.bind(this),this.handleCol2Input=this.handleCol2Input.bind(this)}handleInput(e){this.props.setQuestion(e.target.value)}handleCol1Input(e){const t=`${e.target.value}${c}${this.questionCol2}`;this.props.setQuestion(t)}handleCol2Input(e){const t=`${this.questionCol1}${c}${e.target.value}`;this.props.setQuestion(t)}get questionCol1(){return this.props.question.split(c)[0]}get questionCol2(){return this.props.question.split(c)[1]||""}get unitedColsVal(){return this.props.question.replace(c,"\n")}get className(){if(this.props.questionMinimumLines){const e=this.props.questionMinimumLines;return`sovietQuestionInput-wrapper is__minimum${e.charAt(0).toUpperCase()+e.slice(1)}Lines`}return"sovietQuestionInput-wrapper"}render(e){return e.hasQuestionCols?(0,a.h)("div",{className:this.className},(0,a.h)(l.Cols,{transposeOnMobile:!0},(0,a.h)(n.default,{className:"sovietQuestionInput-text",placeholder:"Вопрос",value:this.questionCol1,onInput:this.handleCol1Input}),(0,a.h)(n.default,{className:"sovietQuestionInput-text",value:this.questionCol2,onInput:this.handleCol2Input}))):(0,a.h)("div",{className:this.className},(0,a.h)("div",{className:"sovietQuestionInput-singleColWrapper"},(0,a.h)(n.default,{className:"sovietQuestionInput-text",placeholder:"Вопрос",value:this.unitedColsVal,onInput:this.handleInput})))}}const h={setQuestion:r.setQuestion};t.default=(0,o.connect)(({soviet:e})=>({question:e.question,hasQuestionCols:e.hasQuestionCols,questionMinimumLines:e.questionMinimumLines}),h)(d)},38103:function(e,t,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=s(76148),a=s(70753),o=s(67697),n=s(76604);class r extends i.Component{constructor(e){super(e),this.handleInput=this.handleInput.bind(this)}handleInput({value:e}){this.props.setQuestionerName(e)}render(e){return e.hideQuestioner?null:(0,i.h)("div",{className:"sovietQuestionerNameInput-outerWrapper"},(0,i.h)("div",{className:"sovietQuestionerNameInput-wrapper module"},(0,i.h)(o.FormInput,{className:"sovietQuestionerNameInput-text",value:e.questionerName,required:!0,onInput:this.handleInput})),(0,i.h)("div",{className:"module"},(0,i.h)("div",{className:"sovietQuestionerNameInput-email"},e.questionerEmail)))}}const l={setQuestionerName:n.setQuestionerName};t.default=(0,a.connect)(({soviet:e})=>({hideQuestioner:e.isLecture,questionerName:e.questionerName,questionerEmail:e.questionerEmail}),l)(r)},83127:function(e,t,s){"use strict";var i=s(24994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=s(54384),o=i(s(674)),n=s(33876);const r=e=>new o.default(e).value,l=({state:e,action:t})=>{const s=!(e.text||"").trim(),i=e.text===e.authorTemplate;return s||i?t.authorTemplate:e.text},c=(0,a.combineReducers)({soviet:(e={},t)=>{switch(t.type){case"SET_HEADER_TEMPLATE":return{...e,...t,isPublishingOrUnpublishing:!1};case"SET_HEADER_TEXT_COLOR":return{...e,headerTextColor:t.headerTextColor,isPublishingOrUnpublishing:!1};case"SET_TITLE":return{...e,title:t.title,mainThink:t.title,isPublishingOrUnpublishing:!1};case"SET_MAIN_THINK":return{...e,title:t.mainThink,mainThink:t.mainThink,isPublishingOrUnpublishing:!1};case"SET_KICKER":return{...e,kicker:t.kicker,isPublishingOrUnpublishing:!1};case"SET_QUESTION":return{...e,question:t.question,isPublishingOrUnpublishing:!1};case"SET_QUESTIONER_NAME":return{...e,questionerName:t.questionerName,isPublishingOrUnpublishing:!1};case"SET_SOVIET_TEXT":return{...e,text:t.text,isPublishingOrUnpublishing:!1};case"SET_AUTHOR":return{...e,...t,text:l({state:e,action:t}),column:r({...e,author:t.author}),isPublishingOrUnpublishing:!1,kicker:(0,n.isDefaultKicker)(e.kicker)||!e.kicker?(0,n.defaultKicker)(t.authorGenitiveName):e.kicker};case"SET_TYPE":return{...e,isImportant:t.isImportant,isLecture:t.isLecture,isPublishingOrUnpublishing:!1};case"SET_CAN_PUBLISH":return{...e,canPublish:t.canPublish};case"SET_PUBLISH_AT":return{...e,publishAt:t.publishAt,...e.isPreview?{hasPublicationApprovalError:!1}:{}};case"SET_TAGS":return{...e,column:r({...e,tags:t.tags}),tags:t.tags,isPublishingOrUnpublishing:!1};case"SET_IS_PROCESSING":return{...e,isPublishingOrUnpublishing:!0,hasPublicationApprovalError:!1};case"SET_HAS_PUBLICATION_APPROVAL_ERROR":return{...e,isPublishingOrUnpublishing:!1,hasPublicationApprovalError:!0};case"SET_HEADER_IMAGE":return{...e,headerImageUrl:t.headerImageUrl,headerImageSize:t.headerImageSize,isPublishingOrUnpublishing:!1};case"SET_HEADER_IMAGE_TO_NONE":return{...e,headerImageUrl:"",headerImageSize:[],isPublishingOrUnpublishing:!1};
2case"SET_HEADER_IMAGE_UPLOAD_ERROR":return{...e,headerImageUrl:"",headerImageSize:[],hasImageUploadError:!0};case"TOGGLE_FILES_PANEL_VISIBILITY":return{...e,isFilesPanelVisible:!e.isFilesPanelVisible};case"SET_FILES":return{...e,files:t.files};case"SET_FILES_AND_OPEN_FILES_PANEL":return{...e,files:t.files,isFilesPanelVisible:!0};case"SET_FILES_UPLOAD_ERROR":return{...e,files:[],hasFilesUploadError:!0};case"SET_PUBLICATION_APPROVED":return{...e,isPublicationApproved:t.isPublicationApproved,isPublishingOrUnpublishing:!1,hasPublicationApprovalError:!1};default:return e}}});t.default=c},91652:function(e,t,s){"use strict";var i=s(24994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=s(76148),o=i(s(32485)),n=s(3027);const r=()=>(0,a.h)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 27 27"},(0,a.h)("path",{d:"M23.943,0H3.057A2.994,2.994,0,0,0,0,3.057V23.943A2.994,2.994,0,0,0,3.057,27H23.943A2.994,2.994,0,0,0,27,23.943V3.057A2.994,2.994,0,0,0,23.943,0ZM21.312,15.635a8.336,8.336,0,0,1,2,2.267c.68,1.1-.717,1.171-.717,1.171l-2.681.036a1.905,1.905,0,0,1-1.321-.4c-1.02-.7-1.963-2.451-2.681-2.231-.755.219-.717,1.829-.717,1.829a.946.946,0,0,1-.151.512.939.939,0,0,1-.529.219H13.308a7.025,7.025,0,0,1-4.984-2.231C5.8,14.172,3.567,8.978,3.567,8.978s-.151-.329,0-.512a1.049,1.049,0,0,1,.6-.182L7.04,8.247a.832.832,0,0,1,.491.329A.68.68,0,0,1,7.8,8.9a20.3,20.3,0,0,0,1.057,2.2c1.208,2.048,1.737,2.487,2.152,2.267.6-.329.415-2.889.415-2.889a2.946,2.946,0,0,0-.3-1.353,1.477,1.477,0,0,0-.906-.439c-.151,0,.113-.366.453-.549a6.687,6.687,0,0,1,2.492-.256,4.943,4.943,0,0,1,1.4.147c.982.219.642,1.133.642,3.328,0,.7-.113,1.682.377,2.011.189.146.755.037,2.077-2.231a23.549,23.549,0,0,0,1.1-2.34,1.1,1.1,0,0,1,.264-.33.58.58,0,0,1,.378-.073l3.02-.036s.906-.11,1.057.292-.339,1.427-1.585,3.036C19.878,14.355,19.651,14.1,21.312,15.635Z"})),l=()=>(0,a.h)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 27 27"},(0,a.h)("path",{d:"M23.943,0H3.057A2.994,2.994,0,0,0,0,3.057V23.943A2.994,2.994,0,0,0,3.057,27H23.943A2.994,2.994,0,0,0,27,23.943V3.057A2.994,2.994,0,0,0,23.943,0ZM21.164,9.918v.456A10.349,10.349,0,0,1,10.652,20.7,10.6,10.6,0,0,1,5,19.084a6.937,6.937,0,0,0,.864.036,7.372,7.372,0,0,0,4.608-1.581A3.709,3.709,0,0,1,7.016,15.01a4.1,4.1,0,0,0,.684.07,4.652,4.652,0,0,0,.972-.14A3.612,3.612,0,0,1,5.72,11.393v-.035a3.619,3.619,0,0,0,1.656.456A3.551,3.551,0,0,1,5.72,8.794a3.972,3.972,0,0,1,.5-1.827,10.536,10.536,0,0,0,7.632,3.794,3.385,3.385,0,0,1-.108-.843A3.659,3.659,0,0,1,17.456,6.3a3.74,3.74,0,0,1,2.7,1.159,7.839,7.839,0,0,0,2.34-.878,3.758,3.758,0,0,1-1.62,2A6.989,6.989,0,0,0,23,8.021,7.75,7.75,0,0,1,21.164,9.918Z"})),c=()=>(0,a.h)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 27 27"},(0,a.h)("path",{d:"M23.943,0H3.057A2.994,2.994,0,0,0,0,3.057V23.943A2.994,2.994,0,0,0,3.057,27H23.943A2.994,2.994,0,0,0,27,23.943V3.057A2.994,2.994,0,0,0,23.943,0ZM21.938,7.347,19.223,20.129c-.19.908-.739,1.126-1.5.706l-4.137-3.052L11.6,19.714a1.062,1.062,0,0,1-.828.413l.282-4.215h0l7.676-6.919c.336-.3-.074-.444-.521-.173L8.734,14.789,4.642,13.514c-.883-.271-.889-.877.2-1.313L20.785,6.059C21.513,5.729,22.216,6.234,21.938,7.347Z"})),d=e=>{const t=(0,o.default)("sovietSocial-button",{[e.type]:e.type});return(0,a.h)("div",{className:t},"twitter"===e.type&&(0,a.h)(l,null),"vkontakte"===e.type&&(0,a.h)(r,null),"telegram"===e.type&&(0,a.h)(c,null))};t.default=class{shouldComponentUpdate(){return!1}render(e){return(0,a.h)("div",{class:"sovietSocial-wrapper"},(0,a.h)(n.Impressions,{mod:"medium",disabled:e.isDisabled||e.isImpressionsDisabled}),(0,a.h)("div",{className:(0,o.default)("sovietSocial-likely likely",{is__disabled:e.isDisabled})},(0,a.h)(d,{type:"twitter"}),(0,a.h)(d,{type:"vkontakte"}),(0,a.h)(d,{type:"telegram"})))}}},23528:function(e,t,s){"use strict";var i=s(24994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=s(76148),o=s(70753),n=i(s(32485)),r=i(s(61827)),l=i(s(47224)),c=i(s(58679)),d=i(s(97388)),h=s(95916),u=i(s(19529));class p extends a.Component{constructor(e){super(e),this.$header=$(".js__header")}updateHeaderColorScheme(){this.$header.toggleClass("is__inversed","white"===this.props.headerTextColor)}componentDidMount(){this.updateHeaderColorScheme()}componentDidUpdate(){this.updateHeaderColorScheme()}get headerImageStyles(){return this.props.headerImageUrl&&!this.props.headerTemplateRequiresImage?{background:`url(${this.props.headerImageUrl}) no-repeat 50% 50% / cover`}:{}}render(e){const t=(0,n.default)("sovietSplash","module",{[`is__${e.headerTemplate}`]:e.headerTemplate,[`is__title-${e.titleSize}`]:e.titleSize,[`is__question-${e.questionStyle}`]:e.questionStyle,with__questionCols:e.hasQuestionCols,is__titleHidden:e.isTitleHidden,is__questionHidden:e.isQuestionHidden,[`is__${e.headerTextColor}`]:e.headerTextColor,is__requiresImage:e.headerTemplateRequiresImage,is__hangingTitle:e.isHangingTitle}),s=r.default[e.headerTemplate]||r.default.default;return(0,a.h)("div",{className:t,style:this.headerImageStyles},(0,a.h)("div",{className:"device laptop desktop"},(0,a.h)(s,e)),(0,a.h)("div",{className:"device mobile"},(0,a.h)(h.SovietSplashColumn,{column:e.column}),(0,a.h)(l.default,null),(0,a.h)(d.default,{isFakeHeadingForSeo:!0})),e.isEditor&&(0,a.h)(u.default,null),e.isEditor&&(0,a.h)(c.default,null))}}t.default=(0,o.connect)(({soviet:e})=>({isEditor:e.isEditor,headerTemplate:e.headerTemplate,column:e.column,isTitleHidden:e.isTitleHidden,titleSize:e.titleSize,isHangingTitle:e.isHangingTitle,isQuestionHidden:e.isQuestionHidden,questionStyle:e.questionStyle,hasQuestionCols:e.hasQuestionCols,headerTextColor:e.headerTextColor,headerTemplateRequiresImage:e.headerTemplateRequiresImage,headerImageUrl:e.headerImageUrl,questionMinimumLines:e.questionMinimumLines}),{})(p)},35613:function(e,t,s){"use strict";
2Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=s(76148),a=s(66192),o=s(45169),n=s(73345);t.default=({authorAvatarUrl:e,authorArchiveUrl:t,authorName:s,authorCaption:r})=>(0,i.h)("div",{className:"sovietSplashAvatar"},(0,i.h)("div",{className:"sovietSplashAvatar-image"},(0,i.h)(a.Image,{src:e,size:[144,144],alt:s})),(0,i.h)("div",{className:"sovietSplashAvatar-caption"},(0,i.h)(o.Caption,{html:`<a href="/soviet/${t}/">${s}</a>          <br />          ${(0,n.typograf)(r)}`})))},95916:function(e,t,s){"use strict";var i=s(24994);Object.defineProperty(t,"__esModule",{value:!0}),t.SovietTitle=t.SovietSplashColumn=t.SovietMeta=void 0;var a=s(76148),o=i(s(32485)),n=s(73345),r=s(45169);const l=({viewsCount:e})=>(0,a.h)("span",{className:"sovietViewsCount"},"👁 ",e),c=({commentCount:e,newCommentCount:t})=>(0,a.h)("span",{className:"sovietCommentsCount",dangerouslySetInnerHTML:{__html:(0,n.sovietCommentsCount)(e,t)}});t.SovietSplashColumn=e=>(0,a.h)("div",{className:"sovietSplash-columnWrapper"},(0,a.h)("div",{className:"sovietSplash-column"},e.column)),t.SovietTitle=e=>{const t=(0,o.default)(e.className,{is__tooLong:e.title.length>=100}),s=e.isHangingTitle?e.title:(0,n.typograf)(e.title),i="largest"===e.titleSize&&("imageLeft"===e.headerTemplate||"imageLeftNarrow"===e.headerTemplate),l=[(0,a.h)("span",{class:"sansSwash"},s[0]),s.slice(1)],c=i?s:l;return e.isFakeHeadingForSeo?(0,a.h)("div",{className:`heading-1 is__fakeHeading ${e.className||""}`},(0,a.h)("p",null,c)):(0,a.h)(r.Heading1,{className:t},c)},t.SovietMeta=e=>{const t=!!e.viewsCount,s=!!e.commentCount||!!e.newCommentCount;return(0,a.h)("div",{className:"sovietMeta-wrapper"},(0,a.h)("div",{className:"sovietMeta"},e.questionerName&&!e.hideQuestioner&&(0,a.h)("div",{className:"sovietMeta-name"},e.questionerName),(0,a.h)("div",{className:"sovietMeta-date"},(e=>{const t=new Date(1e3*e),s=new Date(t.getTime()+60*(new Date).getTimezoneOffset()*1e3+108e5);return(0,n.birmanize)(s,{format:"dateYearOnly"})})(new Date(e.publishAt).getTime()/1e3)),(0,a.h)("div",{className:"sovietMeta-stats"},t&&(0,a.h)(l,{viewsCount:e.viewsCount}),t&&"  ",s&&(0,a.h)(c,e))))}},72822:function(e,t,s){"use strict";var i=s(24994);Object.defineProperty(t,"__esModule",{value:!0}),t.DEFAULT_STATE=void 0,t.createStore=function(e){const{isProduction:t}=window.application,s=t?void 0:window.__REDUX_DEVTOOLS_EXTENSION__,i=e.isEditor||e.isPreview,r={...e,...e.metaDraft},d=i?r:e,h=e.isEditor?(0,n.createSovietDraftAutosave)({initialState:{soviet:d},serverRevision:e.serverRevision,storageKey:`soviet-draft:${e.id}`}):null,u=(0,a.createStore)(o.default,h?h.initialState:{soviet:d},s&&s());let p={soviet:l};return h?h.connect(u):u.subscribe(()=>{e.isPreview&&c(p,u.getState())&&((0,n.saveDraftWithDebounce)(u.getState()),p=u.getState())}),u};var a=s(54384),o=i(s(83127)),n=s(58157),r=s(33876);const l=t.DEFAULT_STATE={canPublish:!0,isPublishingOrUnpublishing:!1,hasPublicationApprovalError:!1,headerTemplate:"default",headerTextColor:"black",headerTemplateRequiresImage:!1,column:"",title:"",mainThink:"",kicker:(0,r.defaultKicker)((window.soviet||{}).authorGenitiveName),isTitleHidden:!1,titleSize:"",question:"",isQuestionHidden:!1,questionStyle:"",hasQuestionCols:!1,questionerName:"",questionDate:"",text:"",headerImageUrl:"",headerImageSize:[],files:[],isFilesPanelVisible:!1,isPublicationApproved:!1,engagedDates:(window.soviet||{}).engagedDates,publishAt:(window.soviet||{}).publishAt},c=(e,t)=>e.soviet.publishAt!==t.soviet.publishAt},15313:function(e,t,s){"use strict";var i=s(24994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=s(76148),o=i(s(94634)),n=s(73345),r=i(s(32485)),l=s(45169),c=s(27384);const d=window.sovietTags||{},h=d.all||[],u=d.allHyphenated||[];let p={};const m=(e,t)=>e<t?-1:e>t?1:0,f=(e,t)=>m(e.charAt(0).toLowerCase(),t.charAt(0).toLowerCase());class v extends a.Component{constructor(e){super(e),this.onSelect=this.onSelect.bind(this);const t=u[this.props.name]||this.props.name;p[t]=p[t]||(0,n.typograf)(t),this.typografedName=p[t]}get isSelected(){return(this.props.selectedTags||[]).includes(this.props.name)}onSelect(){!this.isSelected&&this.props.onSelect&&this.props.onSelect(this.props.name)}render(){const e=(0,r.default)("catalogue-item",{is__disabled:this.isSelected});return(0,a.h)("li",{className:e,onClick:this.onSelect},this.typografedName)}}class g extends a.Component{constructor(e){super(e)}render(){const e=((e,{amount:t})=>{const s=e.slice(0);return[...Array(t)].map(()=>Math.floor(s.length/t)).map((e,i)=>i<s.length%t?e+1:e).map(e=>s.splice(0,e))})(this.props.tags.slice(0).sort(m),{amount:6});return(0,a.h)("div",{className:"catalogue-row"},(0,a.h)(l.Heading3,{className:"catalogue-rowTitle"},this.props.letter),(0,a.h)("div",{className:"catalogue-rowContents"},(0,a.h)(c.Cols,null,e.map(e=>(0,a.h)(l.Ul,{className:"noIndent"},e.map(e=>(0,a.h)(v,(0,o.default)({name:e},this.props))))))))}}class b extends a.Component{constructor(e){super(e),this.preventClickPropagation=this.preventClickPropagation.bind(this)}preventClickPropagation(e){e.stopPropagation()}get tagsByFirstMeaningfulLetter(){return h.reduce((e,t)=>
2{const s=t.trim().replace(/^[^а-яa-z]+/gi,"").charAt(0).toUpperCase();return e[s]=e[s]||[],e[s].push(t),e},{})}get squashedTagsByFirstMeaningfulLetter(){const e=this.tagsByFirstMeaningfulLetter,t=Object.keys(e).sort(f),s={};for(var i=0;i<t.length;i+=1){const a=t[i],o=e[a],n=t[i+1],r=e[n];r&&o.length+r.length<6?(s[[a,n].join(", ")]=e[a].concat(e[n]),i+=1):s[a]=e[a]}return s}render(){const e=(0,r.default)("sovietTagsCatalogue",{is__visible:this.props.isVisible}),t=this.squashedTagsByFirstMeaningfulLetter,s=Object.keys(t).sort(f);return(0,a.h)("div",{className:e,onClick:this.preventClickPropagation},(0,a.h)("div",{className:"sovietTagsCatalogue-inner catalogue"},s.map(e=>(0,a.h)(g,{letter:e,tags:t[e],selectedTags:this.props.selectedTags,onSelect:this.props.onSelect}))))}}t.default=b},17584:function(e,t,s){"use strict";var i=s(24994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=s(76148),o=s(70753),n=i(s(43631)),r=s(9013),l=s(76604);class c extends a.Component{constructor(e){super(e),this.state={value:""},this.caretPosition=0,this.handleInput=this.handleInput.bind(this),this.rememberCaretPosition=this.rememberCaretPosition.bind(this),this.placeFileCode=this.placeFileCode.bind(this)}componentDidMount(){$(document).on("sovietInsertFile",this.placeFileCode)}componentWillUnmount(){$(document).off("sovietInsertFile")}handleInput(e){this.props.setSovietText(e.target.value),this.rememberCaretPosition()}rememberCaretPosition(){this.caretPosition=this.textarea.selectionStart}placeFileCode(e,t){if(void 0===this.caretPosition||null===this.caretPosition)return;const s=this.props.text||"",i=s.substring(0,this.caretPosition),a=s.substring(this.caretPosition),o=[i,t.code,a].join("");this.props.setSovietText(o)}render(e){return(0,a.h)("div",{className:"sovietText"},(0,a.h)("label",{htmlFor:"sovietText"},"Текст совета",(0,a.h)("a",{class:"is__noUnderline sovietText-help",href:"/soviet/templates/",target:"_blank"},(0,a.h)(r.QuestionMarkInCircleIcon,null))),(0,a.h)(n.default,{id:"sovietText",inputRef:e=>this.textarea=e,className:"sovietText-text",value:e.text,onInput:this.handleInput,onClick:this.rememberCaretPosition,onKeyDown:this.rememberCaretPosition}))}}const d={setSovietText:l.setSovietText};t.default=(0,o.connect)(({soviet:e})=>({text:e.text}),d)(c)},69972:function(e,t,s){"use strict";var i=s(24994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=s(76148),o=s(70753),n=i(s(32485)),r=s(76604),l=s(66275);class c extends a.Component{constructor(e){super(e),this.setTextColorWhite=this.setTextColor.bind(this,"white"),this.setTextColorBlack=this.setTextColor.bind(this,"black")}setTextColor(e){this.props.setHeaderTextColor(e)}render(e){return(0,a.h)(l.IconSelector,{isSmall:!0,className:"sovietTextColorSelector"},(0,a.h)(l.IconSelectorItem,{className:(0,n.default)("is__white",{is__active:"white"===e.headerTextColor}),onClick:this.setTextColorWhite},"А"),(0,a.h)(l.IconSelectorItem,{className:(0,n.default)("is__black",{is__active:"black"===e.headerTextColor}),onClick:this.setTextColorBlack},"А"))}}const d={setHeaderTextColor:r.setHeaderTextColor};t.default=(0,o.connect)(({soviet:e})=>({headerTextColor:e.headerTextColor}),d)(c)},93993:function(e,t,s){"use strict";var i=s(24994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=s(76148),o=s(70753),n=i(s(43631)),r=s(76604);class l extends a.Component{constructor(e){super(e),this.handleInput=this.handleInput.bind(this)}handleInput(e){this.props.setTitle(e.target.value)}render(e){return(0,a.h)("div",{className:"sovietTitleInput-wrapper"},(0,a.h)(n.default,{className:"sovietTitleInput-text",placeholder:"Главная мысль",value:e.title,onInput:this.handleInput}))}}const c={setTitle:r.setTitle};t.default=(0,o.connect)(({soviet:e})=>({title:e.title,titleSize:e.titleSize}),c)(l)},97388:function(e,t,s){"use strict";var i=s(24994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=s(76148),o=s(70753),n=i(s(32485)),r=s(73345),l=s(95916),c=i(s(93993)),d=i(s(54459)),h=i(s(38103)),u=s(27384);const p=(e,t)=>({__html:(0,r.wrapText)(e,(0,r.formatText)(t))}),m=e=>{if(e.isEditor)return(0,a.h)(c.default,null);const t=(0,n.default)("sovietTitle",{[`is__${e.titleSize}`]:e.titleSize,is__medium:!e.titleSize});
2return(0,a.h)(l.SovietTitle,{className:t,title:e.title,isHangingTitle:e.isHangingTitle,headerTemplate:e.headerTemplate,isFakeHeadingForSeo:e.isFakeHeadingForSeo,titleSize:e.titleSize})},f=e=>{if(e.isEditor)return(0,a.h)(d.default,null);if(e.hasQuestionCols){const t=e.question.split(" ​").map(e=>p($,e));return(0,a.h)("div",{className:"sovietQuestion"},(0,a.h)(u.Cols,{transposeOnMobile:!0},(0,a.h)("div",{className:"sovietQuestion-col",dangerouslySetInnerHTML:t[0]}),(0,a.h)("div",{className:"sovietQuestion-col",dangerouslySetInnerHTML:t[1]})))}const t=p($,e.question.replace(" ​","\n"));return(0,a.h)("div",{className:"sovietQuestion",dangerouslySetInnerHTML:t})},v=e=>e.isEditor?(0,a.h)(h.default,null):(0,a.h)(l.SovietMeta,e);class g extends a.Component{constructor(e){super(e)}render(e){return"leftHalfPage"===e.headerTemplate?(0,a.h)(u.Cols,{className:"sovietTitleQuestionMeta-cols",transposeOnMobile:"true"},(0,a.h)(m,e),(0,a.h)("div",{className:"module"},(0,a.h)(f,e),(0,a.h)(v,e))):"leftNarrowWithTitleTemplate"===e.headerTemplate?(0,a.h)(u.Cols,{className:"sovietTitleQuestionMeta-cols",divisionProportions:"4:12",transposeOnMobile:"true"},(0,a.h)(m,e),(0,a.h)("div",{className:"module"},(0,a.h)(f,e),(0,a.h)(v,e))):(0,a.h)("div",{class:"sovietTitleQuestionMeta-wrapper"},!e.isTitleHidden&&(0,a.h)(m,e),!e.isQuestionHidden&&(0,a.h)(f,e),e.isTitleHidden&&"default"===e.headerTemplate?(0,a.h)("div",{className:"sovietQuestionPlaceholder-strut"},(0,a.h)(v,e)):(0,a.h)(v,e))}}t.default=(0,o.connect)(({soviet:e})=>({isEditor:e.isEditor,hideQuestioner:e.isLecture,headerTemplate:e.headerTemplate,title:e.title,isTitleHidden:e.isTitleHidden,titleSize:e.titleSize,isHangingTitle:e.isHangingTitle,question:e.question,isQuestionHidden:e.isQuestionHidden,questionStyle:e.questionStyle,hasQuestionCols:e.hasQuestionCols,questionerName:e.questionerName,questionDate:e.questionDate,commentCount:e.commentCount,newCommentCount:e.newCommentCount,viewsCount:e.viewsCount,publishAt:e.publishAt}))(g)},26106:function(e,t,s){"use strict";var i=s(24994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=s(76148),o=s(70753),n=i(s(32485)),r=s(67697),l=s(76604);class c extends r.ExtendableDropdown{constructor(e){super(e),this.wrapperClassName="sovietTypeSelector",this.stopClick=this.stopClick.bind(this),this.setImportant=this.setImportant.bind(this),this.setLecture=this.setLecture.bind(this)}stopClick(e){e.stopPropagation()}setImportant(){this.props.setType({isLecture:this.props.isLecture,isImportant:!this.props.isImportant})}setLecture(){this.props.setType({isLecture:!this.props.isLecture,isImportant:this.props.isImportant})}get sovietType(){let e="Обычный совет";return this.props.isImportant&&(e="Важный совет"),this.props.isLecture&&(e="Лекция"),this.props.isImportant&&this.props.isLecture&&(e="Важный совет, лекция"),e}get currentItem(){const e=(0,n.default)("sovietTypeSelector-current",{is__bold:this.props.isImportant});return(0,a.h)("div",{className:e},this.sovietType)}get dropdownItems(){return[(0,a.h)("label",{onClick:this.stopClick},(0,a.h)("input",{type:"checkbox",onChange:this.setImportant,checked:this.props.isImportant}),"Важный совет"),(0,a.h)("label",{onClick:this.stopClick},(0,a.h)("input",{type:"checkbox",onChange:this.setLecture,checked:this.props.isLecture}),"Лекция")]}}const d={setType:l.setType};t.default=(0,o.connect)(({soviet:e})=>({isImportant:e.isImportant,isLecture:e.isLecture}),d)(c)},93849:function(e,t,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=s(76148);t.default=()=>(0,i.h)("span",{className:"suggestInput-cross"},"×")},92901:function(e,t,s){"use strict";var i=s(24994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=i(s(87021));t.default=e=>fetch(`/soviet/advice_tags/${e}/related`,{headers:a.default}).then(e=>e.ok?e.json():Promise.resolve([])).catch(()=>Promise.resolve([]))},91703:function(e,t,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=s(76148);const a=e=>()=>e?$.tabNext():$.tabPrev();t.default=({isBeginning:e=!0})=>(0,i.h)("div",{tabIndex:"0",onFocus:a(e)})},2121:function(e,t){"use strict";
2Object.defineProperty(t,"__esModule",{value:!0}),t.tagsToStringArray=t.stringArrayToTags=t.sortTagsAlphabetically=t.pushUnique=t.omitAlreadySelected=t.noop=t.isTagNew=t.getRecentSuggestionList=t.getProperSuggestionsList=t.getFirstElements=t.getAllTags=t.findSimilarTags=t.compose=t.areTagsDifferent=t.addTag=void 0,t.noop=()=>{};const s=(...e)=>e.reduce((e,t)=>(...s)=>t(e(...s)),e=>e);t.compose=s;const i=e=>t=>e.value.toLowerCase()!==t.value.toLowerCase();t.areTagsDifferent=i;const a=(e,t)=>[...e.filter(i(t)),t];t.pushUnique=a;const o=e=>t=>t.filter(t=>t.toLowerCase().match(new RegExp(`(^| )${e.toLowerCase()}`,"g")));t.findSimilarTags=o;const n=(e,...t)=>s=>t.reduce((e,t)=>e?e[t]:[],s[e])||[];t.getAllTags=n;const r=e=>e.map(e=>e.value);t.tagsToStringArray=r,t.stringArrayToTags=e=>e.map(e=>({value:e}));const l=e=>t=>{const s=r(e);return t.filter(e=>!s.includes(e))};t.omitAlreadySelected=l;const c=(e,t)=>!e.includes(t);t.isTagNew=c,t.addTag=(e,t,s)=>a(t,{isTagNew:c(s,e),value:e});const d=e=>e.slice().sort((e,t)=>e.localeCompare(t));t.sortTagsAlphabetically=d;const h=e=>t=>t.slice(0,e);t.getFirstElements=h,t.getRecentSuggestionList=(e,t,i,a=[])=>{const o=s(n("byAuthor",t),l(i),h(5))(e),r=a.filter(e=>!o.includes(e));return s(n("byAuthor",t),l(i),h(5),(c=r,e=>[...e,...c]),l(i),h(15))(e);var c},t.getProperSuggestionsList=(e,t,i)=>s(n("all"),o(t),l(i),d)(e)},52092:function(e,t,s){"use strict";var i=s(24994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=s(76148),o=i(s(94634));class n extends a.Component{constructor(e){super(e),this.getRef=this.getRef.bind(this)}getRef(e){this.input=e,this.props._ref(e)}render(){const{onInput:e,onKeyDown:t,value:s,...i}=this.props;return(0,a.h)("input",(0,o.default)({},i,{ref:this.getRef,className:"suggestInput-input input",onKeyDown:t&&(n=t,e=>n(e.key)),onInput:e,value:s}));var n}}t.default=n},22910:function(e,t,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.handleEnter=t.handleBackspace=void 0;var i=s(2121);t.handleEnter=e=>([t,s])=>{if(("Enter"===t||";"===t)&&s.currentValue){const{currentValue:t,selectedTags:a}=s;s={selectedTags:(0,i.addTag)(t,a,e),currentValue:""}}return[t,s]},t.handleBackspace=e=>([t,s])=>("Backspace"===t&&""===s.currentValue&&e(),[t,s])},68244:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;const s={CATALOGUE:({isCatalogueToggled:e})=>e,PROPER:({currentValue:e,isInputFocused:t,properSuggestions:s})=>s.length&&e.length>1&&t,RECENT:({currentValue:e,isInputFocused:t,isCatalogueToggled:s,properSuggestions:i})=>(!i.length||e.length<=1)&&t&&!s};t.default=(e,t,i,a)=>Object.keys(s).find(o=>s[o]({currentValue:e,isInputFocused:t,isCatalogueToggled:i,properSuggestions:a}))},44015:function(e,t,s){"use strict";var i=s(24994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=s(76148),o=i(s(94634));t.default=({children:e,style:t={},...s})=>s.if?(0,a.h)("div",(0,o.default)({style:{display:"inline",...t}},s),e):null},71058:function(e,t,s){"use strict";var i=s(24994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=s(76148),o=i(s(94634));s(10656);var n=s(2121);const r=()=>$(".suggestInput-input").focus(),l={VERTICAL:{ArrowDown:()=>$.tabNext(),ArrowUp:()=>$.tabPrev()},HORIZONTAL:{ArrowRight:()=>$.tabNext(),ArrowLeft:()=>$.tabPrev()},HORIZONTAL_TOP:{ArrowRight:()=>$.tabNext(),ArrowLeft:()=>$.tabPrev(),ArrowDown:()=>r()},HORIZONTAL_BOTTOM:{ArrowRight:()=>$.tabNext(),ArrowLeft:()=>$.tabPrev(),ArrowUp:()=>r()}},c=(e,t)=>e&&e===t;class d extends a.Component{constructor(e){super(e),this.handleKeyDown=this.handleKeyDown.bind(this)}handleKeyDown(e){const{direction:t="HORIZONTAL",nextDirectionButton:s,prevDirectionButton:i}=this.props,{target:{selectionStart:a,tagName:o,value:r},code:d}=e;return c(s,d)?$.tabNext():c(i,d)?$.tabPrev():"INPUT"!==o||((e,t,s)=>0===e&&"ArrowLeft"===t||e===s&&"ArrowRight"===t)(a,d,r.length)?((e,t)=>((l[e]||{})[t]||n.noop)())(t,e.code):null}componentDidMount(){this.ref.addEventListener("keydown",this.handleKeyDown)}componentWillUnmount(){this.ref.removeEventListener("keydown",this.handleKeyDown)}render(){const{direction:e,...t}=this.props;return(0,a.h)("div",(0,o.default)({ref:e=>this.ref=e},t),this.props.children)}}t.default=d},62396:function(e,t,s){"use strict";var i=s(24994);
2Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=s(76148),o=s(70753),n=i(s(32485)),r=i(s(57239)),l=i(s(91703)),c=s(14697),d=s(22910),h=i(s(68244)),u=s(2121),p=i(s(92901)),m=s(76604);class f extends a.Component{constructor(e){super(e),this.state={selectedTags:(0,u.stringArrayToTags)(e.tags),allTags:{},currentValue:"",isInputFocused:!1,isCatalogueToggled:!1,related:[]},this.handleKeyDown=this.handleKeyDown.bind(this),this.handleInputChange=this.handleInputChange.bind(this),this.handleSuggestionDelete=this.handleSuggestionDelete.bind(this),this.handleSuggestionEdit=this.handleSuggestionEdit.bind(this),this.handleComponentClick=this.handleComponentClick.bind(this),this.handleInputFocus=this.handleInputFocus.bind(this),this.handleDocumentKeyDown=this.handleDocumentKeyDown.bind(this),this.handleBlur=this.handleBlur.bind(this),this.handleToggleCatalogue=this.handleToggleCatalogue.bind(this),this.handleSuggestionSelect=this.handleSuggestionSelect.bind(this),this.registerInputRef=this.registerInputRef.bind(this),this.updateTags=this.updateTags.bind(this)}componentDidMount(){document.addEventListener("keydown",this.handleDocumentKeyDown),document.addEventListener("mousedown",this.handleBlur),this.setState({allTags:window.sovietTags||{}}),this.updateRelated()}componentWillUnmount(){document.removeEventListener("keydown",this.handleDocumentKeyDown),document.removeEventListener("mousedown",this.handleBlur)}componentDidUpdate(e,t){const s=this.state.selectedTags;t.selectedTags.length!==s.length&&(this.updateTags(s),this.updateRelated())}updateTags(e){this.props.setTags((0,u.tagsToStringArray)(e))}updateRelated(){const{selectedTags:e}=this.state;return e.length?(0,p.default)(e[e.length-1].value).then(e=>this.setState({related:e})):this.setState({related:[]})}processBlur(){const{selectedTags:e,currentValue:t,allTags:s}=this.state;this.setState({isCatalogueToggled:!1,isInputFocused:!1,selectedTags:t?(0,u.addTag)(t,e,(0,u.getAllTags)("all")(s)):e,currentValue:""}),this.input.blur()}handleDocumentKeyDown(e){"Escape"===e.code&&this.processBlur(),this.state.isInputFocused&&["ArrowDown","ArrowUp"].includes(e.code)&&e.preventDefault()}handleKeyDown(e){const t=(0,u.compose)((0,d.handleEnter)((0,u.getAllTags)("all")(this.state.allTags)),(0,d.handleBackspace)(()=>$.tabPrev()))([e,this.state])[1];this.setState(t)}handleSuggestionDelete(e){return(t=!0)=>{const s=this.state.selectedTags.filter((0,u.areTagsDifferent)(e));t?this.handleComponentClick():$.tabPrev(),this.setState({selectedTags:s})}}handleSuggestionEdit(e){return()=>{const{currentValue:t,selectedTags:s,allTags:i}=this.state,a=s.filter((0,u.areTagsDifferent)(e));t&&a.push({value:t,isTagNew:(0,u.isTagNew)((0,u.getAllTags)("all")(i),t)}),this.setState({currentValue:e.value,selectedTags:a}),this.handleComponentClick()}}handleInputChange({target:{value:e}}){this.setState({currentValue:e.replace(/;/g,"")})}handleComponentClick(){document.activeElement!==this.input&&(this.input.focus(),setTimeout(()=>this.input.setSelectionRange(0,0)))}handleToggleCatalogue(e){e.stopPropagation(),$(document).trigger("enableFocusMode"),this.setState({isCatalogueToggled:!this.state.isCatalogueToggled})}handleInputFocus(){this.setState({isInputFocused:!0})}handleBlur(e){this.componentRef.contains(e.target)||this.processBlur()}handleSuggestionSelect(e){const{selectedTags:t}=this.state,s=(0,u.pushUnique)(t,{value:e});this.setState({selectedTags:s,currentValue:"",isCatalogueToggled:!1}),this.handleComponentClick()}registerInputRef(e){this.input=e}render(){const{selectedTags:e,currentValue:t,isInputFocused:s,isCatalogueToggled:i,allTags:o,related:d}=this.state,{author:p}=this.props,m=(0,u.getRecentSuggestionList)(o,p,e,d),f=(0,u.getProperSuggestionsList)(o,t,e),v=(0,h.default)(t,s,i,f),g=(0,n.default)("suggestInput",{is__focused:s});return(0,a.h)("div",{className:g,onClick:this.handleComponentClick,ref:e=>this.componentRef=e},(0,a.h)(l.default,{isBeginning:!0}),(0,a.h)(r.default,{registerRef:this.registerInputRef,selectedTags:e,handleSuggestionDelete:this.handleSuggestionDelete,handleSuggestionSelect:this.handleSuggestionEdit,handleInputFocus:this.handleInputFocus,handleInputChange:this.handleInputChange,handleKeyDown:this.handleKeyDown,currentValue:t,onCatalogueOpen:this.handleToggleCatalogue,suggestionType:v}),(0,a.h)(c.SuggestionsDropdown,{suggestionType:v,recentSuggestionsList:m,properSuggestionsList:f,catalogueSuggestionsList:this.props.tags,handleSuggestionSelect:this.handleSuggestionSelect,handleToggleCatalogue:this.handleToggleCatalogue}),(0,a.h)(l.default,{isBeginning:!1}))}}const v={setTags:m.setTags};t.default=(0,o.connect)(({soviet:e})=>({tags:e.tags,author:e.authorName}),v)(f)},14697:function(e,t,s){"use strict";var i=s(24994);
2Object.defineProperty(t,"__esModule",{value:!0}),t.SuggestionsDropdown=t.RecentSuggestions=t.ProperSuggestions=void 0;var a=s(76148),o=i(s(45428)),n=i(s(44015)),r=i(s(15313)),l=i(s(71058));const c=({list:e,onSuggestionSelect:t})=>{return(0,a.h)("div",{className:"suggestInput-recentSuggestionsList"},(0,a.h)("ul",{className:"suggestionsList"},e.map((s=t,e=>(0,a.h)(o.default,{onClick:s,onPressEnter:s,isDeletable:!1,value:e})))));var s};t.RecentSuggestions=c;const d=({list:e,onSuggestionSelect:t})=>{return(0,a.h)("ul",{className:"suggestInput-properSuggestionsList suggestionsList"},e.map((s=t,e=>(0,a.h)("li",{onClick:()=>s(e),onKeyDown:t=>s&&"Enter"===t.code&&s(e),className:"suggestInput-suggestionListItem",tabIndex:"0"},e))));var s};t.ProperSuggestions=d,t.SuggestionsDropdown=({suggestionType:e,recentSuggestionsList:t,properSuggestionsList:s,catalogueSuggestionsList:i,handleSuggestionSelect:o})=>(0,a.h)("span",null,(0,a.h)(n.default,{if:"PROPER"===e},(0,a.h)(l.default,{direction:"VERTICAL",className:"suggestInput-suggestionsWrapper"},(0,a.h)(d,{list:s,onSuggestionSelect:o}))),(0,a.h)(n.default,{if:"RECENT"===e&&t.length},(0,a.h)(l.default,{direction:"HORIZONTAL_BOTTOM",className:"suggestInput-suggestionsWrapper"},(0,a.h)(c,{list:t,onSuggestionSelect:o}))),(0,a.h)(n.default,{if:"CATALOGUE"===e},(0,a.h)(l.default,{className:"suggestInput-suggestionsWrapper is__catalogue"},(0,a.h)(r.default,{selectedTags:i,onSelect:o}))))},45428:function(e,t,s){"use strict";var i=s(24994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=s(76148),o=i(s(44015)),n=i(s(93849)),r=s(2121);const l=e=>{e.stopPropagation(),$(document).trigger("enableFocusMode")};t.default=({value:e,isDeletable:t=!0,onDelete:s,onClick:i,isNew:c,onPressEnter:d})=>{return(0,a.h)("div",{className:"suggestInput-tag "+(c?"is__new":""),tabIndex:"0",onKeyDown:(h=()=>s&&s(!1),u=()=>d&&d(e),({code:e})=>(({Enter:u,Backspace:h}[e]||r.noop)())),onClick:t=>{l(t),i&&i(e)},onDblClick:t=>{l(t),d&&d(e)}},(0,a.h)("div",{className:"suggestInput-tagContainer"},(0,a.h)("span",{className:"suggestInput-tagValue"},e),(0,a.h)(o.default,{if:c,className:"suggestInput-tagNewLabel"},"новый"),(0,a.h)(o.default,{if:t,className:"suggestInput-tagDelete"},(0,a.h)("button",{tabIndex:"-1",className:"suggestInput-tagDeleteCross",onClick:e=>{l(e),s&&s()}},(0,a.h)(n.default,null)))));var h,u}},57239:function(e,t,s){"use strict";var i=s(24994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=s(76148),o=i(s(52092)),n=i(s(45428)),r=i(s(71058)),l=s(20690);const c=e=>e||(()=>{});t.default=({registerRef:e,selectedTags:t,handleSuggestionDelete:s,handleInputFocus:i,handleInputChange:d,handleSuggestionSelect:h,handleKeyDown:u,currentValue:p,onCatalogueOpen:m,suggestionType:f})=>{return(0,a.h)("div",null,(0,a.h)(r.default,{direction:"HORIZONTAL_TOP",className:"suggestInput-tagsWrapper"},t.map((v=s,g=h,e=>(0,a.h)(n.default,{value:e.value,onDelete:v(e),onPressEnter:g(e),isNew:e.isTagNew})))),(0,a.h)(r.default,{className:"suggestInput-inputWrapper",nextDirectionButton:"PROPER"===f?"ArrowDown":null},(0,a.h)(o.default,{_ref:e,placeholder:!t.length&&"Теги",onFocus:c(i),onInput:c(d),onKeyDown:c(u),value:p}),(0,a.h)("button",{tabIndex:"-1",onClick:c(m),className:"button is__thin is__textColor is__noBorder suggestInput-catalogueButton"},(0,a.h)(l.DropdownIcon,null))));var v,g}},88289:function(e,t,s){"use strict";var i=s(86019),a=s(24994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=s(76148),n=a(s(2733)),r=a(s(32485)),l=a(s(38309)),c=s(67697),d=s(45169),h=s(52630),u=a(s(43631)),p=a(s(12177)),m=s(3988),f=s(92445),v=a(s(73354)),g=a(s(66169)),b=a(s(23951));const _={question:"",attachmentUrl:"",isValid:!1,isLoading:!1,hasError:!1};class y extends o.Component{constructor(e){super(e),this.user=window.application.user||{},this.isAuthenticated=!!this.user.id,this.scope="sovietAskFormDraft",this.dropAttachmentFile=[],this.userData={name:this.isAuthenticated?this.user.name:(n.default.get("name")||"").replace(/\+/g," ")||null,email:this.isAuthenticated?this.user.email:n.default.get("email")||null};const t=(0,m.mergeState)(_,this.userData||{});this.state=(0,m.mergeState)(t,(0,m.readState)(this.scope)),this.validityStates={name:this.isAuthenticated,email:this.isAuthenticated},this.handleInput=this.handleInput.bind(this),this.handleAuthorFieldsetEdit=this.handleAuthorFieldsetEdit.bind(this),this.displayDropAttachment=this.displayDropAttachment.bind(this),this.displayAttachment=this.displayAttachment.bind(this),this.deleteAttachment=this.deleteAttachment.bind(this),this.submit=this.submit.bind(this),this.reset=this.reset.bind(this),this.onInputValidityChange=this.onInputValidityChange.bind(this),this.handleFetchError=this.handleFetchError.bind(this)}get isFieldsValid(){return Object.keys(this.validityStates).every(e=>this.validityStates[e])}get isValid(){return this.state.question&&this.state.question.trim()&&this.isFieldsValid}get isDisabled(){return!this.isValid||this.state.isLoading}componentDidMount(){const{name:e,email:t}=this.state;e&&t&&setTimeout(()=>this.textarea.focus(),500)}componentDidUpdate(){const{name:e,email:t,question:s}=this.state,i={name:e&&e.trim()?e:void 0,email:t&&t.trim()?t:void 0,question:s};(0,m.persistRawState)(this.scope,i)}clearRememberedQuestion(){try{window.localStorage.removeItem(this.scope)}catch(e){console.warn("Failed to clear remembered scope: ",e)}}handleInput(e){this.setState({question:e.target.value,isValid:this.isValid,hasError:!1})}handleAuthorFieldsetEdit({name:e=this.state.name,email:t=this.state.email}){this.setState({name:e,email:t})}displayAttachment(){if(!this.fileInput||!this.fileInput.files)return;const{files:e}=this.fileInput,t=e[0];
2(0,f.readAsDataURL)(t).then(e=>this.setState({attachmentUrl:e})),this.dropAttachmentFile.length&&this.deleteDropAttachment()}displayDropAttachment(e){if(!(0,f.isValidImageUpload)(e))return;const t=e[0];(0,f.readAsDataURL)(t).then(e=>this.setState({attachmentUrl:e})),this.dropAttachmentFile=[],this.dropAttachmentFile.push(t),this.fileInput.files.length&&this.deleteInputAttachment()}deleteInputAttachment(){this.fileInput.value="",this.setState({attachmentUrl:""})}deleteDropAttachment(){this.dropAttachmentFile=[],this.setState({attachmentUrl:""})}deleteAttachment(){this.fileInput&&this.fileInput.files&&this.fileInput.files.length&&this.deleteInputAttachment(),this.dropAttachmentFile.length&&this.deleteDropAttachment()}onInputValidityChange(e,t){this.validityStates[e]=t,this.setState({isValid:this.isValid,hasError:!1})}submit(e){if(!this.isValid)return;this.setState({isLoading:!0,hasError:!1});const t=this.toFormData(e);(0,l.default)(t).then(e=>{if(!e.ok)throw Error(e.statusText);this.handleSentAsk()}).then(()=>this.reset()).catch(this.handleFetchError)}toFormData(e){let t=new FormData;return Object.keys(e).forEach(s=>t.append(s,e[s])),this.fileInput&&this.fileInput.files&&this.fileInput.files.length&&t.append("image",this.fileInput.files[0]),this.dropAttachmentFile.length&&(t.set("_file_image",this.dropAttachmentFile[0].name),t.append("image",this.dropAttachmentFile[0])),t}handleSentAsk(){this.state.name&&n.default.set("name",this.state.name),this.state.email&&n.default.set("email",this.state.email),$(document).trigger("sovietAskSent"),this.setState({question:""}),this.clearRememberedQuestion(),this.props.onFormSubmit()}handleFetchError(){this.setState({hasError:!0,isLoading:!1})}reset(){this.setState({..._,name:this.state.name,email:this.state.email})}render(){const e=(0,r.default)("sovietAskForm",{is__loading:this.state.isLoading});return(0,o.h)(c.Form,{className:e,onSubmit:this.submit},(0,o.h)(v.default,{name:this.state.name,email:this.state.email,onEdit:this.handleAuthorFieldsetEdit,onValidityChange:this.onInputValidityChange}),(0,o.h)("div",{className:"formLabel"},(0,o.h)("label",{htmlFor:"new-question"},i.t("soviet.askForm.question"))),(0,o.h)("div",{className:"formTextarea-wrapper"},(0,o.h)(u.default,{id:"new-question",name:"question",inputRef:e=>this.textarea=e,className:"formTextarea sovietAskForm-text",value:this.state.question,onInput:this.handleInput})),this.state.attachmentUrl&&(0,o.h)("div",{className:"sovietAskForm-attachment is__position",style:{backgroundImage:`url(${this.state.attachmentUrl})`}},(0,o.h)(p.default,{onClick:this.deleteAttachment})),(0,o.h)("footer",{class:"sovietAskForm-footer"},(0,o.h)("div",{className:"sovietAskForm-submitWrapper"},(0,o.h)("button",{className:"button is__enlargedOnMobiles",type:"submit",disabled:this.isDisabled},i.t("soviet.askForm.send"))),this.state.hasError&&(0,o.h)(d.Caption,{className:"sovietAskForm-error error"},i.t("soviet.askForm.error")),(0,o.h)("div",{className:"formAttach attach"},(0,o.h)(h.AttachmentIconWithHover,null),(0,o.h)("input",{ref:e=>this.fileInput=e,type:"file","aria-label":"Прикрепить изображение",name:"_file_image",onChange:this.displayAttachment,accept:"image/jpeg,image/png,image/gif"}))),(0,o.h)(b.default,{onFileUpload:this.displayDropAttachment}),(0,o.h)(g.default,null))}}t.default=y},73354:function(e,t,s){"use strict";var i=s(86019);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=s(76148),o=s(67697);class n extends a.Component{constructor(e){super(e),this.handleNameInput=this.handleNameInput.bind(this),this.handleEmailInput=this.handleEmailInput.bind(this)}handleNameInput({value:e}){this.props.onEdit({name:e})}handleEmailInput({value:e}){this.props.onEdit({email:e})}render(e){const t=e.id||"new",s=[{id:`${t}-name`,name:"name",type:"text",onIput:this.handleNameInput,label:i.t("soviet.askForm.name"),placeholder:i.t("soviet.askForm.namePlaceholder"),value:e.name},{id:`${t}-email`,name:"email",type:"email",onIput:this.handleEmailInput,label:i.t("soviet.askForm.email"),placeholder:i.t("soviet.askForm.emailPlaceholder"),value:e.email}];return(0,a.h)("div",{className:"sovietAskForm-fieldset"},s.map(t=>(0,a.h)("div",{className:"sovietAskForm-fieldsetRow"},(0,a.h)("div",{className:"formLabel"}
2,(0,a.h)("label",{htmlFor:t.id},t.label)),(0,a.h)(o.FormInput,{className:"is__fullWidth",id:t.id,name:t.name,type:t.type,initialValue:t.value,placeholder:t.placeholder,onInput:t.onIput,onValidityChange:e.onValidityChange,required:!0}))))}}t.default=n},3279:function(e,t,s){"use strict";var i=s(86019);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=s(76148),o=s(45169);class n extends a.Component{shouldComponentUpdate(){return!1}render(){return(0,a.h)(o.Caption,{className:"sovietAskFormCaption"},i.t("soviet.askForm.caption"))}}t.default=n},69120:function(e,t,s){"use strict";var i=s(86019);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=s(76148);class o extends a.Component{shouldComponentUpdate(){return!1}render(){return(0,a.h)("p",{className:"sovietAskFormLeadText"},i.t("soviet.askForm.purpose"))}}t.default=o},28879:function(e,t,s){"use strict";var i=s(24994)(s(55609));$(".js__sovietAskFormPage").each(function(){$(this).reactify(i.default,$(this).data())})},55609:function(e,t,s){"use strict";var i=s(86019),a=s(24994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=s(76148),n=s(45169),r=s(27384),l=s(30782),c=a(s(40757)),d=a(s(88289)),h=a(s(3279)),u=a(s(69120)),p=a(s(7341));class m extends o.Component{constructor(e){super(e),this.state={isSent:!1},this.send=this.send.bind(this),this.reset=this.reset.bind(this)}handlePageTitle(e){document.title=e}send(){this.setState({isSent:!0}),this.handlePageTitle(i.t("soviet.askForm.success"))}reset(){this.setState({isSent:!1}),this.handlePageTitle(i.t("soviet.askForm.title"))}render(){const{isSent:e}=this.state;return e?(0,o.h)(p.default,{onClick:this.reset}):(0,o.h)("div",{class:"sovietAskFormPage"},(0,o.h)(c.default,null),(0,o.h)(n.Heading1,{className:"xxxxl"},i.t("soviet.askForm.title")),(0,o.h)(r.Cols,{divisionProportions:"11:1:4",transposeOnMobile:!0},(0,o.h)("div",{className:"sovietAskFormLeadText-wrapper"},(0,o.h)(u.default,null)),(0,o.h)("div",{className:"module device device__desktop device__laptop"}),(0,o.h)("div",{className:"module device device__desktop device__laptop sovietAskForm-icon"},(0,o.h)(l.SovietAskFormIcon,null))),(0,o.h)(r.Cols,{divisionProportions:"11:1:4",transposeOnMobile:!0},(0,o.h)("div",null,(0,o.h)(d.default,{onFormSubmit:this.send})),(0,o.h)("div",{className:"module device device__desktop device__laptop emptyCol"}),(0,o.h)(h.default,null)))}}t.default=m},66169:function(e,t,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=s(76148);class a extends i.Component{constructor(e){super(e),this.state={summand01:Math.round(1e3*Math.random()),summand02:Math.round(1e3*Math.random())}}get summValue(){return this.state.summand01+this.state.summand02}render(){return(0,i.h)("div",{style:"display: none;"},(0,i.h)("input",{type:"text",name:"summand-01",value:this.state.summand01,id:"summand-01"}),(0,i.h)("input",{type:"text",name:"summand-02",value:this.state.summand02,id:"summand-02"}),(0,i.h)("input",{type:"text",name:"result",id:"result",value:this.summValue}))}}t.default=a},7341:function(e,t,s){"use strict";var i=s(86019),a=s(24994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=s(76148),n=s(45169),r=s(27384),l=a(s(3279));class c extends o.Component{render(){return(0,o.h)("div",null,(0,o.h)(n.Heading1,{className:"is__large"},i.t("soviet.askForm.thankYou")),(0,o.h)(r.Cols,{className:"sovietAskFormSuccessFrame",divisionProportions:"11:1:4",transposeOnMobile:!0},(0,o.h)("div",null,(0,o.h)("p",{className:"sovietAskFormSuccessFrame-caption",dangerouslySetInnerHTML:{__html:i.t("soviet.askForm.questionSent")}}),(0,o.h)("div",{className:"module device device__desktop device__laptop"},(0,o.h)("div",{className:" is__align-left"},(0,o.h)("a",{onClick:this.props.onClick,className:"button is__thin"},i.t("soviet.askForm.anotherQuestion"))))),(0,o.h)("div",{className:"module device device__desktop device__laptop emptyCol"}),(0,o.h)(l.default,null)),(0,o.h)("div",{className:"module device device__mobile"},(0,o.h)("div",{className:" is__align-left"},(0,o.h)("a",{onClick:this.props.onClick,className:"button is__thin"},i.t("soviet.askForm.anotherQuestion")))))}}t.default=c},23951:function(e,t,s){"use strict";var i=s(24994);
2Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=s(76148),o=i(s(32485)),n=i(s(40963));class r extends a.Component{componentDidMount(){const e=$(document);e.on("appDragStart.sovietAskFormFileUpload",()=>this.setState({isDragOver:!0})),e.on("appDragEnd.sovietAskFormFileUpload",()=>this.setState({isDragOver:!1})),e.on("appDrop.sovietAskFormFileUpload",(e,t)=>this.props.onFileUpload(t.files))}componentWillUnmount(){$(document).off("appDragStart.sovietAskFormFileUpload appDragEnd.sovietAskFormFileUpload appDrop.sovietAskFormFileUpload")}render(){const e=(0,o.default)("sovietAskFormFileUploader",{is__dragOver:this.state.isDragOver});return(0,a.h)("div",{className:e},(0,a.h)(n.default,null))}}t.default=r},82569:function(e,t,s){"use strict";var i=s(24994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=s(76148),o=i(s(58509)),n=i(s(16297));class r extends a.Component{constructor(e){super(e),this.state={isEditable:!1},this.handleEditableToggle=this.handleEditableToggle.bind(this)}handleEditableToggle(e){this.setState({isEditable:e})}render(e){return this.state.isEditable&&!e.isDefaultView?(0,a.h)(n.default,{comment:e.comment,toggleEditable:this.handleEditableToggle,onAfterEdit:e.onAfterEdit}):(0,a.h)(o.default,{comment:e.comment,toggleEditable:this.handleEditableToggle,isDefaultView:e.isDefaultView,onStatusUpdate:e.onStatusUpdate})}}t.default=r},41498:function(e,t,s){"use strict";var i=s(24994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=s(76148),o=i(s(32485)),n=i(s(92566)),r=i(s(70635));const l=Object.values(n.default).reduce((e,t)=>(t.authorEmails.forEach(s=>e[s]=t),e),{}),c=({comment:e})=>{const t=l[e.email]||{},s=t.name||e.name;return(0,a.h)("span",null,(0,a.h)(r.default,{name:s,isActive:!!e.sovietUsername,src:t.authorAvatarUrl||e.avatarUrl}),(0,a.h)("span",{className:(0,o.default)("sovietComment-authorName",{link:!!e.sovietUsername})},s))};t.default=({comment:e})=>(0,a.h)("div",{className:"module sovietComment-author"},(0,a.h)("div",null,e.sovietUsername&&(0,a.h)("a",{href:`/bb/soviet/${e.sovietUsername}/`,name:e.sovietUsername,className:"no-u"},(0,a.h)(c,{comment:e})),!e.sovietUsername&&(0,a.h)(c,{comment:e})))},16297:function(e,t,s){"use strict";var i=s(24994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=s(76148),o=i(s(94634)),n=i(s(43631)),r=i(s(32485)),l=i(s(22443)),c=i(s(44386)),d=s(67697),h=s(45169),u=s(92445),p=i(s(61312)),m=i(s(27886));class f extends a.Component{constructor(e){super(e),this.state={name:e.comment.name,email:e.comment.email,text:e.comment.text,status:e.comment.status,isValid:!1,isSent:!1,hasError:!1,attachmentUrl:e.comment.imageUrl,isAttachmentDeleted:!1},this.isCommentAuthorAuthenticated=!!e.comment.sovietUsername,this.isEditable=!this.isCommentAuthorAuthenticated||!(0,c.default)(e.comment.name),this.validityStates=this.isCommentAuthorAuthenticated?{}:{name:!1,email:!1},this.handleInput=this.handleInput.bind(this),this.handleAuthorFieldsetEdit=this.handleAuthorFieldsetEdit.bind(this),this.displayAttachment=this.displayAttachment.bind(this),this.deleteAttachment=this.deleteAttachment.bind(this),this.submit=this.submit.bind(this),this.onInputValidityChange=this.onInputValidityChange.bind(this),this.handleFetchError=this.handleFetchError.bind(this),this.finishEditing=this.finishEditing.bind(this)}get isValid(){return this.state.text&&this.state.text.trim()&&Object.keys(this.validityStates).every(e=>this.validityStates[e])}get isDisabled(){return!this.isValid||this.state.isLoading}handleInput(e){this.setState({text:e.target.value,isValid:this.isValid,hasError:!1})}handleAuthorFieldsetEdit({name:e=this.state.name,email:t=this.state.email}){this.setState({name:e,email:t})}displayAttachment(){if(!this.fileInput||!this.fileInput.files)return;const{files:e}=this.fileInput,t=e[0];(0,u.readAsDataURL)(t).then(e=>this.setState({attachmentUrl:e}))}deleteAttachment(){this.fileInput.value="",this.setState({attachmentUrl:"",isAttachmentDeleted:!0})}onInputValidityChange(e,t){this.validityStates[e]=t,this.setState({isValid:this.isValid,hasError:!1})}submit(e){this.setState({isLoading:!0,hasError:!1});const t=this.toFormData(e);fetch(`/soviet/advice_comments/${this.props.comment.id}/`,{method:"PATCH",headers:{...l.default,Accept:"application/json"},body:t}).then(e=>{if(!e.ok)throw Error(e.statusText);this.handleSentComment()}).catch(this.handleFetchError)}toFormData(e){let t=new FormData;return Object.keys(e).forEach(s=>t.append(s,e[s])),t.append("status",this.state.status),this.fileInput&&this.fileInput.files&&this.fileInput.files.length&&t.append("image",this.fileInput.files[0]),this.state.isAttachmentDeleted&&t.append("image",""),t}handleSentComment(){this.setState({isSent:!0,text:""}),this.finishEditing(),this.props.onAfterEdit()}handleFetchError(){this.setState({hasError:!0,isLoading:!1})}finishEditing(){this.props.toggleEditable(!1)}render(e){const t=e.comment,s={disabled:this.isDisabled?"disabled":""},i=(0,r.default)("sovietCommentForm",{is__loading:this.state.isLoading});return(0,a.h)("div",{className:"module sovietComment",id:`comment-${t.id}`},(0,a.h)(d.Form,{className:i,onSubmit:this.submit},(0,a.h)(p.default,{commentId:t.id,name:t.name,email:t.email,isAuthenticated:this.isCommentAuthorAuthenticated}),this.isEditable&&(0,a.h)(m.default,{id:t.id,name:this.state.name,email:this.state.email,onEdit:this.handleAuthorFieldsetEdit,onValidityChange:this.onInputValidityChange,disableEmailValidation:!0}
2),(0,a.h)("div",{className:"formLabel"},(0,a.h)("label",{htmlFor:`${t.id}-text`},"Комментарий")),(0,a.h)("div",{className:"formTextarea-wrapper sovietCommentForm-textWrapper"},(0,a.h)(n.default,{id:`${t.id}-text`,name:"text",className:"formTextarea",value:this.state.text,onInput:this.handleInput})),this.state.attachmentUrl&&(0,a.h)("div",{className:"sovietCommentForm-attachment is__position",style:{backgroundImage:`url(${this.state.attachmentUrl})`}}),(0,a.h)("footer",{className:"sovietCommentForm-footer"},(0,a.h)("span",{className:"sovietCommentForm-submitWrapper"},(0,a.h)("button",(0,o.default)({className:"button is__enlargedOnMobiles",type:"submit"},s),"Сохранить")),(0,a.h)("button",{className:"sovietCommentForm-cancelButton",onClick:this.finishEditing},"Отменить"),this.state.hasError&&(0,a.h)("div",{className:"sovietCommentForm-error"},(0,a.h)(h.Caption,{className:"error"},"Ошибка отправки. Попробуйте ещё раз")))))}}t.default=f},58509:function(e,t,s){"use strict";var i=s(24994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=s(76148),o=i(s(32485)),n=i(s(87021)),r=s(73345),l=i(s(5634)),c=i(s(41498)),d=s(66192),h=s(45169),u=i(s(56457));class p extends a.Component{constructor(e){super(e),this.state={status:e.comment.status},this.approve=this.approve.bind(this),this.edit=this.edit.bind(this),this.sink=this.sink.bind(this),this.unsink=this.unsink.bind(this)}componentDidUpdate(e){this.props.comment.status!==e.comment.status&&this.setState({status:this.props.comment.status})}buildCommentTextHTML(){return{__html:(0,l.default)({body:this.props.comment.text,$:$})}}edit(){this.props.toggleEditable(!0)}updateStatus(e,t=e){const s=this.state.status;return this.setState({status:t}),fetch(`/soviet/advice_comments/${this.props.comment.id}/`,{method:"PATCH",headers:n.default,body:JSON.stringify({status:e})}).then(e=>{e.ok||this.setState({status:s}),this.props.onStatusUpdate()}).catch(e=>console.error(e))}approve(){this.updateStatus("approved","justApproved")}sink(){this.updateStatus("sunk")}unsink(){this.updateStatus("new")}render(e){const t=e.comment,s=t.impressionSummary||{},i="approved"===this.state.status,n="justApproved"===this.state.status,l="sunk"===this.state.status,p=(0,o.default)("module","sovietComment","textBox",`is__${this.state.status}`);return(0,a.h)("div",{className:p,id:`comment-${t.id}`},(0,a.h)(c.default,{comment:t}),(0,a.h)("div",{className:"module sovietComment-body"},(0,a.h)("div",{className:"sovietComment-text",dangerouslySetInnerHTML:this.buildCommentTextHTML()}),t.imageUrl&&(0,a.h)(d.Image,{src:t.imageUrl,size:t.imageSize,className:"sovietComment-asset",bordered:!0}
2)),!n&&(0,a.h)("footer",{className:"sovietComment-footer"},i&&(0,a.h)(u.default,{impressionSubject:t.impressionSubject,selected:s.selected,helpful:s.helpful,useless:s.useless,mod:"small"}),!i&&(0,a.h)("button",{className:"sovietComment-approveButton button is__thin is__small",onClick:this.approve},"Разрешить"),(0,a.h)(h.Caption,{className:"sovietComment-date"},(0,r.birmanize)(t.createdAt,{format:"dateYearOnly"})),!e.isDefaultView&&(0,a.h)("div",{className:"sovietComment-actions"},(0,a.h)("button",{className:"sovietComment-actionButton",onClick:this.edit},"✎"),!l&&(0,a.h)("button",{className:"sovietComment-actionButton",onClick:this.sink},"🗑"),l&&(0,a.h)("button",{className:"sovietComment-actionButton",onClick:this.unsink},"↺"))),n&&(0,a.h)("footer",{className:"sovietComment-footer"},(0,a.h)(h.Caption,null,"Опубликован")))}}t.default=p},27886:function(e,t,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=s(76148),a=s(67697),o=s(27384);class n extends i.Component{constructor(e){super(e),this.handleNameInput=this.handleNameInput.bind(this),this.handleEmailInput=this.handleEmailInput.bind(this)}handleNameInput({value:e}){this.props.onEdit({name:e})}handleEmailInput({value:e}){this.props.onEdit({email:e})}render(e){const t=e.id||"new",s=`${t}-name`,n=`${t}-email`;return(0,i.h)("div",{className:"sovietCommentForm-fieldset"},(0,i.h)(o.Cols,{className:"formRow is__transposeOnMobile",divisionProportions:"3:9"},(0,i.h)("div",{className:"formLabel sovietCommentForm-nameLabel"},(0,i.h)("label",{htmlFor:s},"Имя и фамилия")),(0,i.h)("div",null,(0,i.h)(a.FormInput,{className:"is__fullWidth",id:s,name:"name",type:"text",initialValue:e.name,placeholder:"Обязательны полностью",onInput:this.handleNameInput,onValidityChange:e.onValidityChange,required:!0}))),!e.askNameOnly&&(0,i.h)(o.Cols,{className:"formRow is__transposeOnMobile",divisionProportions:"3:9"},(0,i.h)("div",{className:"formLabel sovietCommentForm-emailLabel"},(0,i.h)("label",{htmlFor:n},"Эл. почта")),(0,i.h)("div",null,(0,i.h)(a.FormInput,{className:"is__fullWidth",id:n,name:"email",type:e.disableEmailValidation?"text":"email",initialValue:e.email,placeholder:"Не будет опубликована",onInput:this.handleEmailInput,onValidityChange:e.onValidityChange,required:!0}))))}}t.default=n},8037:function(e,t,s){"use strict";var i=s(24994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=s(76148),o=i(s(94634)),n=i(s(43631)),r=i(s(32485)),l=i(s(2733)),c=i(s(22443)),d=s(67697),h=s(27384),u=s(45169),p=s(52630),m=i(s(12177)),f=s(3988),v=s(92445),g=i(s(23817)),b=s(66567),_=i(s(61312)),y=i(s(27886)),S=i(s(99171));const w={name:(l.default.get("name")||"").replace(/\+/g," ")||null,email:l.default.get("email")||null,text:"",attachmentUrl:"",isValid:!1,isLoading:!1,isSent:!1,hasError:!1};class C extends a.Component{constructor(e){super(e),this.user=window.application.user||{},this.scope=window.application.pageId+"/comment/draft",this.sovietId=this.scope.match(/[\d]+/i)[0],this.isAuthenticated=!!this.user.id,this.state=(0,f.mergeState)(w,(0,f.readState)(this.scope)),this.validityStates=this.isAuthenticated?{}:{name:!1,email:!1},this.handleInput=this.handleInput.bind(this),this.handleAuthorFieldsetEdit=this.handleAuthorFieldsetEdit.bind(this),this.displayAttachment=this.displayAttachment.bind(this),this.deleteAttachment=this.deleteAttachment.bind(this),this.submit=this.submit.bind(this),this.reset=this.reset.bind(this),this.onInputValidityChange=this.onInputValidityChange.bind(this),this.handleFetchError=this.handleFetchError.bind(this)}get isValid(){return this.state.text&&this.state.text.trim()&&Object.keys(this.validityStates).every(e=>this.validityStates[e])}get isDisabled(){return!this.isValid||this.state.isLoading}componentDidUpdate(){(0,f.persistRawState)(this.scope,{text:this.state.text})}handleInput(e){this.setState({text:e.target.value,isValid:this.isValid,hasError:!1})}handleAuthorFieldsetEdit({name:e=this.state.name,email:t=this.state.email}){this.setState({name:e,email:t})}displayAttachment(){if(!this.fileInput||!this.fileInput.files)return;const{files:e}=this.fileInput,t=e[0];
2(0,v.readAsDataURL)(t).then(e=>this.setState({attachmentUrl:e}))}deleteAttachment(){this.fileInput.value="",this.setState({attachmentUrl:""})}onInputValidityChange(e,t){this.validityStates[e]=t,this.setState({isValid:this.isValid,hasError:!1})}submit(e){if(!this.isValid)return;this.setState({isLoading:!0,hasError:!1});const t=this.toFormData(e);fetch(`/soviet/advices/${this.sovietId}/comments`,{method:"POST",headers:{...c.default,Accept:"application/json"},body:t}).then(e=>{if(!e.ok)throw Error(e.statusText);this.handleSentComment()}).catch(this.handleFetchError)}toFormData(e){let t=new FormData;return Object.keys(e).forEach(s=>t.append(s,e[s])),this.fileInput&&this.fileInput.files&&this.fileInput.files.length&&t.append("image",this.fileInput.files[0]),t}handleSentComment(){this.state.name&&l.default.set("name",this.state.name),this.state.email&&l.default.set("email",this.state.email),$(document).trigger("sovietCommentSent"),this.setState({isSent:!0,text:""})}handleFetchError(){this.setState({hasError:!0,isLoading:!1})}reset(){this.setState({...w,name:this.state.name,email:this.state.email})}render(){const e={disabled:this.isDisabled?"disabled":""},t=(0,r.default)("sovietCommentForm",{is__loading:this.state.isLoading});return this.state.isSent?(0,a.h)(g.default,{onClick:this.reset}):(0,a.h)(h.Cols,{className:"sovietCommentFormFloor is__transposeOnMobile",divisionProportions:"11:1:4"},(0,a.h)(d.Form,{className:t,onSubmit:this.submit},(0,a.h)(_.default,{name:this.user.name,email:this.user.email,avatarUrl:this.user.avatarUrl,isAuthenticated:this.isAuthenticated}),this.isAuthenticated&&(0,a.h)(b.SovietCommentFormAuthorEmail,{email:this.user.email}),this.isAuthenticated&&this.user.name&&(0,a.h)(b.SovietCommentFormAuthorName,{name:this.user.name}),(!this.isAuthenticated||!this.user.name)&&(0,a.h)(y.default,{name:this.state.name,email:this.state.email,onEdit:this.handleAuthorFieldsetEdit,onValidityChange:this.onInputValidityChange,askNameOnly:this.isAuthenticated&&!this.user.name}),(0,a.h)("div",{className:"formLabel"},(0,a.h)("label",{htmlFor:"new-text"},"Ваши соображения")),(0,a.h)("div",{className:"formTextarea-wrapper sovietCommentForm-textWrapper"},(0,a.h)(n.default,{id:"new-text",name:"text",className:"formTextarea",value:this.state.text,onInput:this.handleInput})),this.state.attachmentUrl&&(0,a.h)("div",{className:"sovietCommentForm-attachment is__position",style:{backgroundImage:`url(${this.state.attachmentUrl})`}},(0,a.h)(m.default,{onClick:this.deleteAttachment})),(0,a.h)("footer",{className:"sovietCommentForm-footer"},(0,a.h)("span",{className:"sovietCommentForm-submitWrapper"},(0,a.h)("button",(0,o.default)({className:"button is__enlargedOnMobiles",type:"submit"},e),"Отправить")),this.state.hasError&&(0,a.h)("div",{className:"sovietCommentForm-error"},(0,a.h)(u.Caption,{className:"error"},"Ошибка отправки. Попробуйте ещё раз")),(0,a.h)("div",{className:"sovietCommentForm-attach attach"},(0,a.h)(p.AttachmentIconWithHover,null),(0,a.h)("input",{ref:e=>this.fileInput=e,type:"file","aria-label":"Прикрепить изображение",name:"attachment",onChange:this.displayAttachment,accept:"image/jpeg,image/png,image/gif"})))),(0,a.h)("div",{className:"module device device__desktop device__laptop"}),(0,a.h)(S.default,null))}}t.default=C},25810:function(e,t,s){"use strict";var i=s(24994)(s(8037));$(".js__sovietCommentForm").each(function(){$(this).reactify(i.default,$(this).data()),$(this).children().unwrap()})},66567:function(e,t,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SovietCommentFormAuthorName=t.SovietCommentFormAuthorEmail=void 0;var i=s(76148);class a extends i.Component{shouldComponentUpdate(){return!1}render(){return(0,i.h)("input",{type:"hidden",name:"name",value:this.props.name})}}t.SovietCommentFormAuthorName=a;class o extends i.Component{shouldComponentUpdate(){return!1}render(){return(0,i.h)("input",{type:"hidden",name:"email",value:this.props.email})}}t.SovietCommentFormAuthorEmail=o},61312:function(e,t,s){"use strict";var i=s(24994);
2Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=s(76148),o=i(s(92566)),n=i(s(44386)),r=i(s(32485)),l=i(s(70635));const c=Object.values(o.default).reduce((e,t)=>(t.authorEmails.forEach(s=>e[s]=t),e),{});t.default=({commentId:e,name:t,email:s,isAuthenticated:i,avatarUrl:o})=>{const d=c[s]||{},h=i&&(0,n.default)(t),u=(0,r.default)("sovietCommentForm-authorRow",{is__authenticated:h,not__authenticated:!h});return(0,a.h)("div",{className:u},(0,a.h)(l.default,{name:t,isActive:h,src:d.authorAvatarUrl||o}),h&&(0,a.h)("div",{className:"sovietCommentForm-author"},t,(0,a.h)("span",{className:"sovietCommentForm-authorEmail"},", ",(0,a.h)("a",{className:"is__masked",href:`mailto:${s}`},s))),!h&&(0,a.h)("div",{className:"sovietCommentForm-author"},(0,a.h)("label",{htmlFor:`${e}-name`},"Имя и фамилия")))}},99171:function(e,t,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=s(76148),a=s(45169);class o extends i.Component{shouldComponentUpdate(){return!1}render(){return(0,i.h)("div",{className:"sovietCommentFormCaption"},(0,i.h)(a.Caption,null,"Цель рубрики — обсуждение вопросов дизайна, веб-разработки, переговоров, редактуры и управления."),(0,i.h)(a.Caption,null,"Комментарии модерируются. Мы публикуем комментарии, которые добавляют к уже сказанному новые мысли и хорошие примеры."),(0,i.h)(a.Caption,null,(0,i.h)("a",{href:"/soviet/howtocomment/",class:"no-u"},(0,i.h)("span",{class:"is__somethingNew"},"Новое")),(0,i.h)("a",{href:"/soviet/howtocomment/"},"Станьте модератором")))}}t.default=o},23817:function(e,t,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=s(76148),a=s(45169);class o extends i.Component{render(){return(0,i.h)("div",{className:"sovietCommentFormSuccessFrame bureausans"},(0,i.h)("div",null,(0,i.h)(a.Heading3,null,"Спасибо! Ваш комментарий отправлен"),(0,i.h)(a.TextNode,null,"Если он соответствует нашим условиям, то, скорее всего, появится на сайте. В любом случае мы благодарны за ваш вклад в обсуждение.")),(0,i.h)("footer",null,(0,i.h)("button",{class:"button is__enlargedOnMobiles",onClick:this.props.onClick},"Написать ещё")))}}t.default=o},64307:function(e,t,s){"use strict";var i=s(24994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=s(76148),o=i(s(87021)),n=i(s(75313)),r=i(s(67905)),l=s(45169),c=i(s(8168)),d=i(s(82569));const h={approved:0,new:0,sunk:0},u={all:/soviet\/[\d]+\/?(comments|preview|preview-comments)?\/?$/i,new:/soviet\/[\d]+\/comments\/new\/?$/i,sunk:/soviet\/[\d]+\/comments\/sunk\/?$/i};class p extends a.Component{constructor(e){super(e),this.state={comments:[],count:h,activeTab:"",hasFetchedComments:!1},this.isModerator=window.application.user&&(window.application.user.isStaff||window.application.user.isModerator),this.isDefaultView=!this.isModerator,this.updateLocation=this.updateLocation.bind(this),this.countComments=this.countComments.bind(this),this.refreshCommentsList=this.refreshCommentsList.bind(this),this.recountComments=this.recountComments.bind(this),this.setActiveTab=this.setActiveTab.bind(this)}componentDidMount(){this.setActiveTab(),this.refreshCommentsList(),$(window).on("popstate.comments",this.setActiveTab),this.isModerator&&$(document).on("sovietCommentSent",this.refreshCommentsList)}componentWillUnmount(){$(window).off("popstate.comments")}componentDidUpdate(e,t){this.state.hasFetchedComments!==t.hasFetchedComments&&this.scrollSelectedCommentIntoView()}scrollSelectedCommentIntoView(){const e=window.location.hash.substring(1);e&&e.length&&requestAnimationFrame(()=>{const t=document.getElementById(e)||document.getElementsByName(e)[0];t&&t.scrollIntoView()})}countComments(e){const t=e.reduce((e,t)=>
2(e[t.status]+=1,e),{...h});this.setState({count:t})}fetchSovietComments(){return fetch(`/soviet/advices/${this.props.sovietKey}/comments/`,{headers:o.default}).then(e=>e.json())}refreshCommentsList(){this.fetchSovietComments().then(e=>{this.setState({hasFetchedComments:!0,comments:e.map(n.default)},()=>this.countComments(this.state.comments))}).catch(e=>console.error(e))}recountComments(){this.fetchSovietComments().then(e=>this.countComments(e)).catch(e=>console.error(e))}setActiveTab(){if(this.isDefaultView)return void this.setState({activeTab:"approved"});const e=window.location.pathname,t=Object.keys(u).find(t=>u[t].test(e));t&&this.setState({activeTab:t})}updateLocation(e,t){window.history.pushState({},e,t),this.setActiveTab(),this.refreshCommentsList()}get visibleComments(){return this.state.comments.filter(e=>"all"===this.state.activeTab?"approved"===e.status||"new"===e.status:e.status===this.state.activeTab).sort(r.default)}renderComments(){return this.visibleComments.map(e=>(0,a.h)(d.default,{key:e.id,comment:e,isDefaultView:this.isDefaultView,onAfterEdit:this.refreshCommentsList,onStatusUpdate:this.recountComments}))}render(e){const t=this.state.count.approved>0;return!this.state.comments.length||this.isDefaultView&&!t?(0,a.h)(l.Heading2,null,"Комментариев пока нет"):(0,a.h)("div",null,this.isDefaultView&&(0,a.h)(l.Heading2,null,"Комментарии"),!this.isDefaultView&&(0,a.h)(c.default,{sovietKey:e.sovietKey,activeTab:this.state.activeTab,count:this.state.count,changeTabAction:this.updateLocation}),!!this.visibleComments.length&&(0,a.h)("div",{className:"module is__textWidth"},this.renderComments()))}}t.default=p},40636:function(e,t,s){"use strict";var i=s(24994)(s(64307));$(".js__sovietComments").each(function(){const e=$(this),{sovietKey:t}=(s=e.data("options"),JSON.parse(decodeURIComponent(s)));var s;e.reactify(i.default,{sovietKey:t},()=>{e.children(".sovietComments__ssr").remove()}),e.children().unwrap()})},8168:function(e,t,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=s(76148),a=s(20270);class o extends i.Component{constructor(e){super(e),this.baseUrl=`/soviet/${e.sovietKey}/comments/`}switchTab(e,t){t.preventDefault(),this.props.changeTabAction("",e)}render(e){const t=e.count.approved+e.count.new,s="all"===e.activeTab,o="new"===e.activeTab,n="sunk"===e.activeTab;return(0,i.h)(a.Product,{name:"Комментарии",mod:"h2"},(0,i.h)(a.ProductMenuItem,{link:this.baseUrl,isActive:s,isDisabled:0===t&&!s,count:t,onClick:this.switchTab.bind(this,this.baseUrl)},"Все"),(0,i.h)(a.ProductMenuItem,{link:`${this.baseUrl}new/`,isActive:o,isDisabled:0===e.count.new&&!o,count:e.count.new,onClick:this.switchTab.bind(this,`${this.baseUrl}new/`)},"Неопубликованные"),(0,i.h)(a.ProductMenuItem,{link:`${this.baseUrl}sunk/`,isActive:n,isDisabled:0===e.count.sunk&&!n,onClick:this.switchTab.bind(this,`${this.baseUrl}sunk/`)},"Вода"))}}t.default=o},70429:function(e,t,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return""!==$((0,i.formatText)(e)).find("a").remove().end().text().trim()};var i=s(73345)},72617:function(e){"use strict";e.exports=({coverUrl:e,coverSize:t})=>e&&t.every(e=>e)},14139:function(e,t,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=s(76148);t.default=e=>{const t=(e=>e.maxlength-e.text.length)(e);return(0,i.h)("div",{className:"sovietCompilation-counter "+(t<0?"is__exceeded":"")},t)}},31773:function(e,t,s){"use strict";var i=s(86019),a=s(24994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=s(76148),n=s(70753),r=a(s(32485)),l=s(52346),c=a(s(38987)),d=a(s(86289)),h=a(s(43830)),u=a(s(15146)),p=a(s(79090)),m=a(s(92243)),f=a(s(25796)),v=a(s(41407)),g=a(s(23570)),b=a(s(53926)),_=a(s(78564)),y=a(s(62205)),S=a(s(70429)),w=s(27384),C=s(45169),k=s(3027),T=s(11171);const N=()=>(0,o.h)(C.Caption,{className:"compilationHowtoLink"},(0,o.h)("a",{href:"/soviet/selected/howto/"},"Как сделать хорошую подборку советов"));class x{constructor(e){this.props=e,this.TITLE_MAX_LENGTH=45,this.TITLE_FONT_SIZE_SWITCH_ON=24,this.SUMMARY_MAX_LENGTH=100}isValid(){return this.props.title&&this._isLengthValid(this.props.title,this.TITLE_MAX_LENGTH)}_isLengthValid(e,t){return e&&e.length>0&&e.length<=t}}class P extends o.Component{constructor(e){super(e),this.$header=$(".js__header"),this.form=new x(this.props),this.setEmptyIf=this.setEmptyIf.bind(this)}setEmptyIf(e){this.setState({isEmpty:e})}componentDidUpdate(){this.form=new x(this.props),this.props.setCanPublish(this.form.isValid()),this.$header.toggleClass("is__inversed","white"===this.props.textColor),this.props.canEdit&&this.props.isReadOnly?this.$header.append(this._buildEditLink()):this.$header.remove(".js__edit")}_buildEditLink(){const e=this.props.isPublished?window.sovietCompilation.editLink:"/soviet/selected/new/";return $("<a />").attr("class","js__edit header-edit").attr("aria-label",i.t("site.editLinkLabel")).attr("href",e)}render(e){const t=(0,S.default)(e.description),s=(0,r.default)({compilation:!0,is__empty:this.state.isEmpty,can__publish:e.canPublish,is__published:e.isPublished,is__readOnly:e.isReadOnly,is__edit:!e.isReadOnly,[`is__${e.layout}`]:!0,[`is__${e.textColor}`]:!0,has__uselessDescription:!t,has__usefulDescription:t,has__cover:!!e.coverUrl,has__coverUploadError:e.hasCoverUploadError});return(0,o.h)("div",{className:s},(0,o.h)("div",{className:"compilationSplash"},(0,o.h)("div",{className:"compilationLayout"}
2,(0,o.h)(c.default,{placeholder:"Название",maxlength:this.form.TITLE_MAX_LENGTH,fontSizeSwitchOn:this.form.TITLE_FONT_SIZE_SWITCH_ON}),(0,o.h)("div",{className:"compilationLayout-margin"}),(0,o.h)(d.default,{placeholder:"Чем полезна подборка?",maxlength:this.form.SUMMARY_MAX_LENGTH})),(0,o.h)(p.default,null,(0,o.h)(c.default,{className:"device device__mobile",placeholder:"Название",maxlength:this.form.TITLE_MAX_LENGTH,fontSizeSwitchOn:this.form.TITLE_FONT_SIZE_SWITCH_ON})),!e.isReadOnly&&(0,o.h)(g.default,{className:"device device__laptop device__desktop"}),e.isReadOnly&&(0,o.h)("div",{className:"device laptop desktop"},(0,o.h)(h.default,null),(0,o.h)(u.default,null))),!e.isReadOnly&&(0,o.h)(g.default,{className:"device device__mobile"}),!e.isReadOnly&&(0,o.h)(w.Cols,{className:"compilationBottom",divisionProportions:"11:1:4"},(0,o.h)(f.default,{placeholder:"Не менее<br>1910×1000 пикселей",defaultUploadError:"Нужна картинка крупнее.<br>Не менее 1910×1000 пикселей"}),(0,o.h)(v.default,null)),(0,o.h)(d.default,{className:"device device__mobile",placeholder:"Чем полезна подборка?",maxlength:this.form.SUMMARY_MAX_LENGTH}),e.isReadOnly&&(0,o.h)("div",{className:"device mobile"},(0,o.h)(h.default,null),(0,o.h)(u.default,null)),(0,o.h)(m.default,null),e.canAssignCategory&&!e.isPublished&&(0,o.h)(y.default,null),e.isPublished&&t&&(0,o.h)("div",{className:"impressionsAndLikely module"},(0,o.h)("div",{className:"impressionsWrapper"},(0,o.h)(k.Impressions,{impressionSubject:`soviet/advice_compilation-${e.compilationId}`})),(0,o.h)(T.Likely,null)),!e.isPublished&&(0,o.h)(b.default,null),(0,o.h)(_.default,{setEmptyIf:this.setEmptyIf}),!e.isPublished&&(0,o.h)(N,null),e.isPublished&&!t&&(0,o.h)("div",{className:"impressionsAndLikely module"},(0,o.h)("div",{className:"impressionsWrapper"},(0,o.h)(k.Impressions,{impressionSubject:`soviet/advice_compilation-${e.compilationId}`})),(0,o.h)(T.Likely,null)))}}const I={setCanPublish:l.setCanPublish,setLayout:l.setLayout,setTextColor:l.setTextColor};t.default=(0,n.connect)(({sovietCompilation:e})=>({compilationId:e.id,isReadOnly:e.isReadOnly,isPublished:e.isPublished,canPublish:e.canPublish,canEdit:e.canEdit,canAssignCategory:e.canChangeApproval&&e.id,hasCoverUploadError:e.hasCoverUploadError,title:e.title,summary:e.summary,description:e.description,links:e.links,layout:e.layout,textColor:e.textColor,coverUrl:e.coverUrl}),I)(P)},76042:function(e,t,s){"use strict";var i=s(24994),a=s(76148),o=s(70753),n=i(s(31773)),r=i(s(1019)),l=s(3988),c=s(29856);{const e=e=>(0,a.h)(o.Provider,{store:(0,c.createStore)(e)},(0,a.h)(n.default,null));$(".js__compilation").each(function(){const t=$(this).attr("persistence-scope")||"soviet/selected/new",s=(0,l.mergeState)(c.DEFAULT_STATE,window.sovietCompilation||{});let i=s;const a=!s.isPublished&&!s.id,o=a;if(a){const e=(0,l.readState)(t);i=(0,l.mergeState)(s,e.sovietCompilation||{})}$(this).reactify(e,{...i,scope:t,shouldPersist:o})}),$(".js__sovietCompilationRows").each(function(){const e=window.SOVIET_COMPILATION_ROWS;$(this).reactify(r.default,e)})}},52346:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.setCanPublish=function(e){return{type:"SET_CAN_PUBLISH",canPublish:e}},t.setCategories=function(e){return{type:"SET_CATEGORIES",categories:e}},t.setCover=function({url:e,id:t}){return{type:"SET_COVER",customCoverUrl:e,url:e,id:t}},t.setCoverUploadError=function(){return{type:"SET_COVER_UPLOAD_ERROR"}},t.setCustomThemeLayout=function(e){return{type:"SET_CUSTOM_THEME_LAYOUT",layout:e}},t.setCustomThemeTextColor=function(e){return{type:"SET_CUSTOM_THEME_TEXT_COLOR",textColor:e}},t.setDescription=function(e){return{type:"SET_DESCRIPTION",description:e}},t.setHasPublishError=function(){return{type:"SET_HAS_PUBLISH_ERROR"}},t.setIsPublishing=function(){return{type:"SET_IS_PUBLISHING"}},t.setLayout=function(e){return{type:"SET_LAYOUT",layout:e}},t.setLinks=function(e){return{type:"SET_LINKS",links:e}},t.setSoviets=function(e){return{type:"SET_SOVIETS",soviets:e}},t.setSummary=function(e){return{type:"SET_SUMMARY",summary:e}},t.setTextColor=function(e){return{type:"SET_TEXT_COLOR",textColor:e}},t.setTheme=function({theme:e,layout:t,textColor:s,coverUrl:i}){return{type:"SET_THEME",theme:e,layout:t,textColor:s,coverUrl:i}},t.setTitle=function(e){return{type:"SET_TITLE",title:e}}},43830:function(e,t,s){"use strict";
2Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=s(76148),a=s(70753),o=s(45169);t.default=(0,a.connect)(({sovietCompilation:e})=>({authorName:e.userName,authorEnglishName:e.userEnglishName,authorGender:e.userGender,viewsCount:e.viewsCount}))(e=>e.authorName?(0,i.h)(o.Caption,{className:`compilationAuthor ${e.className}`},(0,i.h)("span",{className:"js__compilationAuthor"},"female"===e.authorGender?"Собрала ":"Собрал ",(0,i.h)("a",{href:`/soviet/selected/${e.authorEnglishName}/`},(0,i.h)("nobr",null,e.authorName))),e.viewsCount&&(0,i.h)("span",{className:"compilationViewsCount"},"👁 ",e.viewsCount)):null)},78564:function(e,t,s){"use strict";var i=s(24994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=s(76148),o=i(s(94634)),n=s(70753),r=s(52346),l=i(s(87021)),c=i(s(22046)),d=i(s(1019));class h extends a.Component{constructor(e){super(e),this.state={rows:[],soviets:[]}}componentDidMount(){this.props.links.length&&this._getRows(this.props.links)}componentDidUpdate(){$(".doubleHover").each(function(){new c.default($(this))})}componentWillReceiveProps(e){e.links.join("")!==this.props.links.join("")&&this._getRows(e.links)}_getRows(e){this.props.isPublished&&this.props.isReadOnly||fetch("/soviet/selected/build/",{method:"POST",credentials:"include",headers:l.default,body:JSON.stringify({links:e})}).then(e=>e.ok?e.json():Promise.resolve({rows:[],soviets:[]})).then(e=>{const t=[].concat.apply([],e.rows);this.setState({rows:e.rows,soviets:t}),this.props.setSoviets(t)})}render(e){const t=e.rows&&e.rows.length?e.rows:this.state.rows;return e.setEmptyIf(0===t.length),(0,a.h)(d.default,(0,o.default)({},e,{rows:t}))}}const u={setSoviets:r.setSoviets};t.default=(0,n.connect)(({sovietCompilation:e})=>({links:e.links,rows:e.rows,isPublished:e.isPublished,isReadOnly:e.isReadOnly,mainColumn:e.mainColumn}),u)(h)},62205:function(e,t,s){"use strict";var i=s(24994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=s(76148),o=s(70753),n=s(27384),r=i(s(20817)),l=s(52346);class c extends a.Component{constructor(e){super(e),this.categories=r.default.all().filter(e=>e.tags.length).concat(r.default.sunk),this.state={isCustom:e.categories&&e.categories.length>0},this.handleManualAssign=this.handleManualAssign.bind(this),this.handleCategoryChange=this.handleCategoryChange.bind(this)}handleManualAssign(){this.setState({isCustom:!this.state.isCustom})}handleCategoryChange(e){const t=e.target.value;this.props.setCategories([t])}render(e){const t=(e.categories||[])[0]||{}||e.mainColumn;return(0,a.h)(n.Cols,{className:"formRow compilationCategories",divisionProportions:"2:4:5"},(0,a.h)("div",{className:"formLabel"},(0,a.h)("label",{htmlFor:"compilationCategories"},"Рубрика")),(0,a.h)("div",null,(0,a.h)("select",{name:"compilationCategories",disabled:!this.state.isCustom,onChange:this.handleCategoryChange},this.categories.map(e=>(0,a.h)("option",{value:e.title,selected:e.title===t},e.title))),(0,a.h)("div",{className:"checkboxLabel"},(0,a.h)("label",null,(0,a.h)("input",{type:"checkbox",checked:this.state.isCustom,onChange:this.handleManualAssign}),"Задать вручную"))),(0,a.h)("div",null))}}const d={setCategories:l.setCategories};t.default=(0,o.connect)(({sovietCompilation:e})=>({mainColumn:e.mainColumn,categories:e.categories}),d)(c)},69408:function(e,t,s){"use strict";var i=s(86019),a=s(24994);Object.defineProperty(t,"__esModule",{value:!0}),t.TagsCell=t.HalfCell=t.FullCell=void 0;var o=s(76148),n=a(s(94634)),r=a(s(32485)),l=s(74267),c=s(66192),d=s(27384),h=s(73345),u=a(s(72617)),p=a(s(63581));const m=e=>{const t=(0,r.default)("module","doubleHover",{is__equalized:e.isEqualized});return(0,o.h)("a",{href:e.href,className:"compilationCell-cover sovietCover module doubleHover is__multiplied",style:{backgroundColor:e.soviet.coverBgColor}},(0,o.h)(c.Image,{src:e.coverUrl,size:e.coverSize,href:e.href,align:"top",fillModule:"true",className:t}))},f=e=>{const t=e.mainColumn===e.column||e.skipColumn?"":e.column;return(0,o.h)(l.LabelTitleLink,{className:(0,r.default)({doubleHover:(0,u.default)(e)}),label:t,title:e.title,linkText:e.linkText,linkSuffix:e.linkSuffix,href:e.href,size:e.size,align:e.align})};class v extends o.Component{render(e){const t=(0,u.default)(e),s=(0,r.default)("compilationRow","compilationCell","is__full",{is__reversed:e.isReversed,is__hyphenated:t,has__cover:t,has__noCover:!t},e.className.split(" "));return t?(0,o.h)(d.Cols,{divisionProportions:"12:4",className:s,transposeOnM
2obile:"true"},(0,o.h)(m,e),(0,o.h)(f,e)):(0,o.h)("div",{className:s},(0,o.h)(f,(0,n.default)({},e,{size:"large"})))}}t.FullCell=v;class g extends o.Component{render(e){return(0,u.default)(e)?(0,o.h)("div",{className:`compilationCell has__cover ${e.className}`},(0,o.h)(m,e),(0,o.h)(f,(0,n.default)({},e,{size:"small",align:""}))):(0,o.h)("div",{className:`compilationCell is__hyphenated has__noCover ${e.className}`},(0,o.h)(f,(0,n.default)({},e,{size:e.size})))}}t.HalfCell=g;class b extends o.Component{render(){if(!window.soviet||!window.soviet.relatedTags)return null;const e=window.soviet.tagColors,t=window.soviet.relatedTags,s=(0,r.default)("sovietTagsCell-list","is__special",`has__${t.length}Tags`);return(0,o.h)("div",{className:"compilationCell sovietTagsCell"},(0,o.h)(p.default,null,i.t("soviet.relatedTags")),(0,o.h)("ul",{className:s},t.map(t=>{const s={backgroundColor:e[t.name.replace(/[\s]/g," ")]};return(0,o.h)("li",{className:"sovietTagsCell-tag"},(0,o.h)("a",{className:"sovietTagsCell-link",href:`/soviet/${t.alias||t.slug}/`,style:s},(0,o.h)("span",{className:"sovietTagsCell-text"},(0,h.typograf)(t.name)),(0,o.h)("span",{className:"sovietTagsCell-sovietsAmount"},t.usage,(0,o.h)("span",{className:"sovietTagsCell-sovietsAmountCaption"}," "+(0,h.pluralize)(t.usage,"совет","совета","советов")))))})))}}t.TagsCell=b},32476:function(e,t,s){"use strict";var i=s(76148);class a extends i.Component{constructor(e){super(e),this.state={isCopied:!1},this.copy=this.copy.bind(this),this.cleanUp=this.cleanUp.bind(this)}componentDidMount(){$(document).on("touchstart.sovietCompilationCopy",this.cleanUp)}componentWillUnmount(){$(document).off("touchstart.sovietCompilationCopy")}copy(){window._isFullCopyInProcess=!0;const e=document.querySelector(".js__sovietCompilationHtml"),t=document.createRange();t.selectNode(e),window.getSelection().removeAllRanges(),window.getSelection().addRange(t),document.execCommand("copy"),window.getSelection().removeAllRanges(),this.setState({isCopied:!0})}cleanUp(){window._isFullCopyInProcess=!1,this.setState({isCopied:!1})}render(){const e=this.state.isCopied?"Скопировано":"Скопировать";return(0,i.h)("button",{className:"button compilationCopyButton is__small is__thin is__transparent is__enlargedOnMobiles",onClick:this.copy,onMouseout:this.cleanUp,"data-goal":"COMPILATION_COPY"},e)}}e.exports=a},79090:function(e,t,s){"use strict";var i=s(24994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=s(76148),o=s(70753),n=i(s(2700));const r=e=>(0,a.h)("div",{className:"compilationCover"},e.children),l=e=>e.nonRetinaCoverUrl?(0,a.h)(r,null,(0,a.h)("div",{className:"compilationCover-image image","data-src":e.coverUrl,"data-nonretina-src":e.nonRetinaCoverUrl},e.children)):(0,a.h)(r,null,(0,a.h)("div",{className:"compilationCover-image image is__fillModule"},(0,a.h)("img",{className:"image-img",src:e.coverUrl}),(0,a.h)("div",{className:"image-in"},e.children)));class c extends a.Component{render(e){return e.isReadOnly?(0,a.h)(l,e):(0,a.h)("div",null,(0,a.h)(l,e),(0,a.h)(n.default,null))}}t.default=(0,o.connect)(({sovietCompilation:e})=>({coverUrl:e.coverUrl,nonRetinaCoverUrl:e.nonRetinaCoverUrl,isReadOnly:e.isReadOnly}))(c)},2700:function(e,t,s){"use strict";var i=s(24994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=s(76148),o=s(70753),n=s(52346),r=i(s(40963)),l=i(s(22443)),c=s(92445);class d extends a.Component{constructor(e){super(e),this._displayCover=this._displayCover.bind(this),this._handleUploadError=this._handleUploadError.bind(this),this.dropCounter=0}componentDidMount(){const e=$(document);e.on("appDragStart.coverUpload",()=>this.setState({isDragOver:!0})),e.on("appDragEnd.coverUpload",()=>this.setState({isDragOver:!1})),e.on("appDrop.coverUpload",(e,t)=>this._handleDrop(t.files))}componentWillUnmount(){$(document).off("appDragStart.coverUpload appDragEnd.coverUpload appDrop.coverUpload")}render(){return(0,a.h)("div",{className:"compilationCoverUploader "+(this.state.isDragOver?"is__dragOver":"")},(0,a.h)(r.default,{file:this.state.uploadingFileName,loaded:this.state.uploadingFileLoaded,total:this.state.uploadingFileTotal,isActive:this.state.isUploading}))}_handleDrop(e){(0,c.isValidImageUpload)(e)&&this._upload(e)}_upload(e){this._uploadCover(e[0]).then(this._displayCover).catch(this._handleUploadError).then(()=>this.setState({isUploading:!1}))}_uploadCover(e){this.setState({isUploading:!0,uploadingFileName:e.name,uploadingFileTotal:e.size});const t=new FormData;return t.append("image",e),new Promise((e,s)=>{$.ajax({url:"/soviet/advice_compilation_covers",data:t,contentType:!1,processData:!1,headers:l.default,type:"POST",xhr:this._handleProgressUpdate.bind(this),success:t=>e(t),error:e=>s(e)})})}_handleProgressUpdate(){const e=new window.XMLHttpRequest;return e.upload.addEventListener("progress",e=>{e.lengthComputable&&this.setState({uploadingFileLoaded:e.loaded})},!1),e}_displayCover({url:e,id:t}){this.props.setCover({url:e,id:t})}_handleUploadError(){this.props.setCoverUploadError()}}const h={setCover:n.setCover,setCoverUploadError:n.setCoverUploadError};t.default=(0,o.connect)(null,h)(d)},92243:function(e,t,s){"use strict";var i=s(24994);
2Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=s(76148),o=s(70753),n=i(s(43631)),r=s(52346),l=s(47803),c=i(s(51575));class d extends a.Component{constructor(e){super(e),this.state={value:""},this.handleInput=this.handleInput.bind(this),this.handleFocus=this.handleFocus.bind(this),this.handleBlur=this.handleBlur.bind(this),this.rebuildLinks=this.rebuildLinks.bind(this)}rebuildLinks(e){this.props.setLinks((0,l.extractSovietKeys)(e))}handleInput(e){const t=e.target.value;this.props.setDescription(t),clearTimeout(this.setLinksTimeout),this.setLinksTimeout=setTimeout(this.rebuildLinks,300,t)}handleFocus(){this.setState({focus:!0})}handleBlur(){this.setState({focus:!1})}render(e){return e.isReadOnly?(0,a.h)(c.default,e):(0,a.h)("div",{className:"compilationLinks"},(0,a.h)("label",{htmlFor:"compilationLinks"},"Описание подборки и ссылки на советы"),(0,a.h)(n.default,{id:"compilationLinks",className:"compilationLinks-text "+(this.state.focus?"is__focused":""),placeholder:e.placeholder,value:e.description,onInput:this.handleInput,onFocus:this.handleFocus,onBlur:this.handleBlur}))}}const h={setLinks:r.setLinks,setDescription:r.setDescription};t.default=(0,o.connect)(({sovietCompilation:e})=>({links:e.links,soviets:e.soviets,description:e.description,descriptionHtml:e.descriptionHtml,isReadOnly:e.isReadOnly}),h)(d)},23474:function(e,t,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.addMetaToPlainTextVersionOf=c,t.groupSovietsByKey=l,t.markImportantLinks=function(e){return e.find("br+a, p a:last-child, p a:first-child, li a:first-child:last-child").filter((e,t)=>a.test(t.textContent)).addClass("is__importantLink"),e},t.placeSovietTitles=function(e,t){const s=l(t);return e.find("a").each((e,t)=>{const a=t.textContent,o=(0,i.extractSovietKey)(a);t.textContent=(s[o]||{}).title||a}),e},t.plainTextCompilationSelection=function(){const e=window.getSelection();if(e.rangeCount>0)return d(e.getRangeAt(0).cloneContents())},t.plainTextVersionOf=d,t.preprocessPlainText=function(e){return r(e)},t.wrapListLikeLinks=function(e,t){const s=e("<div>").append(e(t));return s.find("p img").unwrap(),s.find("p").each((t,s)=>{const i=e(s),a=e('<ul class="noIndent">');i.find("a+br+a").prev("br").remove(),i.find("br+a+a").prev().prev().remove(),i.find("a+a").each((t,s)=>o(e(s)).appendTo(a)),a.children().length>0&&e(s).after(a)}),n(s),s.html()};var i=s(47803);const a=/^(http:|https:|\/\/)/,o=e=>e.prev("a").add(e).wrap("<li>").parent(),n=e=>{e.find("p").filter((e,t)=>""===t.innerText.trim()).remove()},r=e=>e.replace(/(https?:\/\/.+|\[.+\]\(https?:\/\/.+\))\n((?!https?:\/\/.+|\[.+\]\(https?:\/\/.+\)))/gi,(e,t,s)=>`${t}\n\n${s}`);function l(e){return e.reduce((e,t)=>(e[t.key]=t,e),{})}function c(e){const t=$('meta[property="og:image"]').attr("content"),s=[$(".js__compilationTitle").first().text().trim(),$(".js__compilationSummary").first().text().trim(),$(".js__compilationAuthor").first().text().trim()].filter(e=>e).join("\n");
2return e.prepend($(`<p>${s}\n\n</p>`)),e.prepend($(`<p>${t}\n\n\n</p>`)),e}function d(e){let t=$(document.createElement("div")).append(e);window._isFullCopyInProcess&&(t=t.find(".js__sovietCompilationHtml")),t.find("a").each((e,t)=>t.textContent=t.href),t.find("br").replaceWith("\n"),t.find("li:not(:first-child)").before("\n"),t.find(".textNode + .textNode.is__list").find("li:first-child").before("\n"),t.find(".textNode + .textNode:not(.is__list)").find("p").before("\n");const s=["1","2","3"].map(e=>`.heading-${e}:not(:first-child) h${e}`).join(",");return t.find(s).before("\n\n"),(t.find(".js__sovietCompilationHtml").length||window._isFullCopyInProcess)&&c(t),t[0].textContent}},51575:function(e,t,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function({description:e,soviets:t}){const s=(0,a.wrapText)($,(0,o.wrapListLikeLinks)($,(0,a.formatText)((0,o.preprocessPlainText)(e)))),l=n(s,t),c=(0,a.sanitize)(l);return(0,i.h)("div",{className:"js__sovietCompilationHtml sovietCompilationHtml",onCopy:r,dangerouslySetInnerHTML:{__html:c}})};var i=s(76148),a=s(73345),o=s(23474);const n=(e,t)=>{const s=$("<div>").append($(e));return(0,o.placeSovietTitles)((0,o.markImportantLinks)(s),t).html()},r=e=>{e.clipboardData.setData("text/plain",(0,o.plainTextCompilationSelection)()),e.preventDefault()}},1019:function(e,t,s){"use strict";var i=s(24994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=s(76148),o=i(s(94634)),n=i(s(32485)),r=s(69408),l=s(27384),c=i(s(72617)),d=s(73345);const h={tags:r.TagsCell},u=e=>{const t=(e=>{const t=(e=>{const t=e.match(/soviet\/(?![\d])([\w]+)/i);return t&&t[1]||""})(e.soviet.url);return h[t]||null})(e);return t?(0,a.h)(t,null):(0,a.h)(r.HalfCell,(0,o.default)({mainColumn:e.soviet.mainColumn,skipColumn:e.soviet.skipColumn,column:e.soviet.column,title:e.soviet.hyphenatedCompiledTitle||e.soviet.hyphenatedTitle,linkText:`Совет ${e.soviet.authorGenitiveName}`,linkSuffix:(0,d.sovietCommentsCount)(e.soviet.commentsCount,e.soviet.newCommentsCount),href:e.soviet.url,coverUrl:e.soviet.coverUrl,coverSize:e.soviet.coverSize,isReversed:e.soviet.isReversed},e,{className:e.className||""}))},p=e=>(0,a.h)(l.Cols,{divisionProportions:e.doubleDivisionProportions||"11:5",className:"compilationRow",ribMask:[!1]},(0,a.h)(u,{soviet:e})),m=e=>{const t=(0,c.default)(e[0]),s=(0,c.default)(e[1]),i=!t&&!s,o=!t&&s||t&&!s,r=(0,n.default)("compilationRow","is__double","js__equalize",{is__textOnly:i});let d=i?"11:5":"1:1";d=i?e[0].doubleDivisionProportions||d:e[0].doubleImageDivisionProportions||d;const h=d.split(":").reverse().join(":"),p=e[0].isReversed?h:d;if(i)return(0,a.h)(l.Cols,{divisionProportions:p,className:r,isRibbed:"true",transposeOnMobile:"true"},(0,a.h)(u,{soviet:e[0],size:e[0].isReversed?"":"large"}),(0,a.h)(u,{soviet:e[1],size:e[0].isReversed?"large":""}));const m=p.split(":"),f=!t&&m[0]===m[1],v=!s&&m[1]===m[0];return(0,a.h)(l.Cols,{divisionProportions:p,className:r,ribMask:o||i?[!f,!v]:[!1,!1],mobileRibMask:[!t,!s],transposeOnMobile:"true"},(0,a.h)(u,{soviet:e[0],isEqualized:!0,size:m[0]<m[1]?"":"heading",align:m[0]===m[1]?"center":"",className:f?"is__center":"is__left"}),(0,a.h)(u,{soviet:e[1],isEqualized:!0,size:m[1]<m[0]?"":"heading",align:m[0]===m[1]?"center":"",className:v?"is__center":"is__left"}))},f=e=>{const t=(0,c.default)(e[0]),s=(0,c.default)(e[1]),i=(0,c.default)(e[2]),o=t&&s&&i,r=(0,n.default)("compilationRow","is__triple","js__equalize");return(0,a.h)(l.Cols,{divisionProportions:e[0].isReversed?"2:1:1":"1:1:2",className:r,ribMask:o?[!1,!1,!1]:[!0,!0,!0],mobileRibMask:[!t,!s,!i],transposeOnMobile:"true"},(0,a.h)(u,{soviet:e[0],isEqualized:!0,size:e[0].isReversed?"large":""}),(0,a.h)(u,{soviet:e[1],isEqualized:!0,className:"is__secondary"}),(0,a.h)(u,{soviet:e[2],isEqualized:!0,size:e[0].isReversed?"":"large"}))};t.default=e=>{const t=(0,n.default)("compilationRows",e.className);return(0,a.h)("div",{className:t},(s=e.rows,i=e,s.map(e=>{const t=e.map(e=>({...e,...i}));switch(e.length){case 1:return(0,a.h)(p,t[0]);case 2:return(0,a.h)(m,t);case 3:return(0,a.h)(f,t);default:return null}})));var s,i}},41407:function(e,t,s){"use strict";
2Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=s(76148),a=s(70753),o=s(52346),n=s(66275);const r=()=>(0,i.h)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 43 43"},(0,i.h)("path",{class:"icon-title",d:"M3,4H31V6H3ZM3,9H25v2H3ZM3,19H25v2H3Zm0-5H31v2H3Z"}),(0,i.h)("path",{class:"icon-description",d:"M3,32H20v1H3Zm0,3H20v1H3Zm0,3H13v1H3Z"})),l=()=>(0,i.h)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 43 43"},(0,i.h)("path",{class:"icon-title",d:"M3,4H23V6H3ZM3,9H19v2H3ZM3,19H19v2H3Zm0-5H23v2H3Z"}),(0,i.h)("path",{class:"icon-description",d:"M27,4H40V5H27Zm0,3H40V8H27Zm0,3h8v1H27Z"})),c=()=>(0,i.h)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 43 43"},(0,i.h)("path",{class:"icon-title",d:"M3.5,22h20v2H3.5Zm0,5h16v2H3.5Zm0,10h16v2H3.5Zm0-5h20v2H3.5Z"}),(0,i.h)("path",{class:"icon-description",d:"M27.5,22h13v1h-13Zm0,3h13v1h-13Zm0,3h8v1h-8Z"})),d=()=>(0,i.h)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 43 43"},(0,i.h)("path",{class:"icon-title",d:"M7,7H36V9H7Zm3,5H33v2H10ZM7,17H36v2H7Z"}),(0,i.h)("path",{class:"icon-description",d:"M14,28H29v1H14Zm0,3H29v1H14Zm3,3h9v1H17Z"}));class h extends i.Component{constructor(e){super(e),this.setThemeLayout=this.setThemeLayout.bind(this),this.setThemeTextColor=this.setThemeTextColor.bind(this)}setThemeLayout(e){"custom"===this.props.theme?this.props.setCustomThemeLayout(e):this.props.setLayout(e)}setThemeTextColor(e){"custom"===this.props.theme?this.props.setCustomThemeTextColor(e):this.props.setTextColor(e)}render(e){return e.isReadOnly?null:(0,i.h)("div",{className:"compilationLayoutSwitch"},(0,i.h)(n.IconSelector,{className:"compilationLayoutSwitch-layout"},(0,i.h)(n.IconSelectorItem,{className:"is__left "+("left"===e.layout?"is__active":""),onClick:()=>this.setThemeLayout("left")},(0,i.h)(r,null)),(0,i.h)(n.IconSelectorItem,{className:"is__top "+("top"===e.layout?"is__active":""),onClick:()=>this.setThemeLayout("top")},(0,i.h)(l,null)),(0,i.h)(n.IconSelectorItem,{className:"is__bottom "+("bottom"===e.layout?"is__active":""),onClick:()=>this.setThemeLayout("bottom")},(0,i.h)(c,null)),(0,i.h)(n.IconSelectorItem,{className:"is__center "+("center"===e.layout?"is__active":""),onClick:()=>this.setThemeLayout("center")},(0,i.h)(d,null))),(0,i.h)(n.IconSelector,{className:"compilationLayoutSwitch-color"},(0,i.h)(n.IconSelectorItem,{className:"is__white "+("white"===e.textColor?"is__active":""),onClick:()=>this.setThemeTextColor("white")},"A"),(0,i.h)(n.IconSelectorItem,{className:"is__black "+("black"===e.textColor?"is__active":""),onClick:()=>this.setThemeTextColor("black")},"A")))}}const u={setLayout:o.setLayout,setTextColor:o.setTextColor,setCustomThemeLayout:o.setCustomThemeLayout,setCustomThemeTextColor:o.setCustomThemeTextColor};t.default=(0,a.connect)(({sovietCompilation:e})=>({theme:e.theme,layout:e.layout,textColor:e.textColor,customThemeLayout:e.customThemeLayout,customThemeTextColor:e.customThemeTextColor,isReadOnly:e.isReadOnly}),u)(h)},53926:function(e,t,s){"use strict";var i=s(24994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=s(76148),o=s(70753),n=i(s(32485)),r=i(s(22443)),l=i(s(98999)),c=s(52346),d=s(29856);const h=Object.assign({},r.default,l.default);class u extends a.Component{constructor(e){super(e),this.publishCompilation=this.publishCompilation.bind(this)}publishCompilation(){this.props.canPublish&&(this.props.setIsPublishing(),this._sendCompilationData())}_publishUrl(){return this.props.compilationId?`/soviet/advice_compilations/${this.props.compilationId}`:"/soviet/advice_compilations"}_publishMethod(){return this.props.compilationId?"PUT":"POST"}_sendCompilationData(){return fetch(this._publishUrl(),{method:this._publishMethod(),headers:h,body:JSON.stringify(this.props.jsonData)}).then(e=>{e.ok?e.json().then(this._redirectToPublishedCompilation.bind(this)):this.props.setHasPublishError()})}_redirectToPublishedCompilation(e){try{localStorage.removeItem(this.props.scope)}catch{}window.location=`/soviet/selected/${e.user_english_name}/${e.slug}/`}render(e){const t=(0,n.default)({compilationPublishButton:!0,is__enlargedOnMobiles:!0,sticky:!0,button:!0,has__failed:e.hasPublishError}),s=e.compilationId?"Сохранить":"Опубликовать";return(0,a.h)("div",{className:"compilationPublishButton-shaft"},(0,a.h)("button",{onClick:this.publishCompilation,className:t,disabled:!e.canPublish||e.isPublishing},s))}}const p={setIsPublishing:c.setIsPublishing,setHasPublishError:c.setHasPublishError};t.default=(0,o.connect)(e=>({scope:e.sovietCompilation.scope,compilationId:e.sovietCompilation.id,canPublish:e.sovietCompilation.canPublish,isPublishing:e.sovietCompilation.isPublishing,hasPublishError:e.sovietCompilation.hasPublishError,jsonData:(0,d.storeToJsonParams)(e)}),p)(u)},52537:function(e,t,s){"use strict";
2Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=s(54384),a=s(47803);const o=(0,i.combineReducers)({sovietCompilation:(e={},t)=>{switch(t.type){case"SET_TITLE":return{...e,title:t.title,hasPublishError:!1};case"SET_SUMMARY":return{...e,summary:t.summary,hasPublishError:!1};case"SET_DESCRIPTION":return{...e,description:t.description,hasPublishError:!1};case"SET_LINKS":return{...e,links:t.links};case"SET_SOVIETS":return{...e,soviets:t.soviets,mainColumn:(0,a.detectMainColumn)(t.soviets)};case"SET_CATEGORIES":return{...e,categories:t.categories};case"SET_LAYOUT":return{...e,layout:t.layout,hasPublishError:!1};case"SET_CUSTOM_THEME_LAYOUT":return{...e,layout:t.layout,customThemeLayout:t.layout,hasPublishError:!1};case"SET_TEXT_COLOR":return{...e,textColor:t.textColor,hasPublishError:!1};case"SET_CUSTOM_THEME_TEXT_COLOR":return{...e,textColor:t.textColor,customThemeTextColor:t.textColor,hasPublishError:!1};case"SET_COVER":return{...e,coverUrl:t.url,customCoverUrl:t.url,nonRetinaCoverUrl:null,coverId:t.id,hasCoverUploadError:!1,hasPublishError:!1,theme:"custom"};case"SET_THEME":return{...e,theme:t.theme,layout:t.layout,textColor:t.textColor,coverUrl:t.coverUrl,nonRetinaCoverUrl:null,hasCoverUploadError:!1,hasPublishError:!1};case"SET_COVER_UPLOAD_ERROR":return{...e,coverUrl:"",hasCoverUploadError:!0};case"SET_CAN_PUBLISH":return{...e,canPublish:t.canPublish};case"SET_IS_PUBLISHING":return{...e,isPublishing:!0,hasPublishError:!1};case"SET_HAS_PUBLISH_ERROR":return{...e,isPublishing:!1,hasPublishError:!0};default:return e}}});t.default=o},15146:function(e,t,s){"use strict";var i=s(24994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=s(76148),o=i(s(32485));const n=()=>(0,a.h)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 27 27"},(0,a.h)("path",{d:"M13.3,20.4h1.5c0,0,0.5,0,0.7-0.3c0.2-0.2,0.2-0.6,0.2-0.6s0-2,0.9-2.3c0.9-0.3,2.1,1.9,3.4,2.8c0.9,0.6,1.7,0.5,1.7,0.5h3.4c0,0,1.7-0.1,0.9-1.5c0-0.1-0.5-1-2.5-2.8c-2.1-1.9-1.8-1.6,0.7-4.9c1.6-2,2.2-3.3,2-3.8s-1.3-0.4-1.3-0.4h-3.8c0,0-0.3,0-0.5,0.1s-0.3,0.4-0.3,0.4s-0.6,1.6-1.4,2.9c-1.7,2.8-2.4,3-2.6,2.8c-0.6-0.4-0.5-1.6-0.5-2.5c0-2.7,0.4-3.9-0.8-4.1c-0.6-0.1-0.9-0.2-1.9-0.2c-1.4,0-2.5,0-3.1,0.3C9.5,7,9.2,7.5,9.4,7.5s0.8,0.1,1.1,0.5c0.4,0.5,0.4,1.7,0.4,1.7s0.2,3.2-0.5,3.6c-0.5,0.3-1.2-0.2-2.7-2.8c-0.8-1.3-1-2-1.3-2.7C6.3,7.7,6.3,7.4,6.1,7.2C5.8,7,5.6,7,5.4,7C4.5,7,1.8,7,1.8,7S1.3,7,1,7.2C0.8,7.4,1,7.8,1,7.8s2.9,6.5,6,9.8C10,20.6,13.3,20.4,13.3,20.4"})),r=()=>(0,a.h)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 27 27"},(0,a.h)("path",{d:"M9.8,21.5c7.5,0,11.7-6.2,11.7-11.5V9.5c0.8-0.6,1.5-1.3,2-2.1C22.8,7.7,22,7.9,21.1,8c0.8-0.5,1.5-1.3,1.8-2.2c-0.8,0.5-1.7,0.8-2.6,1c-0.7-0.8-1.8-1.3-3-1.3c-2.3,0-4.1,1.8-4.1,4c0,0.3,0,0.6,0.1,0.9c-3.4-0.1-6.4-1.7-8.4-4.2C4.5,6.9,4.3,7.5,4.3,8.3c0,1.4,0.7,2.7,1.8,3.4c-0.6-0.1-1.3-0.3-1.8-0.6l0,0c0,2,1.4,3.6,3.3,3.9c-0.4,0.2-0.7,0.3-1.1,0.3c-0.3,0-0.5,0-0.8-0.1c0.5,1.6,2,2.8,3.8,2.8c-1.4,1.1-3.2,1.8-5.1,1.8c-0.3,0-0.6,0-1,0C5.3,20.8,7.5,21.5,9.8,21.5"})),l=()=>(0,a.h)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 27 27"},(0,a.h)("path",{d:"M22.2,5.1L4.4,12c-1.2,0.5-1.2,1.2-0.2,1.5L8.8,15l10.5-6.7c0.7-0.4,0.9-0.1,0.6,0.2l-8.5,7.8l0,0l0,0l0,0l0,0L11,21c0.5,0,0.8-0.2,1-0.5c0.6-0.6,2.1-2.2,2.1-2.2l4.6,3.4c0.8,0.5,1.5,0.2,1.7-0.8l3-14.4C23.7,5.3,23,4.7,22.2,5.1z"})),c=e=>{const t=(0,o.default)("compilationSocial-button",{[e.type]:e.type});return(0,a.h)("div",{className:t},"twitter"===e.type&&(0,a.h)(r,null),"vkontakte"===e.type&&(0,a.h)(n,null),"telegram"===e.type&&(0,a.h)(l,null))};t.default=class{shouldComponentUpdate(){return!1}render(){return(0,a.h)("div",{className:"compilationSocial likely"},(0,a.h)(c,{type:"twitter"}),(0,a.h)(c,{type:"vkontakte"}),(0,a.h)(c,{type:"telegram"}))}}},29856:function(e,t,s){"use strict";var i=s(24994);Object.defineProperty(t,"__esModule",{value:!0}),t.PERSISTABLE_PROPS=t.DEFAULT_STATE=void 0,t.createStore=function(e){const t=(0,a.createStore)(o.default,{sovietCompilation:e});return e.shouldPersist&&t.subscribe((0,n.persistState)(t,e.scope,e=>({sovietCompilation:l(e)}))),t},t.persistableState=l,t.storeToJsonParams=function(e){let t=l(e);return t.text_color=t.textColor,t.cover_id=t.coverId,t.advice_date_slugs=t.links,t};var a=s(54384),o=i(s(52537)),n=s(3988);t.DEFAULT_STATE={isReadOnly:!1,canPublish:!1,canEdit:!0,isPublishing:!1,hasPublishError:!1,title:"",summary:"",description:"",links:[],soviets:[],layout:"bottom",textColor:"black",customThemeLayout:"bottom",customThemeTextColor:"black",coverUrl:"",coverId:"",categories:[]};
2const r=t.PERSISTABLE_PROPS=["title","summary","description","links","layout","textColor","customThemeLayout","customThemeTextColor","coverUrl","coverId","customCoverUrl","categories","theme"];function l(e){return r.reduce((t,s)=>(t[s]=e.sovietCompilation[s],t),{})}},86289:function(e,t,s){"use strict";var i=s(24994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=s(76148),o=s(70753),n=i(s(32485)),r=s(73345),l=s(52346),c=i(s(14139)),d=i(s(32476));class h extends a.Component{constructor(e){super(e),this.handleInput=this.handleInput.bind(this),this.handleFocus=this.handleFocus.bind(this),this.handleBlur=this.handleBlur.bind(this)}handleInput(e){this.props.setSummary(e.target.value)}handleFocus(){this.setState({focus:!0})}handleBlur(){this.setState({focus:!1})}render(e){const t=(0,n.default)("compilationSummary-textWrapper",{is__focused:this.state.focus&&!e.isReadOnly,is__readOnly:e.isReadOnly});return(0,a.h)("div",{className:`compilationSummaryWrapper module ${e.className||""}`},(0,a.h)("div",{className:"compilationSummary"},!e.isReadOnly&&(0,a.h)(c.default,{maxlength:e.maxlength,text:e.summary}),e.isReadOnly&&(0,a.h)("div",{className:t},(0,a.h)("div",{className:"js__compilationSummary compilationSummary-text"},(0,r.typograf)(e.summary))),!e.isReadOnly&&(0,a.h)("div",{className:t},(0,a.h)("textarea",{className:"compilationSummary-text",placeholder:e.placeholder,value:e.summary,onInput:this.handleInput,onFocus:this.handleFocus,onBlur:this.handleBlur,readonly:e.isReadOnly}))),e.isReadOnly&&(0,a.h)(d.default,null))}}const u={setSummary:l.setSummary};t.default=(0,o.connect)(({sovietCompilation:e})=>({summary:e.summary,isReadOnly:e.isReadOnly}),u)(h)},23570:function(e,t,s){"use strict";var i=s(24994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=s(76148),o=s(70753),n=i(s(32485)),r=s(52346),l=i(s(82131)),c=i(s(67269));class d extends a.Component{constructor(e){super(e),this.switchTheme=this.switchTheme.bind(this)}switchTheme(){const e=l.default[this.props.theme];this.props.setTheme({theme:this.props.theme,...e})}render(e){const t=l.default[e.theme],s={"background-image":`url('${t.previewUrl||t.coverUrl}')`};return(0,a.h)("li",{style:s,className:(0,n.default)({is__active:this.props.isActive}),onClick:this.switchTheme})}}const h=e=>{const t={};e.customCoverUrl&&(t["background-image"]=`url('${e.customCoverUrl}')`);const s=(0,n.default)("customCoverCell",{is__active:e.isActive,is__uploaded:e.customCoverUrl});return(0,a.h)("li",{style:t,className:s,onClick:e.setTheme},"Своя")};class u extends a.Component{constructor(e){super(e),this.switchTheme=this.switchTheme.bind(this),this.switchToCustomTheme=this.switchToCustomTheme.bind(this)}switchTheme(e){this.props.setTheme(e)}switchToCustomTheme(){this.props.setTheme({theme:"custom",layout:this.props.customThemeLayout,textColor:this.props.customThemeTextColor,coverUrl:this.props.customCoverUrl})}render(e){return(0,a.h)(c.default,{className:`compilationThemePicker ${e.className||""}`},(0,a.h)("ul",{className:"compilationThemePicker-list"},(0,a.h)(h,{isActive:"custom"===this.props.theme,customCoverUrl:e.customCoverUrl,setTheme:this.switchToCustomTheme}),Object.keys(l.default).map(e=>(0,a.h)(d,{theme:e,isActive:this.props.theme===e,setTheme:this.switchTheme}))))}}const p={setTheme:r.setTheme};t.default=(0,o.connect)(({sovietCompilation:e})=>({theme:e.theme,layout:e.layout,textColor:e.textColor,customThemeLayout:e.customThemeLayout,customThemeTextColor:e.customThemeTextColor,coverUrl:e.coverUrl,customCoverUrl:e.customCoverUrl}),p)(u)},38987:function(e,t,s){"use strict";var i=s(24994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=s(76148),o=s(70753),n=i(s(32485)),r=s(73345),l=s(52346),c=i(s(14139));class d extends a.Component{constructor(e){super(e),this._switchTitleFontSize(this.props.title),this.handleInput=this.handleInput.bind(this),this.handleFocus=this.handleFocus.bind(this),this.handleBlur=this.handleBlur.bind(this)}_switchTitleFontSize(e){this.setState({switchFont:e.length>=this.props.fontSizeSwitchOn})}handleInput(e){this._switchTitleFontSize(e.target.value),this.props.setTitle(e.target.value)}handleFocus(){this.setState({focus:!0})}handleBlur(){this.setState({focus:!1})}render(e){const t=(0,n.default)("compilationTitle-textWrapper",{is__focused:this.state.focus&&!e.isReadOnly,is__readOnly:e.isReadOnly,is__switched:this.state.switchFont});return(0,a.h)("div",{className:`compilationTitleWrapper module ${e.className||""}`},(0,a.h)("div",{className:"compilationTitle"},(0,a.h)("label",{htmlFor:"compilationTitle"},(0,a.h)("a",{href:"/soviet/selected/"},"Подборки")),!e.isReadOnly&&(0,a.h)(c.default,{maxlength:e.maxlength,text:e.title}),(0,a.h)("div",{className:t},e.isReadOnly&&(0,a.h)("div",{className:"js__compilationTitle compilationTitle-text"},(0,r.typograf)(e.title)),!e.isReadOnly&&(0,a.h)("textarea",{id:"compilationTitle",className:"compilationTitle-text",placeholder:e.placeholder,value:e.title,onInput:this.handleInput,onFocus:this.handleFocus,onBlur:this.handleBlur,readonly:this.props.isReadOnly}))))}}const h={setTitle:l.setTitle};t.default=(0,o.connect)(({sovietCompilation:e})=>({title:e.title,isReadOnly:e.isReadOnly}),h)(d)},25796:function(e,t,s){"use strict";
2Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=s(76148),a=s(70753);class o extends i.Component{constructor(e){super(e),this.handleFileAttachment=this.handleFileAttachment.bind(this)}handleFileAttachment(e){const t=[e.target.files[0]];$(document).trigger("appDrop.coverUpload",{files:t}),e.target.value=""}render(e){const t=e.hasCoverUploadError?e.defaultUploadError:e.placeholder;return(0,i.h)("div",{className:"compilationUploadButton-wrapper"},(0,i.h)("div",{className:"button is__big is__thin compilationUploadButton"},(0,i.h)("input",{type:"file",id:"compilationUploadButton",accept:"image/jpeg,image/png,image/gif",onChange:this.handleFileAttachment}),(0,i.h)("label",{htmlFor:"compilationUploadButton"},"Загрузить свою картинку")),(0,i.h)("div",{className:"compilationUploadButton-placeholderWrapper"},(0,i.h)("div",{className:"compilationUploadButton-placeholder",dangerouslySetInnerHTML:{__html:t}})))}}t.default=(0,a.connect)(({sovietCompilation:e})=>({hasCoverUploadError:e.hasCoverUploadError}))(o)},61793:function(e,t,s){"use strict";var i=s(24994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=s(76148),o=s(73345),n=s(27384),r=s(45169),l=s(67697),c=i(s(69669)),d=i(s(87021));class h extends a.Component{constructor(e){super(e),this.state={isValid:!1,invitesLeft:e.invitesLeft,isLoading:!1,sentEmails:[],email:""},this.validityStates={name:!1,email:!1},this.onInputValidityChange=this.onInputValidityChange.bind(this),this.onNameFocus=this.onNameFocus.bind(this),this.onEmailFocus=this.onEmailFocus.bind(this),this.trackEmail=this.trackEmail.bind(this),this.onSubmit=this.onSubmit.bind(this)}get isValid(){return Object.keys(this.validityStates).every(e=>this.validityStates[e])}get isDisabled(){return!this.state.isValid||this.state.isLoading||this.hasJustSentInvite||this.state.invitesLeft<=0}get hasJustSentInvite(){return this.state.sentEmails.map(e=>e.toLowerCase()).includes(this.state.email.toLowerCase())}get invitesCaption(){const{invitesLeft:e}=this.state;return e<=0?'У вас больше <br class="device mobile" />нет приглашений':`У вас осталось <br class="device mobile" />${e} ${(0,o.pluralize)(e,"приглашение","приглашения","приглашений")}`}onInputValidityChange(e,t){this.validityStates[e]=t,this.setState({isValid:this.isValid})}onNameFocus(){this.hasJustSentInvite&&this.nameInput.el.select()}onEmailFocus(){this.hasJustSentInvite&&this.emailInput.el.select()}onSubmit(e){this.isDisabled||(this.setState({isLoading:!0}),fetch("/soviet/honorable_invite_requests",{method:"POST",headers:d.default,body:JSON.stringify(e)}).then(t=>t.ok?this.handleSentInvite(e):this.handleError(t)).catch(this.setError.bind(this)))}handleSentInvite({name:e,email:t}){this.setState({isLoading:!1,hasError:!1,hasInvitesError:!1,hasInviteeError:!1,invitesLeft:this.state.invitesLeft-1,sentEmails:this.state.sentEmails.concat([t])},()=>this.trickSafariIntoSentForm({name:e,email:t}))}trickSafariIntoSentForm({name:e,email:t}){this.nameInput.el.value="",this.emailInput.el.value="",this.nameInput.el.value=e,this.emailInput.el.value=t}handleError(e){e.json().then(e=>{const t=(e.errors||[])[0]||{};return/invite_limit_reached/.test(t.code)?this.setInvitesError():/already_honorable/.test(t.code)?this.setInviteeError():this.setError()}).catch(this.setError.bind(this))}setError(){this.setState({isLoading:!1,hasError:!0,hasInvitesError:!1,hasInviteeError:!1})}setInvitesError(){this.setState({isLoading:!1,hasError:!1,hasInvitesError:!0,hasInviteeError:!1,invitesLeft:0})}setInviteeError(){this.setState({isLoading:!1,hasError:!1,hasInvitesError:!1,hasInviteeError:!0})}trackEmail({value:e}){this.setState({email:e})}render(e){const t=e.fullWidth?"fullWidthFloor":"",s=e.fullWidth?"is__fullWidth":"";return(0,a.h)("div",{className:"sovietInvite-wrapper"},(0,a.h)("div",{className:`is__form ${t}`},(0,a.h)(n.Cols,{divisionProportions:"5:11",className:"sovietInvite is__transposeOnMobile"},(0,a.h)("div",{className:"sovietInvite-help"},(0,a.h)(r.TextNode,null,"Пригласите ",(0,a.h)("br",{class:"device desktop laptop"}),"друзей в новые советы")),(0,a.h)(l.Form,{className:"sovietInvite-form",onSubmit:this.onSubmit},(0,a.h)("div",{className:"inputGroup"},(0,a.h)(l.FormInput,{className:"input is__mediumLarge is__padded is__rounded is__inverted",placeholder:"Имя",name:"name",required:"required",ref:e=>this.nameInput=e,onClick:this.onNameFocus,onValidityChange:this.onInputValidityChange}),(0,a.h)(l.FormInput,{className:"input is__mediumLarge is__padded is__rounded is__inverted",placeholder:"Электронная почта",name:"email",type:"email",required:"required",ref:e=>this.emailInput=e,onInput:this.trackEmail,onClick:this.onEmailFocus,onValidityChange:this.onInputValidityChange}),(0,a.h)("button",{className:"inputSubmit is__mediumLarge is__padded is__rounded is__inverted",disabled:this.isDisabled,type:"submit"},this.hasJustSentInvite?"Отправлено":"Пригласить"),(0,a.h)(r.Caption,{className:"sovietInvite-formCaption",html:this.invitesCaption}))))),(0,a.h)("div",{className:`is__noPadding ${t}`},this.state.hasInvitesError&&(0,a.h)(c.default,{className:`is__error ${s}`,html:"Не получилось отправить. У вас закончились приглашения"}),this.state.hasError&&(0,a.h)(c.default,{className:`is__error ${s}`,html:"Не получилось отправить приглашение. Попробуйте позже или напишите нам: <b><a href='mailto:[email protected]'>[email protected]</a></b>"}),this.state.hasInviteeError&&(0,a.h)(c.default,{className:`is__success ${s}`,html:"Уже в клубе! Ваше приглашение осталось у вас"})))}}t.default=h},62118:function(e,t,s){"use strict";var i=s(24994)(s(61793));$(".js__sovietInvite").each((e,t)=>{$(t).reactify(i.default,$(t).data())})},53705:function(e,t,s){"use strict";var i=s(24994);
2Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=s(76148),o=i(s(32485)),n=s(45169),r=i(s(24623)),l=s(38367),c=i(s(62515));const d="soviet_weekly_subscription";class h extends a.Component{constructor(e){super(e),this.state={isSubscribed:!1,email:""},this.userData={email:""},this.isValid=!0,this.handleInput=this.handleInput.bind(this),this.onInputValidityChange=this.onInputValidityChange.bind(this),this.submitForm=this.submitForm.bind(this)}componentDidMount(){this.getSubscriptionData()}getEmailFromLocalStorage(){try{return localStorage.getItem(d)}catch{return}}getFieldsFromUserData(){const e=window.application.user;return e&&{email:e.email,firstName:e.firstName,lastName:e.lastName}}getSubscriptionData(){const e=this.getEmailFromLocalStorage();e&&(this.userData.email=e);const t=this.getFieldsFromUserData();t&&(this.userData=Object.assign(this.userData,t),this.userData.isSubscribed=!!e),this.setState({isSubscribed:this.userData.isSubscribed,email:this.userData.email})}handleInput({value:e}){this.setState({email:e,hasError:!this.isValid,isSubscribed:!1,isLoading:!1})}onInputValidityChange(e,t){this.isValid=t}sendDataAndSaveState(){const{email:e}=this.state;(0,l.subscribeUser)({email:e,eventType:"soviet"}).then(e=>{this.setState({isSubscribed:e,isLoading:!1,hasError:!e}),e&&(localStorage.setItem(d,this.state.email),this.trackSubscription())})}trackSubscription(){(0,c.default)(this.props.goal)}submitForm(e){e.preventDefault(),this.setState({isLoading:!0}),this.sendDataAndSaveState()}render(){const e=(0,o.default)("subscriptionForm",{is__default:this.state.email&&!this.state.isSubscribed&&!this.state.hasError&&!this.state.isLoading,is__disabled:!this.state.email,is__subscribed:this.state.isSubscribed,has__error:this.state.email&&this.state.hasError,is__loading:this.state.isLoading});return(0,a.h)("div",{className:"sovietSubscriptionSpacer banner-debug"},(0,a.h)("div",{className:"sovietSubscriptionSpacer-text module"},(0,a.h)(n.Heading3,null,"Советы почтой каждую неделю"),(0,a.h)(n.TextNode,null,"Подпишитесь, чтобы не пропускать выход новых советов.")),(0,a.h)("form",{className:e,onSubmit:this.submitForm},(0,a.h)("div",{className:"subscriptionForm-inputWrapper"},(0,a.h)(r.default,{className:"subscriptionForm-input",type:"email",name:"email",placeholder:"Электронная почта",required:"required",onInput:this.handleInput,onValidityChange:this.onInputValidityChange,value:this.state.email,silent:!0})),(0,a.h)("button",{className:"button subscriptionForm-submit is__thin",type:"submit"},(0,a.h)("span",{className:"subscriptionForm-submitText is__default"},"→"),(0,a.h)("span",{className:"subscriptionForm-submitText is__success"},"✓"),(0,a.h)("span",{className:"subscriptionForm-submitText is__loading"}))))}}t.default=h},54126:function(e,t,s){"use strict";var i=s(24994)(s(53705));$(".js__sovietSubscriptionSpacer").each(function(){$(this).reactify(i.default,$(this).data())})},15844:function(e,t,s){"use strict";var i=s(24994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=s(76148),o=i(s(32485)),n=s(73345),r=s(63229),l=s(66192),c=s(45169),d=i(s(56457));const h=({commentsCount:e,newCommentsCount:t})=>{const s=` ${(0,n.pluralize)(t,"новый","новых","новых")}`;return(0,a.h)("div",{className:"sovietTitleWithMeta-commentsCount"},(0,a.h)("nobr",null," 🗩",e>0&&e,t>0&&(0,a.h)("span",null,` +${t}`,(0,a.h)("span",{class:"device desktop"},s))))};t.default=e=>{const{url:t,title:s,authorGenitiveName:i,coverUrl:u,coverSize:p,commentsCount:m,newCommentsCount:f,date:v,impressionSubject:g,impressionSummary:b,tagSummaries:_,isUnicorn:y}=e.soviet,S=!!_.length,w=!!m||!!f,C=e.withCover,k=y?t:`${t}preview-comments`,T=_.map(e=>(0,a.h)("a",{key:e.slug,href:`/soviet/${e.alias||e.slug}`,className:"is__noUnderline"},e.name));return(0,a.h)("div",{className:(0,o.default)("module","sovietTitleWithMeta",{has__tags:S})},u&&C&&(0,a.h)("a",{href:k,className:"module sovietTitleWithMeta-coverWrapper sovietCover doubleHover is__noUnderline"},(0,a.h)(l.Image,{src:u,size:[p.width,p.height],fillModule:!0}
2)),!u&&C&&(0,a.h)("div",{className:"sovietTitleWithMeta-coverWrapper is__blank"}),(0,a.h)("div",{className:"module"},(0,a.h)("a",{href:k,className:"sovietTitleWithMeta-titleWrapper doubleHover is__noUnderline"},(0,a.h)("div",{className:"sovietTitleWithMeta-title"},s,w&&(0,a.h)(h,{commentsCount:m,newCommentsCount:f})),w&&(0,a.h)(h,{commentsCount:m,newCommentsCount:f})),(0,a.h)("div",{className:"sovietTitleWithMeta-undertitle"},(0,a.h)(c.TextNode,{className:"sovietTitleWithMeta-link"},(0,a.h)("a",{href:k,className:"doubleHover is__noUnderline"},(0,a.h)("span",{className:"link"},`Совет ${i}`)," · ",(0,n.birmanize)((0,r.moscowifyLocal)(new Date(v)),{format:"dateYearOnly"}))),S&&(0,a.h)("div",{className:"sovietTitleWithMeta-tags"},T),(0,a.h)(d.default,{mod:"small",impressionSubject:g,helpful:b.helpful,useless:b.useless,selected:b.selected})),S&&(0,a.h)("div",{className:"sovietTitleWithMeta-tags"},T)))}},40757:function(e,t,s){"use strict";var i=s(86019),a=s(24994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=s(76148),n=a(s(32485)),r=a(s(60261)),l=a(s(79146)),c=s(20270);const d=[{name:"released",link:"/soviet/"},{name:"withNewComments",link:"/soviet/newcomments/",isStaff:!0,isModerator:!0},{name:"scheduled",link:"/soviet/scheduled/",isStaff:!0},{name:"unanswered",link:"/soviet/questions/",isStaff:!0},{name:"compilations",link:"/soviet/selected/"}];class h extends o.Component{constructor(e){super(e),this.state.items=d}componentDidMount(){(this.user.isStaff||this.user.isModerator)&&this.fetchCounters(),this.props.customItems&&this.applyCustomItems()}fetchCounters(){(0,r.default)().then(this.setCounters.bind(this))}setCounters(e){const t=this.state.items.map(t=>({...t,count:e[t.name]}));this.setState({items:t})}applyCustomItems(){const e=this.state.items.map(e=>{const t=this.props.customItems.find(t=>t.name===e.name);return t?{...e,...t}:e});this.setState({items:e})}get user(){return window.application.user||{}}get displayedItems(){const{isStaff:e=!1,isModerator:t=!1}=this.user;return this.state.items.filter(t=>void 0===t.isStaff||t.isStaff===e).filter(e=>void 0===e.isModerator||e.isModerator===t)}get currentItem(){return this.displayedItems.find(e=>e.name===this.props.activeItem)}get currentItemName(){if(!this.currentItem)return null;const{name:e,count:t}=this.currentItem;let s=i.t(`soviet.switcher.${e}`);return t>0&&(s+=` <span class="product-menu-item-counter">${t}</span>`),s}render(){const{activeItem:e,isAside:t=!0}=this.props,s=(0,n.default)("is__small",{is__aside:t});return(0,o.h)(c.Product,{className:s,name:this.currentItemName},this.displayedItems.map(t=>(0,o.h)(l.default,{item:t,isActive:t.name===e,keepActiveItemClickable:this.props.keepActiveItemClickable})))}}t.default=h},33186:function(e,t,s){"use strict";var i=s(24994)(s(40757));$(".js__sovietsSwitcher").each(function(){const e=JSON.parse($(this).attr("data-options")||null);$(this).reactify(i.default,e),$(this).children().unwrap()})},79146:function(e,t,s){"use strict";var i=s(86019),a=s(24994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=s(76148),n=a(s(94634)),r=s(20270);t.default=({item:e,isActive:t,keepActiveItemClickable:s})=>{const a=t?"device laptop desktop":"";return(0,o.h)(r.ProductMenuItem,(0,n.default)({},e,{isActive:t,className:a,keepActiveItemClickable:s}),i.t(`soviet.switcher.${e.name}`))}},20294:function(e,t,s){"use strict";var i=s(24994);Object.defineProperty(t,"__esModule",{value:!0}),t.fetchSovietsUnanswered=void 0;var a=i(s(87021)),o=i(s(96194));t.fetchSovietsUnanswered=(e=0,t=0)=>fetch(`/soviet/advices?scope=unreleased${e?`&limit=${e}`:""}${t?`&offset=${t}`:""}`,{headers:a.default}).then(e=>e.json()).then(e=>e.map(o.default)).catch(e=>console.error(e))},46594:function(e,t,s){"use strict";var i=s(24994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=s(76148),o=s(73345),n=s(45169),r=i(s(5145));t.default=e=>{const{slug:t,question:s,questionerName:i,questionImageUrl:l,questionImageSize:c,questionCreatedAt:d,coverUrl:h,coverSize:u,withCover:p}=e,m=`https://bureau.ru/soviet/${t}/edit`;return(0,a.h)("div",{className:"module sovietUnanswered"},h&&p&&(0,a.h)(r.default,{sovietUrl:m,imageUrl:h,imageSize:u}),!h&&l&&p&&(0,a.h)(r.default,{sovietUrl:m,imageUrl:l,imageSize:c}),!h&&!l&&p&&(0,a.h)("div",{className:"sovietUnanswered-coverWrapper is__blank"}),(0,a.h)("div",{className:"module"},(0,a.h)("a",{href:m,className:"sovietUnanswered-questionWrapper doubleHover is__noUnderline"},(0,a.h)(n.TextNode,null,(0,o.truncateLinks)(s),(0,a.h)("div",{className:"sovietUnanswered-link"},(0,a.h)("span",{className:"link"},i)," · ",(0,o.birmanize)(d,{format:"dateYearOnly"}))))))}},5145:function(e,t,s){"use strict";
2Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=s(76148),a=s(66192);const o=[1381,777];t.default=({sovietUrl:e,imageUrl:t,imageSize:s})=>{const n=s||o;return(0,i.h)("a",{href:e,className:"module sovietUnanswered-coverWrapper sovietCover doubleHover is__noUnderline"},(0,i.h)(a.Image,{src:t,size:n,fillModule:!0,loading:"lazy"}))}},28377:function(e,t,s){"use strict";var i=s(24994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=s(76148),o=i(s(94634)),n=s(45169),r=i(s(46594)),l=i(s(22046)),c=s(20294);class d extends a.Component{constructor(e){super(e),this.state={soviets:[],showSpinner:!0},this.fetchAllSovietsUnanswered=this.fetchAllSovietsUnanswered.bind(this),this.triggerNewImagesAppeared=this.triggerNewImagesAppeared.bind(this)}componentDidMount(){this.fetchInitialBatch(),setTimeout(this.fetchAllSovietsUnanswered,5e3)}componentDidUpdate(){$(".doubleHover").each(function(){new l.default($(this))}),$(".footer").toggle(!this.state.showSpinner)}componentWillUnmount(){clearTimeout(this.fetchTimeout)}fetchInitialBatch(){(0,c.fetchSovietsUnanswered)(50).then(e=>this.setState({soviets:e,showSpinner:!0}))}fetchAllSovietsUnanswered(){(0,c.fetchSovietsUnanswered)().then(e=>this.setState({soviets:e,showSpinner:!1},this.triggerNewImagesAppeared))}renderQuestionsList(){return this.state.soviets.map(e=>(0,a.h)(r.default,(0,o.default)({key:e.id,withCover:!0},e)))}triggerNewImagesAppeared(){$(document).trigger("newImagesAppeared")}render(){return(0,a.h)("div",{className:"sovietsUnanswered"},(0,a.h)(n.Heading1,{className:"sovietsUnanswered-pageTitle webpage-title is__medium is__wide"},"Без ответа"),!!this.state.soviets.length&&this.renderQuestionsList(),this.state.showSpinner&&(0,a.h)("div",{className:"sovietsUnanswered-spinner"}))}}t.default=d},1566:function(e,t,s){"use strict";var i=s(24994)(s(28377));$(".js__sovietsUnanswered").each(function(){$(this).reactify(i.default,$(this).data()),$(this).children().unwrap()})},5305:function(e,t,s){"use strict";var i=s(24994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=s(76148),o=i(s(87021)),n=s(45169),r=i(s(15844)),l=s(15774),c=i(s(22046));class d extends a.Component{constructor(e){super(e),this.state={soviets:[],isLoaded:!1},this.fetchSovietsWithNewComments=this.fetchSovietsWithNewComments.bind(this)}fetchSovietsWithNewComments(e=0,t=0){return fetch(`/soviet/newcomments.json?scope=with_new_comments${e?`&limit=${e}`:""}${t?`&offset=${t}`:""}`,{headers:o.default}).then(e=>e.json()).then(e=>this.setState({soviets:e,isLoaded:!0})).then(()=>this.fetchTimeout=setTimeout(this.fetchSovietsWithNewComments,3e3)).catch(e=>console.error(e))}componentDidMount(){this.fetchSovietsWithNewComments(50)}componentDidUpdate(){$(".doubleHover").each(function(){new c.default($(this))})}componentWillUnmount(){clearTimeout(this.fetchTimeout)}renderSovietsList(){const e=this.state.soviets.some(e=>e.coverUrl);return this.state.soviets.map(t=>(0,a.h)(r.default,{key:t.key,soviet:t,withCover:e,isSans:!0,withTags:!0,withCommentsCount:!0}))}render(){return(0,a.h)("div",{className:"sovietsWithNewComments"},(0,a.h)(n.Heading1,{className:"sovietsWithNewComments-pageTitle webpage-title is__medium is__wide"},"Советы с новыми комментариями"),this.state.soviets.length>0&&this.state.isLoaded&&this.renderSovietsList(),0===this.state.soviets.length&&this.state.isLoaded&&(0,a.h)("div",{className:"sovietsWithNewComments-placeholder"},(0,a.h)(l.NoNewCommentsIcon,null),"Все комментарии разобраны.",(0,a.h)("br",null),"Офигенно!"))}}t.default=d},80222:function(e,t,s){"use strict";var i=s(24994)(s(5305));$(".js__sovietsWithNewComments").each(function(){$(this).reactify(i.default,$(this).data()),$(this).children().unwrap()})},52950:function(){"use strict";{const e="is__fadedOut";class t{constructor(e){this.$el=e,this.$document=$(document),this.isFaded=!1,this.setListeners()}init(){this.viewportHeight=window.innerHeight,this.bannerOffset=this.$el.offset().top,this.checkScroll(window.application.currentScrollPosition)}setListeners(){this.$document.on("appScroll",(e,t)=>this.checkScroll(t)),this.$document.on("appReady appResize",this.init.bind(this))}
2checkScroll(e){this.isFaded||e+this.viewportHeight>this.bannerOffset&&this.fadeOut()}fadeOut(){this.isFaded=!0,this.$el.addClass(e)}}$(".js__bookDiscount").each(function(){new t($(this))})}},99834:function(e,t,s){"use strict";const i=s(21834);class a extends i{get currentScrollPosition(){return window.application.currentScrollPosition}preInit(){this.$document=$(document)}preCalculate(){this.setTriggers(),this.bindEvents()}preRender(){this.reactToCurrentScrollPosition()}setTriggers(){this.triggers={hold:this.$el.offset().top}}bindEvents(){this.$document.on("appScroll",this.reactToCurrentScrollPosition.bind(this))}reactToCurrentScrollPosition(){this.markAsHalffoldIfNecessary()}markAsHalffoldIfNecessary(){this.$el.toggleClass("is__halffold",this.currentScrollPosition>=this.triggers.hold)}}$(".spread").each(function(){new a($(this))})},36628:function(){"use strict";class e{constructor(e){this.$el=e,this.$document=$(document),this.$shaft=$(".stickyBlackFridayBadge-shaft"),this.$startEl=$(".stickyBlackFridayBadge-start"),this.$stopEl=$(".stickyBlackFridayBadge-stop"),this.updateStickiness=this.updateStickiness.bind(this),this.updateStickinessFirstTime=this.updateStickinessFirstTime.bind(this),this.setListeners()}get topPosition(){return this.$startEl.length?this.$startEl.offset().top:0}get bottomPosition(){return this.$stopEl.length?this.$stopEl.offset().top:$("body").height()}get shaftStyle(){return{height:this.bottomPosition-this.topPosition+"px",top:`${this.topPosition}px`}}setListeners(){this.$document.on("appResize",this.updateStickiness).on("appReady",()=>setTimeout(this.updateStickinessFirstTime,100))}updateStickiness(){this.$shaft.css(this.shaftStyle)}updateStickinessFirstTime(){this.updateStickiness(),this.$el.addClass("is__ready")}}$(".js__stickyBlackFridayBadge").each(function(){new e($(this))})},93925:function(e,t,s){"use strict";var i=s(24994),a=s(76148),o=i(s(32485)),n=i(s(62474));const r={regular:27,caption:18};class l extends a.Component{constructor(e){super(e),this.calculateShaftPosition=this.calculateShaftPosition.bind(this),this.calculateShaftAndButtons=this.calculateShaftAndButtons.bind(this),this.defaultOnClick=this.defaultOnClick.bind(this),this.showButtonForFirstTime=this.showButtonForFirstTime.bind(this),this.updateBadgeOpacity=this.updateBadgeOpacity.bind(this)}componentDidMount(){this.$body=$("body"),this.$topEl=this.$topEl||$(".js__stickyButtonTopEdge, .js__stickyOrderButtonTopEdge"),this.$topEl.length||(this.$topEl=this.$body),this.$bottomEl=this.$bottomEl||$(".js__stickyButtonBottomEdge, .js__stickyOrderButtonBottomEdge"),this.$bottomEl.length||(this.$bottomEl=this.$body),this.$mobileTopEl=$(".js__mobileStickyButtonTopEdge, .js__mobileStickyOrderButtonTopEdge"),this.$mobileTopEl.length||(this.$mobileTopEl=this.$topEl),this.$stickyButtonDouble=$(".js__stickyButtonDouble"),this.isStatic=this.$topEl.is(this.$bottomEl),this.setupButtons(),$(document).on("appReady appResize",this.calculateShaftAndButtons).on("appReady deferredComponentsReady",()=>{setTimeout(this.showButtonForFirstTime,1e3)}).on("appResize",()=>{setTimeout(this.calculateShaftAndButtons,1e3)}),this.hasAnimatedBadge&&($(document).on("appScroll",this.updateBadgeOpacity),this.calculateShaftPosition(),this.updateBadgeOpacity())}componentWillUpdate(){this.$stickyButtonDouble.html(this.text)}componentDidUpdate(e){(e.text!==this.props.text||e.countdown!==this.props.countdown)&&(this.resetButtons(),setTimeout(this.calculateShaftAndButtons.bind(this),250))}showButtonForFirstTime(){this.calculateShaftAndButtons(),this.$shaft.classList.add("is__ready")}resetButtons(){this.setState({mainButtonWidth:"none",extraButtonWidth:"none",isButtonFlexible:!1,isExtraButtonCompact:!1,isSetupComplete:!1})}setupButtons(){this.needsToHandleExtraButton&&this.setState({mainButtonWidth:this.$el.offsetWidth,mainButtonMargin:parseFloat(window.getComputedStyle(this.$el).marginRight),extraButtonWidth:this.$extraButtonWrap.offsetWidth,isButtonFlexible:!0,isExtraButtonCompact:!1,isSetupComplete:!0})}calculateButtons(){if(!this.needsToHandleExtraButton)return;this.state.isSetupComplete||this.setupButtons();const e=(this.state.mainButtonWidth>210?140:this.state.mainButtonWidth)+this.state.mainButtonMargin+this.state.extraButtonWidth;this.setState({isExtraButtonCompact:e>=this.$inner.offsetWidth})}calculateShaftPosition(){this.buttonSize=this.$el.offsetHeight,this.setState({shaftTopOffset:this.getTopShaftOffset(),shaftBottomOffset:this.getBottomShaftOffset()}),this.hackSafariRenderingIssue()}updateDoubleButtonWidth(){this.$stickyButtonDouble.css({width:this.$inner.offsetWidth})}calculateShaftAndButtons(){this.calculateButtons(),this.updateDoubleButtonWidth(),this.calculateShaftPosition()}getTopShaftOffset(){if(this.$topEl.is(this.$body))return 0;if(this.isStatic)return this.$topEl.offset().top;const e=Object.keys(r).find(e=>this.$topEl.is(`.is__${e}`));if(e){const t=this.isMobile?this.$mobileTopEl:this.$topEl;return r[e]+t.offset().top+t.height()}return this.isMobile?this.$mobileTopEl.offset().top+this.$mobileTopEl.height()+this.buttonSize:this.$topEl.offset().top+this.$topEl.height()}
2getBottomShaftOffset(){const e=this.$bottomEl.offset().top;return this.isMobile?e+this.buttonSize:e+this.$bottomEl.height()}get mainButtonClassNames(){return(0,o.default)("stickyButton",`is__${this.props.type}`,{is__flexible:this.state.isButtonFlexible,is__pulsating:!!this.props.countdown})}get extraButtonClassNames(){return(0,o.default)("stickyButtonShaft-extraButtonWrap",{is__flexible:this.state.isButtonFlexible},{is__compact:this.state.isExtraButtonCompact})}get text(){const e=!!this.props.shortText,t=`<span class='device mobile'>${this.props.shortText}</span>`,s=`<span class='device desktop laptop'>${this.props.text}</span>`;return e?`${t}${s}`:this.props.text}get shaftStyle(){return{top:`${this.state.shaftTopOffset}px`,height:this.state.shaftBottomOffset-this.state.shaftTopOffset+"px"}}get isMobile(){return this.$body.width()<961}get needsToHandleExtraButton(){return this.$extraButtonWrap&&!this.isMobile}defaultOnClick(){this.props.href&&(window.location=this.props.href)}hackSafariRenderingIssue(){this.setState({style:{transform:"scale(1)"}}),setTimeout(()=>this.setState({style:{}}),100)}get hasBadge(){return!!this.props.badge}get hasAnimatedBadge(){return this.hasBadge&&this.props.badge.isAnimated}get badgeClassNames(){return(0,o.default)("stickyButtonShaft-badge",{is__animated:this.props.badge.isAnimated})}updateBadgeOpacity(){const e=this.props.badge.offset||0,{currentScrollPosition:t,viewHeight:s}=window.application,i=t+(s||window.innerHeight)-e;this.$badge.classList.toggle("is__visible",this.state.shaftTopOffset<i)}render(){const e=this.props.children.filter(e=>e).length>0,t=!!this.props.countdown;return(0,a.h)("div",{className:"stickyButtonShaft",style:this.shaftStyle,ref:e=>this.$shaft=e},(0,a.h)("div",{className:"stickyButtonShaft-inner",ref:e=>this.$inner=e},this.hasBadge&&(0,a.h)("div",{className:this.badgeClassNames,ref:e=>this.$badge=e}),(0,a.h)("button",{className:this.mainButtonClassNames,onClick:this.props.onClick||this.defaultOnClick,dangerouslySetInnerHTML:!t&&{__html:this.text},ref:e=>this.$el=e,"data-goal":this.props.goal||this.goal,style:`max-width: ${this.state.mainButtonWidth}px;`},t&&(0,a.h)(n.default,{to:this.props.countdown})),e&&(0,a.h)("div",{className:this.extraButtonClassNames,ref:e=>this.$extraButtonWrap=e,style:`max-width: ${this.state.extraButtonWidth}px;`},this.props.children)))}}e.exports=l},88114:function(e,t,s){"use strict";var i=s(24994),a=i(s(93925)),o=i(s(279));$(".js__stickyButton").each(function(){$(this).reactify(a.default,$(this).data())}),$(".js__stickyChatButton").each(function(){$(this).reactify(o.default,$(this).data())})},62474:function(e,t,s){"use strict";var i=s(24994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=s(76148),o=i(s(35209));t.default=({to:e})=>(0,a.h)("span",null,"× ",(0,a.h)("span",{className:"stickyButton-countdown"},(0,a.h)(o.default,{to:e,isTextOnly:!0})))},279:function(e,t,s){"use strict";var i=s(24994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=s(76148),o=i(s(93925)),n=i(s(65559));class r extends o.default{constructor(e){super(e),this.$bottomEl=$(".js__stickyChatButtonDouble")}render(){return(0,a.h)("div",{className:"stickyButtonShaft is__leftAlign",style:this.shaftStyle,ref:e=>this.$shaft=e},(0,a.h)("div",{className:"stickyButtonShaft-inner",ref:e=>this.$inner=e},(0,a.h)(n.default,{buttonRef:e=>this.$el=e})))}}t.default=r},78252:function(){"use strict";{const e="is__sticky",t="is__afterStickyHeader";class s{constructor(e){this.$el=e,this.$nextEl=e.next(),this.$document=$(document),this.height=this.$el.outerHeight(),this.updateStickiness=this.updateStickiness.bind(this),this.setListeners(),this.addMarginForNextElement()}setListeners(){this.$document.on("appScroll appResize",this.updateStickiness).on("appReady",()=>setTimeout(this.updateStickiness,100))}addMarginForNextElement(){this.$nextEl.addClass(t)}updateStickiness(){const t=this.height>=this.$nextEl[0].getBoundingClientRect().top;this.$el.toggleClass(e,t)}}$(".js__stickyHeader").each(function(){new s($(this))})}},34169:function(e,t,s){"use strict";var i=s(86019),a=s(24994);
2Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=s(76148),n=a(s(32485)),r=a(s(62515));const l="bookshelf-all";class c extends o.Component{constructor(e){super(e),this.onClick=this.onClick.bind(this)}onClick(e){e.preventDefault(),this.reachGoal(),this.redirect()}reachGoal(){(0,r.default)(this.props.goal)}redirect(){window.parent.location=this.href}get productId(){const{isBundle:e,subscription:{product_id:t}}=this.props;return e?l:t}get href(){return`${this.props.slug||`/projects/${this.productId}/`}?${this.isUpgrade?"upgrade":"self"}`}get classNames(){return(0,n.default)("button is__purchaseLike is__enlargedOnMobiles",{is__preorderLike:this.isPreorder,is__upgradeLike:this.isUpgrade})}get text(){return this.isUpgrade?this.upgradeText:this.isPreorder?this.preorderText:i.t("buyButtonText.book."+(this.isSubscribed?"subscribed":"default"))}get preorderText(){return i.t("buyButtonText.book."+(this.isSubscribed?"subscribedPreorder":"preorder"))}get upgradeText(){return i.t("buyButtonText.bookshelf.upgradeCompact")}get isPreorder(){const{isBundle:e,prices:t}=this.props;return e?t.bundled.preorder:t.preorder}get isUpgrade(){return this.props.isBundle&&!this.isSubscribed&&this.props.prices.bundled.specialOffer}get isSubscribed(){const{isBundle:e,subscription:{id:t,original_product_id:s}}=this.props;return e?s===l:!!t}render(){return(0,o.h)("a",{href:this.href,className:this.classNames,onClick:this.onClick,dangerouslySetInnerHTML:{__html:this.text}})}}t.default=c},68862:function(e,t,s){"use strict";var i=s(24994)(s(34169));{const e=(e,t)=>{const s=window.productSubscription||{},a=$(t),o={...s,...JSON.parse(a.attr("data-options")||null)};a.reactify(i.default,o)};$(".js__subscriptionButton").each(e)}},38367:function(e,t,s){"use strict";var i=s(91978),a=s(47310);const o=s(2733),n=s(98999),r={demo:20,designers:8,editors:12,managers:17},l=(e,t="")=>{try{localStorage.setItem(e,t)}catch{o.set(e,t)}};e.exports={getStoredEmail:(e,t=1)=>{const s=(e=>{try{return localStorage.getItem(e)||o.get(e)}catch{return}})(`event_subscribe_${e}_${t}`);if(s)return{isSubscribed:!0,email:s};const i=o.get("email");if(i)return{isSubscribed:!1,email:i};const a=window.application.user&&window.application.user.email;return a?{isSubscribed:!1,email:a}:{isSubscribed:!1,email:void 0}},storeEmail:l,subscribeUser:({email:e,eventType:t,eventId:s=1,additionalMeta:o=""})=>{const r=`event_subscribe_${t}_${s}`,c=(0,a.extractMeta)()+o;return(window.application.user&&window.application.user.email?Promise.resolve():(0,i.executeRecaptcha)({action:"subscribeUser"})).then(i=>fetch("/rp/subscribe.php",{method:"POST",headers:n,credentials:"include",body:JSON.stringify({email:e,eventId:s,type:t,token:i,skipEventCookie:!0,meta:c})}).then(t=>(t.ok&&l(r,e),t.ok)))},detectDefaultSchoolEventType:()=>{const e=window.application.pageId.split("/").filter(e=>e)[1]||"demo";return r[e]}}},14042:function(e,t,s){"use strict";var i=s(38367);$(function(){var e,t,s,a="is__subscribed",o="is__loading",n="has__error",r=/\S+@\S+\.\S+/,l=$(document);$(".js__subscriptionForm").each((c,d)=>{var h=$(d),u=h.find("input"),p=h.closest(".js__subscriptionFormWrap"),m=h.add(p),f=h.attr("data-course-id");if(f){var v=(0,i.getStoredEmail)(f);v.email&&(u.val(v.email),m.toggleClass(a,v.isSubscribed),m.toggleClass("is__alreadySubscribed",v.isSubscribed),l.trigger(`subscriptionChanged.${f}`,v.isSubscribed)),h.on("click",e=>e.stopPropagation()),h.on("submit",function(c){c.preventDefault();var d=u.val();return r.test(d)?(s=!1,clearTimeout(e),clearTimeout(t),t=setTimeout(function(){m.addClass(o),s=(new Date).getTime()},100),l.trigger(`submitSubscription.${f}`,{email:d}),(0,i.subscribeUser)({email:d,eventType:f}).then(()=>{var i=s?300-(Date.now()-s):0;clearTimeout(t),e=setTimeout(function(){m.addClass(a),l.trigger(`subscriptionChanged.${f}`,!0),m.removeClass(o)},i)}),!0):(m.addClass(n),!1)}
2),u.on("input",function(){var e=$(this).val();u.not(this).val(e),m.removeClass(n),m.removeClass(a)})}else m.addClass("has__invalidId")})})},21595:function(e,t,s){"use strict";var i=s(86019),a=s(24994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=s(76148),n=a(s(32485));class r extends o.Component{constructor(e){super(e)}get isExpiring(){return this.daysLeft<=3&&this.daysLeft>=0}get daysLeft(){return this.validUntil?Math.floor((new Date(this.validUntil)-new Date)/864e5):1/0}get validUntil(){return this.props.next_subscription_retention_at}get label(){return 0===this.daysLeft?"<1":this.isExpiring?this.daysLeft:"✓"}get captionText(){const e="subscription.subscriptionMarkLabel";return this.isExpiring?0===this.daysLeft?i.t(`${e}.lastDay`):i.t(`${e}.daysLeft`,{count:this.daysLeft}):i.t(`${e}.default`)}render(){const e=(0,n.default)("subscriptionMark",`is__${this.daysLeft}daysLeft`,{is__expiring:this.isExpiring});return(0,o.h)("div",{className:e},(0,o.h)("div",{className:"subscriptionMark-inner"},(0,o.h)("span",{className:"subscriptionMark-label"},this.label),(0,o.h)("div",{className:"module subscriptionMark-caption"},(0,o.h)("div",{className:"subscriptionMark-captionText"},this.captionText))))}}t.default=r},34244:function(e,t,s){"use strict";var i=s(24994),a=i(s(98999)),o=i(s(21595));/^\/books(\/|$)|\/bookshelf-business/.test(window.location.pathname)&&fetch("/api/system/books/accessible_products/",{credentials:"include",headers:a.default}).then(e=>e.json()).then(e=>{e.length&&$(".product-menu-item.is__my-books").removeClass("is__hidden"),e.forEach(e=>{$(`.thumbnail[href="/projects/${e.product_id}/"]`).each(function(){$(this).reactify(o.default,e)})})}).catch(console.error.bind(console))},23716:function(e,t,s){"use strict";var i=s(86019),a=s(24994),o=s(76148),n=a(s(2733)),r=s(73345),l=a(s(1992)),c=a(s(27791));class d extends o.Component{constructor(e){super(e),this.state={notifications:[]}}componentDidMount(){this.setState({notifications:this.notificationsInCookiesOrUrl})}get notificationsInCookiesOrUrl(){return Object.keys(this.props.messages).map(e=>{const t=`s_${(0,r.toSnakeCase)(e)}`,s=n.default.get(t);return n.default.remove(t),{type:e,message:this.props.messages[e],data:s}}).filter(e=>void 0!==e.data||window.location.search.includes(e.type))}get productId(){var e;return null===(e=window.productSubscription)||void 0===e||null===(e=e.subscription)||void 0===e?void 0:e.product_id}get subscriptionRenewsOn(){var e,t;let s=null===(e=window.productSubscription)||void 0===e?void 0:e.subscription;return!window.location.search.includes("s_renewEarly")||null!==(t=s)&&void 0!==t&&t.next_payment||(s={next_payment:Date.now()}),s?(0,r.birmanize)(new Date(s.next_payment),{format:"dateYearOnly"}):null}get interpolationVars(){return{subscriptionRenewsOn:this.subscriptionRenewsOn}}isRetryVisible(e){return this.productId&&"redeemFail"===e.type}isUpdateCardVisible({type:e}){return["renewFail","renewEarlyFail"].includes(e)}render(){const{notifications:e}=this.state;return(0,o.h)("div",{className:"subscriptionNotifications"},e.map(e=>(0,o.h)("div",{className:"topLevelNotification holder is__active"},(0,o.h)("div",{className:"topLevelNotification-main"},(0,o.h)("span",{className:"topLevelNotification-text"},i.interpolate(e.message,this.interpolationVars)),this.isRetryVisible(e)&&(0,o.h)(l.default,{productId:this.productId,url:`/subscriptions/${this.productId}/redeem/${e.data}`})),(0,o.h)("div",{className:"topLevelNotification-side"},this.isUpdateCardVisible(e)&&(0,o.h)(c.default,null)))))}}$(".js__subscriptionNotification").each((e,t)=>{const s={...i.t("subscriptionNotifications"),...JSON.parse(t.dataset.messages||JSON.stringify({}))};$(t).reactify(d,{messages:s})})},1992:function(e,t,s){"use strict";var i=s(86019);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=s(76148);t.default=({url:e,productId:t})=>{const s=t.split("-")[0],o=i.t(`product.email.${s}`),n=i.t("subscription.retry",{email:o,url:e});return(0,a.h)("span",{className:"subscriptionRetry",dangerouslySetInnerHTML:{__html:n}})}},27791:function(e,t,s){"use strict";var i=s(86019);
2Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=s(76148);t.default=()=>(0,a.h)("a",{href:"/pay/edit/",className:"subscriptionUpdateCard"},(0,a.h)("span",{className:"subscriptionUpdateCard-icon"}),(0,a.h)("span",{className:"link"},i.t("subscription.updateCard")))},17716:function(e,t,s){"use strict";var i=s(86019),a=s(24994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=s(76148),n=a(s(25033)),r=a(s(31914)),l=s(73345);class c extends o.Component{get specialOffer(){return this.props.prices.specialOffer||this.props.prices.previousSpecialOffer}get upgradePeriod(){return this.props.prices.upgradePeriod}get subscriptionPeriod(){return this.props.prices.subscriptionPeriod}get upgradeLabel(){const{upgradePeriod:e,subscriptionPeriod:t}=this,{previousOneTime:s}=this.specialOffer;return s&&e!==t?i.t(`subscription.prices.defaultLabel_${e}`)+` <s>${(0,l.formatPrice)(s)}</s>`:i.t("subscription.prices.upgradeLabel")}get subscriptionLabel(){const{upgradePeriod:e,subscriptionPeriod:t}=this;return e!==t?i.t(`subscription.prices.subscriptionLabel_${e}`):i.t("subscription.prices.upgradeSubscriptionLabel")}render(){const{prices:e,size:t="pageTitle",unitsSize:s="medium"}=this.props;return(0,o.h)(r.default,{currency:e.currency},(0,o.h)(n.default,{label:this.upgradeLabel,amount:(0,l.formatPrice)(this.specialOffer.oneTime),className:"is__specialOffer",units:i.t(`subscription.defaultUnits_${e.upgradePeriod}`),size:t,unitsSize:s}),(0,o.h)(n.default,{label:this.subscriptionLabel,amount:(0,l.formatPrice)(e.subscription),size:t,unitsSize:s,units:i.t(`subscription.subscriptionUnits_${e.renewalPeriod}`),hasCompactUnitsView:!0}))}}t.default=c},62171:function(e,t,s){"use strict";var i=s(24994),a=s(76148),o=i(s(25033));class n extends a.Component{render(e){return(0,a.h)("div",{className:"pricing"},(0,a.h)(o.default,{label:e.label,amount:e.price,units:"₽"}))}}e.exports=n},44445:function(e,t,s){"use strict";var i=s(86019),a=s(24994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=s(76148),n=a(s(25033)),r=a(s(31914)),l=s(73345);class c extends o.Component{shouldComponentUpdate(){return!1}get period(){const{renewalPeriod:e,subscriptionPeriod:t}=this.props.prices,s=this.shouldDisplayOneTimePrice?t:e;return s>12?12:s}get shouldDisplayOneTimePrice(){return this.props.prices.subscriptionPeriod>=6}get defaultLabel(){const e=this.shouldDisplayPreviousOneTimePrice?` <s>${this.previousPrice}</s>`:"";return this.props.defaultPriceLabel||i.t(`subscription.prices.defaultLabel_${this.period}`)+e}get shouldDisplayPreviousOneTimePrice(){return this.props.prices.isApplicableForDiscount&&this.previousPrice!==this.currentPrice}get previousPrice(){const{previousOneTime:e,previousDefault:t}=this.props.prices;return this.shouldDisplayOneTimePrice?e:t}get currentPrice(){return this.shouldDisplayOneTimePrice?this.props.prices.oneTime:this.props.prices.default}get subscriptionLabel(){const e=this.shouldDisplayPreviousSubscriptionPrice?` <s>${this.props.prices.previousSubscription}</s>`:"";return this.props.subscriptionPriceLabel||i.t(`subscription.prices.subscriptionLabel_${this.period}`)+e}get shouldDisplayPreviousSubscriptionPrice(){const{previousSubscription:e,subscription:t,isApplicableForDiscount:s}=this.props.prices;return!!e&&s&&e!==t}get hasLeftUnits(){return"USD"===this.props.prices.currency}get leftUnits(){return this.hasLeftUnits?this.defaultUnits:null}get defaultUnits(){return i.t(`subscription.defaultUnits_${this.period}`)}get subscriptionUnits(){const e=i.t(`subscription.subscriptionUnits_${this.props.prices.renewalPeriod}`),t=e.split("/").slice(-1);return this.hasLeftUnits?`/${t}`:e}
2render(){const{prices:e,largePrices:t,smallUnits:s,hasCompactUnitsView:i,size:a,unitsSize:c}=this.props;return(0,o.h)(r.default,{currency:e.currency},(0,o.h)(n.default,{label:this.defaultLabel,amount:(0,l.formatPrice)(this.shouldDisplayOneTimePrice?e.oneTime:e.default),className:e.isApplicableForDiscount?"is__applicableForDiscount":"",size:a,smallUnits:s,unitsSize:c,hasCompactUnitsView:i,large:t,leftUnits:this.leftUnits,units:this.hasLeftUnits?null:this.defaultUnits}),(0,o.h)(n.default,{label:this.subscriptionLabel,amount:(0,l.formatPrice)(e.subscription),className:this.shouldDisplayPreviousSubscriptionPrice?"is__applicableForDiscount":"",size:a,smallUnits:s,unitsSize:c,hasCompactUnitsView:i,large:t,leftUnits:this.leftUnits,units:this.subscriptionUnits}))}}t.default=c},39178:function(e,t,s){"use strict";var i=s(24994),a=i(s(44445)),o=i(s(18278)),n=i(s(84710)),r=i(s(62171)),l=i(s(52230));{const{productSubscription:e={}}=window,t=e.prices||{};t.isCouponApplied&&document.body.classList.add("has__couponApplied"),t.couponValidUntil&&document.body.classList.add("has__coupon"),t.specialOffer&&document.body.classList.add("has__specialOffer"),$(".js__subscriptionPricing, .js__subscriptionPrices").each(function(){$(this).reactify(a.default,{prices:e.prices,smallUnits:!!$(this).attr("data-small-units"),hasCompactUnitsView:!!$(this).attr("data-has-compact-units-view")})}),$(".js__subscriptionPricingWithSinglePlan").each(function(){const t=$(this);t.reactify(o.default,{prices:e.prices,...t.data()}),t.unwrap()}),$(".js__oneTimeSubscriptionPrice").each(function(){$(this).reactify(r.default,{price:e.prices.oneTime,label:$(this).attr("data-label"),units:$(this).attr("data-units")})}),$(".js__subscriptionPricingDiscount").each(function(){e.prices.isApplicableForDiscount||$(this).addClass("is__empty"),$(this).reactify(n.default,{prices:e.prices,caption:$(this).attr("data-caption")})}),$(".js__subscriptionPricingPreorderCaption").each(function(){e.prices.preorder?$(this).reactify(l.default):$(this).remove()})}},84710:function(e,t,s){"use strict";var i=s(86019),a=s(76148),o=s(45169);class n extends a.Component{shouldComponentUpdate(){return!1}render(e){return e.prices.isApplicableForDiscount?e.caption?(0,a.h)(o.Caption,{html:i.t("books.discountPriceCaption")}):(0,a.h)(o.TextNode,{className:"subscriptionPricing-info is__special",html:`${i.t("books.discountPriceCaption")}.`}):null}}e.exports=n},52230:function(e,t,s){"use strict";var i=s(86019),a=s(76148),o=s(45169);class n extends a.Component{shouldComponentUpdate(){return!1}render(){return(0,a.h)(o.Caption,{html:i.t("books.discountPriceCaptionPreorder")})}}e.exports=n},53893:function(e,t,s){"use strict";var i=s(86019),a=s(24994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=s(76148),n=a(s(25033)),r=a(s(31914)),l=s(73345);class c extends o.Component{get defaultUnits(){return i.t("subscription.unitsOneTime")}get label(){const{subscriptionPeriod:e}=this.props.prices;return i.t(`subscription.prices.defaultLabel_${e}`)}get footnote(){const{subscription:e,renewalPeriod:t}=this.props.prices,s=i.t("subscription.prices.after"),a=i.t(`subscription.subscriptionUnits_${t}`);return`${s} ${(0,l.formatPrice)(e)} ${a}`}
2render(){const{prices:e,largePrices:t,unitsSize:s}=this.props;let i="";return e.isApplicableForDiscount&&e.previousOneTime!==e.oneTime&&(i=` <s>${e.previousOneTime}</s>`),(0,o.h)(r.default,{currency:e.currency},(0,o.h)(n.default,{label:this.label+i,footnote:this.footnote,amount:(0,l.formatPrice)(e.oneTime),className:e.isApplicableForDiscount?"is__applicableForDiscount":"",unitsSize:s,large:t,spaceTypeBeforeUnits:"regular",units:this.hasLeftUnits?null:this.defaultUnits}))}}t.default=c},18278:function(e,t,s){"use strict";var i=s(24994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=s(76148),o=i(s(44445)),n=i(s(25033)),r=i(s(31914)),l=s(45169),c=s(73345);class d extends o.default{constructor(e){super(e),this.props.size="large is__stacked",this.props.unitsSize="small is__stacked"}get subscriptionPricingHeading(){return this.props.subscriptionHeading}get singlePricingHeading(){return this.props.singleHeading}render(){const{prices:e,largePrices:t,smallUnits:s,hasCompactUnitsView:i,size:o,unitsSize:d}=this.props;return(0,a.h)("div",{className:"subscriptionPricingWithSinglePlan"},(0,a.h)("div",{className:"subscriptionPricingWithSinglePlan-subscriptionPricing"},(0,a.h)(l.Caption,null,(0,a.h)("b",null,this.subscriptionPricingHeading)),(0,a.h)(r.default,{currency:e.currency}
2,(0,a.h)(n.default,{footnote:this.defaultLabel,amount:(0,c.formatPrice)(this.shouldDisplayOneTimePrice?e.oneTime:e.default),className:e.isApplicableForDiscount?"is__applicableForDiscount":"",size:o,smallUnits:s,unitsSize:d,hasCompactUnitsView:i,large:t,leftUnits:this.leftUnits,units:this.hasLeftUnits?null:this.defaultUnits}),(0,a.h)(n.default,{footnote:this.subscriptionLabel,amount:(0,c.formatPrice)(e.subscription),className:this.shouldDisplayPreviousSubscriptionPrice?"is__applicableForDiscount":"",size:o,smallUnits:s,unitsSize:d,hasCompactUnitsView:i,large:t,leftUnits:this.leftUnits,units:this.subscriptionUnits}))),(0,a.h)("div",{className:"subscriptionPricingWithSinglePlan-singlePricing"},(0,a.h)(l.Caption,null,(0,a.h)("b",null,this.singlePricingHeading)),(0,a.h)(r.default,{currency:e.currency},(0,a.h)(n.default,{amount:(0,c.formatPrice)(e.singlePlan.oneTime),size:o,unitsSize:d}))))}}t.default=d},54032:function(e,t,s){"use strict";var i=s(86019),a=s(24994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=s(76148),n=a(s(25033)),r=a(s(31914)),l=a(s(17716));class c extends o.Component{get upgradeLabel(){return this.props.isBookshelfAll?this.upgradeToAllLabel:i.t("subscription.prices.upgradeLabel")}get upgradeToAllLabel(){const{renewalPeriod:e,previousOneTime:t}=this.props.prices;return i.t(`subscription.prices.defaultLabel_${e}`)+` <s>${t}</s>`}get subscriptionLabel(){const e=this.props.isBookshelfAll?`subscriptionLabel_${this.props.prices.renewalPeriod}`:"upgradeSubscriptionLabel";let t=i.t(`subscription.prices.${e}`);return this.hasDifferentSubscriptionPrices&&(t+=` <s>${this.props.prices.previousSubscription}</s>`),t}get hasDifferentSubscriptionPrices(){const{subscription:e,previousSubscription:t}=this.props.prices;return!!t&&e!==t}render(){if("collecture"===this.props.product)return(0,o.h)(l.default,this.props);const{prices:e,size:t="pageTitle",unitsSize:s="medium"}=this.props;return(0,o.h)(r.default,{currency:e.currency},(0,o.h)(n.default,{label:this.upgradeLabel,amount:e.specialOffer.oneTime,className:"is__specialOffer",units:i.t(`subscription.defaultUnits_${e.renewalPeriod}`),size:t,unitsSize:s}),(0,o.h)(n.default,{label:this.subscriptionLabel,amount:e.subscription,className:this.hasDifferentSubscriptionPrices?"is__specialOffer":"",size:t,unitsSize:s,units:i.t(`subscription.subscriptionUnits_${e.renewalPeriod}`)}))}}t.default=c},49442:function(e,t,s){"use strict";const i=s(21834),a=s(43532);class o extends i{get currentScrollPosition(){return window.application.currentScrollPosition}preInit(){this.isFinal=!0,this.$document=$(document),this.el=this.$el[0],this.editLinks=new a(this.el),this.previewsHolderWrap=this.el.querySelector(".superLecturePreviewsHolderWrap"),this.previewsHolder=this.el.querySelector(".superLecturePreviewsHolder"),this.previewsHeader=this.el.querySelector(".superLecturePreviewsHeader"),this.previewsList=this.el.querySelector(".superLecturePreviews"),this.previewCaptions=this.el.querySelectorAll(".superLecturePreviews-item .caption-text"),this.hasNavigator=!!this.previewsHolderWrap,this.onScroll=this.onScroll.bind(this),this.lockUpdates=this.lockUpdates.bind(this),this.releaseUpdates=this.releaseUpdates.bind(this),this.calculatePreviewsTopAndHeight=this.calculatePreviewsTopAndHeight.bind(this),this.hasNavigator&&this.bindEvents()}preCalculate(){if(!this.hasNavigator)return;this.previewsHolder.classList.remove("is__ready");const e=this.previewsHolder.offsetHeight;this.previewsHolderWrap.style.height=e+"px",this.previewsHolder.style.setProperty("--height",e+"px"),this.previewsHolder.classList.add("is__ready"),this.lastY=window.pageYOffset,this.calculatePreviewsTopAndHeight(),this.buildTriggers()}preRender(){this.editLinks.render(),this.hasNavigator&&(this.$document.off("appScroll.superLecture").on("appScroll.superLecture",this.onScroll),this.$document.on("menuItemBadgeAppended",this.calculatePreviewsTopAndHeight),this.setActiveLectureFromCurrentPosition(),this.ensurePreviewsAreVisible(),this.markOverflowingCaptions())}calculatePreviewsTopAndHeight(){this.previewsTop=this.lastY+this.previewsHolderWrap.getBoundingClientRect().top,this.previewsHeight=this.previewsHolder.offsetHeight}bindEvents(){this.$el.find(".superLecturePreviews").on("click","a",e=>{e.preventDefault();const t=e.currentTarget.href.split("#").pop();this.scrollToLecture(t)})}buildTriggers(){this.triggers=Array.from(this.previewsHeader.querySelectorAll('a[href^="#"]')).map(e=>{const t=e.href.split("#").pop();return{id:t,top:window.pageYOffset+document.getElementById(t).getBoundingClientRect().top-window.application.viewHeight/2}})}scrollToLecture(e){const{currentScrollPosition:t,previewsTop:s,previewsHeight:i,currentShaftHeight:a}=this,o=document.getElementById(e).parentNode.getBoundingClientRect().top+t-i-18.5,n=o-s+i;$("html, body").animate({scrollTop:o},{duration:300,start:()=>{n>a&&this.setShaftHeightTo(n),this.lockUpdates(),this.setActiveLecture(e)},complete:()=>{n<a&&this.setShaftHeightTo(n),this.releaseUpdates()}})}lockUpdates(){this.isLocked=!0}releaseUpdates(){this.isLocked=!1}setActiveLecture(e){this.previewsHeader.querySelectorAll(".is__active").forEach(e
2=>e.classList.remove("is__active"));const t=this.previewsHeader.querySelector(`a[href="#${e}"]`).closest(".superLecturePreviews-item");t.classList.add("is__active"),this.ensureActivePreviewIsVisible(t)}ensureActivePreviewIsVisible(e){const t=e.getBoundingClientRect(),{viewWidth:s}=window.application,i=t.left-20,a=s-t.left-t.width-20;if(i<0||a<0){const{scrollLeft:e}=this.previewsList,t=i<0?i:-a;this.previewsList.scrollLeft=e+t}}onScroll(){this.setActiveLectureFromCurrentPosition(),this.updateShaftHeight()}setActiveLectureFromCurrentPosition(){if(this.isLocked)return;const{currentScrollPosition:e}=this,t=this.triggers.filter(t=>e>t.top).pop()||this.triggers[0];this.setActiveLecture(t.id)}updateShaftHeight(){if(this.isLocked)return;const{currentScrollPosition:e,currentShaftHeight:t,previewsHeight:s,previewsTop:i}=this;let a=e-i;const o=t+i,n=o-e-s,r=e<o,l=r&&e>i&&Math.abs(t-s)>=1;if(e>=this.lastY)if(r&&n>0){const e=this.previewsHeader.getBoundingClientRect().bottom;this.setShaftHeightTo(a+e)}else r||this.setShaftHeightTo(a);this.previewsHeader.classList.toggle("is__stuck",l),this.lastY=e}setShaftHeightTo(e){this.currentShaftHeight!==e&&(this.previewsHolder.style.setProperty("--height",e+"px"),this.currentShaftHeight=e)}ensurePreviewsAreVisible(){this.setShaftHeightTo(this.currentScrollPosition-this.previewsTop+this.previewsHeight),this.updateShaftHeight()}markOverflowingCaptions(){this.previewCaptions.forEach(e=>{const t=e.parentNode;t.classList.remove("is__overflowing"),e.scrollHeight-e.offsetHeight>2&&t.classList.add("is__overflowing")})}}$(".js__superLecture").each((e,t)=>new o($(t)))},43532:function(e){"use strict";e.exports=class{constructor(e){this.lectures=e.querySelectorAll(".embeddedLecture")}get canEdit(){var e;return null===(e=window.application.user)||void 0===e?void 0:e.isStaff}render(){this.canEdit&&!this.hasRendered&&this.appendEditLinksWithShafts()}appendEditLinksWithShafts(){this.hasRendered=!0,this.lectures.forEach(e=>{const t=e.getAttribute("data-lecture-slug"),s=`/lectures/${t}/edit/`,i=t,a=document.createElement("div");a.setAttribute("class","module embeddedLecture-editLinkShaft");const o=document.createElement("a");o.setAttribute("href",s),o.setAttribute("target",i),o.classList.add("embeddedLecture-editLink"),a.prepend(o),e.prepend(a)})}}},74213:function(e,t,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=s(76148);t.default=({type:e,text:t})=>(0,i.h)("span",{className:`tag is__${e}`},t)},40499:function(e,t,s){"use strict";var i=s(24994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.createCommentDraftSync=void 0;var a=i(s(22443)),o=i(s(98999)),n=i(s(99731));const r=Object.assign({},a.default,o.default),l=e=>({draft:e.value,draft_client_id:e.draft_client_id,draft_client_revision:e.draft_client_revision,draft_base_server_revision:e.draft_base_server_revision}),c=({apiUrlBase:e,storageKey:t,initialText:s,serverRevision:i,isPublished:a,clientId:o,storage:c,onChange:d})=>{let h,u=!!a;const p=new n.default({storageKey:t,initialValue:s,serverRevision:i,flush:t=>fetch(e,{method:"PUT",headers:r,body:JSON.stringify(l(t))}).then(e=>{if(!e.ok)throw Error(e.statusText);return e}),onChange:()=>d(h),valueFromResponse:e=>(u=!(!e||!e.text),(e=>e.draft?e.draft:void 0!==e.text?e.text:"")(e))},{clientId:o,storage:c});return h={get value(){return p.value},get hasUnsavedChanges(){return p.hasUnsavedChanges},get hasRestoredValue(){return p.hasRestoredValue},get isPublished(){return u},update(e){return p.update(e)},flush(){return p.flush()},publish(e={}){return u=!0,p.publish(e)},destroy(){return p.destroy()}},h};t.createCommentDraftSync=c,t.default=c},38475:function(e,t,s){"use strict";var i=s(24994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=s(76148),o=i(s(94634)),n=i(s(75719)),r=i(s(43631)),l=i(s(32485)),c=i(s(22443)),d=i(s(98999)),h=i(s(40499));const u=Object.assign({},c.default,d.default);class p extends a.Component{constructor(e){super(e),this.handleDraftChange=this.handleDraftChange.bind(this),this.commentDraft=(0,h.default)({apiUrlBase:e.apiUrlBase,storageKey:e.draftStorageKey||`task-comment:${e.apiUrlBase}`,initialText:e.text,serverRevision:e.serverRevision,isPublished:!!e.isPublished,clientId:e.draftClientId,storage:e.draftStorage,onChange:this.handleDraftChange}),this.state={text:this.commentDraft.value,hasChanges:this.commentDraft.hasUnsavedChanges,isExpanded:e.isExpanded||this.commentDraft.hasUnsavedChanges,isDisabled:!1,hasErrors:!1,isPublished:!!e.isPublished},this.expand=this.expand.bind(this),this.collapse=this.collapse.bind(this),this.handleInput=this.handleInput.bind(this),this.preventSubmitBlur=this.preventSubmitBlur.bind(this),this.submitComment=this.submitComment.bind(this),this.saveDraft=(0,n.default)(300,this.saveDraft.bind(this)),this.updateCommentStickiness=this.updateCommentStickiness.bind(this)}
2get comment(){return this.textarea.closest(".js__taskComment")}get nextEl(){return this.comment.nextSibling}get textareaVerticalIndent(){return this.countCommentCssIndent("padding-top")+this.countCommentCssIndent("padding-bottom")+this.countCommentCssIndent("margin-top")+this.countCommentCssIndent("margin-bottom")}countCommentCssIndent(e){return Number($(this.comment).css(e).replace("px",""))}componentDidMount(){$(document).on("appScroll",this.updateCommentStickiness),this.updateCommentStickiness(),this.commentDraft.hasRestoredValue&&this.saveDraft()}componentWillUnmount(){$(document).off("appScroll",this.updateCommentStickiness),this.commentDraft.destroy()}componentDidUpdate(e,t){!t.isExpanded&&this.state.isExpanded&&this.textarea.focus()}expand(){this.state.isExpanded||this.setState({isExpanded:!0})}collapse(){this.state.hasChanges||!this.state.isPublished&&this.state.text||this.setState({isExpanded:!1})}handleInput(e){const t=e.target.value;this.commentDraft.update(t),this.saveDraft(),this.setState({isDisabled:!1,hasErrors:!1}),this.updateCommentStickiness()}preventSubmitBlur(e){e.preventDefault()}submitComment(){return this.state.isDisabled?Promise.resolve():(this.setState({isDisabled:!0}),fetch(this.props.apiUrlBase,{method:"PUT",headers:u,body:JSON.stringify({text:this.state.text})}).then(async e=>{const t=await(s=e,s&&"function"==typeof s.json?s.json().catch(()=>({})):Promise.resolve({}));var s;e.ok&&this.commentDraft.publish({value:this.state.text,serverRevision:t.server_revision}),this.setState({hasChanges:!e.ok&&this.state.hasChanges,isExpanded:!e.ok,isDisabled:e.ok,hasErrors:!e.ok,isPublished:e.ok||this.state.isPublished})}))}saveDraft(){return this.commentDraft.flush()}handleDraftChange(e){this.setState({text:e.value,hasChanges:e.hasUnsavedChanges,isPublished:e.isPublished})}updateCommentStickiness(){const e=this.comment.previousSibling.offsetHeight,t=window.application.viewHeight,s=t/2;if(e<s)return this.comment.classList.remove("is__sticky"),void this.textarea.classList.remove("is__scrollable");const i=this.nextEl.getBoundingClientRect().top,a=this.comment.getBoundingClientRect().top,o=this.textareaVerticalIndent,n=this.textarea.offsetHeight,r=Number(this.textarea.style.height.replace("px",""))-n;i<t+o?(this.comment.classList.remove("is__sticky"),(t-i>r||a<s)&&this.textarea.classList.remove("is__scrollable")):a>s+o&&(this.comment.classList.add("is__sticky"),this.textarea.classList.add("is__scrollable"))}render(){const e={disabled:this.state.isDisabled?"disabled":""},t=this.state.isPublished?"Сохранить":"Опубликовать",s=(0,l.default)({"taskComment-box":!0,is__expanded:this.state.isExpanded,has__errors:this.state.hasErrors,has__changes:this.state.hasChanges,has__unsavedChanges:this.state.hasChanges});return(0,a.h)("div",{className:s},(0,a.h)(r.default,{className:"taskComment-text",placeholder:"Комментарий",value:this.state.text,inputRef:e=>this.textarea=e,onClick:this.expand,onFocus:this.expand,onBlur:this.collapse,onInput:this.handleInput}),(0,a.h)("button",(0,o.default)({className:"button taskComment-submit"},e,{onMouseDown:this.preventSubmitBlur,onClick:this.submitComment}),t))}}t.default=p},61364:function(e,t,s){"use strict";var i=s(24994)(s(38475));{const e=e=>{const t=(window.application.user||{}).id,{isStaff:s}=window.application.user||{},i=window.task.comments.filter(t=>t.task_result_id===e).find(e=>e.user_uid===t)||{text:"",draft:""},a=i.draft||i.text||"",o=i.server_revision||i.serverRevision||0;let n=null===e?`${window.task.apiUrlBase}/comment`:`/classroom/task_results/${e}/comment`;return s&&i.id&&(n=`/classroom/task_comments/${i.id}/`),{apiUrlBase:n,text:a,serverRevision:o,draftStorageKey:`task-comment:${n}:${t||"anonymous"}`,isExpanded:(i.text||"")!==a,isPublished:!!i.id&&!!i.text}};$(".js__taskComment").each(function(){const t=$(this).data("id")||null;$(this).reactify(i.default,e(t))})}},57543:function(e,t,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.formatBonusScore=void 0;var i=s(73345);t.formatBonusScore=e=>{const t=(e=>"Подг. курсы"===e.column)(e);return`+${(0,i.formatNumber)(e.score,{precision:t?3:2})}`}},46806:function(){"use strict";{const e="is__stickable",t="is__sticky";class s{constructor(e){this.$el=e,this.$container=this.$el.parent(),this.$document=$(document),this.height=this.$el.height(),this.threshold=this.$el.is(".is__imageResult")?9:0,this._bindEvents(),this._calculate(),this._draw(),window.chrome&&$("body").addClass("no__halfPixel")}_bindEvents(){this.$document.on("appScroll",(e,t)=>this._draw(t)),this.$document.on("appResize resultsTableRendered",()=>{this._calculate(),this._draw()});const e=this;
2this.$document.find(".is__img").each(function(){$(this).imagesLoaded(()=>{e._calculate(),e._draw()})}),this.$document.on("appHeightChanged",()=>{this._calculate(),this._draw()})}_calculate(){this.trigger=this.$container.offset().top+this.threshold,this.isFitToViewport=this.$container.height()<=window.innerHeight-this.height,this.$container.toggleClass(e,!this.isFitToViewport)}_draw(e){this.isFitToViewport||(void 0===e&&(e=window.application.currentScrollPosition),e>this.trigger?this.$el.addClass(t):this.$el.removeClass(t))}}$(".js__taskResultHeader").each(function(){new s($(this))})}},38621:function(e,t,s){"use strict";var i=s(24994),a=s(76148),o=i(s(98999)),n=i(s(22443)),r=i(s(94408)),l=i(s(2514)),c=i(s(62693));class d extends a.Component{constructor(e){super(e),this.state={userMarks:{},userParts:e.userParts,score:e.score,average:e.average},this.buildUserMarks=this.buildUserMarks.bind(this),this.setCorrection=this.setCorrection.bind(this)}componentWillMount(){this.state.userParts&&(this.buildUserMarks(),this.setCorrection())}buildUserMarks(){const e=this.state.userParts.reduce((e,t)=>(e[t.column]={score:t.score,reviewerId:t.reviewer_id},e),{});this.setState({userMarks:e})}setCorrection(){const e=this.state.userParts.filter(e=>"correction"===e.column)[0];e&&this.setState({correction:e.score})}updateMarks({user_parts:e,score:t}){this.setState({userParts:e,score:t}),this.triggerBoxGeometryChange()}updateScore({score:e,average:t}){this.setState({score:e,average:t}),this.triggerBoxGeometryChange()}triggerBoxGeometryChange(){setTimeout(()=>$(document).trigger("boxGeometryChange"))}fetchMarksWhenOnline(){const e=$(window),t=`online.testResultMark${this.props.userId}`;e.on(t,()=>{e.off(t),this.fetchMarks()})}fetchMarks(){this.isFetchingMarks||(this.isFetchingMarks=!0,fetch(this.props.apiUrl,{headers:{...n.default,...o.default}}).then(e=>e.json()).then(e=>{this.isFetchingMarks=!1,this.updateMarks(e),this.buildUserMarks()}))}getUserMarksPart(e){return this.state.userMarks[e]||{}}get canDisplayScores(){return this.props.abilities.can_see_score&&void 0!==this.state.score&&null!==this.state.score}get scorableParts(){return this.props.scorableMarkParts}get bonuses(){return(this.state.userParts||[]).filter(e=>e.score).filter(e=>this.props.bonusMarkParts.includes(e.column))}render(){return(0,a.h)("div",{className:"taskResultMark"},(0,a.h)("div",{className:"taskResultMark-parts"},(0,a.h)(c.default,null,this.props.shouldScore&&this.scorableParts.map(e=>(0,a.h)(r.default,{part:e,score:this.getUserMarksPart(e).score,reviewerId:this.getUserMarksPart(e).reviewerId,apiUrl:this.props.apiUrl,onReceiveScore:this.updateScore.bind(this),onSendError:this.fetchMarksWhenOnline.bind(this),disabled:this.props.lockedMarkParts.includes(e)})))),this.canDisplayScores&&(0,a.h)(l.default,{userIsStaff:this.props.userIsStaff,bonuses:this.bonuses,correction:this.state.correction,average:this.state.average,score:this.state.score}))}}e.exports=d},63050:function(e,t,s){"use strict";var i=s(24994)(s(38621));$(document).on("appReady",()=>{$(".js__taskResultMark").each(function(){const e=$(this).data("id"),t=window.task.results.filter(t=>t.id===e)[0];$(this).reactify(i.default,{score:t.score,average:t.average,userParts:t.user_parts,shouldScore:t.should_score,abilities:window.task.abilities,userId:window.task.credentials.id,userIsStaff:window.task.userIsStaff,scorableMarkParts:window.task.mark.scorable_parts,bonusMarkParts:window.task.mark.bonus_parts,lockedMarkParts:window.task.mark.locked_parts,apiUrl:`${window.task.apiUrlBase}/users/${t.user_id}/mark`})})})},65492:function(e,t,s){"use strict";var i=s(86019),a=s(76148),o=s(73345),n=s(57543);const r=({title:e,score:t})=>(0,a.h)("tr",null,(0,a.h)("td",{className:"taskResultTable-partName"},(0,a.h)("p",null,e)),(0,a.h)("td",null,(0,a.h)("p",null,t))),l=({correction:e})=>(0,a.h)(r,{title:i.t("classroom.correction"),score:e}),c=({average:e})=>(0,a.h)(r,{title:i.t("classroom.average"),score:e}),d=({title:e,score:t})=>(0,a.h)(r,{title:e,score:t});class h extends a.Component{render(){return(0,a.h)("div",{className:"taskResultTable-common"},(0,a.h)("table",{className:"taskResultTable"},(0,a.h)("tbody",null,null!=this.props.correction&&(0,a.h)(l,{correction:(0,o.formatNumber)(this.props.correction)}),null!=this.props.average&&(0,a.h)(c,{average:(0,o.formatNumber)(this.props.average)}),this.props.bonuses.length>0&&this.props.bonuses.map(e=>
2(0,a.h)(d,{title:e.column,score:(0,n.formatBonusScore)(e)})))))}}e.exports=h},94408:function(e,t,s){"use strict";var i=s(24994),a=s(76148),o=i(s(75719)),n=i(s(32485)),r=s(73345),l=i(s(98999)),c=i(s(22443));const d="correction";class h extends a.Component{constructor(e){super(e),this.state={score:this.formatValue(e.score),hasChanges:!1},this.handleInput=this.handleInput.bind(this),this.handleKeydown=this.handleKeydown.bind(this),this.handleBlur=this.handleBlur.bind(this),this.send=(0,o.default)(500,this.send.bind(this))}formatValue(e){return e=(0,r.formatNumber)(e),this.props.part===d&&"+0"===(e=(0,r.signNumber)(e))&&(e=""),e}componentWillReceiveProps(e){void 0===this.state.score&&this.setState({score:e.score}),this.isPending&&void 0===e.score&&this.send()}handleInput(e){this.setState({score:e.target.value,status:null,hasChanges:!0}),this.send()}handleKeydown(e){38===e.keyCode&&(e.preventDefault(),this.changeBy(.5)),40===e.keyCode&&(e.preventDefault(),this.changeBy(-.5))}handleBlur(e){this.setState({score:this.formatValue(e.target.value)})}changeBy(e){const t=this.state.score?this.state.score:0,s=(0,r.parseNumber)(t)+e;if(Number.isNaN(s))return;const i=this.formatValue(s);this.setState({score:i,status:null,hasChanges:!0}),this.send()}send(){this.isScoreValid()?(this.isPending=!1,this.setState({status:null}),$.ajax({url:this.props.apiUrl,type:"PUT",headers:Object.assign({},c.default,l.default),dataType:"json",data:JSON.stringify({mark_parts:{[this.props.part]:(0,r.parseNumber)(this.state.score)},reviewer_id:this.props.reviewerId}),beforeSend:this.handleBeforeSend.bind(this),success:this.handleSendSuccess.bind(this),error:this.handleSendError.bind(this)})):this.setState({status:"error"})}isScoreValid(){const e=(0,r.parseNumber)(this.state.score);return!Number.isNaN(+e)||""===this.state.score.trim()}handleBeforeSend(e){return this.currentXhr&&this.currentXhr.abort(),this.currentXhr=e,!0}handleSendSuccess(e){this.isScoreMatchesRemote(e)?(this.setState({status:"success",hasChanges:!1}),this.props.onReceiveScore({score:e.score,average:e.average})):this.send()}handleSendError(e,t){"abort"!==t&&(this.isPending=!0,this.setState({status:"error"}),this.props.onSendError())}isScoreMatchesRemote(e){const t=e.parts.find(e=>{const t=e.reviewer_id==this.props.reviewerId||e.reviewer_id==window.task.credentials.id;return e.column===this.props.part&&t})||{score:""};return this.state.score===this.formatValue(t.score)}render(e){const t=(0,n.default)("taskResultMarkPart",this.state.status?"is__"+this.state.status:"",{has__unsavedChanges:this.state.hasChanges,is__correction:e.part===d});return(0,a.h)("div",{className:t},(0,a.h)("div",{className:"taskResultMarkPart-in"},(0,a.h)("div",{className:"taskResultMarkPart-label"},e.part===d?"Корр.":e.part),(0,a.h)("input",{className:"taskResultMarkPart-input",name:e.part,type:"text",disabled:e.disabled,value:this.state.score,onInput:this.handleInput,onKeydown:this.handleKeydown,onBlur:this.handleBlur,placeholder:e.part===d?"+0":""})))}}e.exports=h},68851:function(e,t,s){"use strict";var i=s(24994),a=s(76148),o=i(s(32485)),n=s(73345),r=i(s(65492));const l=({marks:e,reviewerId:t,part:s})=>(0,a.h)("td",null,(0,a.h)("p",null,(0,n.formatNumber)(e[t].scores[s])||"—"));class c extends a.Component{constructor(e){super(e),this.state=this.parseScoreParts()}componentWillMount(){this.setVisiblity()}componentDidMount(){this.setSize(),window.addEventListener("resize",this.setSize.bind(this))}setVisiblity(){let e;e=this.props.userIsStaff?!["teacher","teachers"].includes(this.props.markType)&&this.state.reviewerIds.length:this.props.abilities.can_see_score&&this.props.scoreParts.length,this.setState({isVisible:!!e})}setSize(){const e=this.table.parentNode.clientWidth;this.minFullTableWidth?this.setState({isShrinked:this.minFullTableWidth>e}):this.table.clientWidth>e&&(this.minFullTableWidth=this.table.clientWidth,this.setState({isShrinked:!0})),$(document).trigger("resultsTableRendered")}parseScoreParts(){if(!this.props.scoreParts)return{};const e={};return this.props.scoreParts.forEach(t=>{"correction"!==t.column&&(this.props.bonusMarkParts.includes(t.column)||(e[t.reviewer_id]||(e[t.reviewer_id]={n
2ame:t.reviewer_name,scores:{}}),e[t.reviewer_id].scores[t.column]=t.score))}),{marks:e,reviewerIds:Object.keys(e)}}get bonuses(){return(this.props.scoreParts||[]).filter(e=>e.score).filter(e=>this.props.bonusMarkParts.includes(e.column))}render(e){const{marks:t}=this.state,s=this.state.reviewerIds.length>1;return(0,a.h)("div",{className:(0,o.default)("taskResultTable-wrap",{is__hidden:!this.state.isVisible})},(0,a.h)("div",{className:"device desktop laptop"},(0,a.h)("table",{className:"taskResultTable",ref:e=>this.table=e},(0,a.h)("thead",{className:(0,o.default)("text",{is__small:this.state.isShrinked})},(0,a.h)("tr",null,s&&(0,a.h)("th",null),e.parts.map(e=>(0,a.h)("th",null,(0,a.h)("p",null,e))))),(0,a.h)("tbody",null,this.state.reviewerIds.map(i=>(0,a.h)("tr",null,s&&(0,a.h)("th",null,(0,a.h)("p",null,t[i].name)),e.parts.map(e=>(0,a.h)(l,{marks:t,reviewerId:i,part:e}))))))),(0,a.h)("div",{className:"device mobile"},e.canSeeScore&&!e.userIsStaff&&(0,a.h)(r.default,{average:e.average,bonuses:this.bonuses,correction:e.correction}),(0,a.h)("div",{className:"taskResultTable-reviewers"},this.state.reviewerIds.map(i=>(0,a.h)("div",{className:"taskResultTable-reviewer"},(0,a.h)("table",{className:`taskResultTable reviewer-${i}`},s&&(0,a.h)("thead",null,(0,a.h)("tr",null,(0,a.h)("th",{colSpan:"2"},(0,a.h)("p",null,t[i].name)))),(0,a.h)("tbody",null,e.parts.map(e=>(0,a.h)("tr",null,(0,a.h)("td",{className:"taskResultTable-partName"},(0,a.h)("p",null,e)),(0,a.h)(l,{marks:t,reviewerId:i,part:e}))))))))))}}e.exports=c},47420:function(e,t,s){"use strict";var i=s(24994)(s(68851));$(document).on("appReady",()=>{$(".js__taskResultMarkPartsTable").each(function(){const e=$(this).data("id"),t=window.task.results.filter(t=>t.id===e)[0];$(this).reactify(i.default,{scoreParts:t.parts||[],markType:window.task.mark.type,parts:window.task.mark.parts,bonusMarkParts:window.task.mark.bonus_parts,average:t.average,canSeeScore:window.task.abilities.can_see_score,correction:t.correction,userId:window.task.credentials.id,userIsStaff:window.task.userIsStaff,abilities:window.task.abilities})})})},2514:function(e,t,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=s(76148),a=s(73345),o=s(57543);const n=e=>(0,a.wrapFractionalPart)((0,a.formatNumber)(e));class r extends i.Component{componentDidMount(){this.updateStrutScore()}componentDidUpdate(){this.updateStrutScore()}updateStrutScore(){null!=this.props.score&&$(".js__taskMarkScore-strut").html(n(this.props.score))}render(){return(0,i.h)("div",{className:"taskResultMark-scores"},!this.props.userIsStaff&&this.props.correction&&null!=this.props.correction&&(0,i.h)("div",{className:"taskResultMarkPart is__correctionAverage"},(0,i.h)("div",{className:"taskResultMarkPart-label"},"Корр."),(0,i.h)("div",{className:"taskResultMarkPart-value"},(0,a.formatNumber)(this.props.correction))),this.props.userIsStaff&&null!=this.props.average&&(0,i.h)("div",{className:"taskResultMarkPart is__average"},(0,i.h)("div",{className:"taskResultMarkPart-label"},"Средняя"),(0,i.h)("div",{className:"taskResultMarkPart-value"},(0,a.formatNumber)(this.props.average))),this.props.bonuses.length>0&&this.props.bonuses.map(e=>(0,i.h)("div",{className:"taskResultMarkPart is__bonus"},(0,i.h)("div",{className:"taskResultMarkPart-label"},e.column),(0,i.h)("div",{className:"taskResultMarkPart-value"},(0,o.formatBonusScore)(e)))),null!=this.props.score&&(0,i.h)("div",{className:"taskResultMark-score",dangerouslySetInnerHTML:{__html:n(this.props.score)}}))}}t.default=r},66148:function(){"use strict";{const e=73,t="is__hidingImageResults";class s{constructor(){this.body=document.body,this.bindEvents()}bindEvents(){this.body.addEventListener("keydown",this.toggleImageResults.bind(this))}toggleImageResults(s){s.ctrlKey&&s.keyCode===e&&this.body.classList.toggle(t)}}$(".js__taskResults").each(()=>new s)}},65841:function(e,t,s){"use strict";var i=s(24994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=i(s(47733)),o=i(s(96563));t.default=(0,a.default)(o.default.telegram)},76438:function(e,t,s){"use strict";var i=s(24994),a=i(s(65841));(0,i(s(85702)).default)(".js__telegramSpacer",a.default)},37011:function(e,t,s){"use strict";var i=s(24994);
2Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=s(76148),o=i(s(94634));t.default=({html:e,...t})=>(0,a.h)("div",(0,o.default)({},t,{className:`caption module ${t.className?t.className:""}`}),(0,a.h)("div",{className:"caption-text",dangerouslySetInnerHTML:e?{__html:e}:null},t.children))},2459:function(e,t,s){"use strict";var i=s(24994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=s(76148),o=i(s(94634));t.default=({html:e,...t})=>(0,a.h)("div",(0,o.default)({},t,{className:`description module ${t.className?t.className:""}`,dangerouslySetInnerHTML:e?{__html:e}:null}),t.children)},35380:function(e,t,s){"use strict";var i=s(24994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=s(76148),o=i(s(94634));t.default=({html:e,...t})=>(0,a.h)("div",(0,o.default)({},t,{className:`heading-1 ${t.className?t.className:""}`}),(0,a.h)("h1",{dangerouslySetInnerHTML:e?{__html:e}:null},t.children))},63581:function(e,t,s){"use strict";var i=s(24994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=s(76148),o=i(s(94634));t.default=({html:e,...t})=>(0,a.h)("div",(0,o.default)({},t,{className:`heading-2 ${t.className?t.className:""}`}),(0,a.h)("h2",{dangerouslySetInnerHTML:e?{__html:e}:null},t.children))},37310:function(e,t,s){"use strict";var i=s(24994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=s(76148),o=i(s(94634));t.default=({html:e,...t})=>(0,a.h)("div",(0,o.default)({},t,{className:`heading-3 ${t.className?t.className:""}`}),(0,a.h)("h3",{dangerouslySetInnerHTML:e?{__html:e}:null},t.children))},45169:function(e,t,s){"use strict";var i=s(24994);Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"Caption",{enumerable:!0,get:function(){return d.default}}),Object.defineProperty(t,"Description",{enumerable:!0,get:function(){return u.default}}),Object.defineProperty(t,"Heading1",{enumerable:!0,get:function(){return r.default}}),Object.defineProperty(t,"Heading2",{enumerable:!0,get:function(){return l.default}}),Object.defineProperty(t,"Heading3",{enumerable:!0,get:function(){return c.default}}),Object.defineProperty(t,"Ol",{enumerable:!0,get:function(){return n.default}}),Object.defineProperty(t,"Sidenote",{enumerable:!0,get:function(){return h.default}}),Object.defineProperty(t,"TextNode",{enumerable:!0,get:function(){return a.default}}),Object.defineProperty(t,"Ul",{enumerable:!0,get:function(){return o.default}});var a=i(s(14738)),o=i(s(28624)),n=i(s(79754)),r=i(s(35380)),l=i(s(63581)),c=i(s(37310)),d=i(s(37011)),h=i(s(15058)),u=i(s(2459))},79754:function(e,t,s){"use strict";var i=s(24994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=s(76148),o=i(s(94634));t.default=e=>(0,a.h)("div",(0,o.default)({},e,{className:`textNode is__list ${e.className?e.className:""}`}),(0,a.h)("ol",null,e.children))},15058:function(e,t,s){"use strict";var i=s(24994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=s(76148),o=i(s(94634));t.default=({html:e,...t})=>(0,a.h)("div",(0,o.default)({},t,{className:`sidenote module ${t.className?t.className:""}`}),(0,a.h)("div",{className:"sidenote-text",dangerouslySetInnerHTML:e?{__html:e}:null},t.children))},14738:function(e,t,s){"use strict";var i=s(24994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=s(76148),o=i(s(94634));t.default=({html:e,...t})=>(0,a.h)("div",(0,o.default)({},t,{className:`textNode ${t.className?t.className:""}`}),(0,a.h)("p",{dangerouslySetInnerHTML:e?{__html:e}:null},t.children))},28624:function(e,t,s){"use strict";var i=s(24994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=s(76148),o=i(s(94634));t.default=e=>(0,a.h)("div",(0,o.default)({},e,{className:`textNode is__list ${e.className?e.className:""}`}),(0,a.h)("ul",null,e.children))},44280:function(e,t,s){"use strict";{const e=s(21834);class t extends e{preInit(){this.isFinal=!0}postInit(){this.$captions=this.$el.find(".caption")}preRender(){this.$captions.css("min-height",0)}postCalculate(){this.maxHeight=0,this.$captions.each((e,t)=>{const s=$(t).height();this.maxHeight<s&&(this.maxHeight=s)})}postRender(){this.$captions.css("height",this.maxHeight)}}$(".js__alignCaptions").each(function(){new t($(this))})}},71990:function(e,t,s){"use strict";{const e=s(21834);class t extends e{preInit(){this.isFinal=!0}postInit(){this.$thumbs=this.$el.find(".thumbnail")}preRender(){this.$thumbs.css("min-height",0)}postCalculate(){this.maxHeight=0,this.$thumbs.each((e,t)=>{const s=$(t).height();this.maxHeight<s&&(this.maxHeight=s)})}postRender(){this.$thumbs.css("height",this.maxHeight)}}$(".js__alignThumbnails").each(function(){new t($(this))})}},14026:function(){"use strict";$(document).on("imageLoaded",(e,t)=>{const s=t.$el.closest(".thumbnail");s.find(".image").toArray().every(e=>e.classList.contains("is__loaded"))&&s.addClass("is__ready")})},44499:function(){"use strict";$(".thumbnail .image[data-src]").each((e,t)=>{$(t).append('<img class="image-img">')})},36662:function(){"use strict";{const e="js__topStickyBanner";class t{constructor(e){this.$el=e,this.$document=$(document),this.$shaft=this.$el.closest(".topStickyBanner-shaft"),this.$strut=$('<div class="topStickyBanner-strut"></div>
2'),this.$bottomEdge=$(".js__topStickyBanner-bottomEdge").first(),this.updateStickiness=this.updateStickiness.bind(this),this.setListeners(),this.placeStrutBeforeHeader()}get hasBottomEdge(){return this.$bottomEdge.length}get shaftStyle(){return{height:`calc(${this.hasBottomEdge?this.$bottomEdge.offset().top:$("body").height()}px - 100vh)`}}setListeners(){this.$document.on("appScroll appResize",this.updateStickiness).on("appReady",()=>setTimeout(this.updateStickiness,100))}placeStrutBeforeHeader(){this.$strut.css("height",this.$el.height()+"px"),this.$shaft.before(this.$strut),this.updateStickiness()}updateStickiness(){this.$shaft.css(this.shaftStyle)}}$(`.${e}`).each(function(){new t($(this))})}},14366:function(e,t,s){"use strict";var i=s(24994)(s(61462));$(document).on("appSetUser",(e,t)=>{if(!t)return;const s=document.querySelectorAll("[data-log-scope]"),a=Array.from(s).map(e=>e.getAttribute("data-log-scope"));new Set(a).forEach(e=>new i.default(e))})},61462:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;const s={method:"POST",headers:{Accept:"application/json","Content-Type":"application/json"},credentials:"include",keepalive:!0},i="xxxxxxxx-xxxx-6xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(e){let t=16*Math.random()|0;return("x"===e?t:3&t|8).toString(16)}),a=e=>({scope:e.scope,event:e.event,data:e.data,timestamp:e.timestamp});t.default=class{constructor(e){this.scope=e,this.sendInterval=1e3,this.messages=[],this.bindDefaultEvents(),this.sendTrackingData(),this.log("init")}log(e,t){this.messages.push({scope:this.scope,event:e,data:t,timestamp:performance.now(),isSynced:!1})}bindDefaultEvents(){document.addEventListener("visibilitychange",this.handleVisibilityChange.bind(this)),document.addEventListener("click",this.handleClick.bind(this))}sendTrackingData(){const e=this.messages.filter(e=>!e.isSynced),t=e.map(a);e.length<=0?setTimeout(this.sendTrackingData.bind(this),this.sendInterval):(e=>{const t=JSON.stringify({session_id:i,payload:e}),a=Object.assign({},s,{body:t});return fetch("/api/system/logs/",a)})(t).then(t=>{t.ok&&e.forEach(e=>e.isSynced=!0),setTimeout(this.sendTrackingData.bind(this),this.sendInterval)}).catch(()=>setTimeout(this.sendTrackingData.bind(this),this.sendInterval))}handleVisibilityChange(){this.log(document.hidden?"hidden":"visible")}handleClick(e){if(!e.srcElement||!e.srcElement.hasAttribute("data-log-id"))return;const t=e.srcElement.getAttribute("data-log-id"),s={log:(i=e.srcElement).getAttribute("data-log"),checked:null!=i.checked?i.checked:/is__checked/.test(i.className)};var i;this.log(`click/${t}`,s)}}},40963:function(e,t,s){"use strict";var i=s(24994),a=s(76148),o=i(s(32485));class n extends a.Component{constructor(e){super(e),this.state={loadedKB:0,totalKB:0}}componentWillReceiveProps(e){this.setState({loadedKB:this.convertToKB(e.loaded),totalKB:this.convertToKB(e.total)})}convertToKB(e){return(e/1024).toFixed()}render({file:e,loaded:t,total:s,isActive:i,isFailed:n}){const r=(0,o.default)("uploadBar",{is__active:i,is__failed:n}),l=n?`Failed to upload ${e}`:`Uploading ${e}`;return(0,a.h)("div",{className:r},(0,a.h)("div",{className:"uploadBar-name"},l),(0,a.h)("div",{className:"uploadBar-status"},this.state.loadedKB," / ",this.state.totalKB," KB"),(0,a.h)("div",{className:"uploadBar-progress",style:`width: ${t/s*100}%`},l))}}e.exports=n},80430:function(e,t,s){"use strict";var i=s(76148);class a extends i.Component{render({file:e,onDelete:t}){return(0,i.h)("div",{className:"uploadFile"},(0,i.h)("a",{href:e.url,className:"uploadFile-name"},e.title),(0,i.h)("button",{class:"uploadFile-remove",onClick:t}))}}e.exports=a},613:function(e,t,s){"use strict";var i=s(24994),a=s(76148),o=i(s(80430));class n extends a.Component{render({files:e,onDelete:t}){return e.length?(0,a.h)("div",{className:"uploadFiles"},e.map(e=>(0,a.h)(o.default,{file:e,onDelete:()=>t(e)}))):null}}e.exports=n},21001:function(e,t,s){"use strict";var i=s(24994),a=s(76148),o=i(s(75719)),n=i(s(40963)),r=i(s(613)),l=s(45169);class c extends a.Component{constructor(e){super(e),this.state={files:e.files,isEnabled:e.isEnabled,isSuccess:!1,error:!1},this.uploadHeadingPlaceholder="Результаты задания",this.desktopUploadPlaceholder=this.getDesktopUploadPlaceholder(),this.mobileUploadPlaceholder1="↑ Загрузите файлы с результатами",this.mobileUploadPlaceholder2=this.getMobileUploadPlaceholder(),this.linkUrl=(0,o.default)(300,this.linkUrl),this.delete=this.delete.bind(this)}componentDidMount(){if(!this.props.isUploadEnabled)return;const e=$(document);e.on("appDragStart.upload",()=>this.setState({isDragOver:!0})),e.on("appDragEnd.upload",()=>this.setState({isDragOver:!1})),e.on("appDrop.upload",(e,t)=>this.batchUpload(t.files))}componentWillUnmount(){$(document).off("appDragStart.upload appDragEnd.upload appDrop.upload")}get hasError(){return this.state.error&&window.application.errors[this.state.error.code]}getDesktopUploadPlaceholder(){return this.props.isUploadEnabled&&this.props.isTextInputEnabled?"Перетащите на страницу файлы с результатами или вставьте сюда ссылку на доÐ
2ºÑƒÐ¼ÐµÐ½Ñ‚":this.props.isUploadEnabled?"Перетащите на страницу файлы с результатами":"Вставьте ссылку на документ"}getMobileUploadPlaceholder(){return this.props.isUploadEnabled?"Или вставьте ссылку на документ":"Вставьте ссылку на документ"}handleTextareaInput(e){this.props.isTextInputEnabled&&(this.setState({link:e.target.value,isSuccess:!1}),this.linkUrl())}handleTextareaKeydown(e){13===e.keyCode&&e.preventDefault()}batchUpload(e){this.state.isEnabled&&e.length&&this.props.isUploadEnabled&&this.upload(e.pop()).then(()=>this.batchUpload(e))}upload(e){const t=new FormData;return t.append("file",e),this.setState({isUploading:!0,isSuccess:!1,error:!1,uploadingFileName:e.name,uploadingFileTotal:e.size}),$.ajax({url:this.props.apiUrl,data:t,contentType:!1,processData:!1,headers:this.props.authHeaders,type:"POST",xhr:this.handleProgressUpdate.bind(this),success:this.handleSuccessfulUpload.bind(this),error:this.handleErrorUpload.bind(this)})}handleSuccessfulUpload(e){this.setState({files:[...this.state.files,e.results[0]],isUploading:!1,isSuccess:!0})}handleErrorUpload(e){e.responseJSON?this.setState({error:e.responseJSON.errors[0]}):this.setState({error:{code:"school.task_result.something_bad_happened"}})}handleProgressUpdate(){const e=new window.XMLHttpRequest;return e.upload.addEventListener("progress",e=>{e.lengthComputable&&this.setState({uploadingFileLoaded:e.loaded})},!1),e}linkUrl(){this.props.isTextInputEnabled&&fetch(this.props.apiUrl,{method:"POST",headers:Object.assign({},this.props.authHeaders,{Accept:"application/json","Content-Type":"application/json"}),body:JSON.stringify({link:this.state.link,sessionId:this.props.sessionId})}).then(e=>{e.ok?this.setState({isSuccess:!0}):e.json().then(e=>this.setState({error:e.errors[0]}))})}delete(e){fetch(`${this.props.apiUrl}/${e.id}`,{method:"DELETE",headers:this.props.authHeaders}).then(t=>{t.ok?this.setState({files:this.state.files.filter(t=>t!==e),isSuccess:!1}):t.json().then(e=>this.setState({error:e.errors[0]}))})}render(){const e=this.state.files.filter(e=>"text/link"===e.type),t=this.state.files.filter(e=>0===e.type.indexOf("image"));return(0,a.h)("div",{className:"uploadBox"},(0,a.h)("div",{className:"uploadGroup is__desktop"},(0,a.h)("div",{className:`\n                upload\n                ${this.state.isEnabled?"":"is__disabled"}\n                ${this.props.isTextInputEnabled?"":"is__textInputDisabled"}\n                ${this.state.isDragOver?"is__dragOver":""}\n                ${this.state.isSuccess?"is__success":""}\n                ${this.state.files.length?"":"is__empty"}\n              `},(0,a.h)("div",{className:"upload-instructions"},(0,a.h)("div",{className:"upload-heading"},this.uploadHeadingPlaceholder),this.props.isTextInputEnabled&&(0,a.h)("textarea",{class:"upload-textarea",required:!0,value:this.state.link,onInput:this.handleTextareaInput.bind(this),onKeyDown:this.handleTextareaKeydown}),(0,a.h)("div",{className:"upload-placeholder"},this.desktopUploadPlaceholder)),(0,a.h)(r.default,{files:this.state.files,onDelete:this.delete}))),(0,a.h)("div",{className:`\n              uploadGroup is__mobile\n              ${this.state.isEnabled?"":"is__disabled"}\n              ${this.state.files.length?"":"is__empty"}\n            `},(0,a.h)("div",{className:"uploadGroup-heading"},this.uploadHeadingPlaceholder),(0,a.h)("div",{className:"uploadGroup-files"},(0,a.h)(r.default,{files:this.state.files,onDelete:this.delete})),(0,a.h)("div",{className:`\n                upload is__mobile\n                ${this.state.isEnabled&&this.props.isUploadEnabled?"":"is__disabled"}\n                ${t.length?"":"is__empty"}\n              `},(0,a.h)("div",{className:"upload-instructions"},this.mobileUploadPlaceholder1,(0,a.h)("input",{className:"upload-fileInput",type:"file",onChange:e=>this.batchUpload([...e.target.files])})),(0,a.h)(r.default,{files:t,onDelete:this.delete})),(0,a.h)("div",{className:`\n                upload is__mobile\n                ${this.state.isEnabled&&this.props.isTextInputEnabled?"":"is__disabled"}\n                ${this.state.isSuccess?"is__success":""}\n                ${e.length?"":"is__empty"}\n              `}
2,(0,a.h)("div",{className:"upload-instructions"},(0,a.h)("textarea",{class:"upload-textarea",required:!0,value:this.state.link,onInput:this.handleTextareaInput.bind(this),onKeyDown:this.handleTextareaKeydown}),(0,a.h)("div",{className:"upload-placeholder"},this.mobileUploadPlaceholder2)),(0,a.h)(r.default,{files:e,onDelete:this.delete}))),this.hasError&&(0,a.h)(l.Caption,{className:"upload-error"},window.application.errors[this.state.error.code](this.state.error.params)),(0,a.h)(n.default,{file:this.state.uploadingFileName,loaded:this.state.uploadingFileLoaded,total:this.state.uploadingFileTotal,isActive:this.state.isUploading,isFailed:this.hasError}))}}e.exports=c},45038:function(e,t,s){"use strict";var i=s(24994)(s(21001));{const e=$(".webpage").attr("mod"),t=t=>e&&e.indexOf(t)>=0,s=!t("uploadDisabled"),a=!t("textInputDisabled");$(".js__upload").each(function(){$(this).reactify(i.default,{isEnabled:window.upload.isEnabled,files:window.upload.files,apiUrl:window.upload.apiUrl,authHeaders:{"X-User-Email":$('meta[name="email"]').attr("content"),"X-User-Token":$('meta[name="token"]').attr("content")},sessionId:`sid${Math.random().toString(10).slice(2)}`,isUploadEnabled:s,isTextInputEnabled:a})});class o{constructor(e){this.$el=e,this.$document=$(document),this.SLIDE_IN_THRESHOLD=50,this._setListeners()}_setListeners(){this.$document.on("appReady",()=>{window.application.currentScrollPosition<=this.SLIDE_IN_THRESHOLD?this._hide():this._show()}),this.$document.on("appScroll",(e,t)=>{t>this.SLIDE_IN_THRESHOLD&&this._show()})}_show(){this.$el.css({bottom:"9px"})}_hide(){this.$el.css({bottom:"-1000px"})}}$(".uploadColWrapper.stickyWrapper").each(function(){new o($(this))})}},70635:function(e,t,s){"use strict";var i=s(24994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=s(76148),o=i(s(32485)),n=s(73345),r=s(41299),l=s(79788);t.default=({name:e,isActive:t,src:s})=>{const i=(0,o.default)("userAvatar",{is__active:t}),c=(0,o.default)("userAvatar-background",{is__custom:!!s});return s?(0,a.h)("div",{className:i},(0,a.h)("div",{className:c,style:{backgroundImage:`url(${s})`}})):(0,a.h)("div",{className:i},(0,a.h)("div",{className:c},t?(0,a.h)(r.BureausphereInIcon,null):(0,a.h)(l.BureausphereIcon,null)),t&&(0,a.h)("div",{className:"userAvatar-initials"},(0,n.toInitials)(e)))}},18684:function(e,t,s){"use strict";var i=s(24994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=s(76148),o=i(s(94634)),n=i(s(41444));class r extends a.Component{constructor(e){super(e),this.state={cpdScores:null,isFetched:!1}}get currentScore(){const{cpdScores:e}=this.state,t=(e||{}).scores;return t&&(t.current||{}).score_rounded?t.current:null}get plainTitle(){return this.props.title}get cpdScoreChange(){const{last_change_rounded:e}=this.currentScore,t=String(Math.abs(e)).replace(".",",");return t?`<span class="cpdBadge-scoreChange ${e>0?"is__up":"is__down"}">${t}</span>`:""}get cpdBadge(){const{score_rounded:e}=this.currentScore;return`<div class="cpdBadge"><span class="cpdBadge-score">[${e}&#x0020;&#xE099;</span>${this.cpdScoreChange}</div>`}get title(){return this.currentScore?[this.plainTitle,this.cpdBadge].join(" "):this.plainTitle}get href(){return"/burosfera/me/"}componentWillReceiveProps({isOpen:e,isAuthenticated:t}){const{isFetched:s}=this.state;e&&t&&!s&&this.fetchCpdScores().then(e=>this.setState({cpdScores:e,isFetched:!0}))}fetchCpdScores(){return fetch("/api/system/user/cpd/",{credentials:"include"}).then(e=>e.json()).catch(()=>null)}render(){return(0,a.h)(n.default,(0,o.default)({},this.props,{title:this.title,href:this.href}))}}t.default=r},65758:function(e,t,s){"use strict";var i=s(86019),a=s(24994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=s(76148),n=a(s(94634)),r=a(s(41444));const l=(e,t)=>e?i.t("userPopup.card.current",{cardNumber:e}):t?i.t("userPopup.card.missing"):i.t("userPopup.card.default");class c extends o.Component{constructor(e){super(e),this.state={cardNumber:null,isCardNumberFetched:!1}}componentWillReceiveProps({isOpen:e,isAuthenticated:t}){const{isCardNumberFetched:s}=this.state;e&&t&&!s&&this.fetchCardNumber().then(e=>this.setState({cardNumber:e&&e.cardNumber,isCardNumberFetched:!0}))}
2fetchCardNumber(){return fetch("/api/system/user/card/",{credentials:"include"}).then(e=>e.json()).catch(console.error)}render(){const{...e}=this.props,{cardNumber:t,isCardNumberFetched:s}=this.state;return(0,o.h)(r.default,(0,n.default)({},e,{title:l(t,s),isDisabled:!s}))}}t.default=c},45031:function(e,t,s){"use strict";var i=s(24994),a=s(76148),o=i(s(2733)),n=i(s(65694)),r=i(s(67695));const l=document.querySelector(".header-user"),c="s_user_login_miss";$(()=>{const{body:e}=document,t=o.default.get("s_user_login_miss");t&&(o.default.remove(c),o.default.remove(c,{path:"/"}),(({loginEmail:e,body:t})=>{const s=document.createDocumentFragment();(0,a.render)((0,a.h)(r.default,{email:e}),s),t.insertBefore(s,t.firstChild)})({loginEmail:t,body:e})),l&&(0,a.render)((0,a.h)(n.default,{handle:l}),e)})},67695:function(e,t,s){"use strict";var i=s(86019);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=s(76148);t.default=({email:e})=>{const t=i.t("vac.invalidLoginLink",{email:e});return(0,a.h)("div",{className:"topLevelNotificationsWrap"},(0,a.h)("div",{className:"topLevelNotification holder is__active"},(0,a.h)("div",{className:"topLevelNotification-main"},(0,a.h)("span",{className:"topLevelNotification-text",dangerouslySetInnerHTML:{__html:t}}))))}},30933:function(e,t,s){"use strict";var i=s(86019),a=s(24994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=s(76148),n=a(s(32485)),r=a(s(98999)),l=s(91978),c=a(s(32943)),d=s(45169),h=a(s(11946));class u extends o.Component{constructor(e){super(e),this.state={email:null,hasRequestedEmail:!1,error:null},this.requestLoginEmail=this.requestLoginEmail.bind(this),this.sendLoginEmail=this.sendLoginEmail.bind(this),this.setError=this.setError.bind(this)}get isCaptionVisible(){return Boolean(this.state.error)||this.props.includeDefaultCaption||this.state.hasRequestedEmail}get captionText(){if(this.state.error)return i.t(`login.${this.state.error}`);if(this.props.includeDefaultCaption&&!this.state.hasRequestedEmail)return i.t("login.defaultCaption");const e=(0,h.default)(this.state.email);return i.t("emailForm.authenticationEmailSent",{email:e})}get returnTo(){return this.props.returnTo?this.props.returnTo:window.URLSearchParams?new window.URLSearchParams(window.location.search).get("return_to"):null}async requestLoginEmail({email:e}){this.setError(null);try{const t=await(0,l.executeRecaptcha)({action:"login"});await this.sendLoginEmail({email:e,token:t})}catch(e){this.setError("loginError"),console.error(e)}}async sendLoginEmail({email:e,token:t}){const s={email:e,"g-recaptcha-response-data":t},i=this.returnTo;i&&(s.return_to=i);const a=await fetch("/sessions/",{method:"POST",headers:r.default,body:JSON.stringify(s)});if(!a.ok){const e=await a.json();return void this.setError("invalidEmail"===e.error?"invalidEmail":"loginError")}this.setState({email:e,hasRequestedEmail:!0,error:null}),this.props.onLoginEmailSent&&this.props.onLoginEmailSent({email:e})}setError(e){this.setState({error:e,hasRequestedEmail:!1})}render(){const e=!0!==this.props.skipHeading;return(0,o.h)("div",{className:"loginForm"},e&&(0,o.h)("div",{className:"loginForm-heading"},(0,o.h)(d.Heading3,null,i.t("userPopup.loginToBureausphere"))),(0,o.h)(c.default,{onSubmit:this.requestLoginEmail,onFormStateInvalid:()=>this.setError("invalidEmail"),onFormStateDefault:()=>this.setError(null),inputRef:this.props.inputRef}),(0,o.h)(d.Caption,{className:(0,n.default)({is__visible:this.isCaptionVisible}),html:this.captionText}))}}t.default=u},41444:function(e,t,s){"use strict";var i=s(24994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=s(76148),o=i(s(32485));t.default=({className:e,href:t,title:s,key:i,isDisabled:n=!1})=>(0,a.h)("li",{className:(0,o.default)("dropdown-item",e,{is__disabled:n}),key:i},(0,a.h)("a",{className:"dropdown-item-link",href:t,dangerouslySetInnerHTML:{__html:s}}))},82761:function(e,t,s){"use strict";var i=s(24994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=s(76148),o=i(s(32485));t.default=({children:e,className:t=""})=>e.length?(0,a.h)("div",{className:(0,o.default)("dropdown-group-item",t)},e):(0,a.h)("div",{className:(0,o.default)("dropdown-group-item","is__empty",t)})},3646:function(e,t,s){"use strict";var i=s(86019);
2Object.defineProperty(t,"__esModule",{value:!0}),t.otherMenuItems=t.myMenuItems=void 0,t.myMenuItems=[{title:"My books",className:"myBooks",href:"/books/my/"},{title:i.t("userPopup.card.default",{locale:"en"}),className:"card",href:"/pay/edit/"},{title:"Sign out",className:"logout",href:"/burosfera/logout/"}],t.otherMenuItems=[]},67147:function(e,t,s){"use strict";var i=s(86019);e.exports="en"===i.locale?s(3646):s(87616)},87616:function(e,t,s){"use strict";var i=s(86019);Object.defineProperty(t,"__esModule",{value:!0}),t.otherMenuItems=t.myMenuItems=void 0,t.myMenuItems=[{title:"Бюросфера",className:"burosfera",href:"/burosfera/me"},{title:"Мои книги",className:"myBooks",href:"/books/my/"},{title:"Мои лекции",className:"myLectures",href:"/lectures/my/"},{title:"Школьный кабинет",className:"cabinet",href:"/school/classroom/"},{title:"Курс",className:"myCourse"}],t.otherMenuItems=[{title:i.t("userPopup.card.default",{locale:"ru"}),className:"card",href:"/pay/edit/"},{title:"Выход",className:"logout",href:"/burosfera/logout/"}]},35399:function(e,t,s){"use strict";var i=s(86019),a=s(24994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=s(76148),n=a(s(94634)),r=a(s(41444));class l extends o.Component{constructor(e){super(e),this.state={courses:null}}componentDidMount(){this.props.isAuthenticated&&this.fetchMyCourses().then(e=>this.setState({courses:e}))}fetchMyCourses(){return fetch("/api/courses/my/",{credentials:"include"}).then(e=>e.json()).catch(()=>null)}render(){const{courses:e}=this.state,t=this.props,s=Object.assign({},t),a=s=>((e,{courses:t,props:s})=>{const{key:a,dates:o,authorGenitiveLastname:n}=e,r=t.length>1?"myCourseWithAuthor":"myCourse",l=e===t[0]?s.className+" is__highlighted":s.className;return{title:i.t(`userPopup.${r}`,{dates:o,authorGenitiveLastname:n}),href:`/courses/${a}/classroom/`,className:l}})(s,{courses:e,props:t});return e&&e.length?e.length>1?(0,o.h)("li",{className:"myCourses"},(0,o.h)("ul",null,e.map(e=>(0,o.h)(r.default,(0,n.default)({},s,a(e)))))):(0,o.h)(r.default,(0,n.default)({},s,a(e[0]))):null}}t.default=l},69304:function(e,t,s){"use strict";var i=s(24994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=s(76148),o=i(s(94634)),n=i(s(65758)),r=i(s(35399)),l=i(s(18684)),c=i(s(41444));t.default=(e,t)=>(s,i)=>{const d={key:i,isAuthenticated:e,isOpen:t};return"card"===s.className?(0,a.h)(n.default,(0,o.default)({},s,d)):"myCourse"===s.className?(0,a.h)(r.default,(0,o.default)({},s,d)):"burosfera"===s.className?(0,a.h)(l.default,(0,o.default)({},s,d)):(0,a.h)(c.default,(0,o.default)({},s,{key:i}))}},80889:function(e,t,s){"use strict";var i=s(24994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=s(76148),o=i(s(32485)),n=i(s(3529)),r=i(s(30933)),l=i(s(82761)),c=i(s(69304)),d=s(67147);const{user:h}=window.application||{},u=Boolean(h);t.default=({isOpen:e,closePopup:t,inputRef:s})=>(0,a.h)("div",{className:"userPopup"},(0,a.h)("div",{className:(0,o.default)("dropdown",{is__open:e})},(0,a.h)(n.default,{device:"mobile",onClick:t}),u&&(0,a.h)("div",{className:"userPopup-menuWrapper"},h.name?(0,a.h)(l.default,null,(0,a.h)("b",null,h.name)):(0,a.h)(l.default,null),h.email&&(0,a.h)(l.default,null,(0,a.h)("b",null,h.email)),(0,a.h)("ul",null,d.myMenuItems.map((0,c.default)(u,e))),d.otherMenuItems.length>0&&(0,a.h)(l.default,null),d.otherMenuItems.length>0&&(0,a.h)("ul",null,d.otherMenuItems.map((0,c.default)(u,e)))),!u&&(0,a.h)(r.default,{inputRef:s})))},65694:function(e,t,s){"use strict";var i=s(24994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=s(76148),o=i(s(80889)),n=i(s(25999));const r=document.querySelector.bind(document),{isOnMobile:l}=window.application||{},c=()=>{try{n.default.disable()}catch{setTimeout(c,50)}};class d extends a.Component{constructor(e){super(e),this.state={isOpen:!1},this.togglePopup=this.togglePopup.bind(this),this.closePopup=this.closePopup.bind(this),this.handleDocumentClick=this.handleDocumentClick.bind(this),this.handleUserIconClick=this.handleUserIconClick.bind(this),this.handleEscapeKeyPress=this.handleEscapeKeyPress.bind(this),c()}componentDidUpdate(){this.focusLoginInputIfNeeded()}focusLoginInputIfNeeded(){var e;this.state.isOpen&&!l&&(null===(e=this.loginInput)||void 0===e||e.focus())}togglePopup(e){this.state.isOpen!==e&&(l&&(e=>{n.default[e?"enable":"disable"]()})(e),this.setState({isOpen:e}))}
2closePopup(){this.togglePopup(!1)}handleUserIconClick(e){e.preventDefault(),this.togglePopup(!this.state.isOpen)}handleDocumentClick(e){this.popup.contains(e.target)||this.userIcon.contains(e.target)||this.closePopup()}handleEscapeKeyPress(e){27===e.keyCode&&this.closePopup()}componentDidMount(){this.popup=r(".userPopup .dropdown"),this.userIcon=r(".header-user"),this.userIcon.addEventListener("click",this.handleUserIconClick),document.addEventListener("click",this.handleDocumentClick),document.addEventListener("keydown",this.handleEscapeKeyPress),$(document).on&&$(document).on("enableFocusMode",this.closePopup)}componentWillUnmount(){this.userIcon.removeEventListener("click",this.handleUserIconClick),document.removeEventListener("click",this.handleDocumentClick),document.removeEventListener("keydown",this.handleEscapeKeyPress),$(document).off&&$(document).off("enableFocusMode",this.closePopup)}render(){const{isOpen:e}=this.state;return(0,a.h)(o.default,{isOpen:e,closePopup:this.closePopup,inputRef:e=>this.loginInput=e})}}t.default=d},22345:function(e,t,s){"use strict";var i=s(24994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=s(76148),o=i(s(32485)),n=i(s(98999)),r=i(s(96194)),l=s(73345),c=s(63229),d=i(s(22046)),h=s(45169),u=function(e){if("function"==typeof WeakMap){var t=new WeakMap;new WeakMap}return function(e){if(e&&e.__esModule)return e;var s,i,a={__proto__:null,default:e};if(null===e||"object"!=typeof e&&"function"!=typeof e)return a;
2if(s=t){if(s.has(e))return s.get(e);s.set(e,a)}for(const t in e)"default"!==t&&{}.hasOwnProperty.call(e,t)&&((i=(s=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,t))&&(i.get||i.set)?s(a,t,i):a[t]=e[t]);return a}(e)}(s(33737));const p=e=>(0,a.h)("div",{className:"vacanciesBanner-title"},(0,a.h)(h.TextNode,null,(0,a.h)("a",{href:e.path,className:"doubleHover is__noUnderline novisited"},(0,a.h)("b",null,"Работа: "),e.children))),m=({endsAt:e,jobFormat:t,jobLocation:s})=>(t={remote:"Удалёнка",office:"В офис"}[t]||"",s=s||"",e=(0,l.birmanize)((0,c.moscowifyLocal)(new Date(e)),{format:"tillCommaSeparatedDateAndWeekDayLowerCase"}),(0,a.h)("div",{className:"vacanciesBanner-info-wrapper"},(0,a.h)("div",{className:"vacanciesBanner-info"},`${(0,l.joinWithComma)([t,s])}`,(0,a.h)("br",null),`🕑 ${e}`))),f=e=>{const t="half"===e.size,s="full"===e.size,i=(0,o.default)("vacanciesBanner","is__placeholder",{is__half:t,is__full:s});return(0,a.h)("div",{className:i},(0,a.h)("div",{className:"vacanciesBanner-text"},(0,a.h)(h.Heading3,null,"Вакансия"),t&&(0,a.h)(h.TextNode,null,"Если вы ищете дизайнера или студию, разместите здесь ",(0,a.h)("a",{class:"novisited",href:"/burosfera/hire/vacancy/"},"вакансию или объявление о проекте")),s&&(0,a.h)(h.TextNode,null,(0,a.h)("span",{className:"device desktop laptop"},(0,a.h)("b",null,"Вакансия:")," е"),(0,a.h)("span",{className:"device mobile"},"Е"),"сли вы ищете дизайнера или студию, разместите здесь ",(0,a.h)("a",{class:"novisited",href:"/burosfera/hire/vacancy/"},"вакансию или объявление о проекте"))))};class v extends u.default{constructor(e){super(e),this.state={vacancies:e.vacancies||[]},this.buttonText="Откликнуться"}fetchVacancies(){fetch("/api/burosfera/vacancies/",{headers:n.default}).then(e=>e.json()).then(e=>this.setState({vacancies:this.decorateVacancies(e)})).catch(e=>console.error(e))}decorateVacancies(e){return e.map(r.default)}componentDidMount(){this.state.vacancies.length||this.fetchVacancies()}componentDidUpdate(){$(this.bannerRef).find(".doubleHover").each(function(){new d.default($(this))})}render(e){if(!this.state.vacancies.length)return(0,a.h)(f,e);const t="half"===e.size,s="full"===e.size,i=Math.floor(Math.random()*this.state.vacancies.length),n=this.state.vacancies[i];if(!Object.keys(n).length)return(0,a.h)(f,e);const r=n.jobTitle.length+n.companyTitle.length<=u.SMALL_TITLE_LENGTH,c=n.jobTitle.length+n.companyTitle.length>u.SMALL_TITLE_LENGTH&&n.jobTitle.length+n.companyTitle.length<=u.MEDIUM_TITLE_LENGTH,d=n.jobTitle.length+n.companyTitle.length>u.MEDIUM_TITLE_LENGTH,h=`${n.jobTitle[0].toLowerCase()}${n.jobTitle.slice(1)}`,v=(0,l.joinWithComma)([h,n.companyTitle]),g=(0,o.default)("vacanciesBanner",{is__shortTitle:r,is__mediumTitle:c,is__longTitle:d,is__half:t,is__full:s});return(0,a.h)("div",{className:g,ref:e=>this.bannerRef=e},(0,a.h)("div",{className:"device laptop desktop"},s&&(0,a.h)(p,{path:n.path},v),t&&(0,a.h)(p,{path:n.path},v,v.length<u.LONG_TITLE_LENGTH&&(0,a.h)("br",null))),(0,a.h)("div",{className:"device mobile"},(0,a.h)(p,{path:n.path},v,(r||c)&&(0,a.h)("br",null))),(0,a.h)("div",{className:"vacanciesBanner-footer"},(0,a.h)("div",{className:"vacanciesBanner-buttonWrapper"},(0,a.h)("a",{href:n.path,className:"button vacanciesBanner-button is__thin doubleHover"},this.buttonText)),(0,a.h)(m,{endsAt:n.endsAt,jobFormat:n.jobFormat,jobLocation:n.jobLocation})))}}t.default=v},74414:function(e,t,s){"use strict";var i=s(24994)(s(22345));$(".js__vacanciesBanner").each(function(){$(this).reactify(i.default,$(this).data())})},33737:function(e,t,s){"use strict";var i=s(24994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.VacancyPlaceholder=t.SMALL_TITLE_LENGTH=t.MEDIUM_TIT
2LE_LENGTH=t.LONG_TITLE_LENGTH=void 0;var a=s(76148),o=i(s(32485)),n=s(73345),r=i(s(98999)),l=s(45169);const c=t.SMALL_TITLE_LENGTH=30,d=t.MEDIUM_TITLE_LENGTH=48,h=t.LONG_TITLE_LENGTH=60,u=e=>{const t=(new Date).getTime();return Math.round((1e3*e-t)/864e5)+1},p=e=>(0,a.h)("div",{className:"vacanciesSpacer-titleWrapper"},(0,a.h)("div",{className:"vacanciesSpacer-title"},e.children)),m=e=>(0,a.h)("span",{className:"vacanciesSpacer-remain"},`🕑Ещё ${e.days} ${(0,n.pluralize)(e.days,"день","дня","дней")}`),f=e=>{const t="half"===e.size,s="full"===e.size,i=(0,o.default)("vacanciesSpacer","is__placeholder",{is__half:t,is__full:s});return(0,a.h)("div",{className:i},(0,a.h)("div",{className:"vacanciesSpacer-text"},(0,a.h)(l.Heading3,null,"Вакансия"),t&&(0,a.h)(l.TextNode,null,"Прямо сейчас мы никого не ищем, но в бюро всегда нужны дизайнеры, редакторы и разработчики"),s&&(0,a.h)(l.TextNode,null,(0,a.h)("span",{className:"device desktop"},(0,a.h)("b",null,"Вакансия:")," п"),(0,a.h)("span",{className:"device mobile laptop"},"П"),"рямо сейчас мы никого не ищем, но в бюро всегда нужны дизайнеры, редакторы и разработчики")),(0,a.h)("div",{className:"vacanciesSpacer-buttonWrapper"},(0,a.h)("a",{href:"mailto:[email protected]?Subject=Работа в бюро",className:"button vacanciesSpacer-button is__thin"},"Написать нам")))};t.VacancyPlaceholder=f;class v extends a.Component{constructor(e){super(e),this.state={vacancies:e.vacancies||[]}}componentDidMount(){this.state.vacancies.length||this.fetchVacancies()}fetchVacancies(){fetch("/api/system/vacancies/",{headers:r.default}).then(e=>e.json()).then(e=>this.setState({vacancies:this.decorateVacancies(e)})).catch(e=>console.error(e))}decorateVacancies(e){return e.map(e=>{return{title:(t=e.text,$(`<div>${t}</div>`).text()),href:e.link,daysLeft:u(e.date_end)};var t})}render(e){if(!this.state.vacancies.length)return(0,a.h)(f,e);const t="half"===e.size,s="full"===e.size,i=Math.floor(Math.random()*this.state.vacancies.length),n=this.state.vacancies[i],r=n.title.length<=c,u=n.title.length>c&&n.title.length<=d,v=n.title.length>d,g=`${n.title[0].toLowerCase()}${n.title.slice(1)}`,b=`${n.title[0].toUpperCase()}${n.title.slice(1)}`,_=(0,o.default)("vacanciesSpacer",{is__shortTitle:r,is__mediumTitle:u,is__longTitle:v,is__half:t,is__full:s});return(0,a.h)("div",{className:_},(0,a.h)("div",{className:"vacanciesSpacer-text"},(0,a.h)("div",{className:"device laptop desktop"},s&&r&&(0,a.h)(p,null,(0,a.h)("b",null,"Работа: "),n.title),s&&(u||v)&&(0,a.h)(p,null,(0,a.h)("b",null,"Работа: "),g),s&&(0,a.h)(l.TextNode,null,(0,a.h)(m,{days:n.daysLeft})),t&&(0,a.h)("div",null,(0,a.h)(l.Heading3,null,"Работа"),(0,a.h)(l.TextNode,null,b,n.title.length<h&&(0,a.h)("br",null),(0,a.h)(m,{days:n.daysLeft})))),(0,a.h)("div",{className:"device mobile"},(0,a.h)(l.Heading3,null,"Работа"),(0,a.h)(l.TextNode,null,b,(r||u)&&(0,a.h)("br",null),(0,a.h)(m,{days:n.daysLeft})))),(0,a.h)("div",{className:"vacanciesSpacer-buttonWrapper"},(0,a.h)("a",{href:n.href,className:"button vacanciesSpacer-button"},"Откликнуться на вакансию")))}}t.default=v},34990:function(e,t,s){"use strict";var i=s(24994)(s(33737));$(".js__vacanciesSpacer").each(function(){$(this).reactify(i.default,$(this).data())})},37034:function(e,t,s){"use strict";var i=s(24994)(s(98999));class a{constructor(e){this.$el=e,this.trackVacancyClick=this.trackVacancyClick.bind(this),this.$button=this.$el.find("button"),this.$button.on("click",this.trackVacancyClick)}get slug(){return this.$el.attr("data-slug")}trackVacancyClick(){fetch("/api/burosfera/vacancy_clicks/",{headers:i.default,method:"POST",body:JSON.stringify({slug:this.slug})}).catch(e=>console.error(e))}}$(".js__clickTracking").each(function(){new a($(this))})},84542:function(){"use strict";$(document).on("appReady",()=>{const e=$(".video.is__noPlayButton.is__autoplay:not(.is__played)");e.length&&setTimeout(()=>e.removeClass("is__noPlayButton"),15e3)})},1897:function(e,t,s){"use strict";var i=s(24994);
2Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=i(s(47733)),o=i(s(96563));t.default=(0,a.default)(o.default.vk)},65422:function(e,t,s){"use strict";var i=s(24994),a=i(s(1897));(0,i(s(85702)).default)(".js__vkSpacer",a.default)},84018:function(e,t,s){"use strict";var i=s(76148);class a extends i.Component{constructor(e){super(e),this.state={isActive:!1}}componentDidMount(){$(window).on(this.props.events.on,this.enable.bind(this)),$(window).on(this.props.events.off,this.disable.bind(this))}enable(){this.setState({isActive:!0})}disable(){this.setState({isActive:!1})}render(e){return(0,i.h)("div",{className:`\n            warning\n            is__${e.id}\n            ${this.state.isActive?"is__active":""}\n          `},e.message)}}e.exports=a},26646:function(e,t,s){"use strict";var i=s(24994),a=s(76148),o=i(s(84018));class n extends a.Component{render(e){return(0,a.h)("div",{className:"warnings"},e.warnings.map(e=>(0,a.h)(o.default,{id:e.id,events:e.events,message:e.message})))}}$(".js__warnings").each(function(){$(this).reactify(n,{warnings:window.warnings})})},56217:function(e,t,s){"use strict";var i=s(76148);const a=["Контент","Подробнее...","Веб-ресурс","Тизер","Юзабилити","Динамично развивающийся","Круговая диаграмма","Текст текст текст","Lorem ipsum","PowerPoint","Сайт в разработке","Медийный баннер","Бриф","Креатив","Социальная сеть","Синергия идей","Облако тегов","Таиланд"];class o extends i.Component{constructor(e){super(e),this.state={index:Math.floor(Math.random()*a.length)},this.changeWord=this.changeWord.bind(this)}changeWord(){const e=(this.state.index+1)%a.length;this.setState({index:e})}render(){return(0,i.h)("div",{class:"forbiddenWords"},"Запрещённые слова",(0,i.h)("br",null),(0,i.h)("del",{onMouseOver:this.changeWord},(0,i.h)("span",null,a[this.state.index])))}}$(".js__forbiddenWords").each((e,t)=>$(t).reactify(o))},2493:function(e,t,s){"use strict";var i=s(24994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=i(s(47733)),o=i(s(96563));t.default=(0,a.default)(o.default.youtube)},49642:function(e,t,s){"use strict";var i=s(24994),a=i(s(2493));(0,i(s(85702)).default)(".js__youtubeSpacer",a.default)},39861:function(e,t,s){"use strict";var i=s(24994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=i(s(47733)),o=i(s(96563));t.default=(0,a.default)(o.default.zen)},62402:function(e,t,s){"use strict";var i=s(24994),a=i(s(39861));(0,i(s(85702)).default)(".js__zenSpacer",a.default)},92566:function(e){"use strict";e.exports={"А. Г.":{authorBureauId:"388",authorAvatarUrl:"/assets/images/soviets/authors/dot-gorbunov.png?v=12",authorArchiveUrl:"ag",authorCaption:"Арт-директор и автор учебных программ бюро",authorEmails:["[email protected]"],keyColor:"rgb(137, 25, 43)",keyUnderlineColor:"rgba(137, 25, 43, .14)",bgColor:"#fff5d3",weekDay:"mo",coverBgColor:"rgba(255, 245, 211, 0.5)",authorGenitiveName:"А. Г.",authorGenitiveLastName:"Г."},"Илья Бирман":{authorBureauId:"570",authorAvatarUrl:"/assets/images/soviets/authors/dot-birman.png?v=12",authorArchiveUrl:"ilyabirman",authorCaption:"Арт‑директор и соавтор курса «Пользовательский интерфейс и представление информации»",authorEmails:["[email protected]","[email protected]"],keyColor:"rgb(17, 97, 150)",keyUnderlineColor:"rgba(17, 97, 150, .14)",bgColor:"#dcf1ff",weekDay:"tu",coverBgColor:"rgba(220, 241, 255, 0.5)",authorGenitiveName:"Ильи Бирмана",authorGenitiveLastName:"Бирмана"},"Константин Мозговой":{authorBureauId:"32019",authorAvatarUrl:"/assets/images/soviets/authors/dot-mozgovoy.png?v=12",authorArchiveUrl:"mozgovoy",authorCaption:"Дизайнер бюро",authorEmails:["[email protected]"],keyColor:"rgb(122, 48, 207)",keyUnderlineColor:"rgba(122, 48, 207, .14)",bgColor:"#d1ffca",weekDay:"",coverBgColor:"rgba(209, 255, 202, 0.5)",authorGenitiveName:"Константина Мозгового",authorGenitiveLastName:"Мозгового"}
2,"Михаил Нозик":{authorBureauId:"25146",authorAvatarUrl:"/assets/images/soviets/authors/dot-nozik.png?v=12",authorArchiveUrl:"nozik",authorCaption:"Арт-директор и автор курса «Типографика и вёрстка»",authorEmails:["[email protected]"],keyColor:"#a600ba",keyUnderlineColor:"rgba(166, 0, 186, .14)",bgColor:"#ffdffd",weekDay:"we",coverBgColor:"rgba(255, 223, 253, 0.5)",authorGenitiveName:"Михаила Нозика",authorGenitiveLastName:"Нозика"},"Василий Половнёв":{authorBureauId:"31288",authorAvatarUrl:"/assets/images/soviets/authors/dot-polovnyov.png?v=12",authorArchiveUrl:"polovnyov",authorCaption:"Технический директор бюро",authorEmails:["[email protected]"],authorTemplate:"+sidenote({ mod: 'footnote' }) P. S. Это был совет о веб-разработке. Хотите знать всё о коде, тестах, фронтенд-разработке, цеэсэсе, яваскрипте, рельсах и джейде? <a href='/soviet/ask/'>Присылайте вопросы</a>.",keyColor:"rgb(134, 36, 26)",keyUnderlineColor:"rgba(134, 36, 26, .14)",bgColor:"#ffe9e1",weekDay:"th",coverBgColor:"rgba(255, 233, 225, 0.5)",authorGenitiveName:"Василия Половнёва",authorGenitiveLastName:"Половнёва"},"Игорь Петров":{authorBureauId:"1385493",authorAvatarUrl:"/assets/images/soviets/authors/dot-petrov.png?v=12",authorArchiveUrl:"petrov",authorCaption:"Разработчик, преподаватель Школы бюро",authorEmails:["[email protected]"],authorTemplate:"+sidenote({ mod: 'footnote' }) P. S. Это был совет о веб-разработке. Хотите знать всё о коде, тестах, фронтенд-разработке, цеэсэсе, яваскрипте, рельсах и джейде? <a href='/soviet/ask/'>Присылайте вопросы</a>.",keyColor:"rgb(5, 80, 255)",keyUnderlineColor:"rgba(5, 80, 255, .14)",bgColor:"#8fd6f5",weekDay:"th",coverBgColor:"rgba(143, 214, 245, 0.5)",authorGenitiveName:"Игоря Петрова",authorGenitiveLastName:"Петрова"},"Руст Кулматов":{authorBureauId:"27092",authorAvatarUrl:"/assets/images/soviets/authors/dot-kulmatov.png?v=12",authorArchiveUrl:"kulmatov",authorCaption:"Фронтенд-разработчик, преподаватель, соавтор движка электронных книг бюро",authorEmails:["[email protected]"],keyColor:"rgb(31, 147, 96)",keyUnderlineColor:"rgba(31, 147, 96, .14)",bgColor:"#d2fff0",weekDay:"",coverBgColor:"rgba(210, 255, 240, 0.5)",authorGenitiveName:"Руста Кулматова",authorGenitiveLastName:"Кулматова"},"Юрий Мазурский":{authorBureauId:"34617",authorAvatarUrl:"/assets/images/soviets/authors/dot-mazursky.png?v=12",authorArchiveUrl:"mazursky",authorCaption:"Разработчик и дизайнер",authorEmails:["[email protected]","[email protected]"],keyColor:"rgb(229, 87, 37)",keyUnderlineColor:"rgba(229, 87, 37, .14)",bgColor:"#ffffa8",weekDay:"",coverBgColor:"rgba(255, 255, 168, 0.5)",authorGenitiveName:"Юрия Мазурского",authorGenitiveLastName:"Мазурского"},"Фёдор Борщёв":{authorBureauId:"1397628",authorAvatarUrl:"/assets/images/soviets/authors/dot-borshev.png?v=12",authorArchiveUrl:"borschyov",authorCaption:'Программист, стартапер, <span class="smallcapitals">ИТ</span>-консультант',authorEmails:["[email protected]"],keyColor:"rgb(8, 66, 158)",keyUnderlineColor:"rgba(8, 66, 158, .14)",bgColor:"#7bd7fd",weekDay:"",coverBgColor:"rgba(123, 215, 253, 0.5)",authorGenitiveName:"Фёдора Борщёва",authorGenitiveLastName:"Борщёва"},"Рецепты":{authorBureauId:"1460614",authorAvatarUrl:"/assets/images/soviets/authors/dot-recipes.png?v=12",authorArchiveUrl:"recipes",authorCaption:"Пошаговые инструкции создания анимаций, трёхмерных картинок и других красивых штук",authorEmails:["[email protected]"],keyColor:"rgb(66, 135, 245)",keyUnderlineColor:"rgba(66, 135, 245, .14)",bgColor:"#e1e1e6",weekDay:"we",coverBgColor:"rgba(225, 225, 230, 0.5)",authorGenitiveName:"рецептов",authorGenitiveLastName:"рецептов"},"Илья Синельников":{authorBureauId:"828",authorAvatarUrl:"/assets/images/soviets/authors/dot-sinelnikov.png?v=12",authorArchiveUrl:"sinelnikov",authorCaption:"Предприниматель, стартапер, преподаватель",authorEmails:["[email protected]","[email protected]","[email protected]"],keyColor:"rgb(103, 72, 141)",keyUnderlineColor:"rgba(103, 72, 141, .14)",bgColor:"#f2e6fd",weekDay:"fr",coverBgColor:"rgba(242, 230, 253, 0.5)",authorGenitiveName:"Ильи Синельникова",authorGenitiveLastName:"Синельникова"},"Аня Данилова":{authorBureauId:"33210",authorAvatarUrl:"/assets/images/soviets/authors/dot-danilova.png?v=12",authorArchiveUrl:"danilova",authorCaption:"Шрифтовик бюро",authorEmails:["[email protected]"],keyColor:"rgb(227, 0, 22)",keyUnderlineColor:"rgba(227, 0, 22, .14)",bgColor:"#f5f5f5",weekDay:"",coverBgColor:"rgba(245, 245, 245, 0.5)",authorGenitiveName:"Ани Даниловой",authorGenitiveLastName:"Даниловой"},"Сергей Чикин":{authorBureauId:"1665",authorAvatarUrl:"/assets/images/soviets/authors/dot-chikin.png?v=12",authorArchiveUrl:"kolpakov-chikin",authorCaption:"Дизайнер-иконист, автор курса «Пиктограммы и системы знаков»",authorEmails:["[email protected]"],keyColor:"rgb(204, 89, 51)",keyUnderlineColor:"rgba(204, 89, 51, .14)",bgColor:"#e6e6f0",weekDay:"sa",coverBgColor:"rgba(230, 230, 240, 0.5)",authorGenitiveName:"Сергея Чикина",authorGenitiveLastName:"Чикина"},"Владимир Колпаков":{authorBureauId:"27060",authorAvatarUrl:"/assets/images/soviets/authors/dot-kolpakov.png?v=12",authorArchiveUrl:"kolpakov-chikin",authorCaption:"Дизайнер, Ñ
2„отограф, автор гайдлайнов «Энви» и книги «Фотосъёмка автомобилей»",authorEmails:["[email protected]"],keyColor:"rgb(48, 53, 207)",keyUnderlineColor:"rgba(48, 53, 207, .14)",bgColor:"#ffa3a0",weekDay:"sa",coverBgColor:"rgba(255, 163, 160, 0.5)",authorGenitiveName:"Владимира Колпакова",authorGenitiveLastName:"Колпакова"},"Максим Ильяхов":{authorBureauId:"626",authorAvatarUrl:"/assets/images/soviets/authors/dot-ilyahov.png?v=12",authorArchiveUrl:"ilyahov",authorCaption:"Главред, автор курса «Информационный стиль и редактура текста»",authorEmails:["[email protected]","[email protected]"],keyColor:"rgb(4, 80, 129)",keyUnderlineColor:"rgba(4, 80, 129, .14)",bgColor:"#cbeffd",weekDay:"su",coverBgColor:"rgba(203, 239, 253, 0.5)",authorGenitiveName:"Максима Ильяхова",authorGenitiveLastName:"Ильяхова"},"Людмила Сарычева":{authorBureauId:"25030",authorAvatarUrl:"/assets/images/soviets/authors/dot-sarycheva.png?v=12",authorArchiveUrl:"sarycheva",authorCaption:"Редактор",authorEmails:["[email protected]"],keyColor:"rgb(4, 80, 129)",keyUnderlineColor:"rgba(4, 80, 129, .14)",bgColor:"#cbeffd",weekDay:"",coverBgColor:"rgba(203, 239, 253, 0.5)",authorGenitiveName:"Людмилы Сарычевой",authorGenitiveLastName:"Сарычевой"},"Антон Шнайдер":{authorBureauId:"24989",authorAvatarUrl:"/assets/images/soviets/authors/dot-schnaider.png?v=12",authorArchiveUrl:"schnaider",authorCaption:"Дизайнер, арт-директор",authorEmails:["[email protected]"],keyColor:"rgb(50, 29, 215)",keyUnderlineColor:"rgba(50, 29, 215, .14)",bgColor:"#fffd38",weekDay:"",coverBgColor:"rgba(255, 253, 56, 0.5)",authorGenitiveName:"Антона Шнайдера",authorGenitiveLastName:"Шнайдера"},"Родион Жабрев":{authorBureauId:"",authorAvatarUrl:"/assets/images/soviets/authors/dot-zhabrev.png?v=12",authorArchiveUrl:"zhabrev",authorCaption:"Ретушёр",authorEmails:["[email protected]"],keyColor:"rgb(176, 31, 20)",keyUnderlineColor:"rgba(176, 31, 20, .14)",bgColor:"#e8ee6a",weekDay:"",coverBgColor:"rgba(232, 238, 106, 0.5)",authorGenitiveName:"Родиона Жабрева",authorGenitiveLastName:"Жабрева"},"Андрей Тиханов":{authorBureauId:"695",authorAvatarUrl:"/assets/images/soviets/authors/dot-tichanov.png?v=12",authorArchiveUrl:"tihanov",authorCaption:"Дизайнер",authorEmails:["[email protected]"],keyColor:"rgb(177, 57, 60)",keyUnderlineColor:"rgba(177, 57, 60, .14)",bgColor:"#fee2c4",weekDay:"",coverBgColor:"rgba(254, 226, 196, 0.5)",authorGenitiveName:"Андрея Тиханова",authorGenitiveLastName:"Тиханова"},"Евгений Лучинин":{authorBureauId:"1222",authorAvatarUrl:"/assets/images/soviets/authors/dot-luchinin.png?v=12",authorArchiveUrl:"genue",authorCaption:"Дизайнер",authorEmails:["[email protected]"],keyColor:"rgb(108, 56, 167)",keyUnderlineColor:"rgba(108, 56, 167, .14)",bgColor:"#fee2f2",weekDay:"",coverBgColor:"rgba(254, 226, 242, 0.5)",authorGenitiveName:"Евгения Лучинина",authorGenitiveLastName:"Лучинина"},"Таня Мисютина":{authorBureauId:"698",authorAvatarUrl:"/assets/images/soviets/authors/dot-misyutina.png?v=12",authorArchiveUrl:"misyutina",authorCaption:"Создатель и руководитель Лаборатории данных, автор курса «Визуализация данных»",authorEmails:["[email protected]"],keyColor:"rgb(239, 0, 93)",keyUnderlineColor:"rgba(239, 0, 93, .14)",bgColor:"#fce5e9",weekDay:"we",coverBgColor:"rgba(252, 229, 233, 0.5)",authorGenitiveName:"Тани Мисютиной",authorGenitiveLastName:"Мисютиной"},"Владимир Беляев":{authorBureauId:"",authorAvatarUrl:"/assets/images/soviets/authors/dot-belyaev.png?v=12",authorArchiveUrl:"belyaev",authorCaption:"Юрист, предприниматель, оптимист, непоÑ
2„игист",authorEmails:["[email protected]"],keyColor:"rgb(8, 79, 130)",keyUnderlineColor:"rgba(8, 79, 130, .14)",bgColor:"#d4e6fe",weekDay:"",coverBgColor:"rgba(212, 230, 254, 0.5)",authorGenitiveName:"Владимира Беляева",authorGenitiveLastName:"Беляева"},"Николай Товеровский":{authorBureauId:"669",authorAvatarUrl:"/assets/images/soviets/authors/dot-toverovskiy.png?v=12",authorArchiveUrl:"kolan",authorCaption:"Директор, автор курса «Управление проектами, людьми и собой»",authorEmails:["[email protected]"],keyColor:"rgb(16, 124, 124)",keyUnderlineColor:"rgba(16, 124, 124, .14)",bgColor:"#c0fde4",weekDay:"fr",coverBgColor:"rgba(192, 253, 228, 0.5)",authorGenitiveName:"Николая Товеровского",authorGenitiveLastName:"Товеровского"},"Артём Поликарпов":{authorBureauId:"661",authorAvatarUrl:"/assets/images/soviets/authors/dot-polikarpov.png?v=12",authorArchiveUrl:"polikarpov-mitin",authorCaption:"Разработчик",authorEmails:["[email protected]","[email protected]"],keyColor:"rgb(8, 79, 130)",keyUnderlineColor:"rgba(8, 79, 130, .14)",bgColor:"#daf4fd",weekDay:"",coverBgColor:"rgba(218, 244, 253, 0.5)",authorGenitiveName:"Артёма Поликарпова",authorGenitiveLastName:"Поликарпова"},"Коля Митин":{authorBureauId:"",authorAvatarUrl:"/assets/images/soviets/authors/dot-mitin.png?v=12",authorArchiveUrl:"polikarpov-mitin",authorCaption:"Разработчик",authorEmails:["[email protected]","[email protected]"],keyColor:"rgb(176, 31, 20)",keyUnderlineColor:"rgba(176, 31, 20, .14)",bgColor:"#fee669",weekDay:"",coverBgColor:"rgba(254, 230, 105, 0.5)",authorGenitiveName:"Коли Митина",authorGenitiveLastName:"Митина"},"Иван Богданов":{authorBureauId:"",authorAvatarUrl:"/assets/images/soviets/authors/dot-bogdanov.png?v=12",authorArchiveUrl:"bogdanov",authorCaption:"Дизайнер логотипов и фирменных стилей",authorEmails:["[email protected]"],keyColor:"rgb(18, 103, 96)",keyUnderlineColor:"rgba(18, 103, 96, .14)",bgColor:"#9dfee2",weekDay:"",coverBgColor:"rgba(157, 254, 226, 0.5)",authorGenitiveName:"Ивана Богданова",authorGenitiveLastName:"Богданова"},"Алексей Наумов":{authorBureauId:"",authorAvatarUrl:"/assets/images/soviets/authors/dot-naumov.png?v=12",authorArchiveUrl:"naumov",authorCaption:"Разработчик бюро",authorEmails:["[email protected]"],keyColor:"rgb(255, 73, 159)",keyUnderlineColor:"rgba(255, 73, 159, .14)",bgColor:"rgb(255, 224, 239)",weekDay:"",coverBgColor:"rgba(255, 224, 239, 0.5)",authorGenitiveName:"Алексея Наумова",authorGenitiveLastName:"Наумова"},"Юлия Бурдукова":{authorBureauId:"1398370",authorAvatarUrl:"/assets/images/soviets/authors/dot-burdukova.png?v=12",authorArchiveUrl:"burdukova",authorCaption:"Ведущий дизайнер в Контеке, выпускница Школы дизайнеров, в прошлом ретушёр бюро",authorEmails:["[email protected]"],keyColor:"rgb(229, 46, 61)",keyUnderlineColor:"rgba(229, 46, 61, .14)",bgColor:"rgb(255, 220, 210)",weekDay:"tu",coverBgColor:"rgba(255, 220, 210, 0.5)",authorGenitiveName:"Юлии Бурдуковой",authorGenitiveLastName:"Бурдуковой"}}},84675:function(e,t,s){"use strict";const i=s(42267),a=s(98361);e.exports={ru:i,en:a}},98361:function(e){"use strict";e.exports={sentence:{lastWordConnector:"and"},dateFormats:{dateOnly:"%{month} %{day}",dateYearOnly:"%{month} %{day}, %{year}"},site:{name:"Bureau Gorbunov",logoName:"Bureau Gorbunov",footerCopyright:"Bureau Gorbunov",host:"bureau.rocks",classroomLinkLabel:"Classroom",userLinkLabel:"Profile",editLinkLabel:"Edit"},likely:{telegram:"Send",facebook:"Share",vkontakte:"Share",pinterest:"Pin",twitter:"Tweet"},project:{bucketCaption:"Recycled"},recycledLinks:{overview:"Overview",recycled:"🗑 Recycled"},timeline:{start:"Start",launch:"Launch",launches:"Launches",byPlan:" planned",inFact:"Launch"},defaultTotalTableHeading:"Total",giftButtonText:"Gift",buyButtonText:{book:{default:"Subscription",preorder:"Preorder",subscribed:"✓ Subscription",subscribedPreorder:"✓ Preorder"}},books:{spacerDiscount:{text:'Special price for subscribers to other <a href="/books/">bureau’s books</a>',textMobile:'Special price for subscribers to other <a href="/books/">bureau’s books</a>',months:"for the first<br>three months"},spacerDemo:{title:"Demo chapter",button:"Try free"},bookSystemRequirements:{text:"You will need a computer, tablet or phone with internet connection and any modern browser",retina:'<span class="bookSystemRequirements-eye">👁</span> We recommend using Retina displays to read the book, though it works on low‑end screens, too'},booksIntro:{lead:"We publish web books on typography, user interface, text editing, project management, and other disciplines. Our books look beautiful and present knowledge in a delightful interactive form.",manifesto:'About our book format<sp
2an class="device laptop desktop"> in the manifesto</span>',aside:"Почему книги доступны только по подписке, сколько стоит подписка и как её отменить?",faq:"Вопросы и ответы",devices:"Читайте на компьютере и планшете",ownedBooks:"Так на этой странице отмечаются книги, на которые вы подписаны",subscriptionFormExplanation:"Оставьте почту, чтобы узнать о выходе книг и обновлениях других продуктов бюро."},priceCaption_12:"Minimal subscription is 1 year",priceCaptionRenewsAutomatically:"Auto-renews",specialPriceCaptionRenewsAutomatically:"Subscription auto-renews",discountPriceCaption:"<em>Special price</em> for Bureau Gorbunov Publishing subscribers",discountPriceCaptionPreorder:"Preorder to get <em>extra 2 months free</em>",stickerPreorderAndRead:"Preorder and start reading",subscriptionFooter:{caption:"Subscription auto-renews",captionCompact:"Auto-renews",captionPreorder:'Preorder to get <span class="is__highlighted">extra 2 months free.</span><br>Subscription auto-renews',subscription:"Subscription",subscriptionForm:{title:"What comes out when",placeholder:"Email",caption:"Subscribe to get updates about other new books.",captionPreorder:"Subscribe to get updates about this and other new books."},subscriptionButton:{caption:"Subscription",captionPreorder:"Preorder"}}},subscription:{subscription:"Subscription",preorder:"Preorder",unitsOneTime:"$",unitsMonthly:"$/month",defaultUnits_1:"$/year",defaultUnits_1Discount:"$",defaultUnits_12:"$",defaultUnits_12Discount:"$",subscriptionUnits_1:"$/year",subscriptionUnits_12:"$/year",schoolUnitsOneTime:"$",prices:{defaultLabel_1:"The first year",defaultLabel_12:"The first year",defaultLabel_12Discount:"The first year",subscriptionLabel_12:"Consecutive years"},subscribed:"✓ Subscribed",read:"Read",subscriptionMarkLabel:{default:"Yours",lastDay:"day left",daysLeft:{one:"day left",few:"days left"}},retry:'If the problem continues, <a href="mailto:%{email}">contact us</a> <a href="%{url}" class="button subscriptionRetry-link">Try Again</a>',updateCard:"Update bank card"},emailForm:{placeholder:"Email",authenticationEmailSent:"A link to access your books has been sent to <b>%{email}</b>"},product:{email:{lecture:"[email protected]",collecture:"[email protected]",book:"[email protected]",bookshelf:"[email protected]",prep:"[email protected]",school:"[email protected]",course:"[email protected]",vacancy:"[email protected]"}},userPopup:{loginToBureausphere:"Sign in",card:{default:"Bank card",current:"Bank card %{cardNumber}",missing:'<span>Update <span class="is__hiddenOnNarrowMobile">bank </span>card</span>'}},publishingSubscriptionForm:{heading:"What comes out when",caption:"Subscribe to get updates about other new books.",captionPreorder:"Subscribe to get updates about this and other new books."},realtimeCountdown:{days:{one:"day",few:"days",many:"days",other:"days"},hours:{one:"hour",few:"hours",many:"hours",other:"hours"},minutes:{one:"minute",few:"minutes",many:"minutes",other:"minutes"},seconds:{one:"second",few:"seconds",many:"seconds",other:"seconds"},short:{days:"d",hours:"h",minutes:"m",seconds:"s"}},leadMagnet:{openLink:"Open for free",downloadFile:"Download for free"},subscriptionCancel:{validUntil:{book:"The subscription to the book paid until %{validUntil}",bookPreorder:"The subscription to the book is paid for 1 year and 2 months. The subscription will start ticking closer to the book's full release"},disclaimer:{book:"If you cancel the subscription now, the book will be no longer accessible. The lowered rate after the first year is available only with an uninterrupted subscription."},buttonKeep:'Keep<span class="device laptop desktop"> subscription</span>',buttonKeepCaption:"And use the paid period to the full",buttonCancel:'Cancel<span class="device laptop desktop"> subscription</span>',buttonCancelCaption:{book:"And immediately disable access to the book"}},lastChance:{subscriptionCancelled:{book:"Book subscription has been cancelled"},motivator:{book:"Restore your subscription and keep the paid period and the lowered subscription rate after the first year",bookNoTimeLeft:"Restore your subscription and keep the lowered subscription rate after the first year"},buttonRevert:"Restore subscription"},subscriptionNotifications:{renewMiss:"Failed to renew subscription. Offer expired",renewEarlyMiss:"Failed to renew subscription. Offer expired",renewFail:"Payment failed. Try to follow the link in email again",renewEarlyFail:"Payment failed. Try to follow the link in email again",renewSuccess:"You have renewed your subscription. Thank y
2ou!",renewEarlySuccess:"You have renewed your subscription. Thank you! Next payment due on %{subscriptionRenewsOn}",renewEarlyDouble:"You have already renewed your subscription before. Next payment due on %{subscriptionRenewsOn}",redeemMiss:"Could not open the book. Subscription has ended",redeemFail:"Failed to activate the gift.",transferSuccess:"Your subscription has been confirmed and will now renew automatically",oneTimeOfferExpired:"Offer expired"}}},42267:function(e){"use strict";e.exports={sentence:{lastWordConnector:"и"},dateFormats:{dateOnly:"%{day} %{month}",dateYearOnly:"%{day} %{month} %{year}"},site:{name:"Бюро Горбунова",logoName:"Бюро Горбунова",footerCopyright:"Бюро Горбунова",host:"bureau.ru",classroomLinkLabel:"Школьный кабинет",userLinkLabel:"Бюросфера",editLinkLabel:"Редактировать"},docTypes:{lecture:"Лекция",literature:"Литература",task:"Задание",test:"Тест",text:"Лекция"},impressions:{upvote:"Полезно",downvote:"Непонятно",hint:'<a href="/login" class="js__loginBar key-link">Войдите в Бюросферу</a>, чтобы голосовать'},likely:{telegram:"Отправить",facebook:"Поделиться",vkontakte:"Поделиться",pinterest:"Запинить",twitter:"Твитнуть"},project:{bucketCaption:"Ведро",stickyButton:"Стать клиентом"},recycledLinks:{overview:"Обзор",recycled:"🗑 Ведро"},timeline:{start:"Старт",launch:"Пуск",launches:"Пуски",byPlan:" по плану",inFact:"Фактически"},comments:{menu:{tabs:{all:"Все",new:"Неопубликованные",sunk:"Вода"}}},defaultTotalTableHeading:"Итого",books:{spacerDiscount:{text:'Для тех, кто уже подписан <nobr><a href="/books/" class="doubleHover">на другие книги бюро</a>,</nobr> <nobr>спеццена —</nobr>',textMobile:'Для тех, кто уже подписан <nobr><a href="/books/" class="doubleHover">на другие книги бюро</a></nobr>, <nobr>спеццена за первые</nobr> <nobr>три месяца</nobr> подписки',textMobileAnnual:'Для тех, кто уже подписан <nobr><a href="/books/" class="doubleHover">на другие книги бюро</a></nobr>, <nobr>спеццена за первый год</nobr> подписки',monthly:"За первые<br>три месяца",annual:"За первый год подписки"},spacerDemo:{title:"Демоглава",button:"Попробовать бесплатно"},bookSpacer:{subscriptionFormCaption:"Оставьте почту, чтобы узнать о предзаказе.",discount:"скидка"},bookSystemRequirements:{text:"Для чтения нужен компьютер, планшет или телефон с интернетом и любым современным браузером",retina:'<span class="bookSystemRequirements-eye">👁</span> Рекомендуем читать на экранах с «ретиной». На обычных тоже работает'},booksIntro:{lead:"Мы выпускаем  электронные учебники по типографике, интерфейсу, редактуре, управлению проектами и другим дисциплинам. Наши книги прекрасно выглядят и представляют знания в интерактивной форме.",manifesto:'О нашем формате книг<span class="device laptop desktop"> в манифесте</span>',aside:"Почему книги доступны только по подписке, сколько стоит подписка и как её отменить?",faq:"Вопросы и ответы",devices:"Читайте на компьютере и планшете",ownedBooks:"Так на этой странице отмечаются книги, на которые вы подписаны",subscriptionFormE
2xplanation:"Оставьте почту, чтобы узнать о выходе книг и обновлениях других продуктов бюро."},priceCaption_1:"Подписка минимум на три месяца",priceCaption_12:"Подписка минимум на год",priceCaptionRenewsAutomatically:"c автопродлением",specialPriceCaptionRenewsAutomatically:"Подписка c автопродлением",discountPriceCaption:"<em>Спеццена</em> для подписчиков на книги бюро",discountPriceCaptionPreorder:"При предзаказе <em>2 месяца в подарок</em>",stickerPreorderAndRead:"Предзакажите и читайте",otherBooks:{defaultTitle:"Ещё книги",bookCaption:'Первый год <nobr>%{price} ₽</nobr>, <br class="device laptop desktop">затем <nobr>%{subscriptionPrice} ₽/год</nobr> ',bookCaptionWithDiscount:'Первый год <nobr><s>%{price}</s> %{newPrice} ₽</nobr><span class="device desktop">, <br class="device laptop desktop">затем <nobr>%{subscriptionPrice} ₽/год</nobr></span> ',bookshelfCaption:"<b>%{name}</b><br/>Первый год <nobr>%{price} ₽</nobr>, затем <nobr>%{subscriptionPrice} ₽/год</nobr>",bookshelfCaptionWithDiscount:'<b>%{name}</b><br/>Первый год <nobr><s>%{price}</s> %{newPrice} ₽</nobr><span class="device desktop">, затем <nobr>%{subscriptionPrice} ₽/год</nobr></span>'},subscriptionFooter:{caption:"Подписка c автопродлением",captionCompact:"С автопродлением",captionPreorder:'При предзаказе <span class="discounted">2 месяца в подарок.</span> <br/>Подписка c автопродлением',shelfTitle:"Полка «%{productTitle}»",bundleTitle:"Все книги бюро",bundleTitleWithBook:"Эта и все книги бюро",subscription:"Подписка",subscriptionForm:{title:"Когда что выйдет",placeholder:"Электронная почта",caption:"Оставьте почту, чтобы узнать о выходе книг и обновлениях других продуктов бюро.",captionPreorder:"Оставьте почту, чтобы узнать о выходе книги и обновлениях других продуктов бюро."},subscriptionButton:{caption:"Подписка",captionPreorder:"Предзаказ"}},bookshelf:{offerTitle:"Подписка для новых читателей",specialOfferTitle:"Для подписчиков на %{booksCount} %{pluralizedBookCount}",bookshelfAllspecialOfferTitle:"Для подписчиков на отдельные книги",subscriptionFooter:{caption:"С автопродлением",captionSpecial:"Подписка c автопродлением",captionUpgrade:'При переключении <span class="is__highlighted">2 месяца в подарок.</span> <br/>Подписка c автопродлением',captionUpgradeSpecial:'Два месяца <span class="is__highlighted">в подарок.</span> <br/>Подписка c автопродлением'}}},course:{lastSignupDate:"Запись до %{endsAt}",signupMotivation:'<span class="highlighted">🕑 Раньше запись — ниже стоимость.</span>',couponSignupMotivationShort:'<span class="highlighted">🕑 До %{couponEndsAt}.</span>',seatsLeft:{one:'Осталось <b class="is__highlighted">%{count} место</b>',few:'Осталось <b class="is__highlighted">%{count} места</b>',many:'Осталось <b class="is__highlighted">%{count} мест</b>'}},subscription:{subscription:"Подписка",preorder:"Предзаказ",unitsOneTime:"₽",unitsMonthly:"₽/мес.",unitsYearly:"₽/год",defaultUnits_1:"₽/мес.",defaultUnits_1Discount:"₽",defaultUnits_7:"₽",defaultUnits_12:"₽",defaultUnits_14:"₽",defaultUnits_12Discount:"₽",subscriptionUnits_1:"₽/мес.",subscriptionUnits_7:"₽/мес.",subscriptionUnits_12:"₽/год",subscriptionUnits_14:"₽/год",prices:{defaultLabel_1:"В первые три месяца",defaultLabel_1Discount:"За первые три месяца",defaultLabel_7:"За первые 6 месяцев",defaultLabel_7Discount:"За первые 6 месяцев",defaultLabel_12:"Первый год",defaultLabel_14:"Первый год",defaultLabel_12Discount:"За первый год",subscriptionLabel_1:"С четвёртого",subscriptionLabel_7:"С восьмого",subscriptionLabel_12:"Со второго года",subscriptionLabel_14:"Со второго года",upgradeLabel:"Переключение",upgradeSubscriptionLabel:"Со второго года",after:"Затем"},license:"Лицензия",unsubscription:"Отмена подписки",subscribed:"✓ Вы подписаны",read:"Читать",notRenewedAutomatically:"Подписка не продлевается автоматически.",giftPricingInfo:"Тот, кому вы дарите, сможет привязать свою карту и продлить подписку по сниженному тарифу.",noAdditionalCharges:"У вас не будет дополнительных списаний.",preorderFor:"Предзаказ за",buyMoreFor:"Купить ещё за",nextPayment:"Следующий платёж",subscriptionSwitched:"Подписка переключена",subscriptionMarkLabel:{default:"У вас",lastDay:"дня ещё у вас",daysLeft:{one:"день ещё у вас",few:"дня ещё у вас"}},retry:'<a href="mailto:%{email}">Напишите нам</a>, если проблема будет повторяться <a href="%{url}" class="button subscriptionRetry-link">Попробовать снова</a>',updateCard:"Указать другую банковскую карту"},emailForm:{placeholder:"Электронная почта",authenticationEmailSent:"По адресу <b>%{email}</b> отправлена ссылка на вашу Бюросферу"},realtimeCountdown:{days:{one:"день",few:"дня",many:"дней"},hours:{one:"час",few:"часа",many:"часов"},minutes:{one:"минута",few:"минуты",many:"минут"},seconds:{one:"секунда",few:"секунды",many:"секунд"},short:{days:"д",hours:"ч",minutes:"м",seconds:"с"}},subscriptionCancel:{validUntil:{book:"Подписка на книгу оплачена до %{validUntil}",bookPreorder:"Подписка предоплачена на один год и два месяца. Срок затикает ближе к полному выходу книги",bookshelf:"Подписка на полку оплачена до %{validUntil}",bookshelfPreorder:"Подписка предоплачена на один год и два месяца. Срок затикает ближе к полному выходу полки",lecture:"Подписка на лекции оплачена до %{validUntil}",collecture:"Подписка на коллекцию оплачена до %{validUntil}",vacancy:"Подписка оплачена до %{validUntil}"},disclaimer:{book:"Если отменить подписку сейчас, доступ к книге будет закрыт. Сниженный тариф после первого года действует только при непрерывной подписке.",bookshelf:"Если отменить подписку сейчас, доступ к полке будет закрыт. Сниженный тариф после первого года действует только при непрерывной подписке.",lecture:"Если отменить подписку сейчас, доступ к лекциям будет закрыт. Сниженный тариф после первого года действует только при непрерывной подписке.",collecture:"Если отменить подписку сейчас, доступ к лекциям будет закрыт. Сниженный тариф после первых трёх месяцев действует только при непрерывной подписке.",vacancy:"Если отменить подписку сейчас, доступ к публикации вакансий в Бюросфере будет закрыт. Сниженный тариф после первых трёх месяцев действует только при непрерывной подписке."},emailCancellation:{lecture:'Интерфейс отмены подписки пока в работе, если вы хотите отменить подписку, напишите: <a href="mailto:[email protected]">[email protected]</a>'},cancellationText:{book:'При отмене подписки читатели потеряют доступ к книгам. Если вы хотите отменить подписку, напишите: <a href="mailto:[email protected]">[email protected]</a>',bookshelf:'При отмене подписки читатели потеряют доступ к книгам. Если вы хотите отменить подписку, напишите: <a href="mailto:[email protected]">[email protected]</a>',lecture:'При отмене подписки зрители потеряют доступ к лекциям. Если вы хотите отменить подписку, напишите: <a href="mailto:[email protected]">[email protected]</a>',collecture:'При отмене подписки зрители потеряют доступ к лекциям. Если вы хотите отменить подписку, напишите: <a href="mailto:[email protected]">[email protected]</a>'},buttonKeep:'Оставить<span class="device laptop desktop"> подписку</span>',buttonKeepCaption:"И использовать оплаченное время",buttonCancel:'Отменить<span class="device laptop desktop"> подписку</span>',buttonCancelCaption:{book:"И сразу же отключить доступ к книге",bookshelf:"И сразу же отключить доступ к полке",lecture:"И сразу же отключить доступ к лекциям",collecture:"И сразу же отключить доступ к лекциям",vacancy:"И сразу же отключить доступ к публикации вакансий в Бюросфере"}},giftButtonText:"Подарок",buyButtonText:{book:{default:"Подписка",preorder:"Предзаказ",subscribed:"✓ Подписка",subscribedPreorder:"✓ Предзаказ"},bookshelf:{default:"Подписка",upgrade:'Переключение <span class="is__hiddenOnMobile">на полку</span>',upgradeCompact:"Переключение",subscribed:"✓ Подписка",preorder:"Предзаказ",subscribedPreorder:"✓ Предзаказ"},prep:{default:"Запись",subscribed:"✓ Запись"},school:{default:"Поступление",preorder:"Поступление",subscribed:"✓ Поступление",subscribedPreorder:"✓ Поступление"},lecture:{default:"Подписка",subscribed:"✓ Подписка"},collecture:{default:"Подписка",subscribed:"✓ Подписка",upgrade:'Переключение <span class="is__hiddenOnLaptopAndMobile">на коллекцию</span>',upgradeCompact:"Переключение"},course:{default:"Запись",subscribed:"✓ Запись"},vacancy:{default:"Публикация",subscribed:"Публикация"}},lastChance:{subscriptionCancelled:{book:"Подписка на книгу отменена",bookshelf:"Подписка на полку отменена",lecture:"Подписка на лекции отменена",collecture:"Подписка на коллекцию отменена",vacancy:"Подписка на публикацию вакансий в Бюросфере отменена"},motivator:{book:"Восстановите подписку и сохраните оплаченное время и сниженный тариф после первого года",bookNoTimeLeft:"Восстановите подписку и сохраните сниженный тариф после первого года",bookshelf:"Восстановите подписку и сохраните оплаченное время и сниженный тариф после первого года",bookshelfNoTimeLeft:"Восстановите подписку и сохраните сниженный тариф после первого года",lecture:"Восстановите подписку и сохраните оплаченное время и сниженный тариф после первого года",lectureNoTimeLeft:"Восстановите подписку и сохраните сниженный тариф после первого года",collecture:"Восстановите подписку и сохраните оплаченное время и сниженный тариф после первых трёх месяцев",collectureNoTimeLeft:"Восстановите подписку и сохраните сниженный тариф после первых трёх месяцев",vacancy:"Восстановите подписку и сохраните оплаченное время и сниженный тариф после первых трёх месяцев",vacancyNoTimeLeft:"Восстановите подписку и сохраните сниженный тариф после первых трёх месяцев"},buttonRevert:"Восстановить подписку"},vac:{invalidLoginLink:"К сожалению, ссылка для входа устарела. По адресу <b>%{email}</b> отправлена новая ссылка"},publishingSubscriptionForm:{heading:"Когда что выйдет",caption:"Оставьте почту, чтобы узнать о выходе книг и обновлениях других продуктов бюро.",captionPreorder:"Оставьте почту, чтобы узнать о выходе книги и обновлениях других продуктов бюро."},userPopup:{loginToBureausphere:"Вход в Бюросферу",card:{default:"Карта",current:"Карта %{cardNumber}",missing:'<span>Сохранить <span class="is__hiddenOnNarrowMobile">банковскую </span>карту</span>'},myCourse:"<span>Курс <nobr>%{dates}</nobr></span>",myCourseWithAuthor:"<span>Курс %{authorGenitiveLastname} <nobr>%{dates}</nobr></span>"},schoolRating:{defaultTitle:"Студенты",caption_level1:"Рейтинг по Ð
2½ÐµÐ´ÐµÐ»ÑÐ¼ тестов и заданий.",caption_level2:"Рейтинг по результатам практических заданий.",caption_level3:"",googleLink:'<a href="%{googleLink}">Подробности в Гугле</a>',level:"%{level} ступень",weekTitle:"%{number} неделя",weekTotal:"За неделю",rating:"Рейтинг",tags:{granted:"Беспл.",grantedFull:"На бесплатном",rookie:"Нов.",failed:{male:"Отчислен",female:"Отчислена",unknown:"Отчислен"},paused:"Академ",blackMark:"Чёрная метка"},empty:{title:"На старт, дамы и господа!",caption:"Рейтинг сформируется после первой недели обучения",listCaption:"Пока никто не начал учиться. Поступайте в школу сегодня и начинайте обучение поскорее, пока конкуренция ниже. У вас будет больше шансов на бесплатное место на следующих ступенях школы."}},schoolFaces:{titleGranted:"На бесплатных местах",titleAbc:"По алфавиту",titleAll:{one:"Все студенты",few:"Все %{count} студента",many:"Все %{count} студентов"},diploma:{tag:"Диплом",team:"Команда: %{team}",artDirector:"Арт-директор: %{artDirector}"}},classroom:{correction:"Корректировка",average:"Средняя"},soviet:{relatedTags:"Копните глубже",switcher:{released:"Советы",withNewComments:"С новыми комментариями",scheduled:"Готовые к публикации",unanswered:"Без ответа",compilations:"Подборки"},askForm:{name:"Имя и фамилия",namePlaceholder:"Обязательны полностью",email:"Эл. почта",emailPlaceholder:"Не будет опубликована",question:"Текст вопроса",send:"Отправить",error:"Ошибка отправки. Попробуйте ещё раз",success:"Ваш вопрос отправлен",title:"Ваш вопрос",caption:"Мы стараемся ответить на все вопросы. Кроме нашего совета, вы получите интеллигентные отзывы посетителей сайта",purpose:"Цель «Советов» — обмен знаниями о дизайне продуктов, представлении информации, пользовательском интерфейсе, навигации в общественных местах, об отношениях с клиентами, о технической и юридической сторонах дизайна. Комментарии к вашему вопросу пройдут модерацию. Будут опубликованы ответы, содержащие новые мысли и интересные примеры.",thankYou:"Спасибо за участие!",anotherQuestion:"Задать другой вопрос",questionSent:'Ваш вопрос отправлен. Пока предлагаем вам ознакомиться с уже <a href="/bb/soviet/">опубликованными ответами</a>.'}},school:{disciplineShortNames:{products:"Продукт",typography:"Типографика",ui:"Интерфейс",data:"Визуализация",prototyping:"Вёрстка",text:"Текст",law:"Право",fff:"Управление",clients:"Переговоры",analytics:"Маркетинг",prep:"Подг. курсы",contests:"Конкурс",bonus:"Бонус",ktostudent:"Кто студент",recipes:"Рецепты",visual:"Повествование"}},getGift:{title:"Открыть подарок",openedTitle:"Подписка оформлена",openedSubtitle:"Срок подписки — 1 год",codeHint:"Подарочный код расположен на сертификате или пришёл вам по электронной почте",readButton:"Читать",form:{name:"Имя и фамилия",email:"Эл. почта",code:"Подарочный код",errors:{code:'Код Ð
2½ÐµÂ ÑÑ€Ð°Ð±Ð¾Ñ‚ал. Попробуйте снова или свяжитесь с нами: <a href="mailto:[email protected]">[email protected]</a>'}},emailCaption:{book:"По адресу <b>%{email}</b> отправлена ссылка для доступа к книге",bookBreak:"По адресу <b>%{email}</b><br />отправлена ссылка для доступа к книге",bookshelf:"По адресу <b>%{email}</b> отправлена ссылка для доступа к полке",bookshelfBreak:"По адресу <b>%{email}</b><br />отправлена ссылка для доступа к полке"},supportCaption:'Если вы хотите привязать доступ к другому адресу, напишите об этом: <a href="mailto:[email protected]">[email protected]</a>'},discountBanner:{discount:"скидка",extraCharge:"наценка",book:{text:"Успейте подписаться на книгу со скидкой до %{endsAt}",textTimeOver:"<b>Время закончилось</b> Скидка на книгу больше не действует"},bookshelf:{text:"Успейте подписаться на электронную полку со скидкой до %{endsAt}",textTimeOver:"<b>Время закончилось</b> Скидка на электронную полку больше не действует"},school:{text:"Успейте поступить в школу со скидкой до %{endsAt}",textWithBonuses:'Успейте поступить<span class="device laptop desktop"> со скидкой и получить все </span><span class="device mobile"> в школу со скидкой и получить </span>бонусы до %{endsAt}',textTimeOver:"<b>Время закончилось</b> Скидка для школы больше не действует"},course:{discount:"экономия",text:"Успейте записаться на курс с экономией до %{endsAt}",textWithBonuses:'Успейте записаться<span class="device laptop desktop"> с экономией и получить все </span><span class="device mobile"> на курс с экономией и получить </span>бонусы до %{endsAt}',textTimeOver:"<b>Время закончилось</b> Экономия на курсе больше не действует"},prep:{text:"Успейте записаться на подготовительные курсы со скидкой до %{endsAt}",textTimeOver:"<b>Время закончилось</b> Скидка на подготовительные курсы больше не действует"},font:{text:"Успейте купить шрифт со скидкой до %{endsAt}",textTimeOver:"<b>Время закончилось</b> Скидка на шрифт больше не действует"},lecture:{text:"Успейте подписаться на лекции со скидкой до %{endsAt}",textTimeOver:"<b>Время закончилось</b> Скидка на лекции больше не действует"},collecture:{text:"Успейте подписаться на коллекцию со скидкой до %{endsAt}",textTimeOver:"<b>Время закончилось</b> Скидка на коллекцию больше не действует"},withExtraCharge:{book:{text:"Успейте подписаться на книгу с наценкой до %{endsAt}",textTimeOver:"<b>Время закончилось</b> Наценка на книгу больше не действует"},bookshelf:{text:"Успейте подписаться на электронную полку с наценкой до %{endsAt}",textTimeOver:"<b>Время закончилось</b> Наценка на электронную полку больше не действует"}}},lectures:{courseTitle:'%{title} <span class="nowrap">c %{author}</span>',navigation:{following:{title:"Смотреть дальше"},other:{title:"Рекомендуем другие лекции"}}},collectures:{pricing:{title:"Подписка для новых зрителей",titleUpgradeFor:{lectures:"Подписчикам на отдельные лекции",collectures:"Подписчикам на коллекции",lecturesAndCollectures:"Подписчикам на отдельные лекции и Ð
2ºÐ¾Ð»Ð»ÐµÐºÑ†Ð¸Ð¸"},subscriptionFooter:{caption3:"Подписка минимум на три месяца, продлевается автоматически",caption12:"Подписка минимум на год, продлевается автоматически",captionUpgrade7:'Месяц <span class="is__highlighted">в подарок.</span> Подписка c автопродлением',captionUpgrade14:'Два месяца <span class="is__highlighted">в подарок.</span> Подписка c автопродлением',captionCompact3:"С автопродлением",captionCompact12:"С автопродлением",captionCompactUpgrade7:'Месяц <span class="is__highlighted">в подарок.</span> <br/>Подписка c автопродлением',captionCompactUpgrade14:'Два месяца <span class="is__highlighted">в подарок.</span> <br/>Подписка c автопродлением'}},upgrade:{title:"Подписчикам на %{productType}",fromLectures:"отдельные лекции",fromCollectures:"коллекции",fromLecturesAndCollectures:"отдельные лекции и коллекции",text:"Переключите свою подписку для доступа ко всем лекциям. Вся предыдущая подписка на %{productType} отменится автоматически."},spacer:{link:"Коллекция",all:{title:"Все лекции бюро",titleLaptop:"Все лекции",description:"Подписка на все лекции, которые вышли и когда‑либо выйдут в бюро.",descriptionLaptop:"Подписка на все лекции, которые вышли и когда‑либо выйдут."}}},product:{email:{lecture:"[email protected]",collecture:"[email protected]",book:"[email protected]",bookshelf:"[email protected]",prep:"[email protected]",school:"[email protected]",course:"[email protected]",vacancy:"[email protected]"}},courses:{openCourses:{seatsLeft:{one:"Осталось одно место",few:"Осталось %{count} места",many:"Осталось %{count} мест"},priceChangeAt:"%{priceСhangeDate} подорожает",priceChangeAtCompact:"%{priceСhangeDate} дороже",enrollEndsAt:"Запись до %{enrollEndsDate}",enrollEndsInTwoDays:"Осталось два дня",enrollEndsInOneDay:"Остался день",priceWillIncreaseTomorrow:"Завтра подорожает",priceWillIncreaseDayAfterTomorrow:"Послезавтра подорожает",enroll:"Записаться",enrollFor:"Записаться <nobr>за %{price} ₽/мес.</nobr>",enrollForShort:"<nobr>%{price} ₽/мес.</nobr>",isSoldOut:"Места закончились"},practicalCourses:{duration:{days:{one:"%{inWords} день",few:"%{inWords} дня",many:"%{inWords} дней"},week:{one:"%{inWords} неделя",few:"%{inWords} недели",many:"%{inWords} недель"}}},durationWeeksDative:{3:"трёхнедельному",4:"четырёхнедельному"}},strategies:{helpers:{onlineCourse:{duration:{weeks:{1:"одна неделя",2:"две недели",3:"три недели",4:"четыре недели",5:"пять недель"},days:{1:"один день",2:"два дня",3:"три дня",4:"четыре дня",5:"пять дней",6:"шесть дней"}}}}},cpd:{captionText:{sameScore:'<a class="no-u" href="/cpd/"><span class="smallcapitals">%{score} КПД</span> ❔</a><br>Дизайнеру, редактору и руководителю',sameScoreEditorManager:'<a class="no-u" href="/cpd/"><span class="smallcapitals">КПД</span> ❔</a><br>%{designerScore} дизайнеру, %{editorScore} редактору и руководителю',sameScoreDesignerEditor:'<a class="no-u" href="/cpd/"><span class="smallcapitals">КПД</span> ❔</a><br>%{designerScore} дизайнеру и редактору, %{managerScore} руководителю',differentScore:'<a class="no-u" href="/cpd/"><span class="smallcapitals">КПД</span> ❔</a><br>%{designerScore} дизайнеру, %{editorScore} редактору, %{managerScore} руководителю'},schoolCaptionText:{header:{designers:'<a class="no-u" href="/cpd/"><span class="title"><span class="smallcapitals">КПД</span> в Школе дизайнеров</span> ❔</a>',editors:'<a class="no-u" href="/cpd/"><span class="title"><span class="smallcapitals">КПД</span> в Школе редакторов</span> ❔</a>',managers:'<a class="no-u" href="/cpd/"><span class="title"><span class="smallcapitals">КПД</span> в Школе руководителей</span> ❔</a>'},header1:"За первую ступень",header2:"За вторую ступень",header3:"За третью ступень",sameScore:"%{score} дизайнеру, редактору и руководителю",sameScoreEditorManager:"%{designerScore} дизайнеру, %{editorScore} редактору и руководителю",sameScoreDesignerEditor:"%{designerScore} дизайнеру и редактору, %{managerScore}
2 руководителю",differentScore:"%{designerScore} дизайнеру, %{editorScore} редактору, %{managerScore} руководителю"}},leadMagnet:{openLink:"Открыть бесплатно",downloadFile:"Скачать бесплатно",defaults:{course:{text:"Оставьте почту, чтобы смотреть лекцию бесплатно, узнать, когда будет открыта запись на этот и другие курсы.",seriesText:"Оставьте почту, чтобы смотреть лекцию бесплатно, %{seriesTeaserText} и когда будет открыта запись на этот и другие курсы."},lecture:{text:"Оставьте почту, чтобы смотреть лекции бесплатно, узнавать о выходе новых лекций и других продуктов бюро.",seriesText:"Оставьте почту, чтобы смотреть лекции бесплатно, %{seriesTeaserText}, о выходе новых лекций и продуктов бюро."},schoolDemo:{text:"Оставьте почту, чтобы %{action} бесплатно, узнавать о наборах в школу, следить за новостями и изменениями стоимости.",buttonText:"Попробовать бесплатно"},schoolPrep:{text:"Оставьте почту, чтобы смотреть лекцию бесплатно, узнавать о наборах в школу, следить за новостями и изменениями стоимости."}},lecture:{name:"Лекция «%{title}»",buttonText:"Смотреть бесплатно"}},leadMagnetWall:{defaults:{course:{name:"🔓 Лекция «%{title}» бесплатно",text:"Оставьте почту, чтобы смотреть лекцию бесплатно, узнать, когда будет открыта запись на этот и другие курсы.",seriesText:"Оставьте почту, чтобы смотреть лекцию бесплатно, %{seriesTeaserText} и когда будет открыта запись на этот и другие курсы.",buttonText:"Смотреть бесплатно"},lecture:{name:"🔓 Лекция «%{title}» бесплатно",text:"Оставьте почту, чтобы смотреть лекцию бесплатно, узнать о выходе лекций и обновлениях других продуктов бюро.",seriesText:"Оставьте почту, чтобы смотреть лекцию бесплатно, %{seriesTeaserText}, о выходе новых лекций и продуктов бюро.",buttonText:"Смотреть бесплатно"},schoolPrep:{name:"🔓 Лекция «%{title}» бесплатно",text:"Оставьте почту, чтобы смотреть лекцию бесплатно, узнавать о наборах в школу, следить за новостями и изменениями стоимости.",buttonText:"Смотреть бесплатно"}}},mailingList:{defaults:{course:{text:"Оставьте почту, чтобы узнать, когда будет открыта запись на этот и другие курсы.",seriesText:"Оставьте почту, чтобы %{seriesTeaserText} и когда будет открыта запись на этот и другие курсы.",heading:"Когда в следующий раз откроется запись",seriesHeading:"С чего начать и когда участвовать"},lecture:{text:"Оставьте почту, чтобы узнать о выходе лекций и обновлениях других продуктов бюро.",seriesText:"Оставьте почту, чтобы %{seriesTeaserText}, о выходе новых лекций и продуктов бюро.",heading:"Когда что выйдет",seriesHeading:"С чего начать"}}},subscriptionNotifications:{renewMiss:"Не удалось продлить подписку. Срок предложения истёк",renewEarlyMiss:"Не удалось продлить подписку. Срок предложения истёк",renewFail:"Оплата не прошла. Попробуйте снова перейти по ссылке в письме",renewEarlyFail:"Оплата не прошла. Попробуйте снова перейти по ссылке в письме",renewSuccess:"Вы возобновили подписку. Спасибо!",renewEarlySuccess:"Вы успешно продлили подписку. Спасибо! Следующий платёж — %{subscriptionRenewsOn}",renewEarlyDouble:"Вы уже продлили подписку ранее. Следующий платёж — %{subscriptionRenewsOn}",redeemMiss:"Не удалось открыть книгу. Срок подписки истёк",redeemFail:"Не получилось активировать подарок.",transferSuccess:"Ваша подписка оформлена и теперь будет продлеваться автоматически",oneTimeOfferExpired:"Срок предложения истёк"},paywall:{assetIsNotAccessible:{lecture:"Лекция пока недоступна",literature:"Литература пока недоступна",task:"Задание пока недоступно",test:"Тест пока недоступен",text:"Лекция пока недоступна"}},login:{heading:"Вход в Бюросферу",defaultCaption:"Адрес для входа или регистрации. Если у вас есть Бюросфера, используйте адрес оттуда",invalidEmail:"Неверный формат почты",loginError:"Ошибка при входе. Свяжитесь с нами: [email protected]"},loginCardForm:{emailSent:"По адресу <b>%{email}</b> отправлена ссылка для сохранения карты",error:"Ошибка отправки. Попробуйте ещё раз"}}},96194:function(e){"use strict";function t(e){return e.replace(/[_.-](\w|$)/g,function(e,t){return t.toUpperCase()})}
2e.exports=function(e){return e?"string"==typeof e?t(e):Object.keys(e).reduce((s,i)=>(s[t(i)]=e[i],s),{}):e}},5634:function(e,t,s){"use strict";const{sanitize:i,formatText:a,wrapText:o}=s(73345);e.exports=({body:e="",$:t}={})=>{const s=i(a(e));return o(t,s)}},75313:function(e){"use strict";e.exports=(e={})=>({...e,sovietUsername:e.soviet_username||e.sovietUsername,text:e.text||"",createdAt:e.created_at||e.createdAt,imageUrl:e.image_url||e.imageUrl,imageSize:e.image_size||e.imageSize,avatarUrl:e.avatar_url||e.avatarUrl,impressionSubject:e.impression_subject||e.impressionSubject,impressionSummary:e.impression_summary||e.impressionSummary})},67905:function(e){"use strict";e.exports=(e,t)=>new Date(e.createdAt).getTime()-new Date(t.createdAt).getTime()},77817:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.THINSP=t.NBSP=t.ARROW_UP=t.ARROW_DOWN=void 0,t.NBSP=" ",t.THINSP=" ",t.ARROW_UP="⇑",t.ARROW_DOWN="⇓"},20817:function(e){"use strict";class t{}const s=e=>e;t.all=()=>[{title:"Свежак",key:"",tags:[],textColor:"#fff",keyColor:"#e20016",backgroundColor:"#000"},{title:"С чего начать",key:"start",tags:["С чего начать"],textColor:"#fff",keyColor:"#fff",backgroundColor:"#5c35bf"},{title:"Золотой фонд",key:"gold",tags:["Золотой фонд"],textColor:"#000",keyColor:"#e20016",backgroundColor:"#e9ddc2"},{title:"Дизайн продуктов",key:"productdesign",tags:["Дизайн продуктов"],keyColor:"#fff",textColor:"#fff",backgroundColor:"#000"},{title:"Дизайн",key:"design",tags:["Дизайн"],keyColor:"#fff",textColor:"#fff",backgroundColor:"#77808c"},{title:"Типографика",key:"layout",tags:["Вёрстка"],keyColor:"#fff",textColor:"#fff",backgroundColor:"#e30016"},{title:"Интерфейс",key:"ui",tags:["Интерфейс"],keyColor:"#fff",textColor:"#fff",backgroundColor:"#fc5620"},{title:"Сайты",key:"websites",tags:["Сайты"],textColor:"#fff",keyColor:"#fff",backgroundColor:"#0000ff"},{title:"Текст",key:"text",tags:["Текст"],keyColor:"#fff",textColor:"#fff",backgroundColor:"#004f83"},{title:"Веб-разработка",key:"webdev",tags:["Веб-разработка"],keyColor:"#fff",textColor:"#000",backgroundColor:"#00cefd"},{title:"Графика",key:"graphics",tags:["Графика"],keyColor:"#000",textColor:"#000",backgroundColor:"#fff"},{title:"Фирстиль",key:"branding",tags:["Фирстиль"],keyColor:"#000",textColor:"#000",backgroundColor:"yellow"},{title:"Шрифт",key:"font",tags:["Шрифт"],keyColor:"#fff",textColor:"#fff",backgroundColor:"#df3d4a"},{title:"Навигация",key:"wayfinding",tags:["Навигация"],keyColor:"#fff",textColor:"#fff",backgroundColor:"#2a8d8a"},{title:"Визуализация",key:"data",tags:["Визуализация"],keyColor:"#b33",textColor:"#000",backgroundColor:"#f9f6ed"},{title:"Переговоры",key:"clients",tags:["Переговоры"],keyColor:"#000",textColor:"#000",backgroundColor:"#fcc033"},{title:"Управление",key:"fff",tags:["Управление"],keyColor:"#fff",textColor:"#fff",backgroundColor:"#2c5956"},{title:"Право",key:"law",tags:["Право"],keyColor:"#fff",textColor:"#fff",backgroundColor:"#406e1d"}].map(s),t.default=t.all()[0],t.sunk={title:"Утопленное",key:"sunk",tags:["Утопленное"],keyColor:"#fff",textColor:"#fff",backgroundColor:"#000"},t.urlsMap=t.all().reduce((e,t)=>(e[t.key]=t,e),{}),t.findByKey=function(e){return this.urlsMap[e]},e.exports=t},82131:function(e){"use strict";e.exports={theme1:{layout:"left",textColor:"black",coverUrl:"/assets/images/compilations/covers/01.jpg",previewUrl:"/assets/images/compilations/previews/01.png"},theme2:{layout:"top",textColor:"white",coverUrl:"/assets/images/compilations/covers/02.jpg",previewUrl:"/assets/images/compilations/previews/02.png"},theme3:{layout:"center",textColor:"white",coverUrl:"/assets/images/compilations/covers/03.jpg",previewUrl:"/assets/images/compilations/previews/03.png"},theme4:{layout:"left",textColor:"white",coverUrl:"/assets/images/compilations/covers/04.jpg",previewUrl:"/assets/images/compilations/previews/04.png"},theme5:{layout:"bottom",textColor:"black",coverUrl:"/assets/images/compilations/covers/05.jpg",previewUrl:"/assets/images/compilations/previews/05.png"},theme6:{layout:"left",textColor:"black",coverUrl:"/assets/images/compilations/covers/06.jpg",previewUrl:"/assets/images/compilations/previews/06.png"},theme7:{layout:"left",textColor:"black",coverUrl:"/assets/images/compilations/covers/07.jpg",previewUrl:"/assets/images/compilations/previews/07.png"},theme8:{layout:"left",textColor:"black",coverUrl:"/assets/images/compilations/covers/08.png",previewUrl:"/assets/images/compilations/previews/08.png"},theme9:{layout:"left",textColor:"white",coverUrl:"/assets/images/compilations/covers/09.png",previewUrl:"/assets/images/compilations/previews/09.png"},theme10:{layout:"bottom",textColor:"white",coverUrl:"/assets/images/compilations/covers/10.png",previewUrl:"/assets/images/compilations/previews/10.png"},theme11:{layout:"center",textColor:"white",coverUrl:"/assets/images/compilations/covers/11.png",previewUrl:"/assets/images/compilations/previews/11.png"},theme12:{layout:"center",textColor:"white",coverUrl:"/assets/images/compilations/covers/12.png",previewUrl:"/assets/images/compilations/previews/12.png"},theme13:{layout:"left",textColor:"white",coverUrl:"/assets/images/compilations/covers/13.png",previewUrl:"/assets/images/compilations/previews/13.png"},theme14:{layout:"left",textColor:"white",coverUrl:"/assets/images/compilations/covers/14.png",previewUrl:"/assets/images/compilations/previews/14.png"},theme15:{layout:"top",textColor:"white",coverUrl:"/assets/images/compilations/covers/15.png",previewUrl:"/assets/images/compilations/previews/15.png"},theme16:{layout:"left",textColor:"black",coverUrl:"/assets/images/compilations/covers/16.png",previewUrl:"/assets/images/compilations/previews/16.png"},theme17:{layout:"left",textColor:"white",coverUrl:"/assets/images/compilations/covers/17.jpg",previewUrl:"/assets/images/compilations/previews/17.png"},theme18:{layout:"center",textColor:"white",coverUrl:"/assets/images/compilations/covers/18.jpg",previewUrl:"/assets/images/compilations/previews/18.png"},theme19:{layout:"left",textColor:"white",coverUrl:"/assets/images/compilations/covers/19.jpg",previewUrl:"/assets/images/compilations/previews/19.png"},theme20:{layout:"center",textColor:"white",coverUrl:"/assets/images/compilations/covers/20.jpg",previewUrl:"/assets/images/compilations/previews/20.png"},theme21:{layout:"left",textColor:"white",coverUrl:"/assets/images/compilations/covers/21.jpg",previewUrl:"/assets/images/compilations/previews/21.png"},theme22:{layout:"top",textColor:"white",coverUrl:"/assets/images/compilations/covers/22.jpg",previewUrl:"/assets/images/compilations/previews/22.png"},theme23:{layout:"bottom",textColor:"white",coverUrl:"/assets/images/compilations/covers/23.jpg",previewUrl:"/assets/images/compilations/previews/23.png"},theme24:{layout:"left",textColor:"white",coverUrl:"/assets/images/compilations/covers/24.jpg",previewUrl:"/assets/images/compilations/previews/24.png"},theme25:{layout:"center",textColor:"white",coverUrl:"/assets/images/compilations/covers/25.png",previewUrl:"/assets/images/compilations/previews/25.png"},theme26:{layout:"left",textColor:"black",coverUrl:"/assets/images/compilations/covers/26.png",previewUrl:"/assets/images/compilations/previews/26.png"},theme27:{layout:"left",textColor:"white",coverUrl:"/assets/images/compilations/covers/27.png",previewUrl:"/assets/images/compilations/previews/27.png"},theme28:{layout:"center",textColor:"white",coverUrl:"/assets/images/compilations/covers/28.png",previewUrl:"/assets/images/compilations/previews/28.png"},theme29:{layout:"left",textColor:"white",coverUrl:"/assets/images/compilations/covers/29.png",previewUrl:"/assets/images/compilations/previews/29.png"},theme30:{layout:"left",textColor:"black",coverUrl:"/assets/images/compilations/covers/30.png",previewUrl:"/assets/images/compilations/previews/30.png"},theme31:{layout:"center",textColor:"black",coverUrl:"/assets/images/compilations/covers/31.png",previewUrl:"/assets/images/compilations/previews/31.png"},theme32:{layout:"center",textColor:"white",coverUrl:"/assets/images/compilations/covers/32.png",previewUrl:"/assets/images/compilations/previews/32.png"},theme33:{layout:"center",textColor:"black",coverUrl:"/assets/images/compilations/covers/33.png",previewUrl:"/assets/images/compilations/previews/33.png"},theme34:{layout:"center",textColor:"black",coverUrl:"/assets/images/compilations/covers/34.jpg",previewUrl:"/assets/images/compilations/previews/34.png"},theme35:{layout:"left",textColor:"black",coverUrl:"/assets/images/compilations/covers/35.jpg",previewUrl:"/assets/images/compilations/previews/35.png"},theme36:{layout:"left",textColor:"white",coverUrl:"/assets/images/compilations/covers/36.jpg",previewUrl:"/assets/images/compilations/previews/36.png"},theme37:{layout:"bottom",textColor:"black",coverUrl:"/assets/images/compilations/covers/37.jpg",previewUrl:"/assets/images/compilations/previews/37.png"},theme38:{layout:"top",textColor:"white",coverUrl:"/assets/images/compilations/covers/38.jpg",previewUrl:"/assets/images/compilations/previews/38.png"},theme39:{layout:"center",textColor:"white",coverUrl:"/assets/images/compilations/covers/39.jpg",previewUrl:"/assets/images/compilations/previews/39.png"},theme40:{layout:"center",textColor:"white",coverUrl:"/assets/images/compilations/covers/40.jpg",previewUrl:"/assets/images/compilations/previews/40.png"}}},46844:function(e){"use strict";e.exports="https://fonts.bureau.ru/1.16"},5238:function(e,t,s){"use strict";const{parseDate:i}=s(38757),a=s(1886),o=s(40455),{FULL_MONTHS:n,WEEK_DAYS:r}=s(83429);e.exports={birmanize:o,format:(e,t={})=>{const s=new Date(e),i=s.getFullYear(),a=i===(new Date).getFullYear()?"":` ${i}`,o=n[s.getMonth()],l=s.getDate(),c=r[s.getDay()],d=0===s.getHours()?"00":s.getHours(),h=("0"+s.getMinutes()).slice(-2);switch(t.format){case"weekDayAndTime":return`${c} ${l} ${o}${a}, ${d}:${h} мск`;case"weekDayAndDate":return`${c} ${l} ${o}${a}`;default:return`${l} ${o}${a}`}},parseTillDateToUnixTime:(e,t={})=>{try{return i(e,t).value.getTime()/1e3+86399}catch{return NaN}},parseDate:i,shortenMonths:e=>e.replace("января","янв").replace("февраля","фев").replace("марта","мар").replace("апреля","апр").replace("августа","авг").replace("сентября","сен").replace("октября","окт").replace("ноября","ноя").replace("декабря","дек"),mergeDateWithTime:(e,t,s={})=>{const{useUtc:i=!0}=s,a=new Date(e),o=new Date(t);return Number.isNaN(a.getTime())||Number.isNaN(o.getTime())||(i?a.setUTCHours(o.getUTCHours(),o.getUTCMinutes(),o.getUTCSeconds(),o.getUTCMilliseconds()):a.setHours(o.getHours(),o.getMinutes(),o.getSeconds(),o.getMilliseconds())),a},parseDateToAdvanced:e=>new a(i(e).value),AdvancedDate:a}},38757:function(e){"use strict";const t=["Января","Февраля","Марта","Апреля","Мая","Июня","Июля","Августа","Сентября","Октября","Ноября","Декабря"],s=["Янв","Фев","Мар","Апр","Май","Июн","Июл","Авг","Сен","Окт","Ноя","Дек"],i=e=>e.map(e=>e.toLowerCase()),a=/^([0]?[1-9]|[12]\d|3[01])\.([0]?[1-9]|1[0-2])\.?(\d{4})?$/,o=new RegExp(`^([0]?[1-9]|[12]\\d|3[01])[ | ](${i([...t,...s]).join("|")})[ | ]?(\\d{4})?$`),n=(e,a,o)=>new Date((e=>e||(new Date).getFullYear())(o),(e=>Number.isNaN(Number(e))?(e=>Math.max(i(t).indexOf(e),i(s).indexOf(e)))(e):e)(a),e),r=(e,t,s)=>{const i=t.exec(e);return i?n(i[1],i[2],i[3]||(null==s?void 0:s.year)):e},l=e=>(t,s)=>"string"==typeof t?e(t,s):t,c=e=>{const t=r(e,a);return"string"==typeof t?t:(e=>{const t=e;return t.setMonth(t.getMonth()-1),t})(t)},d=(e,t)=>r(e,o,t);l(d)(l(c)),e.exports={lowerify:i,parseDate:(e,t={})=>{const s=((e,t)=>l(c)(l(d)(e,t)))(e.toLowerCase(),t);return{value:s,isValid:"string"!=typeof s}}}},38184:function(e,t,s){"use strict";const i=s(96194),a=e=>{let t=i(e);return Object.keys(t).reduce((e,s)=>{var i;return"object"!=typeof(i=t[s])||Array.isArray(i)||null===i?e[s]=t[s]:e[s]=a(t[s]),e},{})};e.exports=a},89322:function(e){"use strict";const t=/vimeo\.com\/(?:video\/)?([0-9]+)/i,s=/(?:youtube\.com)\/(?:embed|watch)(?:\/|\?v=)([a-zA-Z_0-9-]+)/i,i=/(?:youtu\.be)\/([a-zA-Z_0-9-]+)/i,a=/(start|t)(:|=)([0-9:]+)/,o=/end(:|=)([0-9:]+)/,n=/(video|clip)([-0-9]+_[-0-9]+)/i,r=/list=([a-zA-Z0-9-_]+)/,l=/kinescope\.io\/(?:embed\/)?([a-zA-Z0-9-]+)/i,c=/(?:zen\.yandex\.ru|dzen\.ru)\/video\/watch\/([a-zA-Z0-9]+)/i;e.exports={parseVimeoParams:e=>{if(!e)return null;const s=e.match(t);return s?{id:s[1],src:e}:null},parseYoutubeParams:e=>{if(!e)return null;let t=null;if(s.test(e)&&(t=e.match(s)[1]),!t&&i.test(e)&&(t=e.match(i)[1]),!t)return null;const n={id:t};return a.test(e)&&(n.start=e.match(a)[3]),o.test(e)&&(n.end=e.match(o)[2]),n},parseVkParams:e=>{if(!e)return null;const t=e.match(n);if(!t)return null;const s={id:t[2],src:e},i=e.match(r);return i&&(s.list=i[1]),s},parseKinescopeParams:e=>{if(!e)return null;const t=e.match(l);if(!t)return null;const s=t[1];return{id:s,src:`https://kinescope.io/${s}`}},parseZenParams:e=>{if(!e)return null;const t=e.match(c);return t?{id:t[1],src:e}:null}}},8818:function(e,t){"use strict";
2Object.defineProperty(t,"__esModule",{value:!0}),t.isOnSafari=t.isOnMobile=t.MIN_DESKTOP_WIDTH=void 0;const s=t.MIN_DESKTOP_WIDTH=961;t.isOnSafari=()=>{const e=navigator.userAgent.toLowerCase();return!(e.indexOf("chrome")>-1)&&-1!==e.indexOf("safari")},t.isOnMobile=()=>window.innerWidth<s},15011:function(e){"use strict";const t={"Сайт бюро":"bu","Главная страница сайта бюро":"bui","Страницы школы на сайте бюро":"busc","Почта":"m","Телеграм":"tg","Твиттер":"twi","Фейсбук":"fb","Инстаграм":"in","Ютуб":"yt","ТикТок":"tt","Вконтакте":"vk","Яндекс":"ya","Гугль":"g","glvrd.ru":"gl","maximilyahov.ru":"il","ilyabirman.ru":"bi","fff.works":"fw","sinelnikov.name":"sn","Яндекс.Практикум":"yp","Суперджоб":"sj","Палиндром":"pl"},s={"Совет":"s","Новость":"n","Рассылка":"ml","Напоминание":"nt","Вторсырьё":"r","Рекламный пост":"ad","Банер":"b","Рекомендация":"sg","Рекомендации":"sg","Партнёрский пост":"p","Превью":"prw","Апсел":"ups","Кроссел":"xs","Лидформа":"lf","Евангелист":"ev"},i={"Новости":"n","Проекты":"p","Книги":"b","Подарочные сертификаты":"bg","Школа":"sc","Курсы":"c","Лекции":"l","Советы":"s","Бюро":"bu","Телеграм-канал":"tg","Фейсбук-группа":"fb","Вконтакте-группа":"vk","Твиттер-канал":"tw","Ютуб-канал":"yt","Пиар":"pr","Мультипродукт":"multi"},a="CURRENT_DATE",o=e=>("0"+e).slice(-2),n=e=>e?(e=new Date(e),[o(e.getDate()),o(e.getMonth()+1),e.getFullYear().toString().slice(-2)].join("")):null,r=e=>e?e.split("-").join(""):e;e.exports={utmSource:({platform:e,postType:o,productType:l,product:c,id:d,postDate:h,linkNumber:u})=>[e=t[e]||e||"bu",o=s[o]||o,l=i[l]||l,r(c),d,h?n(h):a,u].filter(e=>e).join("-"),toDateParam:n,CURRENT_DATE_PLACEHOLDER:a,INDEX_PREVIEW_DEFAULTS:{platform:"Главная страница сайта бюро",postType:"Превью"}}},82147:function(e){"use strict";e.exports={default:"#E30016","book-typography":"#E30016","book-ui":"#FC5620","book-text":"#004F83","book-fff":"#007A78","book-kungfu":"#004F83","book-japanese":"#EF1C47","book-howtowritethat":"#004f83","book-metro":"#0522A5","book-carphoto":"#FF2800","bookshelf-levelone":"#FD7A82"}},69803:function(e){"use strict";e.exports=({productId:e,path:t="/details/"})=>{const s="undefined"==typeof process?void 0:process.env.HOST;return`${s?`https://${s}`:""}/api/system/products/${e}${t}`}},85844:function(e,t){"use strict";function s(e,t){let s=t.x-e.x,i=t.y-e.y;return Math.atan2(i,s)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,t.default=function(e,t=2.5){let i=function(e){let t=e.replace(/(\r?\n|\r|\t)+/g,"").replace(/\-/g," -").split(/[\s,]+/);t=function(e){for(let t=0;t<e.length;t+=1)""===e[t]&&e.splice(t,1);return e}(t);let s=[];for(let e=0;e<t.length;e+=2){let i=[Number(t[e]),Number(t[e+1])];s.push(i)}return s}(e),a=`M${i[0][0]},${i[0][1]}`;for(let e=1;e<i.length-1;e+=1){let o=e-1,n=e+1,r={};r.x=i[e][0],r.y=i[e][1];let l={};l.x=i[o][0],l.y=i[o][1];let c={};c.x=i[n][0],c.y=i[n][1];let d=s(r,l),h=s(r,c),u=(r.x+t*Math.cos(d)).toFixed(3),p=(r.y+t*Math.sin(d)).toFixed(3),m=(r.x+t*Math.cos(h)).toFixed(3),f=(r.y+t*Math.sin(h)).toFixed(3);a+=`L${u},${p} Q${r.x},${r.y} ${m},${f}`}return a+`L${i[i.length-1][0]},${i[i.length-1][1]}`}},65027:function(e){"use strict";const t=e=>e.toFixed(2).replace(".",",");e.exports={formatScore:t,formatMaxScore:e=>t(e).replace(/,00$/,"").replace(/,0$/,"")}},36468:function(e){"use strict";function t(e){return e.replace(/([a-zA-Z])(?=[A-Z])/g,"$1_").toLowerCase()}e.exports=function(e){return e?"string"==typeof e?t(e):Object.keys(e).reduce((s,i)=>(s[t(i)]=e[i],s),{}):e}},674:function(e){"use strict";const t={"Текст, редактура и информационный стиль":"Текст","Дизайн и право":"Право","Взаимоотношения с клиентом":"Переговоры","Управление проектом":"Управление","Типографика в вебе":"Вёрстка","Модульная вёрстка":"Вёрстка","Компоновка и стиль информационных сайтов":"Вёрстка","Навигация в общественных местах":"Навигация","Решение задач":"Дизайн продуктов","Дизайн продуктов":"Дизайн продуктов","Организация студии":"Организация","Веб-разработка":"Веб-разработка","Разработка веб-интерфейсов":"Веб-разработка","Логотипы и фирменные стили":"Фирстиль","Рекламная ретушь":"Графика","Технический дизайн и графика":"Графика","Шрифт в дизайне":"Шрифт","Визуализация данных":"Визуализация","Представление информации":"Визуализация","Интерфейс":"Интерфейс","Сайты":"Сайты","Вдохновение":"Вдохновение","Информатика":"Информатика","Презентация и публичные выступления":"Презентация","Презентация":"Презентация"},s={"Илья Бирман":"Интерфейс"};e.exports=class{constructor(e){this.soviet=e}get value(){return this._columnFromTags()||this._columnByAuthor()||"Дизайн"}_columnFromTags(){let e;
2return(this.soviet.concepts||this.soviet.tags||[]).forEach(s=>{const i=s.replace(/ /g," ");t[i]&&!e&&(e=t[i])}),e}_columnByAuthor(){let e=null;return Object.keys(s).forEach(t=>{this.soviet.author===t&&(e=s[t])}),e}}},47803:function(e,t,s){"use strict";const i=s(82131),a={0:["double","triple","triple-reversed","double-reversed"],1:["double","triple","triple-reversed","double-reversed"],2:["double","triple","triple-reversed","double-reversed"],3:["triple","triple-reversed","double-reversed","double"],4:["double-reversed","double","triple","triple-reversed"],5:["double","triple","triple-reversed","double-reversed"],6:["triple","triple-reversed","double-reversed","double"],7:["triple-reversed","double-reversed","double","triple"],8:["double","triple","triple-reversed","double-reversed"],9:["triple","triple-reversed","double-reversed","double"]},o=["double","double-reversed"],n={0:o,1:o,2:o,3:o,4:o,5:o,6:o,7:o,8:o,9:o};let r=/(bureau|artgorbunov)\.ru\/(bb\/)?soviet\/([\d\/]{6,10})\/?/gim;const l="Дизайн",c=(e=[],t={})=>{let s=[],i=[],o=0;const n=((e,{patternLibrary:t=a})=>t[e%10])(e.length,t);return((e=[])=>e.map(e=>((({coverUrl:e,coverSize:t})=>{if(/_cover\.(png|jpg|jpeg)$/.test(e))return!0;if(t&&t.every(e=>e)){const e=t[0]/t[1];return e>=.25&&e<=8}return!1})(e)||(e.coverUrl=null,e.coverSize=[]),e)))(e).forEach((t,a)=>{const r=n[o%n.length],l=/-reversed/i.test(r),c=Object.assign({},t,{isReversed:l}),d=a===e.length-1;i.push(c),/double/i.test(r)&&i.length<2&&!d||/triple/i.test(r)&&i.length<3&&!d||(s.push(i),o+=1,i=[])}),{rows:s}},d=(e,t)=>c(e.map(e=>e.asJson()),t).rows;e.exports={SOVIET_LINK:r,extractSovietKeys:e=>{r.lastIndex=0;let t=[],s=r.exec(e);for(;null!==s;){let i=s[3].replace(/\/$/,"");6===i.length&&(i=`20${i}`),t.push(i),s=r.exec(e)}return t},extractSovietKey:e=>{r.lastIndex=0;const t=r.exec(e);if(!t||!t.length)return;const s=t[3].replace(/\/$/,"");return 6===s.length?`20${s}`:s},collectRows:c,detectMainColumn:e=>{if(!e||!e.length)return l;const t=.5*e.length,s=e.reduce((e,t)=>(e[t.column]=e[t.column]||0,e[t.column]+=1,e),{});return Object.keys(s).find(e=>s[e]>t)||l},themify:e=>{const t=i[e.theme];return e.theme&&t?Object.assign({},t,e,{coverUrl:t.coverUrl}):Object.assign({},e,{customCoverUrl:e.coverUrl,customThemeLayout:e.layout,customThemeTextColor:e.textColor})},compileSoviets:d,compileSovietsInNarrowList:e=>d(e,{patternLibrary:n})}},33876:function(e){"use strict";e.exports={defaultKicker:e=>`Совет ${e}:\n%url`,isDefaultKicker:e=>/Совет А. Г.: *\n%url/.test(e)||/Совет [А-Я][а-я]+ [А-Я][а-я]+: *\n%url/.test(e)}},38309:function(e,t,s){"use strict";const i=s(22443);e.exports=e=>fetch("/mod/soviet_post/saveSoviet.php",{method:"POST",headers:{...i,Accept:"application/json"},body:e})},60261:function(e,t,s){"use strict";const i=s(87021),a=s(96194);e.exports=()=>fetch("/soviet/advices/counters",{headers:i}).then(e=>e.json()).then(a)},73345:function(e,t,s){"use strict";var i=s(86019);const a=s(48385),o=s(81233),n=s(84628),r=s(90086),{birmanize:l,shortenMonths:c}=s(5238),d=s(42404),h=s(35424),{findMatch:u,providers:p}=s(397),{buildAllowedDivAttrs:m}=s(26604),f=e=>{if(!e)return null;const t=u(e);return t?t.provider.render(t.params):null};let v=o.defaults;v.allowedAttributes.div=m(p),v.allowedAttributes.span=["class"],v.allowedAttributes.code=["class"],v.allowedAttributes.pre=["class"],v.allowedAttributes.ul=["class"],v.allowedAttributes.a=["href","name","target","class"],v.allowedTags.push("liftout","nohyphen");const g=["Январь","Февраль","Март","Апрель","Май","Июнь","Июль","Август","Сентябрь","Октябрь","Ноябрь","Декабрь"],b=["января","февраля","марта","апреля","мая","июня","июля","августа","сентября","октября","ноября","декабря"],_=e=>b[e.getMonth()],y=(e="")=>e.charAt(0).toUpperCase()+e.substring(1),S=(e,t={})=>e.getFullYear()===(new Date).getFullYear()||t.skipYear?`${e.getDate()} ${_(e)}`:`${e.getDate()} ${_(e)} ${e.getFullYear()}`,w=e=>(e=String(e).trim().replace(",",".").replace("−","-"),parseFloat(e,10)),C=e=>e.replace(/([A-Z])/g,e=>`_${e.toLowerCase()}`),k=e=>String(e).replace(/\B(?=(\d{3})+(?!\d))/g," "),T=Object.fromEntries(["fff","ui","wtf","html"].map(e=>[e,e.toUpperCase()])),N=e=>T[e.toLowerCase()]||e,$="https://t.me/",x=(e="")=>e.replace($,"").replace(/^@/,"");e.exports={serializeJS:a,pluralize:(e,t,s,i)=>{let a=e;return a=Math.abs(a),a%=100,a>=5&&a<=20?i:(a%=10,1===a?t:a>=2&&a<=4?s:i)},normalize:e=>e.replace(/ /g," "),capitalize:y,formatDateInterval:(e,t)=>e.getMonth()===t.getMonth()?`${e.getDate()}—${t.getDate()} ${_(e)}`:`${S(e,{skipYear:!0})} — ${S(t,{skipYear:!0})}`,formatNumber:(e,t={precision:2})=>{if(!["number","string"].includes(typeof e))return null;let s=w(e).toFixed(t.precision);return Number.isNaN(s)||"NaN"===s?e:(t.keepInsignificantZeroes||(s=parseFloat(s)),String(s).replace(".",",").replace("-","−"))},parseNumber:w,signNumber:e=>{const t=w(e);return t>=0?`+${t}`:e},wrapFractionalPart:e=>{if(!e)return e;const[t,s]=e.split(",");return s?`${t}<small>,${s}</small>`:e},monthName:e=>g[e-1],toSentence:e=>{if(e.length<=1)return e[0];const t=e.pop(),s=i.t("sentence.lastWordConnector");return`${e.join(", ")} ${s} ${t}`},formatDate:S,birmanize:l,formatText:e=>e?r.execute(n.render((e=>e.replace(/<\/(h1|h2|h3|h4|h5|h6|div|p)>\n([a-zа-я0-9])/gim,"</$1>\n\n$2"))(e))):"",typograf:e=>e?r.execute(e):"",sanitize:e=>o(e,v),wrapText:(e,t)=>
2{const s=e("<div>").append(e(t));return s.find("liftOut").each((t,s)=>{const i=e(s),a=i.html(),o=e(`<div class="sidenote is__marginal module"><div class="sidenote-text module"><div class="liftOut module is__lead"><p>${a}</p></div></div></div>`);i.parent().before(o)}),s.find("liftOut").each((t,s)=>{const i=e(s),a=i.parent();i.remove(),a.html().trim()||a.remove()}),s.find("p a").each((t,s)=>{const i=e(s),a=i.closest("p"),o=i.text(),n=f(o);n&&(a.before(e(n)),i.remove(),a.html().trim()||a.remove())}),s.find("p, blockquote").wrap('<div class="textNode" />'),s.find("ul, ol").wrap('<div class="textNode is__list" />'),s.find("li").filter((t,s)=>!e(s).children().is(".textNode")).each((t,s)=>{const i=e(s),a=e('<div class="textNode"><p></p></div>');a.find("p").append(i.contents()),i.append(a)}),s.find("h1").wrap('<div class="heading-1" />'),s.find("h2").wrap('<div class="heading-2" />'),s.find("h3").wrap('<div class="heading-3" />'),s.find("img").wrap(function(){return e(`<div class="is__img image media ${e(this).attr("class")}" />`)}),s.html()},extractVideoHtml:f,toSnakeCase:C,toKebabCase:e=>C(e).replace("_","-"),toInitials:(e="")=>e.split(/\s/).map(e=>e[0]||"").map(e=>e.toUpperCase()).join(""),truncate:(e,t={})=>{const s=t.limit||0,i=t.omission||"...";return!e||e.length<s?e:e.substring(0,s)+i},truncateLinks:e=>e.replace(/(https?:\/\/[^\s]+)/gi,e=>d(e)),transliterate:h,sovietCommentsCount:(e,t=0)=>e>
20&&!t?`<span class="sovietCommentsCount"> 🗩${e}</span>`:t>0&&!e?`<span class="sovietCommentsCount is__newCommentsOnly"> 🗩<span class="sovietCommentsCount-new">+${t}</span></span>`:t>0?`<span class="sovietCommentsCount"> 🗩${e} <span class="sovietCommentsCount-new">+${t}</span></span>`:null,extractExcerptFromPug:e=>String(e).split("\n").filter(e=>/^p /.test(e)).map(e=>e.replace(/^p /,"")).filter(e=>e.trim()).slice(0,2).join(" "),splitDigits:k,formatPrice:(e,{currency:t}={})=>{const s=e>=1e4?k(e):e;return String(t?`${s} ${t}`:s).replace(/^-/,"−")},addWeeksToDate:e=>{const t=new Date;return t.setDate(t.getDate()+7*e),l(t,{format:"fullMonthDateOnly"})},shortenMonths:c,mindAbbrs:N,camelizeDashed:e=>e.split("-").filter(Boolean).map((e,t)=>0===t?e:N(y(e))).join(""),joinWithAnd:e=>e.length<=1?e[0]:e.slice(0,-1).join(", ")+" и "+e[e.length-1],joinWithComma:e=>e.filter(e=>e&&e.trim()).join(", "),lowerCaseFirst:e=>e?e.slice(0,2)===e.slice(0,2).toUpperCase()?e:e.charAt(0).toLowerCase()+e.slice(1):e,withWbrs:e=>e.replace(/ /g," <wbr/>").replace(/ и <wbr\/>/g," и "),withoutTrailingDot:e=>null==e?void 0:e.replace(/\.$/,""),buildTelegramName:e=>e?`@${x(e)}`:e,buildTelegramUrl:e=>e?`${$}${x(e)}`:e}},35424:function(e){"use strict";const t={"а":"a","б":"b","в":"v","г":"g","д":"d","е":"e","ё":"e","ж":"zh","з":"z","и":"i","й":"y","к":"k","л":"l","м":"m","н":"n","о":"o","п":"p","р":"r","с":"s","т":"t","у":"u","ф":"f","х":"h","ц":"ts","ч":"ch","ш":"sh","щ":"sch","ы":"y","э":"e","ю":"yu","я":"ya","ь":"","ъ":""};e.exports=e=>{e=(e=e.toLowerCase()).replace(/\s/gi,"-").replace(/[^\wа-яё-]/gi,"").replace(/-{2,}/g,"-");let s="";for(let i=0;i<e.length;i+=1)e[i]in t?s+=t[e[i]]:s+=e[i];return s}},42404:function(e){"use strict";const t=e=>e.reduce((e,t)=>e+t.length,0);e.exports=e=>{if(e<=40)return e;const s=/(https?:\/\/[^\/]+)(\/.+)/i.exec(e);if(!s||!s.length)return e;const i=s[1],a=s[2];if(!a||a.length<=30)return e;const o=a.match(/[\W]+[\w]+/g)||[];let n="";return o.length>1?(o.reverse(),n=(e=>{let s=[];for(let i=0;i<e.length;i+=1){const a=e[i];if(t([...s,a])>30)break;s.push(a)}return s})(o).reverse().join("")):n=a.slice(-30),`${i}/…${n}`}},44386:function(e){"use strict";e.exports=e=>e&&e.trim().split(" ").length>=2},1886:function(e,t,s){"use strict";const i=s(40455),a=(e,t=2)=>{const s=String(e);return s.length>=t?s:`${"0".repeat(t-s.length)}${s}`},o=e=>{if(null===e||"boolean"==typeof e)return NaN;const t=Number(e);return t<0?Math.ceil(t):Math.floor(t)},n=(e,t)=>{const s=new Date(e.getTime()),i=o(t);return i&&s.setDate(s.getDate()+i),Number.isNaN(i)&&s.setTime(NaN),(e=>{const t=new Date(e.getTime());return t.setHours(0,0,0,0),t})(s)},r=(e,t)=>{const s=(t-e.getDay()+7)%7||7;return n(e,s)};class l{constructor(e){this.date=e}get value(){return this.date}get year(){return this.date.getFullYear()}get shortSlug(){return`${a(this.date.getDate())}${a(this.date.getMonth()+1)}${a(this.year%100)}`}get eventSlug(){return`${a(this.year,4)}-${a(this.date.getMonth()+1)}-${a(this.date.getDate())}`}get slug(){return`${a(this.year,4)}${a(this.date.getMonth()+1)}${a(this.date.getDate())}`}get isPast(){return Date.now()>=this.date}get isFuture(){return Date.now()<this.date}week(e){const t=n(this.date,7*o(e));return new l(t)}day(e){const t=n(this.date,e);return new l(t)}nextDay(){const e=n(this.date,1);return new l(e)}nextMonday(){const e=r(this.date,1);return new l(e)}prevMonday(){const e=1===this.date.getDay()?-7:-(this.date.getDay()+6)%7,t=n(this.date,e);return new l(t)}nextSunday(){const e=r(this.date,0);return new l(e)}toText(){return i(this.date,{format:"fullMonthDateYearOnly"})}toTextShort(){return i(this.date,{format:"fullMonthDateOnly"})}}e.exports=l},84628:function(e,t,s){"use strict";const i=s(42404),a=s(85233),o=s(50632)("commonmark",{html:!0,xhtmlOut:!1,linkify:!0,breaks:!0,highlight:function(e,t){return`<pre class="module media"><code class="hljs ${t||""}">${(t?a.highlightAuto(e,[t]).value:a.highlightAuto(e).value).trim()}</code></pre>`}});o.enable("linkify").disable("blockquote").disable("table");const n=o.renderer.rules.link_open||function(e,t,s,i,a){return a.renderToken(e,t,s)};o.renderer.rules.link_open=function(e,t,s,a,o){const r=(e[t].attrs.find(e=>"href"===e[0])||[])[1],l=(e[t+1]||{}).content;return r&&r===l&&!r.includes("youtu.be")&&(e[t+1].content=i(l)),n(e,t,s,a,o)},e.exports=o},40455:function(e,t,s){"use strict";var i=s(86019);const{BIRMAN_MONTHS:a,BIRMAN_IN_MONTHS:o,FULL_IN_MONTHS:n,FULL_MONTHS:r,SHORT_WEEK_DAYS:l,WEEK_DAYS:c}=s(83429);e.exports=(e,t={})=>{const s=new Date(e),d=s.getFullYear(),h=a[s.getMonth()],u=o[s.getMonth()],p=n[s.getMonth()],m=r[s.getMonth()],f=s.getDate(),v=l[s.getDay()],g=c[s.getDay()],b=[2,3].includes(s.getDay())?"Со":"С",_=("0"+s.getHours()).slice(-2),y=("0"+s.getMinutes()).slice(-2),S={year:d,month:
2h,inMonth:u,inFullMonth:p,fullMonth:m,day:f,weekDay:v,weekDayFull:g,hours:_,minutes:y},w=e=>i.t(`dateFormats.${e}`,S);switch(t.format){case"weekDay":return v;case"weekDayAndDate":return`${v} ${f} ${h}`;case"weekDayLowerCaseAndDate":return`${v.toLowerCase()} ${f} ${h}`;case"sinceWeekDayLowerCaseAndDate":return`${b} ${v.toLowerCase()} ${f} ${h}`;case"tillWeekDayLowerCaseAndDate":return`До ${v.toLowerCase()} ${f} ${h}`;case"tillCommaSeparatedDateAndWeekDayLowerCase":return`До ${f} ${h}, ${v.toLowerCase()}`;case"weekDaySmallcapsAndDate":return`<span class="smallcapitals">${v}</span> ${f} ${h}`;case"weekDaySmallcapsAndDateAndTime":return`<span class="smallcapitals">${v}</span> ${f} ${h} ${_}:${y} мск`;case"dateAndWeekDayLowerCaseWithComma":return`${f} ${h}, ${v.toLowerCase()}`;case"weekDayFullAndDate":return`${g} ${f} ${h}`;case"dateOnly":return w("dateOnly");case"dateYearOnly":return w("dateYearOnly");case"dateAndTime":return`${f} ${h} ${_}:${y} мск`;case"dateAndTimeNotCurrentYear":return(new Date).getFullYear()===d?`${f} ${h} ${_}:${y} мск`:`${f} ${h} ${d} ${_}:${y} мск`;case"fullMonthDateOnly":return`${f} ${m}`;case"fullMonthDateNotCurrentYear":return(new Date).getFullYear()===d?`${f} ${m}`:`${f} ${m} ${d}`;case"fullMonthDateYearOnly":return`${f} ${m} ${d}`;case"fullMonthDateAndTime":return`${f} ${m} ${_}:${y} мск`;case"fullMonthDateNotCurrentYearAndTime":return(new Date).getFullYear()===d?`${f} ${m} ${_}:${y} мск`:`${f} ${m} ${d} ${_}:${y} мск`;case"atTime":return`${f} ${h} в ${_}:${y}`;case"month":return h;case"fullMonth":return m;case"inMonth":return`в ${u}`;case"inFullMonthYear":return`в ${p} ${d}`;default:return`${f} ${h} ${_}:${y} мск`}}},83429:function(e,t,s){"use strict";var i=s(86019);e.exports=void 0!==i&&"en"===i.locale?{BIRMAN_MONTHS:["Jan","Feb","Mar","Apr","May","June","July","Aug","Sep","Oct","Nov","Dec"],BIRMAN_IN_MONTHS:["Jan","Feb","Mar","Apr","May","June","July","Aug","Sep","Oct","Nov","Dec"],FULL_MONTHS:["january","february","march","april","may","june","july","august","september","october","november","december"],FULL_IN_MONTHS:["january","february","march","april","may","june","july","august","september","october","november","december"],WEEK_DAYS:["sunday","monday","tuesday","wednesday","thursday","friday","saturday"],SHORT_WEEK_DAYS:["SU","MO","TU","WE","TH","FR","SA"]}:{BIRMAN_MONTHS:["янв","фев","мар","апр","мая","июня","июля","авг","сен","окт","ноя","дек"],BIRMAN_IN_MONTHS:["янв","фев","мар","апр","мае","июне","июле","авг","сен","окт","ноя","дек"],FULL_MONTHS:["января","февраля","марта","апреля","мая","июня","июля","августа","сентября","октября","ноября","декабря"],FULL_IN_MONTHS:["январе","феврале","марте","апреле","мае","июне","июле","августе","сентябре","октябре","ноябре","декабре"],WEEK_DAYS:["воскресенье","понедельник","вторник","среда","четверг","пятница","суббота"],SHORT_WEEK_DAYS:["ВС","ПН","ВТ","СР","ЧТ","ПТ","СБ"]}},85233:function(e,t,s){"use strict";const i=s(38416),a=s(98416);i.registerLanguage("javascript",a);const o=s(58612);i.registerLanguage("css",o);const n=s(11611);i.registerLanguage("scss",n);const r=s(54356);i.registerLanguage("erb",r);const l=s(61117);i.registerLanguage("python",l);const c=s(23111);i.registerLanguage("php",c);const d=s(95015);i.registerLanguage("ruby",d);const h=s(30621);i.registerLanguage("json",h);const u=s(60114);i.registerLanguage("xml",u);const p=s(63383);i.registerLanguage("http",p);const m=s(15645);i.configure({hideUpgradeWarningAcceptNoSupportOrSecurityUpdates:!0,ignoreUnescapedHTML:!0,throwUnescapedHTML:!1,tabReplace:"  ",languages:["javascript","css","scss","erb","php","python","ruby","json","xml","http"]}),i.addPlugin(m),e.exports=i},48385:function(){},73385:function(){}},s={};function i(e){var a=s[e];if(void 0!==a)return a.exports;var o=s[e]={id:e,loaded:!1,exports:{}};return t[e].call(o.exports,o,o.exports,i),o.loaded=!0,o.exports}i.m=t,e=[],i.O=function(t,s,a,o){if(!s){var n=1/0;for(d=0;d<e.length;d++){s=e[d][0],a=e[d][1],o=e[d][2];for(var r=!0,l=0;l<s.length;l++)(!1&o||n>=o)&&Object.keys(i.O).every(function(e){return i.O[e](s[l])})?s.splice(l--,1):(r=!1,o<n&&(n=o));if(r){e.splice(d--,1);var c=a();void 0!==c&&(t=c)}}return t}o=o||0;for(var d=e.length;d>0&&e[d-1][2]>o;d--)e[d]=e[d-1];e[d]=[s,a,o]}
2,i.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return i.d(t,{a:t}),t},i.d=function(e,t){for(var s in t)i.o(t,s)&&!i.o(e,s)&&Object.defineProperty(e,s,{enumerable:!0,get:t[s]})},i.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),i.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},i.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.nmd=function(e){return e.paths=[],e.children||(e.children=[]),e},function(){var e={792:0};i.O.j=function(t){return 0===e[t]};var t=function(t,s){var a,o,n=s[0],r=s[1],l=s[2],c=0;if(n.some(function(t){return 0!==e[t]})){for(a in r)i.o(r,a)&&(i.m[a]=r[a]);if(l)var d=l(i)}for(t&&t(s);c<n.length;c++)o=n[c],i.o(e,o)&&e[o]&&e[o][0](),e[o]=0;return i.O(d)},s=self.webpackChunkbureau_prototype=self.webpackChunkbureau_prototype||[];s.forEach(t.bind(null,0)),s.push=t.bind(null,s.push.bind(s))}(),i.O(void 0,[96],function(){return i(45109)});var a=i.O(void 0,[96],function(){return i(7124)});a=i.O(a)}();

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.