1 line
3.7 KiB
JavaScript
1 line
3.7 KiB
JavaScript
|
(window.webpackJsonp=window.webpackJsonp||[]).push([[6],{1:function(t,e,n){"use strict";n.r(e),n.d(e,"isRTL",(function(){return o})),n.d(e,"isMobile",(function(){return i})),n.d(e,"isDarkMode",(function(){return a})),n.d(e,"formatDate",(function(){return r})),n.d(e,"getParameterByName",(function(){return s}));var o=function(){var t=document.querySelector("html");return["ar","he","fa"].includes(t.getAttribute("lang"))},i=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"768px";return window.matchMedia("(max-width: ".concat(t,")")).matches},a=function(){var t=window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)");return t&&t.matches},r=function(t){return t?new Date(t).toLocaleDateString(document.documentElement.lang,{year:"numeric",month:"long",day:"numeric"}):""},s=function(t,e){e||(e=window.location.href),t=t.replace(/[\[\]]/g,"\\$&");var n=new RegExp("[?&]".concat(t,"(=([^&#]*)|&|#|$)")).exec(e);return n?n[2]?decodeURIComponent(n[2].replace(/\+/g," ")):"":null}},21:function(t,e,n){t.exports=n(22)},22:function(t,e,n){"use strict";n.r(e);var o=n(0),i=n.n(o),a=(n(6),n(14)),r=n(3),s=n(4),c=n.n(s),l=n(2),u=n(1),d=null,f=null,m=window.pageYOffset,w=0,h=0,p=0,g=!1;function b(){m=window.pageYOffset,y()}function v(t){Object(u.isMobile)("1023px")?(i()("body").addClass("share-menu-displayed"),setTimeout((function(){d.removeAttr("data-aos")}),t)):(Object(a.a)(".js-sticky",{stickyBitStickyOffset:100}),i()("body").removeClass("share-menu-displayed"))}function k(){x(),v(100),setTimeout((function(){O(),y()}),200)}function y(){g||requestAnimationFrame(j),g=!0}function j(){var t=h-w,e=Math.ceil(m/t*100);e<=100&&function(t){if(t<=100){var e=p-t/100*p;f[0].style.strokeDashoffset=e}}(e),g=!1}function x(){w=window.innerHeight,h=i()(document).height()}function O(){var t=f.parent().width(),e=t/2,n=Object(u.isMobile)()?2:3;f.parent().attr("viewBox","0 0 ".concat(t," ").concat(t)),f.attr("stroke-width",n),f.attr("r",e-(n-1)),f.attr("cx",e),f.attr("cy",e),p=2*e*Math.PI,f[0].style.strokeDasharray="".concat(p," ").concat(p),f[0].style.strokeDashoffset=p}function M(){f=i()(".js-progress"),x(),O(),j(),setTimeout((function(){f.parent().css("opacity",1)}),300)}i()(document).ready((function(){d=i()(".js-aos-wrapper");var t=i()(".js-scrolltop"),e=i()(".js-load-comments"),n=i()(".js-comments-iframe"),o=i()(".js-recommended-articles");c()(".js-post-content"),function(){for(var t=document.querySelectorAll(".kg-gallery-image img"),e=0,n=t.length;e<n;e++){var o=t[e].closest(".kg-gallery-image"),i=t[e].attributes.width.value/t[e].attributes.height.value;o.style.flex="".concat(i," 1 0%")}}(),v(1e3),o.length>0&&(o.on("init",(function(){M(),Object(l.a)(".js-article-card-title",100),Object(l.a)(".js-article-card-title-no-image",250)})),o.slick({arrows:!0,infinite:!0,prevArrow:'<button class="m-icon-button filled in-recommended-articles slick-prev" aria-label="Previous"><span class="icon-arrow-left"></span></button>',nextArrow:'<button class="m-icon-button filled in-recommended-articles slick-next" aria-label="Next"><span class="icon-arrow-right"></span></button>',mobileFirst:!0,responsive:[{breakpoint:720,settings:{slidesToShow:2}},{breakpoint:1023,settings:{arrows:!1,slidesToShow:3}}],rtl:Object(u.isRTL)()})),t.click((function(){i()("html, body").animate({scrollTop:0},500)})),e.click((function(){e.parent().hide(),n.fadeIn("slow")})),i()(".js-post-content").find("img").each((function(){i()(this).closest("figure").hasClass("kg-bookmark-card")||i()(this).addClass("js-zoomable");var t=i()(this).parent().find("figcaption");t?i()(this).attr("alt",t.text()):i()(this).attr("alt","")})),Object(r.a)(".js-zoomable"),window.addEventListener("scroll",b,{passive:!0}),window.addEventListener("resize",k,{passive:!0})})),i()(window).on("load",(function(){M()}))}},[[21,0,1]]]);
|