(function(n,t){"use strict";function v(n,t,r){var e=n.children(),o=!1,u,s,f;for(n.empty(),u=0,s=e.length;u<s;u++)if(f=e.eq(u),n.append(f),r&&n.append(r),i(n,t)){f.remove();o=!0;break}else r&&r.detach();return o}function o(t,r,u,f,e){var s=!1,h="a, table, thead, tbody, tfoot, tr, col, colgroup, object, embed, param, ol, ul, dl, blockquote, select, optgroup, option, textarea, script, style",c="script, .dotdotdot-keep";return t.contents().detach().each(function(){var a=this,l=n(a);if(typeof a=="undefined")return!0;if(l.is(c))t.append(l);else{if(s)return!0;t.append(l);!e||l.is(f.after)||l.find(f.after).length||t[t.is(h)?"after":"append"](e);i(u,f)&&(s=a.nodeType==3?y(l,r,u,f,e):o(l,r,u,f,e));s||e&&e.detach()}}),r.addClass("is-truncated"),s}function y(t,e,o,s,c){var l=t[0],nt,k,d,tt;if(!l)return!1;var a=h(l),it=a.indexOf(" ")!==-1?" ":"　",p=s.wrap=="letter"?"":it,v=a.split(p),g=-1,w=-1,b=0,y=v.length-1;if(s.fallbackToLetter&&b===0&&y===0&&(p="",v=a.split(p),y=v.length-1),s.maxLength)a=f(a.trim().substr(0,s.maxLength),s),r(l,a);else{while(b<=y&&!(b===0&&y===0)){if(nt=Math.floor((b+y)/2),nt==w)break;w=nt;r(l,v.slice(0,w+1).join(p)+s.ellipsis);o.children().each(function(){n(this).toggle().toggle()});i(o,s)?(y=w,s.fallbackToLetter&&b===0&&y===0&&(p="",v=v[0].split(p),g=-1,w=-1,b=0,y=v.length-1)):(g=w,b=w)}g==-1||v.length===1&&v[0].length===0?(k=t.parent(),t.detach(),d=c&&c.closest(k).length?c.length:0,k.contents().length>d?l=u(k.contents().eq(-1-d),e):(l=u(k,e,!0),d||k.detach()),l&&(a=f(h(l),s),r(l,a),d&&c&&(tt=c.parent(),n(l).parent().append(c),n.trim(tt.html())||tt.remove()))):(a=f(v.slice(0,g+1).join(p),s),r(l,a))}return!0}function i(n,t){return n.innerHeight()>t.maxHeight||t.maxLength&&n.text().trim().length>t.maxLength}function f(t,i){while(n.inArray(t.slice(-1),i.lastCharacter.remove)>-1)t=t.slice(0,-1);return n.inArray(t.slice(-1),i.lastCharacter.noEllipsis)<0&&(t+=i.ellipsis),t}function s(n){return{width:n.innerWidth(),height:n.innerHeight()}}function r(n,t){n.innerText?n.innerText=t:n.nodeValue?n.nodeValue=t:n.textContent&&(n.textContent=t)}function h(n){return n.innerText?n.innerText:n.nodeValue?n.nodeValue:n.textContent?n.textContent:""}function c(n){do n=n.previousSibling;while(n&&n.nodeType!==1&&n.nodeType!==3);return n}function u(t,i,r){var e=t&&t[0],f;if(e){if(!r){if(e.nodeType===3)return e;if(n.trim(t.text()))return u(t.contents().last(),i)}for(f=c(e);!f;){if(t=t.parent(),t.is(i)||!t.length)return!1;f=c(t[0])}if(f)return u(n(f),i)}return!1}function p(t,i){return t?typeof t=="string"?(t=n(t,i),t.length?t:!1):t.jquery?t:!1:!1}function w(n){for(var t,r=n.innerHeight(),u=["paddingTop","paddingBottom"],i=0,f=u.length;i<f;i++)t=parseInt(n.css(u[i]),10),isNaN(t)&&(t=0),r-=t;return r}var e,l,a;n.fn.dotdotdot||(n.fn.dotdotdot=function(t){var r,c;if(this.length===0)return n.fn.dotdotdot.debug('No element found for "'+this.selector+'".'),this;if(this.length>1)return this.each(function(){n(this).dotdotdot(t)});r=this;c=r.contents();r.data("dotdotdot")&&r.trigger("destroy.dot");r.data("dotdotdot-style",r.attr("style")||"");r.css("word-wrap","break-word");r.css("white-space")==="nowrap"&&r.css("white-space","normal");r.bind_events=function(){return r.bind("update.dot",function(t,e){r.removeClass("is-truncated");t.preventDefault();t.stopPropagation();switch(typeof u.height){case"number":u.maxHeight=u.height;break;case"function":u.maxHeight=u.height.call(r[0]);break;default:u.maxHeight=w(r)}u.maxHeight+=u.tolerance;typeof e!="undefined"&&((typeof e=="string"||"nodeType"in e&&e.nodeType===1)&&(e=n("<div />").append(e).contents()),e instanceof n&&(c=e));h=r.wrapInner('<div class="dotdotdot" />').children();h.contents().detach().end().append(c.clone(!0)).find("br").replaceWith("  <br />  ").end().css({height:"auto",width:"auto",border:"none",padding:0,margin:0});var s=!1,l=!1;return f.afterElement&&(s=f.afterElement.clone(!0),s.show(),f.afterElement.detach()),i(h,u)&&(l=u.wrap=="children"?v(h,u,s):o(h,r,h,u,s)),h.replaceWith(h.contents()),h=null,n.isFunction(u.callback)&&u.callback.call(r[0],l,c),f.isTruncated=l,l}).bind("isTruncated.dot",function(n,t){return n.preventDefault(),n.stopPropagation(),typeof t=="function"&&t.call(r[0],f.isTruncated),f.isTruncated}).bind("originalContent.dot",function(n,t){return n.preventDefault(),n.stopPropagation(),typeof t=="function"&&t.call(r[0],c),c}).bind("destroy.dot",function(n){n.preventDefault();n.stopPropagation();r.unwatch().unbind_events().contents().detach().end().append(c).attr("style",r.data("dotdotdot-style")||"").removeClass("is-truncated").data("dotdotdot",!1)}),r};r.unbind_events=function(){return r.unbind(".dot"),r};r.watch=function(){if(r.unwatch(),u.watch=="window"){var t=n(window),i=t.width(),e=t.height();t.bind("resize.dot"+f.dotId,function(){i==t.width()&&e==t.height()&&u.windowResizeFix||(i=t.width(),e=t.height(),l&&clearInterval(l),l=setTimeout(function(){r.trigger("update.dot")},100))})}else a=s(r),l=setInterval(function(){if(r.is(":visible")){var n=s(r);(a.width!=n.width||a.height!=n.height)&&(r.trigger("update.dot"),a=n)}},500);return r};r.unwatch=function(){return n(window).unbind("resize.dot"+f.dotId),l&&clearInterval(l),r};var u=n.extend(!0,{},n.fn.dotdotdot.defaults,t),f={},a={},l=null,h=null;return u.lastCharacter.remove instanceof Array||(u.lastCharacter.remove=n.fn.dotdotdot.defaultArrays.lastCharacter.remove),u.lastCharacter.noEllipsis instanceof Array||(u.lastCharacter.noEllipsis=n.fn.dotdotdot.defaultArrays.lastCharacter.noEllipsis),f.afterElement=p(u.after,r),f.isTruncated=!1,f.dotId=e++,r.data("dotdotdot",!0).bind_events().trigger("update.dot"),u.watch&&r.watch(),r},n.fn.dotdotdot.defaults={ellipsis:"... ",wrap:"word",fallbackToLetter:!0,lastCharacter:{},tolerance:0,callback:null,after:null,height:null,watch:!1,windowResizeFix:!0,maxLength:null},n.fn.dotdotdot.defaultArrays={lastCharacter:{remove:[" ","　",",",";",".","!","?"],noEllipsis:[]}},n.fn.dotdotdot.debug=function(){},e=1,l=n.fn.html,n.fn.html=function(i){return i!=t&&!n.isFunction(i)&&this.data("dotdotdot")?this.trigger("update",[i]):l.apply(this,arguments)},a=n.fn.text,n.fn.text=function(i){return i!=t&&!n.isFunction(i)&&this.data("dotdotdot")?(i=n("<div />").text(i).html(),this.trigger("update",[i])):a.apply(this,arguments)})})(jQuery);jQuery(document).ready(function(n){n(".dot-ellipsis").each(function(){var r=n(this).hasClass("dot-resize-update"),u=n(this).hasClass("dot-timer-update"),i=0,f=n(this).attr("class").split(/\s+/),t;n.each(f,function(n,t){var r=t.match(/^dot-height-(\d+)$/);r!==null&&(i=Number(r[1]))});t={};u&&(t.watch=!0);r&&(t.watch="window");i>0&&(t.height=i);n(this).dotdotdot(t)})});jQuery(window).on("load",function(){jQuery(".dot-ellipsis.dot-load-update").trigger("update.dot")})