(()=>{var t={65:()=>{!function(t,e){"use strict";t.chap=t.chap||{},t.chap.hooks=t.chap.hooks||new function(){var t=Array.prototype.slice,e={removeFilter:function(t,i){return"string"==typeof t&&n("filters",t,i),e},applyFilters:function(){var i=t.call(arguments),n=i.shift();return"string"==typeof n?a("filters",n,i):e},addFilter:function(t,i,n,a){return"string"==typeof t&&"function"==typeof i&&o("filters",t,i,n=parseInt(n||10,10),a),e},removeAction:function(t,i){return"string"==typeof t&&n("actions",t,i),e},doAction:function(){var i=t.call(arguments),n=i.shift();return"string"==typeof n&&a("actions",n,i),e},addAction:function(t,i,n,a){return"string"==typeof t&&"function"==typeof i&&o("actions",t,i,n=parseInt(n||10,10),a),e}},i={actions:{},filters:{}};function n(t,e,n,o){var a,s,r;if(i[t][e])if(n)if(a=i[t][e],o)for(r=a.length;r--;)(s=a[r]).callback===n&&s.context===o&&a.splice(r,1);else for(r=a.length;r--;)a[r].callback===n&&a.splice(r,1);else i[t][e]=[]}function o(t,e,n,o,a){var s={callback:n,priority:o,context:a},r=i[t][e];r?(r.push(s),r=function(t){for(var e,i,n,o=1,a=t.length;oe.priority;)t[i]=t[i-1],--i;t[i]=e}return t}(r)):r=[s],i[t][e]=r}function a(t,e,n){chap.debug&&console.info("Chap -","Running "+t+":",e);var o,a,s=i[t][e];if(!s)return"filters"===t&&n[0];if(a=s.length,"filters"===t)for(o=0;o{window.chap=window.chap||{},function(t){"use strict";chap.init_sidebar_menu=function(){if(t.fn.sidebar&&t(".toc.item").length&&t("#sidebar_menu").length)if(t("#sidebar_menu[data-chap-deferred]").length)t(".toc.item").on("click",(function(){return t.ajax({url:CHAP_REST+"menu/sidebar"}).done((function(e){t("#sidebar_menu[data-chap-deferred]").replaceWith(e.value),t(".toc.item").off("click"),chap.init_sidebar_menu(),t(".toc.item").trigger("click"),chap.hooks.doAction("chap_sidebar_menu_loaded")})).fail((function(t){console.error(t)})),!1}));else{var e=function(e){"Escape"===e.key&&t("#sidebar_menu").sidebar("hide")},i=chap.hooks.applyFilters("sidebar_menu_conf",{onVisible:function(){t("body").addClass("overflow-hidden")},onShow:function(){t("body").addClass("overflow-hidden"),t(document).on("keyup",e),t("#sidebar_menu").find(".item:first").trigger("focus")},onHide:function(){t(document).off("keyup",e),t("body").removeClass("overflow-hidden")}}),n=t("#wpadminbar");n.length>0&&(i.onVisible=function(){t("#sidebar_menu").css("padding-top",n.height())}),t(".toc.item").on("keypress",(function(e){"Enter"!==e.key&&"Space"!==e.key||(t("#sidebar_menu").sidebar("show"),e.preventDefault())})),t("#sidebar_menu .ui.accordion.item").length&&(t("#sidebar_menu .ui.accordion.item").accordion({exclusive:!1}),t("#sidebar_menu .active.item").each((function(){t(this).parents(".content.menu").each((function(){t(this).addClass("active"),t(this).prev(".ui.title").addClass("active")})),t(this).parent().is(".ui.title")&&t(this).parent().addClass("active").next(".content").addClass("active")})),t("#sidebar_menu .ui.accordion.item .ui.title > a").on("click",(function(e){if("#"!==t(e.target).attr("href"))return window.location=e.target.href,!1}))),t("#sidebar_menu").sidebar(i).sidebar("attach events",".toc.item"),t('#sidebar_menu > [role="menu"] > .close').on("click",(function(e){return e.preventDefault(),t("#sidebar_menu").sidebar("hide"),!1}))}},chap.init_sticky_menu=function(){if(t.fn.visibility&&t("#sticky_menu").length){var e=function(){var e=t("#wpadminbar");e.length>0&&"absolute"!==e.css("position")?t("#sticky_menu").css("margin-top",e.height()):t("#sticky_menu").css("margin-top",0),t("#sticky_menu").transition("fade in")},i=!1,n=chap.hooks.applyFilters("sticky_menu_trigger_selector",".ui.masthead");t(n).visibility({once:!1,onBottomPassed:function(){t("#sticky_menu[data-chap-deferred]").length?i||(i=!0,t.ajax({url:CHAP_REST+"menu/sticky"}).done((function(i){return t("#sticky_menu[data-chap-deferred]").replaceWith(i.value),chap.init_dropdowns(),t("#sidebar_menu[data-chap-deferred]").length?(t(".toc.item").off("click"),chap.init_sidebar_menu()):t("#sidebar_menu").sidebar("attach events","#sticky_menu .toc.item"),window.scrollY>t(n).offset().top+t(n).height()&&e(),chap.hooks.doAction("chap_sticky_menu_loaded"),!1})).fail((function(t){console.error(t)}))):e()},onBottomPassedReverse:function(){t("#sticky_menu").transition("fade out")}})}};var e=function(){chap_options.get.morph_enabled&&chap.main_menu_morph&&chap.main_menu_morph.hide_popup(),chap_options.get.menu_exclusive&&(t.fn.dropdown&&t(".chap-menu.menu .ui.dropdown").dropdown("hide"),t.fn.popup&&t(".chap-menu.menu .browse").popup("hide"))};chap.init_dropdowns=function(){t.fn.dropdown?t(".chap-menu.menu .ui.dropdown:not(.browse)").dropdown({action:"select",on:chap_options.get.menu_trigger,transition:chap_options.get.menu_transition,duration:chap_options.get.menu_animation_duration,delay:{show:chap_options.get.menu_show_delay,hide:chap_options.get.menu_hide_delay},className:{active:chap_options.get.menu_item_hover_active?"active":"_active"},onShow:function(){e(),t(this).attr("aria-expanded",!0)},onHide:function(){t(this).attr("aria-expanded",!1)}}):t(".ui.dropdown").addClass("simple")},chap.init_popups=function(){if(t.fn.popup){var i=chap_options.get.menu_transition;"slide"===i&&(i="fade"),t(".chap-menu.menu .browse > a").on("click",(function(t){"click"===chap_options.get.menu_trigger?t.preventDefault():!chap_options.get.morph_enabled&&t.target.href&&(window.location=t.target.href)})),t(".menu_popup").attr("tabindex","-1");var n=chap_options.get.morph_enabled?"tab":chap_options.get.menu_trigger;chap.sui_popup=t(".chap-menu.menu .browse").popup({popup:".menu_popup",on:n,hoverable:"hover"===chap_options.get.menu_trigger,inline:!1,position:"bottom left",lastResort:"bottom center",transition:i,duration:chap_options.get.menu_animation_duration,delay:{show:chap_options.get.menu_show_delay,hide:chap_options.get.menu_hide_delay},preserve:!0,onShow:function(i){e(),chap_options.get.menu_item_hover_active&&t(i).addClass("active"),chap.sui_popup_open=!0,t(i).attr("aria-expanded",!0)},onHide:function(e){chap_options.get.menu_item_hover_active&&t(e).removeClass("active"),chap.sui_popup_open=!1,t(e).attr("aria-expanded",!1)}}),t(".chap-menu.menu .browse").on("focus",(function(){t(this).popup("show")})),document.body.onkeydown=function(e){if(chap.sui_popup_open){if("ArrowDown"===e.key){var i=t(".menu_popup.visible");i.length&&(i.trigger("focus"),e.preventDefault())}"Tab"===e.key&&(t(document.activeElement).is(".menu_popup.visible .item:last")&&(t(".menu_popup.visible .item:first").trigger("focus"),e.preventDefault()),t(document.activeElement).is(".chap-menu.menu .visible.browse")&&t(".chap-menu.menu .visible.browse").popup("hide")),"Escape"!==e.key&&"ArrowUp"!==e.key||(t(".chap-menu.menu .visible.browse > .item").trigger("focus"),t(".chap-menu.menu .visible.browse").popup("hide"),e.preventDefault())}}}},chap.init_messages=function(){t.fn.transition&&t(".message .close.icon").on("click",(function(){t(this).closest(".message").transition("fade")}))},chap.country_select=function(e,i){if(e.length&&t.fn.dropdown){e.find("option").each((function(){if(!t(this).find(".flag").length){var e=t(this).val().toLowerCase(),i=t(this).html();t(this).attr("data-value",e),t(this).html(''+i)}}));var n=t(e).dropdown({forceSelection:!1});"function"==typeof i&&i(n)}},chap.fix_admin_bar_mobile=function(){var e=t("#wpadminbar");e.length&&("absolute"===e.css("position")?e.css("margin-top","-"+e.height()+"px"):e.css("margin-top",""))},chap.init_checkboxes=function(){t.fn.checkbox&&t(".ui.checkbox").checkbox()},chap.init_tablesort=function(){t.fn.tablesort&&t("table.sortable").tablesort()},chap.handle_wprm=function(){t(".ui.recipe.steps .link.step").on("click",(function(e){t(e.target).hasClass("image")||t(e.target).is("img")||t(this).toggleClass("completed").toggleClass("active")})),t(".comment-form-wprm-rating").addClass("field")},chap.init_attachments=function(){t(".ui.attachment.zoom.button").on("click",(function(){return t(this).parents(".ui.bottom.attached.segment").prev().find(".ui.zoomable.image").trigger("show-viewer"),!1})),t.fn.embed&&(t(".ui.attachment.embed:not(.scrolling)").embed(),t(".ui.scrolling.attachment.embed").embed({templates:Object.assign({},t.fn.embed.settings.templates,{iframe:function(t,e){var i=t;return e&&(i+="?"+e),''}})}))}}(jQuery)},969:()=>{var t;t=jQuery,chap.Morph=function(t){this.conf=Object.assign({menu:"",anchor:"",items:"",body:"body",active_class:"active",trigger:"hover",gap:0,transition_duration:250,hide_delay:100,pointing:!0},t),chap.hooks.addAction("chap_init",this.init.bind(this),35)},chap.Morph.prototype.init=function(){this.body=t(this.conf.body),this.menu=t(this.conf.menu),this.menu_top="0px",this.anchor=this.conf.anchor,this.items=this.menu.find(this.conf.items),this.gap=parseInt(this.conf.gap),this.hide_delay=parseInt(this.conf.hide_delay),this.transition_duration=parseInt(this.conf.transition_duration),this.rtl_flip="rtl"===t("html").attr("dir")?-1:1,this.setup_elements(),this.setup_events(),chap.hooks.addAction("chap_resize",this.setup_items.bind(this),25)},chap.Morph.prototype.setup_elements=function(){var e=t("#wpadminbar").length?t("#wpadminbar").height():0;this.menu_top=Math.round(this.menu.offset().top-e+this.menu.innerHeight()+this.gap)+"px",this.menu.addClass("chap-morph-no-transition"),this.root=t('
').insertAfter(this.menu),this.root.css("transition-duration",this.transition_duration+"ms"),this.popup=t('').appendTo(this.root),this.popup.css({"transition-duration":this.transition_duration+"ms"}),this.conf.pointing&&(this.popup.append('
'),this.popup_arrow=this.popup.find(".chap-morph-arrow"),this.popup_arrow.css({"transition-duration":this.transition_duration+"ms"})),this.popup.append('
'),this.popup.find(".chap-morph-gap-filler").css({width:"100%",height:this.gap+"px","margin-top":"-"+this.gap+"px"}),this.popup.append('
'),this.popup_container=this.popup.find(".chap-morph-container"),this.setup_items()},chap.Morph.prototype.position_root=function(){this.root.css({width:Math.round(this.body.width())+"px",top:Math.round(this.menu.get(0).offsetTop+this.menu.height()+this.gap)+"px",left:Math.round(-1*(this.menu.offset().left-this.menu.get(0).offsetLeft))+"px"})},chap.Morph.prototype.setup_items=function(){var e=this;this.hide_popup(),this.popup_container.html(""),this.position_root(),this.items.each((function(i){var n=t(this).attr("data-chap-morph"),o=t("#"+n),a=o.hasClass("paddingless"),s=o.hasClass("inverted"),r=o.children().clone(!0,!0),c=Math.floor(o.outerWidth(!0)),p=Math.floor(o.outerHeight(!0));t(this).attr("data-chap-morph-index",i);var h=t('
');h.append(r);var d=t('
');if(d.attr("data-chap-morph-index",i),d.attr("data-chap-popup-paddingless",a),d.attr("data-chap-popup-inverted",s),d.css({"transition-duration":e.transition_duration+"ms"}),d.append(h),e.popup_container.append(d),d.find(".csc-swiper-container").length&&window.ChapSwiper&&window.csc_swipers){var l=d.find(".csc-swiper-container"),u=l.attr("id");l.attr("id",u+"-clone"),new window.ChapSwiper(l,csc_swipers[u].params)}}))},chap.Morph.prototype.setup_events=function(){var e=this;if(this.active=!1,"hover"===this.conf.trigger){this.items.on("mouseenter touchstart",(function(){e.clear_hide_timeout(),e.show_popup(t(this))})),this.items.on("mouseleave",(function(){e.start_hide_timeout()})),this.popup.on("mouseenter",(function(){e.clear_hide_timeout()})),this.popup.on("mouseleave",(function(){e.start_hide_timeout()})),this.items.find("a").on("click",(function(t){if(!chap.user_can_touch)return t.stopPropagation(),!0;t.preventDefault()}));var i=null,n=null;this.items.on("touchstart",(function(e){var o=t(this),a=t(this).attr("data-chap-morph-index");if(null==i)i=setTimeout((function(){i=null}),500);else if(clearTimeout(i),i=null,a&&a===n){var s=o.find("a").attr("href");s&&"#"!==s&&(window.location=s)}n=a}))}else this.items.on("click",(function(){e.clear_hide_timeout(),e.show_popup(t(this))}));this.body.on("click",(function(i){var n=t(i.target),o=n.closest(".chap-morph").length>0,a=n.closest(".browse.item").length>0;o||a?e.clear_hide_timeout():e.start_hide_timeout()}))},chap.Morph.prototype.start_hide_timeout=function(){var t=this;this.hide_timeout=setTimeout((function(){t.hide_popup()}),this.hide_delay)},chap.Morph.prototype.clear_hide_timeout=function(){clearTimeout(this.hide_timeout)},chap.Morph.prototype.show_popup=function(e){clearTimeout(this.remove_transitions_timeout),chap.sui_popup&&chap.sui_popup.popup("hide"),this.items.removeClass(this.conf.active_class),e.addClass(this.conf.active_class);var i=e.attr("data-chap-morph-index"),n=t('.chap-morph-wrapper[data-chap-morph-index="'+i+'"]'),o=n.find(".chap-morph-content");"true"===n.attr("data-chap-popup-paddingless")?this.popup.addClass("paddingless"):this.popup.removeClass("paddingless"),"true"===n.attr("data-chap-popup-inverted")?this.popup.addClass("inverted"):this.popup.removeClass("inverted");var a=parseInt(o.css("width").replace("px","")),s=parseInt(o.css("height").replace("px","")),r=e.offset().top+e.innerHeight()-this.menu.outerHeight()-this.menu.offset().top;Math.abs(r)<10&&(r=0);var c=this.body.innerWidth(),p=Math.round(e.offset().left+e.innerWidth()/2),h=p,d=Math.round(a/2),l=0;if(hc){for(;h+d>c;)h--;l=-10}var u=h-d+l;this.popup_container.find(".chap-morph-wrapper").removeClass("left").removeClass("right").removeClass("active"),n.addClass("active"),this.popup_container.find(".active.chap-morph-wrapper").prevAll().addClass("left").end().nextAll().addClass("right"),this.update_popup(n,a,s,r,u,p),this.root.css("transform-origin",p+"px -50px"),this.menu.addClass("chap-morph-active"),setTimeout(function(){this.menu.removeClass("chap-morph-no-transition")}.bind(this),50)},chap.Morph.prototype.update_popup=function(t,e,i,n,o,a){this.popup.css({transform:"translate3d("+Math.round(o)+"px, "+Math.round(n)+"px, 0)",width:e+"px",height:i+"px"}),this.conf.pointing&&this.popup_arrow.css({transform:"translateX("+Math.round(a-o-2)*this.rtl_flip+"px) rotate(45deg)"})},chap.Morph.prototype.hide_popup=function(){this.menu.removeClass("chap-morph-active"),this.items.removeClass(this.conf.active_class),this.remove_transitions_timeout=setTimeout(function(){this.menu.addClass("chap-morph-no-transition")}.bind(this),250)}},641:()=>{"function"!=typeof Object.assign&&(Object.assign=function(t,e){"use strict";if(null==t)throw new TypeError("Cannot convert undefined or null to object");for(var i=Object(t),n=1;n{if("undefined"==typeof chap)throw new Error("No Chap JavaScript variable defined. Try disabling any plugins that may modify the script execution order.");chap.hooks.addAction("chap_init",chap.init_dropdowns,20),chap.hooks.addAction("chap_init",chap.init_popups,25),chap.hooks.addAction("chap_init",chap.init_sidebar_menu,40),chap.hooks.addAction("chap_init",chap.init_sticky_menu,50),chap.hooks.addAction("chap_init",chap.init_checkboxes,100),chap.hooks.addAction("chap_init",chap.init_tablesort,110),chap.hooks.addAction("chap_init",chap.init_messages,120),chap.hooks.addAction("chap_init",chap.handle_wprm,150),chap.hooks.addAction("chap_init",chap.init_attachments,160),chap.hooks.addAction("chap_resize_fast",chap.fix_admin_bar_mobile,10),function(t){"use strict";var e={common:{finalize:function(){var e,i;window.addEventListener("touchstart",(function t(){chap.user_can_touch=!0,window.removeEventListener("touchstart",t,!1)}),!1),t((function(){var t=new CustomEvent("chap_ready");document.dispatchEvent(t),chap.hooks.doAction("chap_init")})),window.addEventListener("resize",(function(){chap.hooks.doAction("chap_resize_instant"),clearTimeout(i),i=setTimeout((function(){chap.hooks.doAction("chap_resize_fast")}),100),clearTimeout(e),e=setTimeout((function(){chap.hooks.doAction("chap_resize")}),500)}))}}},i={fire:function(t,i,n){var o=e;i=void 0===i?"init":i,""!==t&&o[t]&&"function"==typeof o[t][i]&&o[t][i](n)},loadEvents:function(){i.fire("common"),t.each(document.body.className.replace(/-/g,"_").split(/\s+/),(function(t,e){i.fire(e),i.fire(e,"finalize")})),i.fire("common","finalize")}};t(i.loadEvents)}(jQuery)},343:()=>{var t;(t=window).Bideo=function(){this.opt=null,this.videoEl=null,this.approxLoadingRate=null,this._resize=null,this._progress=null,this.startTime=null,this.onLoadCalled=!1,this.init=function(e){this.opt=e=e||{};var i=this;i._resize=i.resize.bind(this),i.videoEl=e.videoEl,i.videoEl.addEventListener("loadedmetadata",i._resize,!1),i.videoEl.addEventListener("canplay",(function(){i.opt.isMobile||(i.opt.onLoad&&i.opt.onLoad(),!1!==i.opt.autoplay&&i.videoEl.play())})),i.opt.resize&&t.addEventListener("resize",i._resize,!1),this.startTime=(new Date).getTime(),this.opt.src.forEach((function(t,e,n){var o,a,s=document.createElement("source");for(o in t)t.hasOwnProperty(o)&&(a=t[o],s.setAttribute(o,a));i.videoEl.appendChild(s)})),i.opt.isMobile&&i.opt.playButton&&(i.opt.videoEl.addEventListener("timeupdate",(function(){i.onLoadCalled||(i.opt.onLoad&&i.opt.onLoad(),i.onLoadCalled=!0)})),i.opt.playButton.addEventListener("click",(function(){i.opt.pauseButton.style.display="inline-block",this.style.display="none",i.videoEl.play()}),!1),i.opt.pauseButton.addEventListener("click",(function(){this.style.display="none",i.opt.playButton.style.display="inline-block",i.videoEl.pause()}),!1))},this.resize=function(){if(!("object-fit"in document.body.style)){var e=this.videoEl.videoWidth,i=this.videoEl.videoHeight,n=(e/i).toFixed(2),o=this.opt.container,a=t.getComputedStyle(o),s=parseInt(a.getPropertyValue("width")),r=parseInt(a.getPropertyValue("height"));if("border-box"!==a.getPropertyValue("box-sizing")){var c=a.getPropertyValue("padding-top"),p=a.getPropertyValue("padding-bottom"),h=a.getPropertyValue("padding-left"),d=a.getPropertyValue("padding-right");c=parseInt(c),p=parseInt(p),s+=(h=parseInt(h))+(d=parseInt(d)),r+=c+p}if(s/e>r/i)var l=s,u=Math.ceil(l/n);else u=r,l=Math.ceil(u*n);this.videoEl.style.width=l+"px",this.videoEl.style.height=u+"px"}}}},860:()=>{var t;(t=window.Zepto||window.jQuery).tablesort=function(e,i){var n=this;this.$table=e,this.$thead=this.$table.find("thead"),this.settings=t.extend({},t.tablesort.defaults,i),this.$sortCells=this.$thead.length>0?this.$thead.find("th:not(.no-sort)"):this.$table.find("th:not(.no-sort)"),this.$sortCells.on("click.tablesort",(function(){n.sort(t(this))})),this.index=null,this.$th=null,this.direction=null},t.tablesort.prototype={sort:function(e,i){var n=new Date,o=this,a=this.$table,s=a.find("tbody").length>0?a.find("tbody"):a,r=s.find("tr").has("td, th"),c=r.find(":nth-child("+(e.index()+1)+")").filter("td, th"),p=e.data().sortBy,h=[],d=c.map((function(i,n){return p?"function"==typeof p?p(t(e),t(n),o):p:null!=t(this).data().sortValue?t(this).data().sortValue:t(this).text()}));0!==d.length&&(this.index!==e.index()?(this.direction="asc",this.index=e.index()):this.direction="asc"!==i&&"desc"!==i?"asc"===this.direction?"desc":"asc":i,i="asc"==this.direction?1:-1,o.$table.trigger("tablesort:start",[o]),o.log("Sorting by "+this.index+" "+this.direction),o.$table.css("display"),setTimeout((function(){o.$sortCells.removeClass(o.settings.asc+" "+o.settings.desc);for(var a=0,p=d.length;a2e3?200:10))},log:function(e){(t.tablesort.DEBUG||this.settings.debug)&&console&&console.log&&console.log("[tablesort] "+e)},destroy:function(){return this.$sortCells.off("click.tablesort"),this.$table.data("tablesort",null),null}},t.tablesort.DEBUG=!1,t.tablesort.defaults={debug:t.tablesort.DEBUG,asc:"sorted ascending",desc:"sorted descending",compare:function(t,e){return t>e?1:t{var e=t&&t.__esModule?()=>t.default:()=>t;return i.d(e,{a:e}),e},i.d=(t,e)=>{for(var n in e)i.o(e,n)&&!i.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},i.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),(()=>{"use strict";const t=window.jQuery;var e=i.n(t),n=function(){function t(e,i){void 0===i&&(i=t.options);var n=this;for(var o in this.container=e,this.options=i||{},this.watchTimeout=null,this.watchInterval=null,this.resizeEvent=null,t.options)t.options.hasOwnProperty(o)&&void 0===this.options[o]&&(this.options[o]=t.options[o]);var a=this.container.dotdotdot;a&&a.destroy(),this.API={},["truncate","restore","destroy","watch","unwatch"].forEach((function(t){n.API[t]=function(){return n[t].call(n)}})),this.container.dotdotdot=this.API,this.originalStyle=this.container.getAttribute("style")||"",this.originalContent=this._getOriginalContent(),this.ellipsis=document.createTextNode(this.options.ellipsis);var s=window.getComputedStyle(this.container);"break-word"!==s["word-wrap"]&&(this.container.style["word-wrap"]="break-word"),"pre"===s["white-space"]?this.container.style["white-space"]="pre-wrap":"nowrap"===s["white-space"]&&(this.container.style["white-space"]="normal"),null===this.options.height&&(this.options.height=this._getMaxHeight()),this.truncate(),this.options.watch&&this.watch()}return t.prototype.restore=function(){var t=this;this.unwatch(),this.container.setAttribute("style",this.originalStyle),this.container.classList.remove("ddd-truncated"),this.container.innerHTML="",this.originalContent.forEach((function(e){t.container.append(e)}))},t.prototype.destroy=function(){this.restore(),this.container.dotdotdot=null},t.prototype.watch=function(){var t=this;this.unwatch();var e={width:null,height:null},i=function(i,n,o){if(t.container.offsetWidth||t.container.offsetHeight||t.container.getClientRects().length){var a={width:i[n],height:i[o]};return e.width==a.width&&e.height==a.height||t.truncate(),a}return e};"window"===this.options.watch?(this.resizeEvent=function(n){t.watchTimeout&&clearTimeout(t.watchTimeout),t.watchTimeout=setTimeout((function(){e=i(window,"innerWidth","innerHeight")}),100)},window.addEventListener("resize",this.resizeEvent)):this.watchInterval=setInterval((function(){e=i(t.container,"clientWidth","clientHeight")}),1e3)},t.prototype.unwatch=function(){this.resizeEvent&&(window.removeEventListener("resize",this.resizeEvent),this.resizeEvent=null),this.watchInterval&&clearInterval(this.watchInterval),this.watchTimeout&&clearTimeout(this.watchTimeout)},t.prototype.truncate=function(){var t=this,e=!1;return this.container.innerHTML="",this.originalContent.forEach((function(e){t.container.append(e.cloneNode(!0))})),this.maxHeight=this._getMaxHeight(),this._fits()||(e=!0,this._truncateToNode(this.container)),this.container.classList[e?"add":"remove"]("ddd-truncated"),this.options.callback.call(this.container,e),e},t.prototype._truncateToNode=function(e){var i=[],n=[];if(t.$.contents(e).forEach((function(t){if(1!=t.nodeType||!t.matches(".ddd-keep")){var e=document.createComment("");t.replaceWith(e),n.push(t),i.push(e)}})),n.length){for(var o=0;o1)return void n[o-2].remove();break}}for(var r=o;r=0;o--)if(t.textContent=this._addEllipsis(n.slice(0,o).join(i)),this._fits()){"letter"==this.options.truncate&&(t.textContent=n.slice(0,o+1).join(i),this._truncateToLetter(t));break}},t.prototype._truncateToLetter=function(t){for(var e=t.textContent.split(""),i="",n=e.length;n>=0&&(!(i=e.slice(0,n).join("")).length||(t.textContent=this._addEllipsis(i),!this._fits()));n--);},t.prototype._fits=function(){return this.container.scrollHeight<=this.maxHeight+this.options.tolerance},t.prototype._addEllipsis=function(t){for(var e=[" "," ",",",";",".","!","?"];e.indexOf(t.slice(-1))>-1;)t=t.slice(0,-1);return t+this.ellipsis.textContent},t.prototype._getOriginalContent=function(){var e="script, style";this.options.keep&&(e+=", "+this.options.keep),t.$.find(e,this.container).forEach((function(t){t.classList.add("ddd-keep")}));var i="div, section, article, header, footer, p, h1, h2, h3, h4, h5, h6, table, td, td, dt, dd, li";[this.container].concat(t.$.find("*",this.container)).forEach((function(e){e.normalize(),t.$.contents(e).forEach((function(t){8==t.nodeType&&e.removeChild(t)})),t.$.contents(e).forEach((function(t){if(3==t.nodeType&&""==t.textContent.trim()){var n=t.previousSibling,o=t.nextSibling;(t.parentElement.matches("table, thead, tbody, tfoot, tr, dl, ul, ol, video")||!n||1==n.nodeType&&n.matches(i)||!o||1==o.nodeType&&o.matches(i))&&e.removeChild(t)}}))}));var n=[];return t.$.contents(this.container).forEach((function(t){n.push(t.cloneNode(!0))})),n},t.prototype._getMaxHeight=function(){if("number"==typeof this.options.height)return this.options.height;for(var t=window.getComputedStyle(this.container),e=["maxHeight","height"],i=0,n=0;n{const t=document.querySelectorAll("[data-lazy-bg]");if(t.length>0){const e=new IntersectionObserver((t=>{t.forEach((t=>{if(t.isIntersecting){const i=t.target;i.style.backgroundImage=`url(${i.getAttribute("data-lazy-bg")})`,i.removeAttribute("data-lazy-bg"),e.unobserve(i)}}))}));t.forEach((t=>e.observe(t)))}Array.from(document.querySelectorAll(".dot-ellipsis")).forEach((t=>{new o(t,{callback:t=>{if(t){var i=e()(void 0).html();if(i.includes(find)){var n=i.replace("

","…

");e()(void 0).html(n)}}},ellipsis:"…",height:null,keep:null,tolerance:0,truncate:"word",watch:"window"})}))}))})()})();