1(self.webpackChunk_sv_portlet=self.webpackChunk_sv_portlet||[]).push([[9344],{2476:()=>{sv.i18n.portlet=sv.i18n.portlet||{},sv.i18n.portlet.archive=sv.i18n.portlet.archive||{},sv.i18n.portlet.archive.archive=sv.i18n.portlet.archive.archive||{},sv.i18n.portlet.archive.archive.de={creatingArticle:"Artikel wird erstellt..."},sv.i18n.portlet.archive.archive.en={creatingArticle:"Creating article..."},sv.i18n.portlet.archive.archive.es={creatingArticle:"Creando artÃculo..."},sv.i18n.portlet.archive.archive.fi={creatingArticle:"Luo artikkelia..."},sv.i18n.portlet.archive.archive.fr={creatingArticle:"Créer des articles..."},sv.i18n.portlet.archive.archive.no={creatingArticle:"Oppretter artikkel ..."},sv.i18n.portlet.archive.archive.sv={creatingArticle:"Skapar artikel..."}},3237:(t,e,i)=>{"use strict";i.r(e);i(5132),i(2476),i(4967)},4967:()=>{sv.i18n.portlet=sv.i18n.portlet||{},sv.i18n.portlet.blog=sv.i18n.portlet.blog||{},sv.i18n.portlet.blog.blog=sv.i18n.portlet.blog.blog||{},sv.i18n.portlet.blog.blog.de={creatingBlogEntry:"Blogbeitrag wird erstellt..."},sv.i18n.portlet.blog.blog.en={creatingBlogEntry:"Creating blog entry..."},sv.i18n.portlet.blog.blog.es={creatingBlogEntry:"Creando entrada de blog..."},sv.i18n.portlet.blog.blog.fi={creatingBlogEntry:"Luo blogiyhteyttä..."},sv.i18n.portlet.blog.blog.fr={creatingBlogEntry:"Créer des articles de blog..."},sv.i18n.portlet.blog.blog.no={creatingBlogEntry:"Oppretter blogginnlegg ..."},sv.i18n.portlet.blog.blog.sv={creatingBlogEntry:"Skapar blogginlägg..."}},5132:(t,e,i)=>{"use strict";i.d(e,{V:()=>b});var l=i(7809),r=i.n(l),a=i(1097),n=i.n(a),o=i(6751),s=i(6237);const c=n().template('<i class="halflings-icon thumbs-up"></i><%= likeText %> (<%= likeCount %>)'),d={};var g=function(t){return d[t]?d[t]:o.i18n.getText("portlet.social.util.likableutil",t)},p=function(t){var e=t.data("like-count")||0,i=!!t.data("user-likes");t.html(c({likeText:g(i?"likes":"like"),likeCount:e,userLikes:i})),t[i?"addClass":"removeClass"]("sv-liked")},v=function(t){(t=t||r()("body")).is("[data-fn-likable],[data-fn-portlet-likable]")?p(t):t.find("[data-fn-likable],[data-fn-portlet-likable]").each((function(){p(r()(this))}))},u=function(t,e){t.tooltip({html:!0,title:e.join("<br>")}),t.tooltip("show")};const b=function(){var t,e,i=r()(this),l=!!i.data("user-likes"),a=i.data("likable-id");if(i.removeData("likes"),a){if(!i.hasClass("sv-disabled"))return i.addClass("sv-disabled"),t=i.closest(".sv-portlet"),e=o.ObjectUtil.getObjectId(t.attr("id")),function(t,e,i){return r().ajax({url:t,method:i?"DELETE":"POST",dataType:"JSON",data:{likable:e}})}(l?(0,s.U4)(e,"unlike")+"&likable="+a:(0,s.U4)(e,"like"),a,l).done((function(t){i.data("user-likes",!l).data("like-count",t.count),p(i)})).fail((function(t){o.ErrorUtil.handleAjaxFailure(t)}
1)).always((function(){i.removeClass("sv-disabled")})),!1}else o.Log.warn("Trying to like object without likable-id in portlet "+i.closest(".sv-portlet").attr("id"))};r()("body").on("click.likeable","a[data-fn-likable]",b),r()(document).on("mouseenter",".sv-like",(function(){var t,e=r()(this),i=e.closest(".sv-portlet"),l=o.ObjectUtil.getObjectId(i.attr("id")),a=e.data("likable-id"),n=e.data("likes");if(e.data("like-count")>0)if(n)u(e,n);else{var c=(0,s.U4)(l,"likes")+"&likable="+a;(t=c,r().ajax({url:t,method:"GET",dataType:"JSON"})).done((function(t){e.data("likes",t),u(e,t)})).fail((function(t){o.ErrorUtil.handleAjaxFailure(t)}))}})),o.Events.on(o.Events.types.updateLikables,v),v()},6237:(t,e,i)=>{"use strict";i.d(e,{CD:()=>u,L9:()=>g,NE:()=>p,U4:()=>v,oE:()=>b,px:()=>c,t4:()=>h,xb:()=>d});var l=i(6751),r=i.n(l),a=i(7809),n=i.n(a),o=i(1097),s=i.n(o);const c=function(t){var e=new RegExp("[\\?&]"+t+"=([^&#]*)").exec(window.location.href);return e?e[1]:null},d=function(t,e,i){var l="/modelobjectapi/1/"+r().PageContext.pageId+"/"+t+"/"+e;return i&&(l+="/"+i),l},g=function(t){var e=t.modelHandler,i=t.objectId,l=t.operationObjectId,a=t.contextNodeId||r().PageContext.pageId;"string"==typeof t&&(e=t),i||(i=r().PageContext.pageId);var n="/edit-api/1/"+a+"/"+i+"/"+e;return l&&(n+="/"+l),n},p=function(t,e,i){return`/${r().PageContext.pageId}/${t}.${i?"json":"htm"}?state=${e}`},v=function(t,e){var i=c("identity"),l=c("group"),a=c("tag");return"/portletresource/"+r().PageContext.pageId+"/"+t+"?state="+e+(i?"&identity="+i:"")+(l?"&group="+l:"")+(a?"&tag="+a:"")},u=function(t,e){var i=n()(t);n().each(i,(function(){var t=n()(this),i=t.attr("id"),a=l.ObjectUtil.getObjectId(i);b(t,"/"+r().PageContext.pageId+"/"+a+".htm"+(e||""))}))},b=function(t,e,i){let l;l="string"==typeof t?n()(t):t,n().get(e,(function(e){l.fadeOut("fast",(function(){l.html(e),l.fadeIn(),"function"==typeof i&&i.call(this,t)}))}))};var f={};const h=function(t,e){var i,r=t.attr("id");if(r){if(r=r.replace(".","_"),!f[r+e]){if(0===(i=t.find("script.sv-tmpl-"+e)).length)return void l.Log.warn("portletUtil","Could not find template with name "+e+" for portlet "+r);f[r+e]=s().template(i.html())}return f[r+e]}l.Log.warn("portletUtil","Tried to get template from invalid element")};r().PortletUtil={getModelObjectUri:d,getEditApiUri:g,getPortletUri:p,getPortletResourceUri:v,reloadPortletsByType:u,doGetWithFade:b,doGet:function(t,e,i){n().get(e,(function(e){n()(t).html(e),"function"==typeof i&&i.call(this,t)}))},getTemplate:h,parseRequestParameters:c}}}]); 2//# sourceMappingURL=likableUtil.js.map
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.