/* >>> file start: js/jquery/jquery.lj.repostbutton.js */ LJ.UI.registerTemplate('templates-CleanHtml-PaidRepost', "{{if !$data.owner}}+{{html $data.cost}}{{else $data.budget}}{{html $data.budget}}{{/if}}{{html $data.count}} ", 'JQuery.stat'); LJ.UI.registerTemplate('templates-CleanHtml-Repost', "{{if !$data.owner}}+{{html $data.cost}}{{else $data.budget}}{{html $data.budget}}{{/if}}{{html $data.count}} ", 'JQuery.stat'); LJ.UI.registerTemplate('templates-CleanHtml-reposted', "{{if $data.content}} {{each ($value.users || $data.users)}}{{if !((!$index) && !($value.dropComma || $data.dropComma))}}, {{/if}}{{html ($value.user || $data.user)}}{{/each}} {{else}}
{{html LJ.mltext(\'repost.popup.head\')}}
{{html LJ.mltext(\'repost.popup.footer\')}}
{{/if}} ", 'JQuery.stat'); !function(t){return t}(),function(t){"use strict";t.widget("lj.repostbutton",t.lj.basicWidget,{options:{classNames:{active:"repost-button-active",inactive:"repost-button-inactive",popupLoad:"b-reposted-popup-load",popupNomore:"b-reposted-popup-footer-hide",repostError:"repost-error"},selectors:{counterParent:".lj-button-c",button:".lj-button-b",counter:".lj-like-item-count",buttonLink:".lj-button-link",popupContent:".b-reposted-popup-content",popupFooter:".b-reposted-popup-footer",popupMore:".b-reposted-popup-footer > a"},templates:{popup:"templates-CleanHtml-reposted"},url:"",reposted:!1,cost:0,budget:0,paid:!1},_create:function(){this.options.classNames={active:"b-flatrepost-reposted",inactive:"b-flatrepost-disabled",popupLoad:"b-reposted-popup-load",popupNomore:"b-reposted-popup-footer-hide",repostError:"repost-error"},this.options.selectors={counterParent:".b-flatrepost-counter",button:".b-flatrepost-name",counter:".b-flatrepost-counter",buttonLink:".b-flatrepost-name",popupContent:".b-reposted-popup-content",popupFooter:".b-reposted-popup-footer",popupMore:".b-reposted-popup-footer > a"},t.lj.basicWidget.prototype._create.apply(this),this.options.url||console.warn(this.widgetName,": no url in options, initialization won't continue"),this._journal=LJ.get("currentJournal"),this._count=null,this._remote=LJ.get("remoteUser"),this._reposted=this.options.reposted,this._el("buttonLink"),this._href=this.element.find(this._s("button")).data("href"),this._href=LJ.Util.Journal.parseLink(this._href)||{},this._canRepost()||(this.element.addClass(this._cl("inactive")),this._buttonLink.removeAttr("title"),this._lock()),this._popup=null,this._popupContent=null,this._popupLocked=!1,this._lastUser=null,this._el("counterParent"),this._el("counter"),Number(this._counter.html())||this._hideCounter(),this._bindControls()},_hideCounter:function(){this._counterParent.addClass("empty")},_showCounter:function(){this._counterParent.removeClass("empty")},_bindControls:function(){var e=this;this.element.on("click",this._s("button"),this._onUpdateButton.bind(this)),this._counterParent.one("click",function(){Number(e._counter.html())&&(e._popup=e._tmpl("popup"),e._el("popupFooter",e._popup),e._popupContent=e._popup.find(e._s("popupContent")),e._popup.bubble({showOn:"click",align:"side",alwaysShowUnderTarget:!0,target:e._counterParent}).on("bubblehide",function(){e._lastUser=null,e._popupContent.empty(),e._popupFooter.removeClass(e._cl("popupNomore"))}).on("bubbleshow",function(){e._loadRepostedList()}).on("click",e._s("popupMore"),e._loadRepostedList.bind(e)),Function.defer(function(){e._popup.bubble("show")}))}),t.lj.basicWidget.prototype._bindControls.apply(e)},_loadRepostedList:function(t){var e=this;t&&t.preventDefault(),this._popupLocked||(this._popupLocked=!0,this._popupContent.addClass(this._cl("popupLoad")),LJ.Api.call("repost.get_list",{url:this.options.url,last:this._lastUser},function(t){e._popupContent.removeClass(e._cl("popupLoad")),e._popupLocked=!1,t.error?e._handleAnswer(t):(e._render(t.users,t.nomore,t.count),e._lastUser=t.last)}))},_render:function(t,e,o){var s=this;t.length>0&&s._tmpl("popup",{content:!0,dropComma:!!s._lastUser,users:t}).appendTo(s._popupContent),this._updateCounter(o),e&&s._popupFooter.addClass(s._cl("popupNomore"))},_onUpdateButton:function(t){this.locked()||this.toggleRepost(),t.preventDefault()},_handleAnswer:function(t){if(t.hasOwnProperty("delete")&&(t.message&&this._showMessage(t.message),this.paid!==Boolean(t.paid)||this.paid&&this.cost!==t.cost))return void this.element.replaceWith(LJ.Social.renderRepostButton(this.options.url,t));if(t.error){if(t.error.message&&this._showMessage(t.error.message),t.error.data)return void this.element.replaceWith(LJ.Social.renderRepostButton(this.options.url,t.error.data))}else this._updateButton(!this._reposted);!t.hasOwnProperty("count")&&t.hasOwnProperty("delete")&&(t.count=this._count-1),this._updateCounter(t.count),this._unlock()},_showMessage:function(e){var o=t("
",{"class":this._cl("repostError"),text:e}).bubble({target:this.element,align:"center",hide:function(){o.remove()}}).bubble("show")},_updateButton:function(t){this._reposted=t,this.element.toggleClass(this._cl("active"),this._reposted)},_updateCounter:function(t){"undefined"!=typeof t&&(this._count=Number(t),this._counter.html(this._count)),Number(this._counter.html())?this._showCounter():this._hideCounter()},_canRepost:function(){return LJ.get("preview")?!1:this._remote?LJ.get("remote_is_identity")?!1:this._remote!==this._href.journal:!1},toggleRepost:function(){var t=this,e={url:this.options.url};this._canRepost()&&(null===this._count&&(this._count=parseInt(this._el("counter").html(),10)||0),this._lock(),this._reposted?LJ.Api.call("repost.delete",e,function(e){e.error||e.reposted||t._journal!==t._remote||location.href.match(/\/(friends|times|feed)\b/)?t._handleAnswer(e):location.reload()}):(e.timezone=LJ.Util.Date.timezone(),this.options.paid&&(e.cost=this.options.cost),LJ.Api.call("repost.create",e,this._handleAnswer.bind(this))))}})}(jQuery); /* <<< file end: js/jquery/jquery.lj.repostbutton.js */ //# map link was there [jquery.lj.repostbutton.js.map] /* >>> file start: js/threeposts.js */ !function(t){return t}(),function(t){"use strict";t(function(){function e(){var t=3,e={7:4,8:4,9:3};return t=e[v]>0?e[v]:v}function i(){var t=1;if(M>H)return t=1;if(v>=2){t=Math.floor(H/M),t>v&&(t=v);var e=v%t;if(e>0)if(v%(t-1)===0)t--;else if(v%(t+1)===0)t++;else if(1===e){var i=H/(t+1);i>=E&&t++}}return t}function n(){H=u.width(),b=O>H?i():e(),s(H/b)}function s(t){var e=[150,300,330,400,500,600,800],i=["xxs","xs","s","m","l","xl","xxl"];e.forEach(function(n){t>n&&(F=i[e.indexOf(n)])})}function r(){u.find("."+w).removeClass(w),"xs"===F&&z.each(function(){var e=t(this).find("."+_),i=e.get(0).getClientRects().length;2>i&&t(this).addClass(w)})}function o(t){return p.get(t).scrollHeight}function a(){if(0===C&&g.height()>0){p.height("auto");var t=p.map(o),e=Math.max.apply(Math,t);p.height(e)}}function h(){H=u.width();var t=[400,600,800,1e3,1200,1400],e=["xs","s","m","l","xl","xxl"];t.forEach(function(i){H>i&&(j=e[t.indexOf(i)])}),n(),f()}function f(){var t=c+"--size-"+j,e=c+"--items-in-row-"+b,i=c+"--item-size-"+F,n=l+"\n"+t+"\n"+e+"\n"+i;u.attr("class",n),u.attr("data-item-layout",F),x.hide(),d.show(),a(),r()}var c="threeposts",u=t("."+c),l=u.attr("class"),x=t(".placeholder-threeposts"),d=t(".threeposts__items"),m="threeposts__item",p=t("."+m),g=t(p.get(0)),v=p.length,_="threeposts__title-inner",w="threeposts__item--short-title",y="threeposts__item--pic",z=t("."+y),C=z.length,M=235,E=200,O=1200,b=3,j="xxs",F="xxs",H=u.width();h(),t(window).resize(LJ.Function.debounce(h,50))})}(jQuery); /* <<< file end: js/threeposts.js */ //# map link was there [threeposts.js.map] /* >>> file start: js/recommended-entries.js */ !function(t){return t}(),function(t){"use strict";t(function(){function e(){return a=t("."+c),0==a.length?void setTimeout(e,1e3):(u=a.attr("class"),M=a.width(),d=t(".recommended-entries__list"),x=t("."+l),f=t(x.get(0)),m=x.length,void o())}function n(){var t=1;return _>M?t:(m>=2&&(t=Math.floor(M/_),6>t&&(t=Math.floor(M/v)),t>2&&6>t&&(t=3)),t)}function i(){M=a.width(),y>M&&(z=n()),g=M/z,r(g)}function r(){var t=[150,250,330,400,500,600,800],e=["xxs","xs","s","m","l","xl","xxl"];t.forEach(function(n){g>n&&(E=e[t.indexOf(n)])})}function o(){M=a.width();var t=[280,300,400,800,1e3,1200,1400],e=["xxs","xs","s","m","l","xl","xxl"];t.forEach(function(n){M>n&&(p=e[t.indexOf(n)])}),i(),s()}function s(){var t=c+"--size-"+p,e=c+"--items-in-row-"+z,n=c+"--item-size-"+E,i=u+"\n"+t+"\n"+e+"\n"+n;a.attr("class",i),a.attr("data-layout",M+"/"+p+"|"+z),a.attr("data-item-layout",g+"/"+E),d.show()}var c="recommended-entries",a=t("."+c),u=a.attr("class"),d=t(".recommended-entries__list"),l="recommended-entries__item",x=t("."+l),f=t(x.get(0)),m=x.length,h="threeposts__item--pic",w=t("."+h),_=(w.length,220),v=155,g=0,y=1044,z=6,p="xxs",E="xxs",M=a.width();e(),t(window).resize(LJ.Function.debounce(o,50))})}(jQuery); /* <<< file end: js/recommended-entries.js */ //# map link was there [recommended-entries.js.map] /* >>> file start: js/jquery/jquery.lj.ljcut.js */ !function(t){return t}(),function(t){"use strict";var e=[];t.widget("lj.ljcut",t.lj.basicWidget,{options:{journalid:null,ditemid:null,cutid:null,placeholders:0,sticky:!1,selectors:{expand:".ljcut-link-expand",collapse:".ljcut-link-collapse",collapseLink:".ljcut-pseudolink-collapse",stickyLink:".b-sticky-cut-link"},classNames:{preloader:"ljcut-link-expanding",expanded:"ljcut-expanded","sticky-cut-visible":"b-sticky-cut-visible",cut:".b-sticky-cut"}},_create:function(){t.lj.basicWidget.prototype._create.apply(this),this._window=t(window),this.cut=t(this._cl("cut")),this._stickyCollapseHandler=this._collapse.bind(this),this.content=null,this._isMac=/Mac/.test(navigator.userAgent),this._isOpera=/Opera/.test(navigator.userAgent),this._collapseNode=t('{close}'.supplant({close:this._ml("collapse")})),this._bindControls(),this._id=e.length,e[this._id]=!1},_bindControls:function(){var e=!1,i=[this._s("expand"),this._s("collapse")].join(", ");t.lj.basicWidget.prototype._bindControls.apply(this),this.element.on("click",this._s("expand"),this._expand.bind(this)),this.element.on("click",this._s("collapse"),this._collapse.bind(this)),this.element.on("touchstart",i,function(){e=!0}),this.element.on("touchmove",i,function(){e=!1}),this.element.on("touchend",i,function(i){e&&(t(i.target).trigger("click"),i.preventDefault())}),t(document).on("keydown",this._shortcuts.bind(this)),this._window.on("scroll",this._scrolling.bind(this))},_shortcuts:function(t){var e=this._isMac&&this._isOpera?t.metaKey:t.ctrlKey,i=t.altKey;if(e&&i){switch(t.which){case 61:case 187:this.expand();break;case 173:case 31:case 109:case 189:this.collapse()}t.preventDefault()}},_togglePreloader:function(t){this.element.toggleClass(this._cl("preloader"),t)},_toggleContent:function(e,i){var s,n=this;!this.locked()&&this.content&&(this._lock(),"function"!=typeof i&&(i=t.noop),this.element.toggleClass(n._cl("expanded"),e),e?this._showContent(i):(s=this.element.offset().top-30,this.element.is(":screenable")?this._hideContent(i):t("body,html").animate({scrollTop:s},300,function(){setTimeout(n._hideContent.bind(n,i),50)})))},_showContent:function(t){var e=this;this.content.show(50,function(){e._trigger("show",null,e),t(),e._unlock()})},_hideContent:function(t){var e=this;this.content.slideUp(50,function(){e._trigger("hide",null,e),t(),e._unlock()})},_requestContent:function(e){var i=this;this._lock(),this._togglePreloader(!0),LJ.Api.call("event.get_lj_cut",e,function(e){i.content=t("
",{html:e.text}).hide(),i.content.find("a:not([target])").attr("target","_self"),i.element.after(i.content),setTimeout(function(){LJ.Event.trigger("ljcut:appendContent",{$content:i.content})},0),i._unlock(),i._togglePreloader(!1),i._toggleContent(!0,i._addHandlers.bind(i)),e.counter_image_url&&LJ.Stat.addCounter(e.counter_image_url)})},_addHandlers:function(){this.content.ljLikes(),LJ.Event.trigger("social:widgets:parse"),LJ.Event.trigger("social:newinsta:parse")},expand:function(){this.locked()||(this.content?this._toggleContent(!0):this._requestContent({journalid:this.options.journalid,ditemid:this.options.ditemid,cutid:this.options.cutid,placeholders:this.options.placeholders}))},collapse:function(){this.locked()||(this._toggleContent(!1),this._toggleStickyClass(!1))},_expand:function(t){return t.metaKey||t.ctrlKey?!0:(t.preventDefault(),void this.expand())},_collapse:function(t){return t.metaKey||t.ctrlKey?!0:(t.preventDefault(),e[this._id]=!1,void this.collapse())},_scrolling:function(){this._updateStickyCutState()},_updateStickyCutState:function(){var i,s,n,o,l,c,a;this._isExpanded()&&this.options.sticky&&this.content&&(i=this._window.height(),s=t(document).scrollTop(),n=this.content.height(),o=this.content.offset().top,l=o+n,a=this.element.find(this._s("collapse")),c=s>o&&l-i>s,e[this._id]=c,this._toggleStickyClass(c))},_toggleStickyClass:function(i){this.cut.toggleClass(this._cl("sticky-cut-visible"),e.indexOf(!0)>-1),i?t(document).on("click",this._s("stickyLink"),this._stickyCollapseHandler):t(document).off("click",this._s("stickyLink"),this._stickyCollapseHandler)},_addBottomCollapser:function(){return!this._bottomCloser&&this.options.sticky&&(this._bottomCloser=this._collapseNode.appendTo(this.content),this._bottomCloser.find(this._s("collapseLink")).on("click",this._bottomCloserClickHandler.bind(this))),this._bottomCloser},_bottomCloserClickHandler:function(){event.preventDefault(),this.collapse()},_isExpanded:function(){return this.element.hasClass(this._cl("expanded"))},_isCollapsed:function(){return!this._isExpanded()}})}(jQuery); /* <<< file end: js/jquery/jquery.lj.ljcut.js */ //# map link was there [jquery.lj.ljcut.js.map] /* >>> file start: js/core/string.js */ var _extends=Object.assign||function(t){for(var e=1;e=e)return t;for(;t.length":">",'"':""","'":"'"};return t.replace(/([<>&\"\'])/g,function(t,n){return e[n]?e[n]:n})},LJ.String.limit=function(){var t=arguments.length<=0||void 0===arguments[0]?"":arguments[0],e=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],n=e.maxLength||150;return t.split(" ").reduce(function(t,e){if(t.limitReached)return t;var r=(t.limitedString+" "+e).trim();return r.length>n?_extends({},t,{limitReached:!0}):_extends({},t,{limitedString:r})},{limitedString:"",limitReached:!1}).limitedString}}(); /* <<< file end: js/core/string.js */ //# map link was there [string.js.map] /* >>> file start: js/core/angular/activity.js */ !function(){"use strict";function t(t,n){function c(){return u}function e(t){u=t}function i(){n.cancel(o),e(!0),o=n(e.bind(this,!1),9e5)}var u,o;return i(),t.on("click touchstart touchend keydown mousemove mousewheel",LJ.Function.debounce(i,100,!0)),{isActive:c}}angular.module("LJ.Activity",[]),angular.module("LJ.Activity").factory("Activity",t),t.$inject=["$document","$timeout"]}(); /* <<< file end: js/core/angular/activity.js */ //# map link was there [activity.js.map] /* >>> file start: js/core/angular/api.js */ //!= require js/core/angular/messages.js //= require js/core/angular/activity.js !function(){"use strict";function e(e,n,t,r,a,c){function i(e,n){return"undefined"==typeof n?e:e+angular.toJson(s(n))}function s(e){var n;return angular.isObject(e)?(n={},Object.keys(e).sort().forEach(function(t){n[t]=s(e[t])}),n):e}function o(e,n){f.remove(i(e,n))}function u(n,s,o,u){var g,l,p=r.defer(),d={cache:!1,silent:!1,meta:!1},m=!1;return c.isActive()?(angular.isObject(s)&&null!==s||(s={}),angular.isObject(o)&&(u=o,o=null),u=angular.extend(d,u||{}),l=i(n,s),u.cache&&(g=f.get(l),g&&(m=!0)),m||(g=p.promise,LJ.Api.call(n,s,function(n){e(function(){n.error?p.reject(n.error):p.resolve(n),t.$apply()},0)}),u.cache&&f.put(l,g)),LJ.Event.trigger("api:request:change",n,!0),g.then(function(){LJ.Event.trigger("api:request:change",n,!1)}),u.silent||g.then(function(e){var n={};"undefined"!=typeof e.message&&(angular.isString(e.message)?(n.body=e.message,n.type="success"):(n.body=e.message.content,n.type="success"),a.add(n))},function(e){"undefined"!=typeof e.message&&1!==e.code&&a.error({body:e.message})}),u.meta&&(g=g.then(function(e){return{response:e,fromCache:m}})),angular.isFunction(o)&&g.then(o),g):(p.reject(),p.promise)}var g={call:u,invalidate:o},f=n("LJApiPromises");return g}angular.module("LJ.Api",["LJ.Messages","LJ.Activity"]).factory("Api",e),e.$inject=["$timeout","$cacheFactory","$rootScope","$q","Messages","Activity"]}(); /* <<< file end: js/core/angular/api.js */ //# map link was there [api.js.map] /* >>> file start: js/lib/jquery-ui/jquery.ui.position.min.js */ !function(t,o){t.ui=t.ui||{};var e=/left|center|right/,i=/top|center|bottom/,n="center",s={},f=t.fn.position,l=t.fn.offset;t.fn.position=function(o){if(!o||!o.of)return f.apply(this,arguments);o=t.extend({},o);var l,r,h,a=t(o.of),c=a[0],p=(o.collision||"flip").split(" "),u=o.offset?o.offset.split(" "):[0,0];return 9===c.nodeType?(l=a.width(),r=a.height(),h={top:0,left:0}):c.setTimeout?(l=a.width(),r=a.height(),h={top:a.scrollTop(),left:a.scrollLeft()}):c.preventDefault?(o.at="left top",l=r=0,h={top:o.of.pageY,left:o.of.pageX}):(l=a.outerWidth(),r=a.outerHeight(),h=a.offset()),t.each(["my","at"],function(){var t=(o[this]||"").split(" ");1===t.length&&(t=e.test(t[0])?t.concat([n]):i.test(t[0])?[n].concat(t):[n,n]),t[0]=e.test(t[0])?t[0]:n,t[1]=i.test(t[1])?t[1]:n,o[this]=t}),1===p.length&&(p[1]=p[0]),u[0]=parseInt(u[0],10)||0,1===u.length&&(u[1]=u[0]),u[1]=parseInt(u[1],10)||0,"right"===o.at[0]?h.left+=l:o.at[0]===n&&(h.left+=l/2),"bottom"===o.at[1]?h.top+=r:o.at[1]===n&&(h.top+=r/2),h.left+=u[0],h.top+=u[1],this.each(function(){var e,i=t(this),f=i.outerWidth(),a=i.outerHeight(),c=parseInt(t.curCSS(this,"marginLeft",!0))||0,g=parseInt(t.curCSS(this,"marginTop",!0))||0,d=f+c+(parseInt(t.curCSS(this,"marginRight",!0))||0),m=a+g+(parseInt(t.curCSS(this,"marginBottom",!0))||0),y=t.extend({},h);"right"===o.my[0]?y.left-=f:o.my[0]===n&&(y.left-=f/2),"bottom"===o.my[1]?y.top-=a:o.my[1]===n&&(y.top-=a/2),s.fractions||(y.left=Math.round(y.left),y.top=Math.round(y.top)),e={left:y.left-c,top:y.top-g},t.each(["left","top"],function(i,n){t.ui.position[p[i]]&&t.ui.position[p[i]][n](y,{targetWidth:l,targetHeight:r,elemWidth:f,elemHeight:a,collisionPosition:e,collisionWidth:d,collisionHeight:m,offset:u,my:o.my,at:o.at})}),t.fn.bgiframe&&i.bgiframe(),i.offset(t.extend(y,{using:o.using}))})},t.ui.position={fit:{left:function(o,e){var i=t(window),n=e.collisionPosition.left+e.collisionWidth-i.width()-i.scrollLeft();o.left=n>0?o.left-n:Math.max(o.left-e.collisionPosition.left,o.left)},top:function(o,e){var i=t(window),n=e.collisionPosition.top+e.collisionHeight-i.height()-i.scrollTop();o.top=n>0?o.top-n:Math.max(o.top-e.collisionPosition.top,o.top)}},flip:{left:function(o,e){if(e.at[0]!==n){var i=t(window),s=e.collisionPosition.left+e.collisionWidth-i.width()-i.scrollLeft(),f="left"===e.my[0]?-e.elemWidth:"right"===e.my[0]?e.elemWidth:0,l="left"===e.at[0]?e.targetWidth:-e.targetWidth,r=-2*e.offset[0];o.left+=e.collisionPosition.left<0?f+l+r:s>0?f+l+r:0}},top:function(o,e){if(e.at[1]!==n){var i=t(window),s=e.collisionPosition.top+e.collisionHeight-i.height()-i.scrollTop(),f="top"===e.my[1]?-e.elemHeight:"bottom"===e.my[1]?e.elemHeight:0,l="top"===e.at[1]?e.targetHeight:-e.targetHeight,r=-2*e.offset[1];o.top+=e.collisionPosition.top<0?f+l+r:s>0?f+l+r:0}}}},t.offset.setOffset||(t.offset.setOffset=function(o,e){/static/.test(t.curCSS(o,"position"))&&(o.style.position="relative");var i=t(o),n=i.offset(),s=parseInt(t.curCSS(o,"top",!0),10)||0,f=parseInt(t.curCSS(o,"left",!0),10)||0,l={top:e.top-n.top+s,left:e.left-n.left+f};"using"in e?e.using.call(o,l):i.css(l)},t.fn.offset=function(o){var e=this[0];return e&&e.ownerDocument?o?t.isFunction(o)?this.each(function(e){t(this).offset(o.call(this,e,t(this).offset()))}):this.each(function(){t.offset.setOffset(this,o)}):l.call(this):null}),t.curCSS||(t.curCSS=t.css),function(){var o,e,i,n,f,l=document.getElementsByTagName("body")[0],r=document.createElement("div");o=document.createElement(l?"div":"body"),i={visibility:"hidden",width:0,height:0,border:0,margin:0,background:"none"},l&&t.extend(i,{position:"absolute",left:"-1000px",top:"-1000px"});for(var h in i)o.style[h]=i[h];o.appendChild(r),e=l||document.documentElement,e.insertBefore(o,e.firstChild),r.style.cssText="position: absolute; left: 10.7432222px; top: 10.432325px; height: 30px; width: 201px;",n=t(r).offset(function(t,o){return o}).offset(),o.innerHTML="",e.removeChild(o),f=n.top+n.left+(l?2e3:0),s.fractions=f>21&&22>f}()}(jQuery); /* <<< file end: js/lib/jquery-ui/jquery.ui.position.min.js */ //# map link was there [jquery.ui.position.min.js.map] /* >>> file start: js/lib/jquery-ui/jquery.ui.autocomplete.min.js */ !function(e,t){var i=0;e.widget("ui.autocomplete",{options:{appendTo:"body",autoFocus:!1,delay:300,minLength:1,position:{my:"left top",at:"left bottom",collision:"none"},source:null},pending:0,_create:function(){var t,i=this,n=this.element[0].ownerDocument;this.isMultiLine=this.element.is("textarea"),this.element.addClass("ui-autocomplete-input").attr("autocomplete","off").attr({role:"textbox","aria-autocomplete":"list","aria-haspopup":"true"}).bind("keydown.autocomplete",function(n){if(!i.options.disabled&&!i.element.propAttr("readOnly")){t=!1;var s=e.ui.keyCode;switch(n.keyCode){case s.PAGE_UP:i._move("previousPage",n);break;case s.PAGE_DOWN:i._move("nextPage",n);break;case s.UP:i._keyEvent("previous",n);break;case s.DOWN:i._keyEvent("next",n);break;case s.ENTER:case s.NUMPAD_ENTER:i.menu.active&&(t=!0,n.preventDefault());case s.TAB:if(!i.menu.active)return;i.menu.select(n);break;case s.ESCAPE:i.element.val(i.term),i.close(n);break;default:clearTimeout(i.searching),i.searching=setTimeout(function(){i.term!=i.element.val()&&(i.selectedItem=null,i.search(null,n))},i.options.delay)}}}).bind("keypress.autocomplete",function(e){t&&(t=!1,e.preventDefault())}).bind("focus.autocomplete",function(){i.options.disabled||(i.selectedItem=null,i.previous=i.element.val())}).bind("blur.autocomplete",function(e){i.options.disabled||(clearTimeout(i.searching),i.closing=setTimeout(function(){i.close(e),i._change(e)},150))}),this._initSource(),this.menu=e("
    ").addClass("ui-autocomplete").appendTo(e(this.options.appendTo||"body",n)[0]).mousedown(function(t){var n=i.menu.element[0];e(t.target).closest(".ui-menu-item").length||setTimeout(function(){e(document).one("mousedown",function(t){t.target!==i.element[0]&&t.target!==n&&!e.ui.contains(n,t.target)&&i.close()})},1),setTimeout(function(){clearTimeout(i.closing)},13)}).menu({focus:function(e,t){var n=t.item.data("item.autocomplete");!1!==i._trigger("focus",e,{item:n})&&/^key/.test(e.originalEvent.type)&&i.element.val(n.value)},selected:function(e,t){var s=t.item.data("item.autocomplete"),o=i.previous;i.element[0]!==n.activeElement&&(i.element.focus(),i.previous=o,setTimeout(function(){i.previous=o,i.selectedItem=s},1)),!1!==i._trigger("select",e,{item:s})&&i.element.val(s.value),i.term=i.element.val(),i.close(e),i.selectedItem=s},blur:function(e,t){i.menu.element.is(":visible")&&i.element.val()!==i.term&&i.element.val(i.term)}}).zIndex(this.element.zIndex()+1).css({top:0,left:0}).hide().data("menu"),e.fn.bgiframe&&this.menu.element.bgiframe(),i.beforeunloadHandler=function(){i.element.removeAttr("autocomplete")},e(window).bind("beforeunload",i.beforeunloadHandler)},destroy:function(){this.element.removeClass("ui-autocomplete-input").removeAttr("autocomplete").removeAttr("role").removeAttr("aria-autocomplete").removeAttr("aria-haspopup"),this.menu.element.remove(),e(window).unbind("beforeunload",this.beforeunloadHandler),e.Widget.prototype.destroy.call(this)},_setOption:function(t,i){e.Widget.prototype._setOption.apply(this,arguments),"source"===t&&this._initSource(),"appendTo"===t&&this.menu.element.appendTo(e(i||"body",this.element[0].ownerDocument)[0]),"disabled"===t&&i&&this.xhr&&this.xhr.abort()},_initSource:function(){var t,i,n=this;e.isArray(this.options.source)?(t=this.options.source,this.source=function(i,n){n(e.ui.autocomplete.filter(t,i.term))}):"string"==typeof this.options.source?(i=this.options.source,this.source=function(t,s){n.xhr&&n.xhr.abort(),n.xhr=e.ajax({url:i,data:t,dataType:"json",success:function(e,t){s(e)},error:function(){s([])}})}):this.source=this.options.source},search:function(e,t){return e=null!=e?e:this.element.val(),this.term=this.element.val(),e.length").data("item.autocomplete",i).append(e("").text(i.label)).appendTo(t)},_move:function(e,t){return this.menu.element.is(":visible")?this.menu.first()&&/^previous/.test(e)||this.menu.last()&&/^next/.test(e)?(this.element.val(this.term),void this.menu.deactivate()):void this.menu[e](t):void this.search(null,t)},widget:function(){return this.menu.element},_keyEvent:function(e,t){this.isMultiLine&&!this.menu.element.is(":visible")||(this._move(e,t),t.preventDefault())}}),e.extend(e.ui.autocomplete,{escapeRegex:function(e){return e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")},filter:function(t,i){var n=new RegExp(e.ui.autocomplete.escapeRegex(i),"i");return e.grep(t,function(e){return n.test(e.label||e.value||e)})}})}(jQuery),function(e){e.widget("ui.menu",{_create:function(){var t=this;this.element.addClass("ui-menu ui-widget ui-widget-content ui-corner-all").attr({role:"listbox","aria-activedescendant":"ui-active-menuitem"}).click(function(i){e(i.target).closest(".ui-menu-item a").length&&(i.preventDefault(),t.select(i))}),this.refresh()},refresh:function(){var t=this,i=this.element.children("li:not(.ui-menu-item):has(a)").addClass("ui-menu-item").attr("role","menuitem");i.children("a").addClass("ui-corner-all").attr("tabindex",-1).mouseenter(function(i){t.activate(i,e(this).parent())}).mouseleave(function(){t.deactivate()})},activate:function(e,t){if(this.deactivate(),this.hasScroll()){var i=t.offset().top-this.element.offset().top,n=this.element.scrollTop(),s=this.element.height();0>i?this.element.scrollTop(n+i):i>=s&&this.element.scrollTop(n+i-s+t.height())}this.active=t.eq(0).children("a").addClass("ui-state-hover").attr("id","ui-active-menuitem").end(),this._trigger("focus",e,{item:t})},deactivate:function(){this.active&&(this.active.children("a").removeClass("ui-state-hover").removeAttr("id"),this._trigger("blur"),this.active=null)},next:function(e){this.move("next",".ui-menu-item:first",e)},previous:function(e){this.move("prev",".ui-menu-item:last",e)},first:function(){return this.active&&!this.active.prevAll(".ui-menu-item").length},last:function(){return this.active&&!this.active.nextAll(".ui-menu-item").length},move:function(e,t,i){if(!this.active)return void this.activate(i,this.element.children(t));var n=this.active[e+"All"](".ui-menu-item").eq(0);n.length?this.activate(i,n):this.activate(i,this.element.children(t))},nextPage:function(t){if(this.hasScroll()){if(!this.active||this.last())return void this.activate(t,this.element.children(".ui-menu-item:first"));var i=this.active.offset().top,n=this.element.height(),s=this.element.children(".ui-menu-item").filter(function(){var t=e(this).offset().top-i-n+e(this).height();return 10>t&&t>-10});s.length||(s=this.element.children(".ui-menu-item:last")),this.activate(t,s)}else this.activate(t,this.element.children(".ui-menu-item").filter(!this.active||this.last()?":first":":last"))},previousPage:function(t){if(this.hasScroll()){if(!this.active||this.first())return void this.activate(t,this.element.children(".ui-menu-item:last"));var i=this.active.offset().top,n=this.element.height(),s=this.element.children(".ui-menu-item").filter(function(){var t=e(this).offset().top-i+n-e(this).height();return 10>t&&t>-10});s.length||(s=this.element.children(".ui-menu-item:first")),this.activate(t,s)}else this.activate(t,this.element.children(".ui-menu-item").filter(!this.active||this.first()?":last":":first"))},hasScroll:function(){return this.element.height()>> file start: js/core/angular/autocomplete.js */ //= require js/lib/jquery-ui/jquery.ui.position.min.js //= require js/lib/jquery-ui/jquery.ui.autocomplete.min.js angular.module("LJ.Autocomplete",[]).directive("ljAutocomplete",["$parse","$window",function(e,t){return{restrict:"A",link:function(o,l,n){function u(e,t){var o,u,c,r,a,d=e.term,v=LJ.DOM.getSelection(l).start,A=d.slice(0,v),j=d.slice(v);return j.length&&","!==j.charAt(0)?void t():(A=A.trim(),u=A.lastIndexOf(","),-1===u?(r=A,p=[]):(r=A.slice(u+1).trim(),p=A.slice(0,u).split(/\,\s*/)),j.length?(j=j.slice(1).trim(),m=j.split(/\,\s*/),""===m[m.length-1]&&m.pop()):m=[],o=p.concat(m),r.length>> file start: js/core/angular/ref.js */ !function(e){return e}(),function(){"use strict";angular.module("LJ.Ref",[]).factory("Ref",function(){function e(e,n){return f[e]?void console.error("Ref element with id `%s` has been registered before.",e):void(f[e]=n)}function n(e){f[e]&&delete f[e]}function o(e){var n=f[e];return n||console.error("Ref `%s` not found.",e),n}function r(e,n){"undefined"==typeof n&&(n={});var r=o(e),f=angular.element("html, body");if(!r)return void console.error("Could not scroll to the ref `%s` that has not been already defined.",e);var l=r.offset().top;n.onlyUp&&angular.element(window).scrollTop()<=l||n.onlyOutOfScreen&&!t(r)||(n.toParent&&(f=r.parent(),l=0),f.animate({scrollTop:l}))}function t(e){var n=angular.element(window),o=n.scrollTop(),r=o+n.height(),t=e.offset().top;return t>r-100||o>t}var f={};return{add:e,remove:n,get:o,scrollTo:r}}).directive("ljRef",["Ref",function(e){return{restrict:"A",scope:!0,link:function(n,o,r){var t=r.ljRef;e.add(t,o),n.$on("$destroy",function(){e.remove(t)})}}}])}(); /* <<< file end: js/core/angular/ref.js */ //# map link was there [ref.js.map] /* >>> file start: js/core/angular/bubble.js */ //= require js/core/angular/ref.js Site.page.template['Widgets/ljBubble.tmpl'] = '\n
    \n
    \n \n \n \n \n \n \n \n
    \n \n
    \n
    \n
    \n'; Site.page.template['angular/confirm.bubble.ng.tmpl'] = '
    \n
    \n {{ bubble.options.header }}\n
    \n
    \n
    \n \n \n
    \n
    \n'; //= require_ml confirm.bubble.yes //= require_ml confirm.bubble.no !function(){"use strict";function e(e,o,t,n,r){return{scope:!0,link:function(i,l,a){function u(){var e=i.arrow.vertical,o=i.arrow.horizontal,t=W.aside,r=H.innerWidth<=650;i.visibility="hidden",W.keepInitialWidth&&!W.widthSaved&&(W.widthSaved=!0,L.width(L.width())),b(),p()&&!r&&(i.arrow.vertical="b"===e?f("alwaysTop")?"b":"t":f("alwaysBottom")?"t":"b",b(),h()&&!f("alwaysTop")&&(i.arrow.vertical="t",b())),w()&&!r&&(i.arrow.horizontal="l"===o?f("alwaysRight")||v()?"l":"r":f("alwaysLeft")||g()?"r":"l"),!r&&w()&&i.arrow.horizontal===o&&c()&&(W.aside=!0),r||i.arrow.horizontal===o&&i.arrow.vertical===e&&W.aside===t?i.visibility="visible":n(s)}function s(){return b(),w()&&c()?(W.aside=!0,i.$apply(),void s()):w()&&!f("aside")&&i.arrow.horizontal?(i.arrow.horizontal="",void s()):void(i.visibility="visible")}function c(){return!f("aside")&&f("tryAsideIfNoHorizSpace")}function f(e){return i.bubble.options[e]||W[e]}function b(){var o=e.node||l,t=o.offset().left+Math.floor(o.outerWidth()/2),n=i.bubble.options.forceX||0,r=i.bubble.options.forceY||0;if(f("aside"))i.position.x="r"===i.arrow.horizontal?o.offset().left-L.outerWidth()-x.outerWidth()+n:o.offset().left+o.outerWidth()+x.outerWidth()+n,i.position.y=o.offset().top-x.position().top+(o.outerHeight()-x.outerHeight())/2+r;else{if("center"===i.arrow.horizontal){var a=void 0;a=x.is(":visible")?x.position().left:L.outerWidth()/2,i.position.x=t-a+n}else i.position.x=i.arrow.horizontal?t-x.position().left-Math.floor(x.outerWidth()/2)-2+n:t-L.outerWidth()/2-Math.floor(x.outerWidth()/4)-2+n;i.position.y="t"===i.arrow.vertical?o.offset().top+o.outerHeight()+x.outerHeight()+r:o.offset().top-x.outerHeight()-L.outerHeight()+r}}function d(){i.position.x=-9999}function p(){return h()?!0:i.position.y+L.outerHeight()>H.scrollTop()+H.outerHeight()}function h(){return i.position.yH.scrollLeft()+H.outerWidth()}function m(o){o.preventDefault(),e.current!==W.name&&n(function(){e.open(W.name)})}function y(){$(),J&&(B=n(e.close,J))}function $(){n.cancel(B)}function z(){var o=W.name,t=e.current;o===t&&($(),e.close(),i.$apply())}function C(){i.show&&n(j)}var B,W=o(a.ljBubble)(i),S=W.name,L=t(r.get("ljBubble.tmpl"))(i),j=LJ.Function.throttle(u,50),x=L.find(".i-popup-arr"),H=angular.element(window),O=W.eventType||"click",J=Number(W.autoClose||0);i.show=!1,e._register(S,W),i.template=W.template||S+".html",i.bubble={name:S,close:e.close,options:e.options(S)},i.clear=function(){i.arrow={vertical:W.arrowInitialVertical||"t",horizontal:W.arrowInitialHorizontal||"l"}},i.position={x:-9999,y:-9999},i.visibility="hidden",i.arrowClass=function(){var e=i.bubble.options,o=i.arrow.vertical,t=void 0;return t="center"===i.arrow.horizontal?"":i.arrow.horizontal,e.aside||W.aside?"i-popup-arr"+t+o:"i-popup-arr"+o+t},i.getShouldShowArrow=function(){return angular.isDefined(i.bubble.options.showArrow)?i.bubble.options.showArrow:angular.isDefined(W.showArrow)?W.showArrow:!0},i.getShowCloseBtn=function(){return angular.isDefined(i.bubble.options.showCloseBtn)?i.bubble.options.showCloseBtn:angular.isDefined(W.showCloseBtn)?W.showCloseBtn:!0},i.$on("bubble:reposition:"+S,function(){n(j)}),i.$watch(function(){return e.current},function(e){d(),n(function(){i.show=e===S,e&&i.show&&(i.clear(),n(j))})},!0),W.disableClick||l.on(O,m),W.disableResizeListener||H.on("resize",C),W.recalculateOnOrientationChange&&H.on("orientationchange",function(){C(),H.on("resize",C),n(function(){H.off("resize",C)},1e3)}),W.recalculateOnScroll&&H.on("scroll",C),W.closeOnScroll&&H.on("scroll",z),angular.element("body").append(L),l.on("mouseleave",y),L.on("mouseenter",$),L.on("mouseleave",y),i.clear(),i.$on("$destroy",function(){l.off(O,m),H.off("resize",C),H.off("scroll",C),H.off("scroll",e.close),l.off("mouseleave",y),L.off("mouseenter",$),L.off("mouseleave",y),e._unregister(S),L.remove()})}}}function o(e,o,n,r,i,l){var a={},u={};return a.current=null,a.node=null,a.register=function(){function t(t,i){var a,u,s;return t&&t.name&&t.template?(a=t.name,t.disableClick=!0,r[a]?(r[a].count+=1,n.bind(null,a)):(u=angular.element("
    ").attr("lj-bubble",angular.toJson(t)),s="undefined"==typeof i,s&&(i=e.$new(!0)),u.appendTo("body"),o(u)(i),r[a]={count:1,node:u,scope:i,isScopeCreated:s},n.bind(null,a))):void l.error("Incorrect bubble options. You should provide name and template.",t)}function n(e){var o=r[e];o&&(o.count-=1,0===o.count&&(o.isScopeCreated||o.scope.$destroy(),o.node.remove(),delete r[e]))}var r={};return t}(),a.exists=function(e){return u.hasOwnProperty(e)},a._register=function(e,o){var t;if(u.hasOwnProperty(e))throw"Warning: bubble with name "+e+" has been registered before!";t=angular.isDefined(o)?angular.copy(o):{},t=angular.extend({closeControl:!0},t),u[e]=Object.create(t)},a._unregister=function(e){delete u[e],a.current===e&&(a.current=null)},a.confirm=function(e){function o(){i.scrollBy(0,1),i.scrollBy(0,-1)}var t=LJ.ml("confirm.bubble.yes"),n=LJ.ml("confirm.bubble.no"),l={closeControl:!1,confirm:e.confirm,header:e.header,text:e.text,yes:e.yes||t,no:e.no||n};a.open(e.id,l),r(o),r(o,100),r(o,200),r(o,300)},a.open=function(o,r,i){return u.hasOwnProperty(o)?(r instanceof jQuery&&(i=r,r={}),angular.isString(r)&&(i=n.get(r),r={}),angular.isObject(r)&&a.options(o,r),i instanceof jQuery&&(a.node instanceof jQuery&&!a.node.is(i)&&e.$broadcast("bubble:reposition:"+o),a.node=i),angular.isString(i)&&(a.node=n.get(i)),a.current=o,e.$broadcast("bubble:open",o,r,i),e.$broadcast("bubble:open:"+o,o,r,i),void angular.element("body").addClass(t)):void l.error("Bubble `"+o+"` can't be opened, it has not been registered yet.")},a.close=function(){var o,n=a.current,r=u[n];e.$broadcast("bubble:close",n,r,a.node),e.$broadcast("bubble:close:"+n,n,r,a.node);for(o in r)r.hasOwnProperty(o)&&delete r[o];a.current=null,a.node=null,angular.element("body").removeClass(t)},a.options=function(e,o){return"undefined"==typeof o||o===u[e]?u[e]:void angular.copy(o,u[e])},a}angular.module("LJ.Bubble",["LJ.Templates","LJ.Directives","LJ.Ref"]),angular.module("LJ.Bubble").factory("Bubble",o).directive("ljBubble",e);var t="p-openpopup";e.$inject=["Bubble","$parse","$compile","$timeout","$templateCache"],o.$inject=["$rootScope","$compile","Ref","$timeout","$window","$log"]}(); /* <<< file end: js/core/angular/bubble.js */ //# map link was there [bubble.js.map] /* >>> file start: js/core/angular/options.js */ var _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};angular.module("LJ.Options",[]).factory("Options",[function(){return{create:function(t){function n(n,o){"undefined"==typeof o?angular.extend(t,n):t[n]=o}function o(n){return t[n]}function e(){return t}if("undefined"==typeof t&&(t={}),"object"!==("undefined"==typeof t?"undefined":_typeof(t)))throw new TypeError("Options should be an object.");return{set:n,get:o,raw:e}}}}]); /* <<< file end: js/core/angular/options.js */ //# map link was there [options.js.map] /* >>> file start: js/core/angular/users.js */ //= require js/core/angular/api.js //= require js/core/angular/options.js !function(e){return e}(),function(){"use strict";angular.module("Users",["LJ.Api","LJ.Options"]).factory("Relations",["$q","$timeout","UsersCache",function(e,n,r){function t(t,i,u){var a=e.defer(),s={addFriend:{is_invite_sent:!0},removeFriend:{is_friend:!1},subscribe:{is_subscribedon:!0},unsubscribe:{is_subscribedon:!1},join:{is_invite_sent:!0},leave:{is_member:!1},setBan:{is_banned:!0},setUnban:{is_banned:!1}},o={addFriend:{is_invite_sent:!1},removeFriend:{is_friend:!0},subscribe:{is_subscribedon:!1},unsubscribe:{is_subscribedon:!0},join:{is_invite_sent:!1},leave:{is_member:!0},setBan:{is_banned:!1},setUnban:{is_banned:!0}},c=angular.copy(r.get(t)||{});return angular.isUndefined(u)&&(u={}),u.wait||r.update(t,s[i]||{}),LJ.Event.trigger("relations.change",{username:t,action:i,callback:function(e){n(function(){if(e.error)return u.wait||r.update(t,angular.extend(o[i],c)),void a.reject(e.error.message);var n=LJ.Object.pick(e,"is_banned","is_friend","is_member","is_subscriber","is_subscribedon","is_friend_of","is_invite_sent");r.update(t,n),a.resolve(e)})}}),a.promise}function i(e,n,i){var u=t(e,n?"subscribe":"unsubscribe",i);return n||u.then(function(){r.update(e,{filtermask:0})}),u}function u(e,n,r){return t(e,n?"addFriend":"removeFriend",r)}function a(e,n,r){return t(e,n?"join":"leave",r)}function s(e,n,r){return t(e,n?"setBan":"setUnban",r)}function o(e,n,r){return t(e,n?"banEverywhere":"unbanEverywhere",r)}return{toggleFriend:u,toggleSubscription:i,toggleMember:a,toggleBan:s,toggleBanEverywhere:o}}]).factory("Mask",function(){function e(e){return e>>>0}var n={};return n.change=function(n,r){var t=r.add,i=r.remove;return angular.isDefined(t)&&(angular.isArray(t)||(t=[t]),n=t.reduce(function(n,r){return e(n|Math.pow(2,r))},n)),angular.isDefined(i)&&(angular.isArray(i)||(i=[i]),n=i.reduce(function(n,r){var t=Math.pow(2,32)-1-Math.pow(2,r);return e(n&t)},n)),n},n.check=function(e,n){var r=Math.pow(2,n);return Boolean(e&r)},n}).factory("UsersCache",["$q","$cacheFactory","Options",function(e,n,r){function t(e){if(!angular.isUndefined(e)){var n=l.get(f.get("journal"))||{},r=e;return angular.isArray(e)||(e=[e]),e.forEach(function(e){if(e&&angular.isObject(e)&&!angular.isUndefined(e.username)){var r=e.display_username||e.username,t=n[r];n[r]=t?angular.extend(t,e):e}}),l.put(f.get("journal"),n),r}}function i(e){var n=l.get(f.get("journal"));return Boolean(n[e])}function u(e){var n;if(angular.isString(e))return n=l.get(f.get("journal")),n&&n[e]?n[e]:null;if(angular.isFunction(e))return s(e);if(angular.isUndefined(e))return s();throw new TypeError("Incorrect argument passed.")}function a(e){var n=l.get(f.get("journal"));return n||angular.isObject(n)?Object.keys(n).reduce(function(r,t){return String(n[t].id)===String(e)?n[t]:r},null):null}function s(e){var n,r=l.get(f.get("journal")),t=[];for(n in r)if(r.hasOwnProperty(n)){if(e&&!e(r[n]))continue;t.push(r[n])}return t}function o(e,n){var r=u(e)||{username:e};return angular.extend(r,n),t(r),r}var c,l=n("users"),f=r.create({journal:LJ.get("remoteUser")});return c={add:t,update:o,set:f.set,get:u,getById:a,exists:i}}]).factory("Users",["$q","$timeout","Api","Mask","UsersCache","Options",function(e,n,r,t,i,u){function a(e){return k[C.get("type")][e]}function s(e){return"subscriptions"===C.get("type")?Boolean(e.is_subscribedon):!0}function o(e,n){return angular.isUndefined(n)?e[c()]||1:void(e[c()]=n)}function c(){return"subscriptions"===C.get("type")?"filtermask":"groupmask"}function l(e,n,t){return r.call("user.get",{target:e,fields:n},t).then(function(e){var n=e.user;return i.add(n),n})}function f(e,n,t){return r.call("user.get",{targetid:e,fields:n},t).then(function(e){var n=e.user;return i.add(n),n})}function d(e,n){return r.call("relations.list_friends",{journal:C.get("journal"),fields:e},n).then(_("is_friend"))}function g(e){return r.call("groups.list_users",{journal:C.get("journal"),fields:e}).then(function(e){return i.add(e.users),e})}function p(e){return r.call("relations.list_subscriptions",{journal:C.get("journal"),fields:e}).then(_("is_subscribedon"))}function b(e){return r.call("relations.list_banned",{journal:C.get("journal"),fields:e}).then(_("is_banned"))}function _(e){return function(n){var r=n.users;return r.forEach(LJ.Function.set(e,!0)),i.add(r),r}}function v(e){return r.call("relations."+e+"_count").then(function(e){return e.count})}function h(n){return angular.isArray(n)||(n=[n]),0===n.length?e.reject("You should provide users to sync."):r.call(a("update"),{users:n,journal:C.get("journal")}).then(function(e){return i.add(e.users),e})}function m(e,n){var r=i.get(e);return r?t.check(o(r),n):!1}function j(e){return e.filter(i.exists).map(i.get).filter(s)}function y(e){var n=(e.filter||"").toLowerCase(),r=i.get(function(r){return s(r)&&t.check(o(r),e.id)?!n||-1!==r.display_username.toLowerCase().indexOf(n):!1});return e.limit&&(r=r.slice(0,e.limit)),r}function U(e){var n=(e.filter||"").toLowerCase(),r=i.get(function(r){return s(r)?t.check(o(r),e.id)?!1:!n||-1!==r.display_username.toLowerCase().indexOf(n):!1});return e.limit&&(r=r.slice(0,e.limit)),r}function w(e,n){angular.isArray(n)||(n=[n]);var r;return r="subscriptions"===C.get("type")?j(n):n.map(function(e){return i.get(e)||{username:e}}),r.forEach(function(n){o(n,t.change(o(n),{add:e}))}),h(r)}function L(e,n,r){angular.isArray(n)||(n=[n]);var i=j(n);return i.forEach(function(n){o(n,t.change(o(n),{remove:e}))}),r&&r.silent?void 0:h(i)}function E(e,n){return i.update(e,{alias:n}),r.call("user.alias_set",{target:e,alias:n})}function F(e){return function(n,r){return n[e].toLowerCase().localeCompare(r[e].toLowerCase())}}function O(){var e,n=C.get("journal");C.set.apply(null,arguments),e=C.get("journal"),e!==n&&i.set("journal",e)}var k={friends:{read:"relations.list_friends",readOne:"relations.get_friend",update:"groups.update_users"},subscriptions:{read:"relations.list_subscriptions",readOne:"relations.get_subscription",update:"filters.update_users"}},C=u.create({type:"friends",journal:LJ.get("remoteUser")});return{USERHEAD_FIELDS:{alias:1,journal_url:1,profile_url:1,userhead_url:1,is_invisible:1,journaltype:1},set:O,get:C.get,Cache:i,fetchUser:l,fetchUserById:f,fetchBanned:b,fetchFriends:d,fetchGroupUsers:g,fetchSubscriptions:p,fetchCount:v,sync:h,alias:E,isUserInGroup:m,getExisting:j,fromGroup:y,outOfGroup:U,addToGroup:w,removeFromGroup:L,comparator:F}}])}(); /* <<< file end: js/core/angular/users.js */ //# map link was there [users.js.map] /* >>> file start: js/lib/textinputs_jquery.js */ var _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};!function(e){function t(e,t){var n=_typeof(e[t]);return"function"===n||!("object"!=n||!e[t])||"unknown"==n}function n(e,t){return _typeof(e[t])!=g}function o(e,t){return!("object"!=_typeof(e[t])||!e[t])}function r(e){window.console&&window.console.log&&window.console.log("RangyInputs not supported in your browser. Reason: "+e)}function a(e,t,n){return 0>t&&(t+=e.value.length),("undefined"==typeof n?"undefined":_typeof(n))==g&&(n=t),0>n&&(n+=e.value.length),{start:t,end:n}}function c(e,t,n){return{start:t,end:n,length:n-t,text:e.value.slice(t,n)}}function l(){return o(document,"body")?document.body:document.getElementsByTagName("body")[0]}var i,s,u,d,f,p,v,y,m,g="undefined";e(document).ready(function(){function h(e,t){return function(){var n=this.jquery?this[0]:this,o=n.nodeName.toLowerCase();if(1==n.nodeType&&("textarea"==o||"input"==o&&"text"==n.type)){var r=[n].concat(Array.prototype.slice.call(arguments)),a=e.apply(this,r);if(!t)return a}return t?this:void 0}}var x=document.createElement("textarea");if(l().appendChild(x),n(x,"selectionStart")&&n(x,"selectionEnd"))i=function T(e){var t=e.selectionStart,T=e.selectionEnd;return c(e,t,T)},s=function b(e,t,n){var b=a(e,t,n);e.selectionStart=b.start,e.selectionEnd=b.end},m=function(e,t){t?e.selectionEnd=e.selectionStart:e.selectionStart=e.selectionEnd};else{if(!(t(x,"createTextRange")&&o(document,"selection")&&t(document.selection,"createRange")))return l().removeChild(x),void r("No means of finding text input caret position");i=function w(e){var t,n,o,r,a=0,w=0,l=document.selection.createRange();return l&&l.parentElement()==e&&(o=e.value.length,t=e.value.replace(/\r\n/g,"\n"),n=e.createTextRange(),n.moveToBookmark(l.getBookmark()),r=e.createTextRange(),r.collapse(!1),n.compareEndPoints("StartToEnd",r)>-1?a=w=o:(a=-n.moveStart("character",-o),a+=t.slice(0,a).split("\n").length-1,n.compareEndPoints("EndToEnd",r)>-1?w=o:(w=-n.moveEnd("character",-o),w+=t.slice(0,w).split("\n").length-1))),c(e,a,w)};var S=function(e,t){return t-(e.value.slice(0,t).split("\r\n").length-1)};s=function R(e,t,n){var R=a(e,t,n),o=e.createTextRange(),r=S(e,R.start);o.collapse(!0),R.start==R.end?o.move("character",r):(o.moveEnd("character",S(e,R.end)),o.moveStart("character",r)),o.select()},m=function(e,t){var n=document.selection.createRange();n.collapse(t),n.select()}}l().removeChild(x),d=function k(e,t,n,o){var k;t!=n&&(k=e.value,e.value=k.slice(0,t)+k.slice(n)),o&&s(e,t,t)},u=function(e){var t=i(e);d(e,t.start,t.end,!0)},y=function(e){var t,n=i(e);return n.start!=n.end&&(t=e.value,e.value=t.slice(0,n.start)+t.slice(n.end)),s(e,n.start,n.start),n.text};var E=function(e,t,n,o){var r=t+n.length;switch(o="string"==typeof o?o.toLowerCase():""){case"collapsetostart":s(e,t,t);break;case"collapsetoend":s(e,r,r);break;case"select":s(e,t,r)}};f=function(e,t,n,o){var r=e.value;e.value=r.slice(0,n)+t+r.slice(n),"boolean"==typeof o&&(o=o?"collapseToEnd":""),E(e,n,t,o)},p=function(e,t,n){var o=i(e),r=e.value;e.value=r.slice(0,o.start)+t+r.slice(o.end),E(e,o.start,t,n||"collapseToEnd")},v=function _(e,t,n,o){("undefined"==typeof n?"undefined":_typeof(n))==g&&(n=t);var r=i(e),a=e.value;e.value=a.slice(0,r.start)+t+r.text+n+a.slice(r.end);var _=r.start+t.length;E(e,_,r.text,o||"select")},e.fn.extend({getSelection:h(i,!1),setSelection:h(s,!0),collapseSelection:h(m,!0),deleteSelectedText:h(u,!0),deleteText:h(d,!0),extractSelectedText:h(y,!1),insertText:h(f,!0),replaceSelectedText:h(p,!0),surroundSelectedText:h(v,!0)})})}(jQuery); /* <<< file end: js/lib/textinputs_jquery.js */ //# map link was there [textinputs_jquery.js.map] /* >>> file start: js/core/angular/ljTour.js */ //= require js/core/angular/bubble.js //= require js/core/angular/api.js //= require js/core/angular/ref.js Site.page.template['angular/bubbletour.ng.tmpl'] = '
    \n
    \n \n \n /\n \n \n
    \n
    \n \n
    \n
    \n
      \n
    • \n \n
    • \n
    \n
      \n
    • \n \n
    • \n
    • \n \n
    • \n
    • \n \n
    • \n
    \n
    \n
    \n'; LJ.injectStyle('/* >>> file start: stc/tour/ljtour.css */\n.b-bubble-tour{z-index:5001}.b-bubble-tour .b-popup-inner{padding:0}.b-helptour{width:350px}.b-helptour-header{margin:0 0 .3em;padding:10px 16px 0}.b-helptour-footer:after,.b-helptour-header:after{display:table;width:100%;clear:both;content:\"\"}.b-helptour-stage-title{margin-right:10px}.b-helptour P:first-child{margin:0 0 .3em}.b-helptour-content{margin:10px 0 .6em;padding:0 16px}.b-helptour-content P{margin:.3em 0}.b-helptour-content LI,.b-helptour-content UL{margin:0;padding:0;list-style:none}.b-helptour-footer{padding:6px 15px;border-radius:0 0 5px 5px;background-color:#DAE3E6}.b-helptour-controls{margin:0;padding:0}.b-helptour-state{float:left}.b-helptour-step{float:right}.b-helptour-control{display:inline;margin-right:4px;cursor:pointer}.b-helptour-control-done:after{display:inline-block;content:\"\";width:14px;height:12px;background-image:url(/img/icons/unit_v3.png?v=42878);background-repeat:no-repeat;background-position:0 -223px}.b-helptour-control-done A{padding-left:8px}.b-helptour-control-done A:link,.b-helptour-control-done A:visited,.b-helptour-control-next A:link,.b-helptour-control-prev A:link{color:#00A3D9}.b-helptour-control-skip A:link,.b-helptour-control-skip A:visited{color:#7A9199}.b-helptour-control A{font-size:13px}.b-helptour-control A:active,.b-helptour-control A:focus,.b-helptour-control A:hover{color:#0086b3}.p-ljtour .b-lenta .l-flatslide-container{position:static}.p-ljtour .l-flatslide-menu-controls{position:absolute;top:auto!important}.p-ljtour.p-openpopup .w-cs{overflow:visible}@media all and (max-width:650px){.p-ljtour.p-openpopup .b-fader{display:none!important}.b-bubble-tour{display:none}}\n/* <<< file end: stc/tour/ljtour.css */\n\n/*# sourceMappingURL=ljtour.css.map */\n'); //= require_ml tour.steps.prev //= require_ml tour.steps.next //= require_ml tour.steps.skip //= require_ml tour.steps.done !function(e){return e}(),function(e){"use strict";angular.module("LJ.Tour",["LJ.Bubble","LJ.Templates","LJ.Directives","LJ.Api"]).factory("Tour",["Api",function(e){var t={};return t.queue={},t.checkAvailable=function(){var n=Object.keys(t.queue);return e.call("tour.is_available",{tours:n}).then(function(e){n.forEach(function(n){0===e.states[n]&&delete t.queue[n]})})},t.setDone=function(t){return e.call("tour.set_done",{tour:t})},t}]).directive("ljTour",["$timeout","$document","Bubble","Ref","Tour",function(t,n,r,u,o){return{scope:!0,link:function(i){function c(){e("body").find("[data-tour]").each(function(){var t=e(this),n=angular.extend({element:t},t.data());Array.isArray(L[n.tour])||(L[n.tour]=[]),n.tourStepDiscardDuplicates&&L[n.tour].some(function(e){return e.tourStep===n.tourStep})||L[n.tour].push(n)})}function a(){var e=Object.keys(L)[0],t=L[e];i.current=t.filter(function(e){return b(e)&&v(e)}).sort(function(e,t){return e.tourStep>t.tourStep?1:e.tourStep0&&(i.step=i.current[--e],i.index=++e,h())}function b(e){return e.hasOwnProperty("tourOwner")?LJ.get("remote.username")===LJ.get("journal.username"):!0}function v(e){return e.hasOwnProperty("tourSkipIf")?e.tourSkipIf.split(",").every(function(e){return e=e.trim(),"!"===e.charAt(0)?LJ.get(e.slice(1)):!LJ.get(e)}):!0}function m(e){return e.is(":visible")&&0!==e.css("opacity")&&"hidden"!==e.css("visibility")}function g(e){return e?e.hasOwnProperty("tourStartPage")?new RegExp(e.tourStartPage,"i").test(location.pathname):1===e.tourStep:!1}function y(){angular.element(window).trigger("resize"),S()}function h(){if(i.step){if(!i.step.element.is(":visible"))return p();r.current&&r.close(),t(function(){var e=r.options("tour")||{};r.open("tour",angular.extend(e,i.step.tourBubble),i.step.element),S()}),LJ.Event.once("visual_editor_ready",function(){t(y)})}}function S(){u.scrollTo(i.step.tour+i.step.tourStep,{onlyOutOfScreen:!0})}function k(e){if(i.current&&i.current.length){switch(e.which){case 27:s();break;case 37:d();break;case 39:p()}i.$apply()}}var J,L=o.queue,O=angular.element(document.querySelector(".b-fader")),w=!1;J=r.register({name:"tour",template:"bubbletour.ng.tmpl",closeControl:!1},i),!LJ.Flags.isEnabled("friendsfeed_tour")||LJ.Support.isMobile()||w||(w=!0,t(function(){c(),o.checkAvailable().then(l)})),i.next=p,i.prev=d,i.end=s,n.on("keydown",k),i.$on("$destroy",function(){n.off("keydown",k),J()})}}}])}(jQuery); /* <<< file end: js/core/angular/ljTour.js */ //# map link was there [ljTour.js.map] /* >>> file start: js/editor/editor.js */ //= require js/lib/textinputs_jquery.js //= require js/core/angular/ljTour.js !function(e){"use strict";angular.module("Editor",["LJ.Tour"]).factory("Editor",function(){var t={};return t.getSelectedText=function(){var t=e("#body");return t.getSelection().text},t.htmlMode=function(){return e("#body").is(":visible")},t.insertContent=function(r,n,o,i){var l,u=e("#body");if(LJ.Event.trigger("contentInsert"),t.htmlMode()){var c=n.split("{caret}");return u.surroundSelectedText(c[0],c.length>1?c[c.length-1]||"":"").trigger("input"),l=u.getSelection(),3===c.length&&0===l.length&&u.replaceSelectedText(c[1],"collapseToEnd").setSelection(l.start+c[1].length+c[c.length-1].length),LJ.Event.trigger(r+"_htmlMode_response",n,o,i),void u.focus()}return LJ.Editor.RTEReadyPromise.then(function(){if("color"===r)return LJ.Event.trigger("selectedColor",o);if("video"===r&&"string"==typeof n){var e=void 0;return e=Array.isArray(i)&&i.length>1?n.split("\n"):[n],LJ.Event.trigger("video_response",e,i)}LJ.Event.trigger(r+"_response",o||n,i)})},t}).controller("EditorCtrl",["$scope","Editor","Bubble","$timeout",function(e,t,r,n){var o={bold:"{caret}",italic:"{caret}",underline:"{caret}",strikethrough:"{caret}"};e.formattingAction=function(e,r){e.preventDefault(),o[r]&&t.insertContent(r,o[r])},e.userClick=function(e,o){var i=t.getSelectedText(),l=/^[A-Za-z0-9_\-]+$/;e.preventDefault(),l.test(i)?t.insertContent(o,''):n(function(){r.open("user")})}}])}(jQuery); /* <<< file end: js/editor/editor.js */ //# map link was there [editor.js.map] /* >>> file start: js/editor/media.js */ var _extends=Object.assign||function(e){for(var t=1;t'):new RegExp("^"+r)}var n=LJ.get("siteroot").split(/https?:\/\/www\./)[1].replace(/\./g,"\\.");LJ.Media.Provider=t;t.prototype.parse=function(e,t){var r,i=this,a=this,n=this.params(e,t);if(!n)return null;var o=void 0;return o=n.then?new Promise(function(e,t){n.then(e),n.fail?n.fail(t):n["catch"]&&n["catch"](t)}):Promise.resolve(n),o.then(function(e){var n="";"function"==typeof a.link?n=a.link(e):"string"==typeof a.link&&(n=a.link.supplant(e)),r=[];var o=_extends({},e,{link:n});return r.push("string"==typeof i.embed?i.toPromise(i.embed.supplant(o)):i.embed(o)),t.thumbnail&&i.thumbnail&&r.push("string"==typeof i.thumbnail?i.toPromise(i.thumbnail.supplant(e)):i.thumbnail(e)),Promise.all(r).then(function(t){var r=t[0],i=t[1];return{provider:a.provider,site:a.provider,embed:r,thumb:i,customTag:!!e.custom,id:e.id,link:n}})})["catch"](function(){return null})},t.prototype.cache=function(e,t){return"undefined"==typeof t?this._cache[e]:void(this._cache[e]=t)},t.prototype.toPromise=function(t){var r=e.Deferred();return r.resolve(t),r.promise()};var o=t.prototype.toPromise,s={ljVideo:function(e){var t=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],r=/.*livejournal\.com\/.*\?[\w=&]*record_id=(\d+).*$/,i=("string"==typeof e?e:t.url).match(r);return i}};LJ.Media.embedMatchers=s;var u=function(){var e=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],t=["ljVideo","coub","youtube","vimeo","vine","rutube"];return t.indexOf(e.site)>-1};LJ.Media.isVideoEmbedData=u;var d={coub:new t("coub",{link:"//coub.com/embed/{id}?muted=false&autostart=false&originalSize=false",embed:' ',thumbnail:function(e){var t=this.cache(e.id);return t?this.toPromise(t):this.toPromise(null)},params:function(e){var t=/\/\/[w\.]*coub\.com\/embed\/(\w+)/,r=e.match(t);return r&&{id:r[1]}}}),youtube:new t("youtube",{link:"https://youtube.com/watch?v={id}",thumbnail:"https://img.youtube.com/vi/{id}/0.jpg",embed:'',params:function(e){var t=/^.*((youtu.be\/)|(v\/)|(\/u\/\w\/)|(embed\/)|(watch\??v?=?))([^#\&\?]*).*/,r=e.match(t);return r&&-1===r[0].indexOf("youtu")?null:r&&{id:r[7]}}}),vimeo:new t("vimeo",{link:"https://vimeo.com/{id}",embed:'',params:function(e){var t=/^(https?:\/\/)?(www\.)?(player\.)?vimeo.com\/(video\/|channels\/\w+\/)?(\d+)*/,r=e.match(t);return r&&{id:r[5]}},thumbnail:function(t){var r=this,i=this.cache(t.id);return i?this.toPromise(i):e.ajax({url:"../https@vimeo.com/api/v2/video/"+t.id+".json",dataType:"jsonp"}).then(function(e){if(e&&e[0]){var i=e[0].thumbnail_large;if(i)return r.cache(t.id,i),i}else console.error("Data error",e)})}}),vine:new t("vine",{link:"https://vine.co/v/{id}",embed:'',params:function(e){var t=/vine.co\/v\/([^\/]*)/,r=e.match(t);return r&&{id:r[1]}}}),gist:new t("gist",{link:"https://gist.github.com/{id}",embed:'',params:function(e){var t=/.*(?:gist\.github\.com\/)([^\/]+\/{1}[^\/]+)\/{0,1}$/,r=e.match(t);return r&&{id:r[1]}}}),rutube:new t("rutube",{link:"https://rutube.ru/video/{id}/",embed:'',params:function(e){var t=/^.*rutube.ru\/video(\/embed\/|\/private\/|\/)(\w{32}).*/,r=e.match(t);return r&&{id:r[2]}},thumbnail:function(t){var r=this,i=this.cache(t.id);return i?this.toPromise(i):e.ajax({url:"../https@rutube.ru/api/video/"+t.id+"/?format=jsonp",dataType:"jsonp"}).done(function(e){if(e&&e.thumbnail_url){var i=e.thumbnail_url;if(i)return r.cache(t.id,i),i}else console.error("Data error",e)})}}),ramblerKassa:new t("ramblerKassa",{link:"https://kassa.rambler.ru/movie/{id}",embed:'',params:function(e){var t=/kassa\.rambler\.ru\/movie\/(\d+)$/,r=e.match(t);return r&&{id:r[1]}}}),ljEmbed:new t("ljEmbed",{link:"{link}",embed:function(e){return e.embedCode?e.embedCode:''},params:function(e){var t=a(!0),r=e.match(t),i=LJ.Util.parseStringForLJPostLinks(e),n="";try{n=i[0].link}catch(o){}if(!n)return null;var s=n.replace(/#.*$/,"").replace(/\?.*$/,"");if(r)return{embedCode:r[0],link:s};var u=/^\s*$/.test(e.replace(n,""));return u?{link:s}:null}}),playbuzz:new t("playbuzz",{link:"../https@www.playbuzz.com/default.htm",embed:"{embed}",params:function(e){var t=void 0,r=void 0;try{var i=(new DOMParser).parseFromString(e,"text/html");r=i.querySelector(".playbuzz"),t=r.attributes["data-id"].value,r.innerHTML="[Playbuzz Embed]"}catch(a){}return t?{id:t,embed:r.outerHTML}:null}})},c={facebook:{config:{link:function(e){return e.link},params:function(e){var t=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],r=/(^.*facebook.com\/.*)/,i=e.match(r);if(!i)return null;var a={link:i[1]};t.embedCode&&(a.embedCode=t.embedCode);var n=e.match(/post.php\?href=([^&]*)/);return n&&n[1]&&(a.postLink=decodeURIComponent(n[1])),a},embed:function(t){var r=this,i=/(^.*facebook.com\/)(\d*)(\/.*)/,a=t.link.match(i),n=t.link.match(/video\.php/),s=e.Deferred(),u=a&&a[2],d=this.cache(t.link),c=void 0,l=t.embedCode&&t.link.match(/comment_embed.php/),m=function(e){var t=e.link,r=e.postLink;if(l)return e.embedCode;if(n)return"';var i=r||t;return'
    '+('')+"
    "};return d?(o||this.toPromise)(d):(u?LJ.Social.load("facebook").then(function(){FB.api(u,function(e){t.link.replace(i,"$1"+e.username+"$3");c=m(t),r.cache(t.link,c),s.resolve(c)})}):(c=m(t),this.cache(t.link,c),s.resolve(c)),s.promise())}}},twitter:{config:{link:function(e){return"../https@twitter.com/"+e.username+"/status/"+e.id},params:function(e){var t=/^.*twitter.com\/(\w*)\/status\/(\w*).*/,r=e.match(t);return r&&{id:r[2],username:r[1]}},embed:function(t){var r=this,i=this.cache(t.id);return i?(o||this.toPromise)(i):e.ajax({url:"../https@api.twitter.com/1/statuses/oembed.json@id="+t.id,dataType:"jsonp"}).then(function(e){var i=e.html.replace(/)<[^<]*)*<\/script>/gi,"").trim();return r.cache(t.id,i),i})}}},telegram:{config:{link:function(e){var t=e.id;return"../https@t.me/"+t},embed:function(e){var t=e.id;return"
    https:../https@t.me/"+t+"
    "},params:function(e){var t=/t.me\/([^\/]+\/[0-9]+)/;e.indexOf("script")>-1&&(t=/data-telegram-post=["']([^"']*)["']/);var r=e.match(t);return r&&r[1]&&-1!==r[1].indexOf("/")?{id:r[1]}:null}}},instagram:{config:{link:function(e){return"https:../https@instagram.com/p/"+e.id+"/"},embed:function(e){var t=e.id;return('\n https:../https@instagram.com/p/'+t+"\n ").replace(/\n/g,"").replace(/\s+/g," ")},params:function(e){var t=/.*(?:instagram\.\w*|instagr\.am)\/p\/([^\/<>]+).*/,r=e.match(t);return r&&{id:r[1]}}}},ljEmbed:{config:{link:function(e){return e.link},embed:function(e){return e.embed},params:function(e){var t=a(!0),r=e.match(t),i=e.match("(?:(?:https?:)?//)?[-\\w]{1,15}\\."+n+"/\\d+.html")||[];return r&&{embed:e,link:i[0]}}}},ljVideo:{config:{link:function(e){return"../https@vc.videos.livejournal.com/index/player@player=new&record_id="+e.storageid},embed:function(e){var t=e.link,r=e.thumbnail,i=e.width,a=void 0===i?560:i,n=e.height,o=void 0===n?315:n;return''},thumbnail:function(e){return e.screenshot||this.cache(e.storageid)},params:function(e){var t=arguments.length<=1||void 0===arguments[1]?{}:arguments[1];t.screenshot&&this.cache(t.storageid,t.screenshot);var r=/.*livejournal\.com\/.*\?[\w=&]*record_id=(\d+).*$/,i=("string"==typeof e?e:t.url).match(r),a=i&&i[1];if(a)return _extends({},t,{storageid:a});var n=LJ.Util.parseStringForLJLink(e,{thisDomainOnly:!0});if(!n)return null;var o=/\/video\/\album\/\d+\/.*id=(\d+).*$/,s=(e||t.url||"").match(o);return s?LJ.Api.call("video.get_record",{id:s[1],user:n.domainUsername}).then(function(){var e=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],r=e.record||{},i=r.storageid;return i?_extends({},t,{storageid:i,screenshot:r.screenshot}):Promise.reject()}).fail(function(){return null}):null}}}};return Object.keys(c).forEach(function(e){d[e]=new t(e,c[e].config)}),LJ.Media.providerRecipes=c,i}(jQuery); /* <<< file end: js/editor/media.js */ //# map link was there [media.js.map] /* >>> file start: js/core/angular/pills.js */ !function(i){return i}(),function(){"use strict";angular.module("LJ.Pills",[]).factory("Pills",function(){var i={};return{group:function(n,t){return"undefined"==typeof t?i[n]:void(i[n]=t)}}}).directive("ljPillsGroup",["Pills",function(i){return{restrict:"A",link:function(n,t,l){var r=l.ljPillsGroupActive||"b-menu-item-active";n.$watch(function(){return i.group(l.ljPillsGroup)},function(i){t.find("[data-pill]").removeClass(r).filter('[data-pill="'+i+'"]').addClass(r)})}}}])}(); /* <<< file end: js/core/angular/pills.js */ //# map link was there [pills.js.map] /* >>> file start: js/core/angular/authHelper.js */ !function(e){return e}(),function(){"use strict";angular.module("LJ.AuthHelper",[]).factory("AuthHelper",["$q","$interval",function(e,n){function t(t){var u,i=window.open(t,"Auth helper","height=450,width=650"),l=0;return o=e.defer(),u=n(function(){var e;l++,i.closed&&(e=LJ.Cookie.get("_Auth_token"),"undefined"!=typeof e?o.resolve(e):o.reject(),LJ.Cookie.setGlobal("_Auth_token",null),n.cancel(u)),l>r&&n.cancel(u)},200),o.promise}var o,r=1500;return{open:t}}])}(); /* <<< file end: js/core/angular/authHelper.js */ //# map link was there [authHelper.js.map] /* >>> file start: js/core/angular/adult.js */ Site.page.template['angular/adult.ng.tmpl'] = '\n\n'; //= require_ml flatmedia.adult.content //= require_ml flatmedia.adult.content.default //= require_ml flatmedia.adult.content.explicit //= require_ml flatmedia.adult.content.none !function(t){return t}(),function(){"use strict";angular.module("LJ.Adult",[]).directive("ljAdult",[function(){return{scope:{model:"=ljAdult"},templateUrl:"adult.ng.tmpl",controllerAs:"adult",controller:["$scope","$element","$attrs",function(t,l,e){this.categories=[{title:LJ.ml("flatmedia.adult.content.none"),value:!1},{title:LJ.ml("flatmedia.adult.content.explicit"),value:!0}],e.hasOwnProperty("ljAdultNotStrict")&&this.categories.unshift({title:LJ.ml("flatmedia.adult.content.default"),value:""})}]}}])}(); /* <<< file end: js/core/angular/adult.js */ //# map link was there [adult.js.map] /* >>> file start: js/lib/plupload/plupload-2.3.6.full.min.js */ var _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};!function(e,t){var i=function(){var e={};return t.apply(e,arguments),e.moxie};"function"==typeof define&&define.amd?define("moxie",[],i):"object"==("undefined"==typeof module?"undefined":_typeof(module))&&module.exports?module.exports=i():e.moxie=i()}(this||window,function(){!function(e,t){"use strict";function i(e,t){for(var i,n=[],r=0;r0&&c(n,function(n,u){var c=-1!==f(e(n),["array","object"]);return n===r||t&&o[u]===r?!0:(c&&i&&(n=s(n)),void(e(o[u])===e(n)&&c?a(t,i,[o[u],n]):o[u]=n))})}),o}function u(e,t){function i(){this.constructor=e}for(var n in t)({}).hasOwnProperty.call(t,n)&&(e[n]=t[n]);return i.prototype=t.prototype,e.prototype=new i,e.parent=t.prototype,e}function c(e,t){var i,n,r,o;if(e){try{i=e.length}catch(s){i=o}if(i===o||"number"!=typeof i){for(n in e)if(e.hasOwnProperty(n)&&t(e[n],n)===!1)return}else for(r=0;i>r;r++)if(t(e[r],r)===!1)return}}function l(t){var i;if(!t||"object"!==e(t))return!0;for(i in t)return!1;return!0}function d(t,i){function n(r){"function"===e(t[r])&&t[r](function(e){++ri;i++)if(t[i]===e)return i}return-1}function h(t,i){var n=[];"array"!==e(t)&&(t=[t]),"array"!==e(i)&&(i=[i]);for(var r in t)-1===f(t[r],i)&&n.push(t[r]);return n.length?n:!1}function p(e,t){var i=[];return c(e,function(e){-1!==f(e,t)&&i.push(e)}),i.length?i:null}function g(e){var t,i=[];for(t=0;ti;i++)n+=Math.floor(65535*Math.random()).toString(32);return(t||"o_")+n+(e++).toString(32)}}();return{guid:w,typeOf:e,extend:t,extendIf:i,extendImmutable:n,extendImmutableIf:r,clone:o,inherit:u,each:c,isEmptyObj:l,inSeries:d,inParallel:m,inArray:f,arrayDiff:h,arrayIntersect:p,toArray:g,trim:x,sprintf:y,parseSizeStr:v,delay:_}}),n("moxie/core/utils/Encode",[],function(){var e=function(e){return unescape(encodeURIComponent(e))},t=function(e){return decodeURIComponent(escape(e))},i=function(e,i){if("function"==typeof window.atob)return i?t(window.atob(e)):window.atob(e);var n,r,o,s,a,u,c,l,d="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",m=0,f=0,h="",p=[];if(!e)return e;e+="";do s=d.indexOf(e.charAt(m++)),a=d.indexOf(e.charAt(m++)),u=d.indexOf(e.charAt(m++)),c=d.indexOf(e.charAt(m++)),l=s<<18|a<<12|u<<6|c,n=255&l>>16,r=255&l>>8,o=255&l,p[f++]=64==u?String.fromCharCode(n):64==c?String.fromCharCode(n,r):String.fromCharCode(n,r,o);while(m>18,a=63&l>>12,u=63&l>>6,c=63&l,p[f++]=d.charAt(s)+d.charAt(a)+d.charAt(u)+d.charAt(c);while(mn;n++)if(e[n]!=t[n]){if(e[n]=u(e[n]),t[n]=u(t[n]),e[n]t[n]){o=1;break}}if(!i)return o;switch(i){case">":case"gt":return o>0;case">=":case"ge":return o>=0;case"<=":case"le":return 0>=o;case"==":case"=":case"eq":return 0===o;case"<>":case"!=":case"ne":return 0!==o;case"":case"<":case"lt":return 0>o;default:return null}}var n=function(e){var t="",i="?",n="function",r="undefined",o="object",s="name",a="version",u={has:function(e,t){return-1!==t.toLowerCase().indexOf(e.toLowerCase())},lowerize:function(e){return e.toLowerCase()}},c={rgx:function(){for(var t,i,s,a,u,c,l,d=0,m=arguments;d0?2==u.length?t[u[0]]=_typeof(u[1])==n?u[1].call(this,l):u[1]:3==u.length?t[u[0]]=_typeof(u[1])!==n||u[1].exec&&u[1].test?l?l.replace(u[1],u[2]):e:l?u[1].call(this,l,u[2]):e:4==u.length&&(t[u[0]]=l?u[3].call(this,l.replace(u[1],u[2])):e):t[u]=l?l:e;break}if(c)break}return t},str:function(t,n){for(var r in n)if(_typeof(n[r])===o&&n[r].length>0){for(var s=0;s=")),i.use_blob_uri},use_data_uri:function(){var e=new Image;return e.onload=function(){i.use_data_uri=1===e.width&&1===e.height},setTimeout(function(){e.src="data:image/gif;base64,R0lGODlhAQABAIAAAP8AAAAAACH5BAAAAAAALAAAAAABAAEAAAICRAEAOw=="},1),!1}(),use_data_uri_over32kb:function(){return i.use_data_uri&&("IE"!==s.browser||s.version>=9)},use_data_uri_of:function(e){return i.use_data_uri&&33e3>e||i.use_data_uri_over32kb()},use_fileinput:function(){if(navigator.userAgent.match(/(Android (1.0|1.1|1.5|1.6|2.0|2.1))|(Windows Phone (OS 7|8.0))|(XBLWP)|(ZuneWP)|(w(eb)?OSBrowser)|(webOS)|(Kindle\/(1.0|2.0|2.5|3.0))/))return!1;var e=document.createElement("input");return e.setAttribute("type","file"),i.use_fileinput=!e.disabled},use_webgl:function(){var e,n=document.createElement("canvas"),r=null;try{r=n.getContext("webgl")||n.getContext("experimental-webgl")}catch(o){}return r||(r=null),e=!!r,i.use_webgl=e,n=t,e}};return function(t){var n=[].slice.call(arguments);return n.shift(),"function"===e.typeOf(i[t])?i[t].apply(this,n):!!i[t]}}(),o=(new n).getResult(),s={can:r,uaParser:n,browser:o.browser.name,version:o.browser.version,os:o.os.name,osVersion:o.os.version,verComp:i,swf_url:"flash/Moxie.swf",xap_url:"silverlight/Moxie.xap",global_event_dispatcher:"moxie.core.EventTarget.instance.dispatchEvent"};return s.OS=s.os,s}),n("moxie/core/Exceptions",["moxie/core/utils/Basic"],function(e){function t(e,t){var i;for(i in e)if(e[i]===t)return i;return null}return{RuntimeError:function(){function i(e,i){this.code=e,this.name=t(n,e),this.message=this.name+(i||": RuntimeError "+this.code)}var n={NOT_INIT_ERR:1,EXCEPTION_ERR:3,NOT_SUPPORTED_ERR:9,JS_ERR:4};return e.extend(i,n),i.prototype=Error.prototype,i}(),OperationNotAllowedException:function(){function t(e){this.code=e,this.name="OperationNotAllowedException"}return e.extend(t,{NOT_ALLOWED_ERR:1}),t.prototype=Error.prototype,t}(),ImageError:function(){function i(e){this.code=e,this.name=t(n,e),this.message=this.name+": ImageError "+this.code}var n={WRONG_FORMAT:1,MAX_RESOLUTION_ERR:2,INVALID_META_ERR:3};return e.extend(i,n),i.prototype=Error.prototype,i}(),FileException:function(){function i(e){this.code=e,this.name=t(n,e),this.message=this.name+": FileException "+this.code}var n={NOT_FOUND_ERR:1,SECURITY_ERR:2,ABORT_ERR:3,NOT_READABLE_ERR:4,ENCODING_ERR:5,NO_MODIFICATION_ALLOWED_ERR:6,INVALID_STATE_ERR:7,SYNTAX_ERR:8};return e.extend(i,n),i.prototype=Error.prototype,i}(),DOMException:function(){function i(e){this.code=e,this.name=t(n,e),this.message=this.name+": DOMException "+this.code}var n={INDEX_SIZE_ERR:1,DOMSTRING_SIZE_ERR:2,HIERARCHY_REQUEST_ERR:3,WRONG_DOCUMENT_ERR:4,INVALID_CHARACTER_ERR:5,NO_DATA_ALLOWED_ERR:6,NO_MODIFICATION_ALLOWED_ERR:7,NOT_FOUND_ERR:8,NOT_SUPPORTED_ERR:9,INUSE_ATTRIBUTE_ERR:10,INVALID_STATE_ERR:11,SYNTAX_ERR:12,INVALID_MODIFICATION_ERR:13,NAMESPACE_ERR:14,INVALID_ACCESS_ERR:15,VALIDATION_ERR:16,TYPE_MISMATCH_ERR:17,SECURITY_ERR:18,NETWORK_ERR:19,ABORT_ERR:20,URL_MISMATCH_ERR:21,QUOTA_EXCEEDED_ERR:22,TIMEOUT_ERR:23,INVALID_NODE_TYPE_ERR:24,DATA_CLONE_ERR:25};return e.extend(i,n),i.prototype=Error.prototype,i}(),EventException:function(){function t(e){this.code=e,this.name="EventException"}return e.extend(t,{UNSPECIFIED_EVENT_TYPE_ERR:0}),t.prototype=Error.prototype,t}()}}),n("moxie/core/utils/Dom",["moxie/core/utils/Env"],function(e){var t=function(e){return"string"!=typeof e?e:document.getElementById(e)},i=function u(e,t){if(!e.className)return!1;var u=new RegExp("(^|\\s+)"+t+"(\\s+|$)");return u.test(e.className)},n=function(e,t){i(e,t)||(e.className=e.className?e.className.replace(/\s+$/,"")+" "+t:t)},r=function(e,t){if(e.className){var i=new RegExp("(^|\\s+)"+t+"(\\s+|$)");e.className=e.className.replace(i,function(e,t,i){return" "===t&&" "===i?" ":""})}},o=function(e,t){return e.currentStyle?e.currentStyle[t]:window.getComputedStyle?window.getComputedStyle(e,null)[t]:void 0},s=function c(t,i){function n(e){var t,i,n=0,r=0;return e&&(i=e.getBoundingClientRect(),t="CSS1Compat"===u.compatMode?u.documentElement:u.body,n=i.left+t.scrollLeft,r=i.top+t.scrollTop),{x:n,y:r}}var r,o,c,s=0,a=0,u=document;if(t=t,i=i||u.body,t&&t.getBoundingClientRect&&"IE"===e.browser&&(!u.documentMode||u.documentMode<8))return o=n(t),c=n(i),{x:o.x-c.x,y:o.y-c.y};for(r=t;r&&r!=i&&r.nodeType;)s+=r.offsetLeft||0,a+=r.offsetTop||0,r=r.offsetParent;for(r=t.parentNode;r&&r!=i&&r.nodeType;)s-=r.scrollLeft||0,a-=r.scrollTop||0,r=r.parentNode;return{x:s,y:a}},a=function(e){return{w:e.offsetWidth||e.clientWidth,h:e.offsetHeight||e.clientHeight}};return{get:t,hasClass:i,addClass:n,removeClass:r,getStyle:o,getPos:s,getSize:a}}),n("moxie/core/EventTarget",["moxie/core/utils/Env","moxie/core/Exceptions","moxie/core/utils/Basic"],function(e,t,i){function n(){this.uid=i.guid()}var r={};return i.extend(n.prototype,{init:function(){this.uid||(this.uid=i.guid("uid_"))},addEventListener:function(e,t,n,o){var s,a=this;return this.hasOwnProperty("uid")||(this.uid=i.guid("uid_")),e=i.trim(e),/\s/.test(e)?void i.each(e.split(/\s+/),function(e){a.addEventListener(e,t,n,o)}):(e=e.toLowerCase(),n=parseInt(n,10)||0,s=r[this.uid]&&r[this.uid][e]||[],s.push({fn:t,priority:n,scope:o||this}),r[this.uid]||(r[this.uid]={}),void(r[this.uid][e]=s))},hasEventListener:function(e){var t;return e?(e=e.toLowerCase(),t=r[this.uid]&&r[this.uid][e]):t=r[this.uid],t?t:!1},removeEventListener:function(e,t){var n,o,s=this;if(e=e.toLowerCase(),/\s/.test(e))return void i.each(e.split(/\s+/),function(e){s.removeEventListener(e,t)});if(n=r[this.uid]&&r[this.uid][e]){if(t){for(o=n.length-1;o>=0;o--)if(n[o].fn===t){n.splice(o,1);break}}else n=[];n.length||(delete r[this.uid][e],i.isEmptyObj(r[this.uid])&&delete r[this.uid])}},removeAllEventListeners:function(){r[this.uid]&&delete r[this.uid]},dispatchEvent:function(e){var n,o,s,a,u,c={},l=!0;if("string"!==i.typeOf(e)){if(a=e,"string"!==i.typeOf(a.type))throw new t.EventException(t.EventException.UNSPECIFIED_EVENT_TYPE_ERR);e=a.type,a.total!==u&&a.loaded!==u&&(c.total=a.total,c.loaded=a.loaded),c.async=a.async||!1}if(-1!==e.indexOf("::")?function(t){n=t[0],e=t[1]}(e.split("::")):n=this.uid,e=e.toLowerCase(),o=r[n]&&r[n][e]){o.sort(function(e,t){return t.priority-e.priority}),s=[].slice.call(arguments),s.shift(),c.type=e,s.unshift(c);var d=[];i.each(o,function(e){s[0].target=e.scope,c.async?d.push(function(t){setTimeout(function(){t(e.fn.apply(e.scope,s)===!1)},1)}):d.push(function(t){t(e.fn.apply(e.scope,s)===!1)})}),d.length&&i.inSeries(d,function(e){l=!e})}return l},bindOnce:function(e,t,i,n){var r=this;r.bind.call(this,e,function o(){return r.unbind(e,o),t.apply(this,arguments)},i,n)},bind:function(){this.addEventListener.apply(this,arguments)},unbind:function(){this.removeEventListener.apply(this,arguments)},unbindAll:function(){this.removeAllEventListeners.apply(this,arguments)},trigger:function(){return this.dispatchEvent.apply(this,arguments)},handleEventProps:function(e){var t=this;this.bind(e.join(" "),function(e){var t="on"+e.type.toLowerCase();"function"===i.typeOf(this[t])&&this[t].apply(this,arguments)}),i.each(e,function(e){e="on"+e.toLowerCase(e),"undefined"===i.typeOf(t[e])&&(t[e]=null)})}}),n.instance=new n,n}),n("moxie/runtime/Runtime",["moxie/core/utils/Env","moxie/core/utils/Basic","moxie/core/utils/Dom","moxie/core/EventTarget"],function(e,t,i,n){function r(e,n,o,a,u){var c,l=this,d=t.guid(n+"_"),m=u||"browser";e=e||{},s[d]=this,o=t.extend({access_binary:!1,access_image_binary:!1,display_media:!1,do_cors:!1,drag_and_drop:!1,filter_by_extension:!0,resize_image:!1,report_upload_progress:!1,return_response_headers:!1,return_response_type:!1,return_status_code:!0,send_custom_headers:!1,select_file:!1,select_folder:!1,select_multiple:!0,send_binary_string:!1,send_browser_cookies:!0,send_multipart:!0,slice_blob:!1,stream_upload:!1,summon_file_dialog:!1,upload_filesize:!0,use_http_method:!0},o),e.preferred_caps&&(m=r.getMode(a,e.preferred_caps,m)),c=function(){var e={};return{exec:function(t,i,n,r){return c[i]&&(e[t]||(e[t]={context:this,instance:new c[i]}),e[t].instance[n])?e[t].instance[n].apply(this,r):void 0},removeInstance:function(t){delete e[t]},removeAllInstances:function(){var i=this;t.each(e,function(e,n){"function"===t.typeOf(e.instance.destroy)&&e.instance.destroy.call(e.context),i.removeInstance(n)})}}}(),t.extend(this,{initialized:!1,uid:d,type:n,mode:r.getMode(a,e.required_caps,m),shimid:d+"_container",clients:0,options:e,can:function(e,i){var n=arguments[2]||o;if("string"===t.typeOf(e)&&"undefined"===t.typeOf(i)&&(e=r.parseCaps(e)),"object"===t.typeOf(e)){for(var s in e)if(!this.can(s,e[s],n))return!1;return!0}return"function"===t.typeOf(n[e])?n[e].call(this,i):i===n[e]},getShimContainer:function(){var e,n=i.get(this.shimid);return n||(e=i.get(this.options.container)||document.body,n=document.createElement("div"),n.id=this.shimid,n.className="moxie-shim moxie-shim-"+this.type,t.extend(n.style,{position:"absolute",top:"0px",left:"0px",width:"1px",height:"1px",overflow:"hidden"}),e.appendChild(n),e=null),n},getShim:function(){return c},shimExec:function(e,t){var i=[].slice.call(arguments,2);return l.getShim().exec.call(this,this.uid,e,t,i)},exec:function(e,t){var i=[].slice.call(arguments,2);return l[e]&&l[e][t]?l[e][t].apply(this,i):l.shimExec.apply(this,arguments)},destroy:function(){if(l){var e=i.get(this.shimid);e&&e.parentNode.removeChild(e),c&&c.removeAllInstances(),this.unbindAll(),delete s[this.uid],this.uid=null,d=l=c=e=null}}}),this.mode&&e.required_caps&&!this.can(e.required_caps)&&(this.mode=!1)}var o={},s={};return r.order="html5,flash,silverlight,html4",r.getRuntime=function(e){return s[e]?s[e]:!1},r.addConstructor=function(e,t){t.prototype=n.instance,o[e]=t},r.getConstructor=function(e){return o[e]||null},r.getInfo=function(e){var t=r.getRuntime(e);return t?{uid:t.uid,type:t.type,mode:t.mode,can:function(){return t.can.apply(t,arguments)}}:null},r.parseCaps=function(e){var i={};return"string"!==t.typeOf(e)?e||{}:(t.each(e.split(","),function(e){i[e]=!0}),i)},r.can=function(e,t){var i,n,o=r.getConstructor(e);return o?(i=new o({required_caps:t}),n=i.mode,i.destroy(),!!n):!1},r.thatCan=function(e,t){var i=(t||r.order).split(/\s*,\s*/);for(var n in i)if(r.can(i[n],e))return i[n];return null},r.getMode=function(e,i,n){var r=null;if("undefined"===t.typeOf(n)&&(n="browser"),i&&!t.isEmptyObj(e)){if(t.each(i,function(i,n){if(e.hasOwnProperty(n)){var o=e[n](i);if("string"==typeof o&&(o=[o]),r){if(!(r=t.arrayIntersect(r,o)))return r=!1}else r=o}}),r)return-1!==t.inArray(n,r)?n:r[0];if(r===!1)return!1}return n},r.getGlobalEventTarget=function(){if(/^moxie\./.test(e.global_event_dispatcher)&&!e.can("access_global_ns")){var i=t.guid("moxie_event_target_");window[i]=function(e,t){n.instance.dispatchEvent(e,t)},e.global_event_dispatcher=i}return e.global_event_dispatcher},r.capTrue=function(){return!0},r.capFalse=function(){return!1},r.capTest=function(e){return function(){return!!e}},r}),n("moxie/runtime/RuntimeClient",["moxie/core/utils/Env","moxie/core/Exceptions","moxie/core/utils/Basic","moxie/runtime/Runtime"],function(e,t,i,n){return function(){var e;i.extend(this,{connectRuntime:function(r){function o(i){var s,u;return i.length?(s=i.shift().toLowerCase(),(u=n.getConstructor(s))?(e=new u(r),e.bind("Init",function(){e.initialized=!0,setTimeout(function(){e.clients++,a.ruid=e.uid,a.trigger("RuntimeInit",e)},1)}),e.bind("Error",function(){e.destroy(),o(i)}),e.bind("Exception",function(e,i){var n=i.name+"(#"+i.code+")"+(i.message?", from: "+i.message:"");a.trigger("RuntimeError",new t.RuntimeError(t.RuntimeError.EXCEPTION_ERR,n))}),e.mode?void e.init():void e.trigger("Error")):void o(i)):(a.trigger("RuntimeError",new t.RuntimeError(t.RuntimeError.NOT_INIT_ERR)),void(e=null))}var s,a=this;if("string"===i.typeOf(r)?s=r:"string"===i.typeOf(r.ruid)&&(s=r.ruid),s){if(e=n.getRuntime(s))return a.ruid=s,e.clients++,e;throw new t.RuntimeError(t.RuntimeError.NOT_INIT_ERR)}o((r.runtime_order||n.order).split(/\s*,\s*/))},disconnectRuntime:function(){e&&--e.clients<=0&&e.destroy(),e=null},getRuntime:function(){return e&&e.uid?e:e=null},exec:function(){return e?e.exec.apply(this,arguments):null},can:function(t){return e?e.can(t):!1}})}}),n("moxie/file/Blob",["moxie/core/utils/Basic","moxie/core/utils/Encode","moxie/runtime/RuntimeClient"],function(e,t,i){function n(o,s){function a(t,i,o){var s,a=r[this.uid];return"string"===e.typeOf(a)&&a.length?(s=new n(null,{type:o,size:i-t}),s.detach(a.substr(t,s.size)),s):null}i.call(this),o&&this.connectRuntime(o),s?"string"===e.typeOf(s)&&(s={data:s}):s={},e.extend(this,{uid:s.uid||e.guid("uid_"),ruid:o,size:s.size||0,type:s.type||"",slice:function(e,t,i){return this.isDetached()?a.apply(this,arguments):this.getRuntime().exec.call(this,"Blob","slice",this.getSource(),e,t,i)},getSource:function(){return r[this.uid]?r[this.uid]:null},detach:function(e){if(this.ruid&&(this.getRuntime().exec.call(this,"Blob","destroy"),this.disconnectRuntime(),this.ruid=null),e=e||"","data:"==e.substr(0,5)){var i=e.indexOf(";base64,");this.type=e.substring(5,i),e=t.atob(e.substring(i+8))}this.size=e.length,r[this.uid]=e},isDetached:function(){return!this.ruid&&"string"===e.typeOf(r[this.uid])},destroy:function(){this.detach(),delete r[this.uid]}}),s.data?this.detach(s.data):r[this.uid]=s}var r={};return n}),n("moxie/core/I18n",["moxie/core/utils/Basic"],function(e){var t={};return{addI18n:function(i){return e.extend(t,i)},translate:function(e){return t[e]||e},_:function(e){return this.translate(e)},sprintf:function(t){var i=[].slice.call(arguments,1);return t.replace(/%[a-z]/g,function(){var t=i.shift();return"undefined"!==e.typeOf(t)?t:""})}}}),n("moxie/core/utils/Mime",["moxie/core/utils/Basic","moxie/core/I18n"],function(e,t){var i="application/msword,doc dot,application/pdf,pdf,application/pgp-signature,pgp,application/postscript,ps ai eps,application/rtf,rtf,application/vnd.ms-excel,xls xlb xlt xla,application/vnd.ms-powerpoint,ppt pps pot ppa,application/zip,zip,application/x-shockwave-flash,swf swfl,application/vnd.openxmlformats-officedocument.wordprocessingml.document,docx,application/vnd.openxmlformats-officedocument.wordprocessingml.template,dotx,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet,xlsx,application/vnd.openxmlformats-officedocument.presentationml.presentation,pptx,application/vnd.openxmlformats-officedocument.presentationml.template,potx,application/vnd.openxmlformats-officedocument.presentationml.slideshow,ppsx,application/x-javascript,js,application/json,json,audio/mpeg,mp3 mpga mpega mp2,audio/x-wav,wav,audio/x-m4a,m4a,audio/ogg,oga ogg,audio/aiff,aiff aif,audio/flac,flac,audio/aac,aac,audio/ac3,ac3,audio/x-ms-wma,wma,image/bmp,bmp,image/gif,gif,image/jpeg,jpg jpeg jpe,image/photoshop,psd,image/png,png,image/svg+xml,svg svgz,image/tiff,tiff tif,text/plain,asc txt text diff log,text/html,htm html xhtml,text/css,css,text/csv,csv,text/rtf,rtf,video/mpeg,mpeg mpg mpe m2v,video/quicktime,qt mov,video/mp4,mp4,video/x-m4v,m4v,video/x-flv,flv,video/x-ms-wmv,wmv,video/avi,avi,video/webm,webm,video/3gpp,3gpp 3gp,video/3gpp2,3g2,video/vnd.rn-realvideo,rv,video/ogg,ogv,video/x-matroska,mkv,application/vnd.oasis.opendocument.formula-template,otf,application/octet-stream,exe",n={},r={},o=function d(e){var t,i,d,o=e.split(/,/);for(t=0;ts;s++)o+=String.fromCharCode(r[s]);return o}}t.call(this),e.extend(this,{uid:e.guid("uid_"),readAsBinaryString:function(e){return n.call(this,"readAsBinaryString",e)},readAsDataURL:function(e){return n.call(this,"readAsDataURL",e)},readAsText:function(e){return n.call(this,"readAsText",e)}})}}),n("moxie/xhr/FormData",["moxie/core/Exceptions","moxie/core/utils/Basic","moxie/file/Blob"],function(e,t,i){function n(){var e,n=[];t.extend(this,{append:function(r,o){var s=this,a=t.typeOf(o);o instanceof i?e={name:r,value:o}:"array"===a?(r+="[]",t.each(o,function(e){s.append(r,e)})):"object"===a?t.each(o,function(e,t){s.append(r+"["+t+"]",e)}):"null"===a||"undefined"===a||"number"===a&&isNaN(o)?s.append(r,"false"):n.push({name:r,value:o.toString()})},hasBlob:function(){return!!this.getBlob()},getBlob:function(){return e&&e.value||null},getBlobName:function(){return e&&e.name||null},each:function(i){t.each(n,function(e){i(e.value,e.name)}),e&&i(e.value,e.name)},destroy:function(){e=null,n=[]}})}return n}),n("moxie/xhr/XMLHttpRequest",["moxie/core/utils/Basic","moxie/core/Exceptions","moxie/core/EventTarget","moxie/core/utils/Encode","moxie/core/utils/Url","moxie/runtime/Runtime","moxie/runtime/RuntimeTarget","moxie/file/Blob","moxie/file/FileReaderSync","moxie/xhr/FormData","moxie/core/utils/Env","moxie/core/utils/Mime"],function(e,t,i,n,r,o,s,a,u,c,l,d){function m(){this.uid=e.guid("uid_")}function f(){function i(e,t){return A.hasOwnProperty(e)?1===arguments.length?l.can("define_property")?A[e]:I[e]:void(l.can("define_property")?A[e]=t:I[e]=t):void 0}function u(t){function n(){b&&(b.destroy(),b=null),a.dispatchEvent("loadend"),a=null}function r(r){b.bind("LoadStart",function(e){i("readyState",f.LOADING),a.dispatchEvent("readystatechange"),a.dispatchEvent(e),L&&a.upload.dispatchEvent(e)}),b.bind("Progress",function(e){i("readyState")!==f.LOADING&&(i("readyState",f.LOADING),a.dispatchEvent("readystatechange")),a.dispatchEvent(e)}),b.bind("UploadProgress",function(e){L&&a.upload.dispatchEvent({type:"progress",lengthComputable:!1,total:e.total,loaded:e.loaded})}),b.bind("Load",function(t){i("readyState",f.DONE),i("status",Number(r.exec.call(b,"XMLHttpRequest","getStatus")||0)),i("statusText",h[i("status")]||""),i("response",r.exec.call(b,"XMLHttpRequest","getResponse",i("responseType"))),~e.inArray(i("responseType"),["text",""])?i("responseText",i("response")):"document"===i("responseType")&&i("responseXML",i("response")),H=r.exec.call(b,"XMLHttpRequest","getAllResponseHeaders"),a.dispatchEvent("readystatechange"),i("status")>0?(L&&a.upload.dispatchEvent(t),a.dispatchEvent(t)):(M=!0,a.dispatchEvent("error")),n()}),b.bind("Abort",function(e){a.dispatchEvent(e),n()}),b.bind("Error",function(e){M=!0,i("readyState",f.DONE),a.dispatchEvent("readystatechange"),F=!0,a.dispatchEvent(e),n()}),r.exec.call(b,"XMLHttpRequest","send",{url:x,method:v,async:T,user:y,password:_,headers:S,mimeType:D,encoding:O,responseType:a.responseType,withCredentials:a.withCredentials,options:U},t)}var a=this;w=(new Date).getTime(),b=new s,"string"==typeof U.required_caps&&(U.required_caps=o.parseCaps(U.required_caps)),U.required_caps=e.extend({},U.required_caps,{return_response_type:a.responseType}),t instanceof c&&(U.required_caps.send_multipart=!0),e.isEmptyObj(S)||(U.required_caps.send_custom_headers=!0),B||(U.required_caps.do_cors=!0),U.ruid?r(b.connectRuntime(U)):(b.bind("RuntimeInit",function(e,t){r(t)}),b.bind("RuntimeError",function(e,t){a.dispatchEvent("RuntimeError",t)}),b.connectRuntime(U))}function g(){i("responseText",""),i("responseXML",null),i("response",null),i("status",0),i("statusText",""),w=E=null}var x,v,y,_,w,E,b,R,I=this,A={timeout:0,readyState:f.UNSENT,withCredentials:!1,status:0,statusText:"",responseType:"",responseXML:null,responseText:null,response:null},T=!0,S={},O=null,D=null,C=!1,N=!1,L=!1,F=!1,M=!1,B=!1,P=null,z=null,U={},H="";e.extend(this,A,{uid:e.guid("uid_"),upload:new m,open:function(o,s,a,u,c){var l;if(!o||!s)throw new t.DOMException(t.DOMException.SYNTAX_ERR);if(/[\u0100-\uffff]/.test(o)||n.utf8_encode(o)!==o)throw new t.DOMException(t.DOMException.SYNTAX_ERR);if(~e.inArray(o.toUpperCase(),["CONNECT","DELETE","GET","HEAD","OPTIONS","POST","PUT","TRACE","TRACK"])&&(v=o.toUpperCase()),~e.inArray(v,["CONNECT","TRACE","TRACK"]))throw new t.DOMException(t.DOMException.SECURITY_ERR);if(s=n.utf8_encode(s),l=r.parseUrl(s),B=r.hasSameOrigin(l),x=r.resolveUrl(s),(u||c)&&!B)throw new t.DOMException(t.DOMException.INVALID_ACCESS_ERR);if(y=u||l.user,_=c||l.pass,T=a||!0,T===!1&&(i("timeout")||i("withCredentials")||""!==i("responseType")))throw new t.DOMException(t.DOMException.INVALID_ACCESS_ERR);C=!T,N=!1,S={},g.call(this),i("readyState",f.OPENED),this.dispatchEvent("readystatechange")},setRequestHeader:function(r,o){var s=["accept-charset","accept-encoding","access-control-request-headers","access-control-request-method","connection","content-length","cookie","cookie2","content-transfer-encoding","date","expect","host","keep-alive","origin","referer","te","trailer","transfer-encoding","upgrade","user-agent","via"];if(i("readyState")!==f.OPENED||N)throw new t.DOMException(t.DOMException.INVALID_STATE_ERR);if(/[\u0100-\uffff]/.test(r)||n.utf8_encode(r)!==r)throw new t.DOMException(t.DOMException.SYNTAX_ERR);return r=e.trim(r).toLowerCase(),~e.inArray(r,s)||/^(proxy\-|sec\-)/.test(r)?!1:(S[r]?S[r]+=", "+o:S[r]=o,!0)},hasRequestHeader:function(e){return e&&S[e.toLowerCase()]||!1},getAllResponseHeaders:function(){return H||""},getResponseHeader:function(t){return t=t.toLowerCase(),M||~e.inArray(t,["set-cookie","set-cookie2"])?null:H&&""!==H&&(R||(R={},e.each(H.split(/\r\n/),function(t){var i=t.split(/:\s+/);2===i.length&&(i[0]=e.trim(i[0]),R[i[0].toLowerCase()]={header:i[0],value:e.trim(i[1])})})),R.hasOwnProperty(t))?R[t].header+": "+R[t].value:null},overrideMimeType:function(n){var r,o;if(~e.inArray(i("readyState"),[f.LOADING,f.DONE]))throw new t.DOMException(t.DOMException.INVALID_STATE_ERR);if(n=e.trim(n.toLowerCase()),/;/.test(n)&&(r=n.match(/^([^;]+)(?:;\scharset\=)?(.*)$/))&&(n=r[1],r[2]&&(o=r[2])),!d.mimes[n])throw new t.DOMException(t.DOMException.SYNTAX_ERR);P=n,z=o},send:function(i,r){if(U="string"===e.typeOf(r)?{ruid:r}:r?r:{},this.readyState!==f.OPENED||N)throw new t.DOMException(t.DOMException.INVALID_STATE_ERR);if(i instanceof a)U.ruid=i.ruid,D=i.type||"application/octet-stream";else if(i instanceof c){if(i.hasBlob()){var o=i.getBlob();U.ruid=o.ruid,D=o.type||"application/octet-stream"}}else"string"==typeof i&&(O="UTF-8",D="text/plain;charset=UTF-8",i=n.utf8_encode(i));this.withCredentials||(this.withCredentials=U.required_caps&&U.required_caps.send_browser_cookies&&!B),L=!C&&this.upload.hasEventListener(),M=!1,F=!i,C||(N=!0),u.call(this,i)},abort:function(){if(M=!0,C=!1,~e.inArray(i("readyState"),[f.UNSENT,f.OPENED,f.DONE]))i("readyState",f.UNSENT);else{if(i("readyState",f.DONE),N=!1,!b)throw new t.DOMException(t.DOMException.INVALID_STATE_ERR);b.getRuntime().exec.call(b,"XMLHttpRequest","abort",F),F=!0}},destroy:function(){b&&("function"===e.typeOf(b.destroy)&&b.destroy(),b=null),this.unbindAll(),this.upload&&(this.upload.unbindAll(),this.upload=null)}}),this.handleEventProps(p.concat(["readystatechange"])),this.upload.handleEventProps(p)}var h={100:"Continue",101:"Switching Protocols",102:"Processing",200:"OK",201:"Created",202:"Accepted",203:"Non-Authoritative Information",204:"No Content",205:"Reset Content",206:"Partial Content",207:"Multi-Status",226:"IM Used",300:"Multiple Choices",301:"Moved Permanently",302:"Found",303:"See Other",304:"Not Modified",305:"Use Proxy",306:"Reserved",307:"Temporary Redirect",400:"Bad Request",401:"Unauthorized",402:"Payment Required",403:"Forbidden",404:"Not Found",405:"Method Not Allowed",406:"Not Acceptable",407:"Proxy Authentication Required",408:"Request Timeout",409:"Conflict",410:"Gone",411:"Length Required",412:"Precondition Failed",413:"Request Entity Too Large",414:"Request-URI Too Long",415:"Unsupported Media Type",416:"Requested Range Not Satisfiable",417:"Expectation Failed",422:"Unprocessable Entity",423:"Locked",424:"Failed Dependency",426:"Upgrade Required",500:"Internal Server Error",501:"Not Implemented",502:"Bad Gateway",503:"Service Unavailable",504:"Gateway Timeout",505:"HTTP Version Not Supported",506:"Variant Also Negotiates",507:"Insufficient Storage",510:"Not Extended"};m.prototype=i.instance;var p=["loadstart","progress","abort","error","load","timeout","loadend"];return f.UNSENT=0,f.OPENED=1,f.HEADERS_RECEIVED=2,f.LOADING=3,f.DONE=4,f.prototype=i.instance,f}),n("moxie/runtime/Transporter",["moxie/core/utils/Basic","moxie/core/utils/Encode","moxie/runtime/RuntimeClient","moxie/core/EventTarget"],function(e,t,i,n){function r(){function n(){l=d=0,c=this.result=null}function o(t,i){var n=this;u=i,n.bind("TransportingProgress",function(t){d=t.loaded,l>d&&-1===e.inArray(n.state,[r.IDLE,r.DONE])&&s.call(n)},999),n.bind("TransportingComplete",function(){d=l,n.state=r.DONE,c=null,n.result=u.exec.call(n,"Transporter","getAsBlob",t||"")},999),n.state=r.BUSY,n.trigger("TransportingStarted"),s.call(n)}function s(){var e,i=this,n=l-d;m>n&&(m=n),e=t.btoa(c.substr(d,m)),u.exec.call(i,"Transporter","receive",e,l)}var a,u,c,l,d,m;i.call(this),e.extend(this,{uid:e.guid("uid_"),state:r.IDLE,result:null,transport:function(t,i,r){var s=this;if(r=e.extend({chunk_size:204798},r),(a=r.chunk_size%3)&&(r.chunk_size+=3-a),m=r.chunk_size,n.call(this),c=t,l=t.length,"string"===e.typeOf(r)||r.ruid)o.call(s,i,this.connectRuntime(r));else{var u=function d(e,t){s.unbind("RuntimeInit",d),o.call(s,i,t)};this.bind("RuntimeInit",u),this.connectRuntime(r)}},abort:function(){var e=this;e.state=r.IDLE,u&&(u.exec.call(e,"Transporter","clear"),e.trigger("TransportingAborted")),n.call(e)},destroy:function(){this.unbindAll(),u=null,this.disconnectRuntime(),n.call(this)}})}return r.IDLE=0,r.BUSY=1,r.DONE=2,r.prototype=n.instance,r}),n("moxie/image/Image",["moxie/core/utils/Basic","moxie/core/utils/Dom","moxie/core/Exceptions","moxie/file/FileReaderSync","moxie/xhr/XMLHttpRequest","moxie/runtime/Runtime","moxie/runtime/RuntimeClient","moxie/runtime/Transporter","moxie/core/utils/Env","moxie/core/EventTarget","moxie/file/Blob","moxie/file/File","moxie/core/utils/Encode"],function(e,t,i,n,r,o,s,a,u,c,l,d,m){function f(){function n(e){try{return e||(e=this.exec("Image","getInfo")),this.size=e.size,this.width=e.width,this.height=e.height,this.type=e.type,this.meta=e.meta,""===this.name&&(this.name=e.name),!0}catch(t){return this.trigger("error",t.code),!1}}function c(t){var n=e.typeOf(t);try{if(t instanceof f){if(!t.size)throw new i.DOMException(i.DOMException.INVALID_STATE_ERR);p.apply(this,arguments)}else if(t instanceof l){if(!~e.inArray(t.type,["image/jpeg","image/png"]))throw new i.ImageError(i.ImageError.WRONG_FORMAT);g.apply(this,arguments)}else if(-1!==e.inArray(n,["blob","file"]))c.call(this,new d(null,t),arguments[1]);else if("string"===n)"data:"===t.substr(0,5)?c.call(this,new l(null,{data:t}),arguments[1]):x.apply(this,arguments);else{if("node"!==n||"img"!==t.nodeName.toLowerCase())throw new i.DOMException(i.DOMException.TYPE_MISMATCH_ERR);c.call(this,t.src,arguments[1])}}catch(r){this.trigger("error",r.code)}}function p(t,i){var n=this.connectRuntime(t.ruid);this.ruid=n.uid,n.exec.call(this,"Image","loadFromImage",t,"undefined"===e.typeOf(i)?!0:i)}function g(t,i){function n(e){r.ruid=e.uid,e.exec.call(r,"Image","loadFromBlob",t)}var r=this;r.name=t.name||"",t.isDetached()?(this.bind("RuntimeInit",function(e,t){n(t)}),i&&"string"==typeof i.required_caps&&(i.required_caps=o.parseCaps(i.required_caps)),this.connectRuntime(e.extend({required_caps:{access_image_binary:!0,resize_image:!0}},i))):n(this.connectRuntime(t.ruid))}function x(e,t){var i,n=this;i=new r,i.open("get",e),i.responseType="blob",i.onprogress=function(e){n.trigger(e)},i.onload=function(){g.call(n,i.response,!0)},i.onerror=function(e){n.trigger(e)},i.onloadend=function(){i.destroy()},i.bind("RuntimeError",function(e,t){n.trigger("RuntimeError",t)}),i.send(null,t)}s.call(this),e.extend(this,{uid:e.guid("uid_"),ruid:null,name:"",size:0,width:0,height:0,type:"",meta:{},clone:function(){this.load.apply(this,arguments)},load:function(){c.apply(this,arguments)},resize:function(t){var n,r,o=this,s={x:0,y:0,width:o.width,height:o.height},a=e.extendIf({width:o.width,height:o.height,type:o.type||"image/jpeg",quality:90,crop:!1,fit:!0,preserveHeaders:!0,resample:"default",multipass:!0},t);try{if(!o.size)throw new i.DOMException(i.DOMException.INVALID_STATE_ERR);if(o.width>f.MAX_RESIZE_WIDTH||o.height>f.MAX_RESIZE_HEIGHT)throw new i.ImageError(i.ImageError.MAX_RESOLUTION_ERR);if(n=o.meta&&o.meta.tiff&&o.meta.tiff.Orientation||1,-1!==e.inArray(n,[5,6,7,8])){var u=a.width;a.width=a.height,a.height=u}if(a.crop){switch(r=Math.max(a.width/o.width,a.height/o.height),t.fit?(s.width=Math.min(Math.ceil(a.width/r),o.width),s.height=Math.min(Math.ceil(a.height/r),o.height),r=a.width/s.width):(s.width=Math.min(a.width,o.width),s.height=Math.min(a.height,o.height),r=1),"boolean"==typeof a.crop&&(a.crop="cc"),a.crop.toLowerCase().replace(/_/,"-")){case"rb":case"right-bottom":s.x=o.width-s.width,s.y=o.height-s.height;break;case"cb":case"center-bottom":s.x=Math.floor((o.width-s.width)/2),s.y=o.height-s.height;break;case"lb":case"left-bottom":s.x=0,s.y=o.height-s.height;break;case"lt":case"left-top":s.x=0,s.y=0;break;case"ct":case"center-top":s.x=Math.floor((o.width-s.width)/2),s.y=0;break;case"rt":case"right-top":s.x=o.width-s.width,s.y=0;break;case"rc":case"right-center":case"right-middle":s.x=o.width-s.width,s.y=Math.floor((o.height-s.height)/2);break;case"lc":case"left-center":case"left-middle":s.x=0,s.y=Math.floor((o.height-s.height)/2);break;case"cc":case"center-center":case"center-middle":default:s.x=Math.floor((o.width-s.width)/2),s.y=Math.floor((o.height-s.height)/2)}s.x=Math.max(s.x,0),s.y=Math.max(s.y,0)}else r=Math.min(a.width/o.width,a.height/o.height),r>1&&!a.fit&&(r=1);this.exec("Image","resize",s,r,a)}catch(c){o.trigger("error",c.code)}},downsize:function(t){var i,n={width:this.width,height:this.height,type:this.type||"image/jpeg",quality:90,crop:!1,fit:!1,preserveHeaders:!0,resample:"default"};i="object"==("undefined"==typeof t?"undefined":_typeof(t))?e.extend(n,t):e.extend(n,{width:arguments[0],height:arguments[1],crop:arguments[2],preserveHeaders:arguments[3]}),this.resize(i)},crop:function(e,t,i){this.downsize(e,t,!0,i)},getAsCanvas:function(){if(!u.can("create_canvas"))throw new i.RuntimeError(i.RuntimeError.NOT_SUPPORTED_ERR);return this.exec("Image","getAsCanvas")},getAsBlob:function(e,t){if(!this.size)throw new i.DOMException(i.DOMException.INVALID_STATE_ERR);return this.exec("Image","getAsBlob",e||"image/jpeg",t||90)},getAsDataURL:function(e,t){if(!this.size)throw new i.DOMException(i.DOMException.INVALID_STATE_ERR);return this.exec("Image","getAsDataURL",e||"image/jpeg",t||90)},getAsBinaryString:function(e,t){var i=this.getAsDataURL(e,t);return m.atob(i.substring(i.indexOf("base64,")+7))},embed:function(n,r){function o(t,r){var o=this;if(u.can("create_canvas")){var l=o.getAsCanvas();if(l)return n.appendChild(l),l=null,o.destroy(),void c.trigger("embedded")}var d=o.getAsDataURL(t,r);if(!d)throw new i.ImageError(i.ImageError.WRONG_FORMAT);if(u.can("use_data_uri_of",d.length))n.innerHTML='',o.destroy(),c.trigger("embedded");else{var f=new a;f.bind("TransportingComplete",function(){s=c.connectRuntime(this.result.ruid),c.bind("Embedded",function(){e.extend(s.getShimContainer().style,{top:"0px",left:"0px",width:o.width+"px",height:o.height+"px"}),s=null},999),s.exec.call(c,"ImageView","display",this.result.uid,width,height),o.destroy()}),f.transport(m.atob(d.substring(d.indexOf("base64,")+7)),t,{required_caps:{display_media:!0},runtime_order:"flash,silverlight",container:n})}}var s,c=this,l=e.extend({width:this.width,height:this.height,type:this.type||"image/jpeg",quality:90,fit:!0,resample:"nearest"},r);try{if(!(n=t.get(n)))throw new i.DOMException(i.DOMException.INVALID_NODE_TYPE_ERR);if(!this.size)throw new i.DOMException(i.DOMException.INVALID_STATE_ERR);this.width>f.MAX_RESIZE_WIDTH||this.height>f.MAX_RESIZE_HEIGHT;var d=new f;return d.bind("Resize",function(){o.call(this,l.type,l.quality)}),d.bind("Load",function(){this.downsize(l)}),this.meta.thumb&&this.meta.thumb.width>=l.width&&this.meta.thumb.height>=l.height?d.load(this.meta.thumb.data):d.clone(this,!1),d}catch(h){this.trigger("error",h.code)}},destroy:function(){this.ruid&&(this.getRuntime().exec.call(this,"Image","destroy"),this.disconnectRuntime()),this.meta&&this.meta.thumb&&this.meta.thumb.data.destroy(),this.unbindAll()}}),this.handleEventProps(h),this.bind("Load Resize",function(){return n.call(this)},999)}var h=["progress","load","error","resize","embedded"];return f.MAX_RESIZE_WIDTH=8192,f.MAX_RESIZE_HEIGHT=8192,f.prototype=c.instance,f}),n("moxie/runtime/html5/Runtime",["moxie/core/utils/Basic","moxie/core/Exceptions","moxie/runtime/Runtime","moxie/core/utils/Env"],function(e,t,i,n){function o(t){var o=this,u=i.capTest,c=i.capTrue,l=e.extend({access_binary:u(window.FileReader||window.File&&window.File.getAsDataURL),access_image_binary:function(){return o.can("access_binary")&&!!a.Image},display_media:u((n.can("create_canvas")||n.can("use_data_uri_over32kb"))&&r("moxie/image/Image")),do_cors:u(window.XMLHttpRequest&&"withCredentials"in new XMLHttpRequest),drag_and_drop:u(function(){var e=document.createElement("div");return("draggable"in e||"ondragstart"in e&&"ondrop"in e)&&("IE"!==n.browser||n.verComp(n.version,9,">"))}()),filter_by_extension:u(function(){return!("Chrome"===n.browser&&n.verComp(n.version,28,"<")||"IE"===n.browser&&n.verComp(n.version,10,"<")||"Safari"===n.browser&&n.verComp(n.version,7,"<")||"Firefox"===n.browser&&n.verComp(n.version,37,"<"))}()),return_response_headers:c,return_response_type:function(e){return"json"===e&&window.JSON?!0:n.can("return_response_type",e)},return_status_code:c,report_upload_progress:u(window.XMLHttpRequest&&(new XMLHttpRequest).upload),resize_image:function(){return o.can("access_binary")&&n.can("create_canvas")},select_file:function(){return n.can("use_fileinput")&&window.File},select_folder:function(){return o.can("select_file")&&("Chrome"===n.browser&&n.verComp(n.version,21,">=")||"Firefox"===n.browser&&n.verComp(n.version,42,">="))},select_multiple:function(){return!(!o.can("select_file")||"Safari"===n.browser&&"Windows"===n.os||"iOS"===n.os&&n.verComp(n.osVersion,"7.0.0",">")&&n.verComp(n.osVersion,"8.0.0","<"))},send_binary_string:u(window.XMLHttpRequest&&((new XMLHttpRequest).sendAsBinary||window.Uint8Array&&window.ArrayBuffer)),send_custom_headers:u(window.XMLHttpRequest),send_multipart:function(){return!!(window.XMLHttpRequest&&(new XMLHttpRequest).upload&&window.FormData)||o.can("send_binary_string")},slice_blob:u(window.File&&(File.prototype.mozSlice||File.prototype.webkitSlice||File.prototype.slice)),stream_upload:function(){return o.can("slice_blob")&&o.can("send_multipart")},summon_file_dialog:function(){return o.can("select_file")&&!("Firefox"===n.browser&&n.verComp(n.version,4,"<")||"Opera"===n.browser&&n.verComp(n.version,12,"<")||"IE"===n.browser&&n.verComp(n.version,10,"<"))},upload_filesize:c,use_http_method:c},arguments[2]);i.call(this,t,arguments[1]||s,l),e.extend(this,{init:function(){this.trigger("Init")},destroy:function(e){return function(){e.call(o),e=o=null}}(this.destroy)}),e.extend(this.getShim(),a)}var s="html5",a={};return i.addConstructor(s,o),a}),n("moxie/runtime/html5/file/Blob",["moxie/runtime/html5/Runtime","moxie/file/Blob"],function(e,t){function i(){function e(e,t,i){var n;if(!window.File.prototype.slice)return(n=window.File.prototype.webkitSlice||window.File.prototype.mozSlice)?n.call(e,t,i):null;try{return e.slice(),e.slice(t,i)}catch(r){return e.slice(t,i-t)}}this.slice=function(){return new t(this.getRuntime().uid,e.apply(this,arguments))},this.destroy=function(){this.getRuntime().getShim().removeInstance(this.uid)}}return e.Blob=i}),n("moxie/core/utils/Events",["moxie/core/utils/Basic"],function(e){function t(){this.returnValue=!1}function i(){this.cancelBubble=!0}var n={},r="moxie_"+e.guid(),o=function(o,s,a,u){var c,l;s=s.toLowerCase(),o.addEventListener?(c=a,o.addEventListener(s,c,!1)):o.attachEvent&&(c=function(){var e=window.event;e.target||(e.target=e.srcElement),e.preventDefault=t,e.stopPropagation=i,a(e)},o.attachEvent("on"+s,c)),o[r]||(o[r]=e.guid()),n.hasOwnProperty(o[r])||(n[o[r]]={}),l=n[o[r]],l.hasOwnProperty(s)||(l[s]=[]),l[s].push({func:c,orig:a,key:u})},s=function u(t,i,o){var u,s;if(i=i.toLowerCase(),t[r]&&n[t[r]]&&n[t[r]][i]){u=n[t[r]][i];for(var a=u.length-1;a>=0&&(u[a].orig!==o&&u[a].key!==o||(t.removeEventListener?t.removeEventListener(i,u[a].func,!1):t.detachEvent&&t.detachEvent("on"+i,u[a].func),u[a].orig=null,u[a].func=null,u.splice(a,1),o===s));a--);if(u.length||delete n[t[r]][i],e.isEmptyObj(n[t[r]])){delete n[t[r]];try{delete t[r]}catch(c){t[r]=s}}}},a=function(t,i){t&&t[r]&&e.each(n[t[r]],function(e,n){s(t,n,i)})};return{addEvent:o,removeEvent:s,removeAllEvents:a}}),n("moxie/runtime/html5/file/FileInput",["moxie/runtime/html5/Runtime","moxie/file/File","moxie/core/utils/Basic","moxie/core/utils/Dom","moxie/core/utils/Events","moxie/core/utils/Mime","moxie/core/utils/Env"],function(e,t,i,n,r,o,s){function a(){var e,a;i.extend(this,{init:function(u){var c,l,d,m,f,h,p=this,g=p.getRuntime();e=u,d=o.extList2mimes(e.accept,g.can("filter_by_extension")),l=g.getShimContainer(),l.innerHTML='",c=n.get(g.uid),i.extend(c.style,{position:"absolute",top:0,left:0,width:"100%",height:"100%"}),m=n.get(e.browse_button),a=n.getStyle(m,"z-index")||"auto",g.can("summon_file_dialog")&&("static"===n.getStyle(m,"position")&&(m.style.position="relative"),r.addEvent(m,"click",function(e){var t=n.get(g.uid);t&&!t.disabled&&t.click(),e.preventDefault()},p.uid),p.bind("Refresh",function(){f=parseInt(a,10)||1,n.get(e.browse_button).style.zIndex=f,this.getRuntime().getShimContainer().style.zIndex=f-1})),h=g.can("summon_file_dialog")?m:l,r.addEvent(h,"mouseover",function(){p.trigger("mouseenter")},p.uid),r.addEvent(h,"mouseout",function(){p.trigger("mouseleave")},p.uid),r.addEvent(h,"mousedown",function(){p.trigger("mousedown")},p.uid),r.addEvent(n.get(e.container),"mouseup",function(){p.trigger("mouseup")},p.uid),(g.can("summon_file_dialog")?c:m).setAttribute("tabindex",-1),c.onchange=function x(){if(p.files=[],i.each(this.files,function(i){var n="";return e.directory&&"."==i.name?!0:(i.webkitRelativePath&&(n="./"+i.webkitRelativePath.replace(/^\//,"")),i=new t(g.uid,i),i.relativePath=n,void p.files.push(i))}),"IE"!==s.browser&&"IEMobile"!==s.browser)this.value="";else{var n=this.cloneNode(!0);this.parentNode.replaceChild(n,this),n.onchange=x}p.files.length&&p.trigger("change")},p.trigger({type:"ready",async:!0}),l=null},setOption:function(e,t){var i=this.getRuntime(),r=n.get(i.uid);switch(e){case"accept":if(t){var s=t.mimes||o.extList2mimes(t,i.can("filter_by_extension"));r.setAttribute("accept",s.join(","))}else r.removeAttribute("accept");break;case"directory":t&&i.can("select_folder")?(r.setAttribute("directory",""),r.setAttribute("webkitdirectory","")):(r.removeAttribute("directory"),r.removeAttribute("webkitdirectory"));break;case"multiple":t&&i.can("select_multiple")?r.setAttribute("multiple",""):r.removeAttribute("multiple")}},disable:function(e){var t,i=this.getRuntime();(t=n.get(i.uid))&&(t.disabled=!!e)},destroy:function(){var t=this.getRuntime(),i=t.getShim(),o=t.getShimContainer(),s=e&&n.get(e.container),u=e&&n.get(e.browse_button);s&&r.removeAllEvents(s,this.uid),u&&(r.removeAllEvents(u,this.uid),u.style.zIndex=a),o&&(r.removeAllEvents(o,this.uid),o.innerHTML=""),i.removeInstance(this.uid),e=o=s=u=i=null}})}return e.FileInput=a}),n("moxie/runtime/html5/file/FileDrop",["moxie/runtime/html5/Runtime","moxie/file/File","moxie/core/utils/Basic","moxie/core/utils/Dom","moxie/core/utils/Events","moxie/core/utils/Mime"],function(e,t,i,n,r,o){function s(){function e(e){if(!e.dataTransfer||!e.dataTransfer.types)return!1;var t=i.toArray(e.dataTransfer.types||[]);return-1!==i.inArray("Files",t)||-1!==i.inArray("public.file-url",t)||-1!==i.inArray("application/x-moz-file",t)}function s(e,i){if(u(e)){var n=new t(h,e);n.relativePath=i||"",p.push(n)}}function a(e){for(var t=[],n=0;n=")&&u.verComp(u.version,7,"<"),h="Android Browser"===u.browser,p=!1;if(f=i.url.replace(/^.+?\/([\w\-\.]+)$/,"$1").toLowerCase(),m=c(),m.open(i.method,i.url,i.async,i.user,i.password),r instanceof o)r.isDetached()&&(p=!0),r=r.getSource();else if(r instanceof s){if(r.hasBlob())if(r.getBlob().isDetached())r=d.call(a,r),p=!0;else if((l||h)&&"blob"===t.typeOf(r.getBlob().getSource())&&window.FileReader)return void e.call(a,i,r);if(r instanceof s){var g=new window.FormData;r.each(function(e,t){e instanceof o?g.append(t,e.getSource()):g.append(t,e)}),r=g}}m.upload?(i.withCredentials&&(m.withCredentials=!0),m.addEventListener("load",function(e){a.trigger(e)}),m.addEventListener("error",function(e){a.trigger(e)}),m.addEventListener("progress",function(e){a.trigger(e)}),m.upload.addEventListener("progress",function(e){a.trigger({type:"UploadProgress",loaded:e.loaded,total:e.total})})):m.onreadystatechange=function(){switch(m.readyState){case 1:break;case 2:break;case 3:var e,t;try{n.hasSameOrigin(i.url)&&(e=m.getResponseHeader("Content-Length")||0),m.responseText&&(t=m.responseText.length)}catch(r){e=t=0}a.trigger({type:"progress",lengthComputable:!!e,total:parseInt(e,10),loaded:t});break;case 4:m.onreadystatechange=function(){};try{if(m.status>=200&&m.status<400){a.trigger("load");break}}catch(r){}a.trigger("error")}},t.isEmptyObj(i.headers)||t.each(i.headers,function(e,t){m.setRequestHeader(t,e)}),""!==i.responseType&&"responseType"in m&&(m.responseType="json"!==i.responseType||u.can("return_response_type","json")?i.responseType:"text"),p?m.sendAsBinary?m.sendAsBinary(r):function(){for(var e=new Uint8Array(r.length),t=0;t0&&o.set(new Uint8Array(t.slice(0,e)),0),o.set(new Uint8Array(r),e),o.set(new Uint8Array(t.slice(e+n)),e+r.byteLength),this.clear(),t=o.buffer,i=new DataView(t);break}default:return t}},length:function(){return t?t.byteLength:0},clear:function(){i=t=null}})}function n(t){function i(e,i,n){n=3===arguments.length?n:t.length-i-1,t=t.substr(0,i)+e+t.substr(n+i)}e.extend(this,{readByteAt:function(e){return t.charCodeAt(e)},writeByteAt:function(e,t){i(String.fromCharCode(t),e,1)},SEGMENT:function(e,n,r){switch(arguments.length){case 1:return t.substr(e);case 2:return t.substr(e,n);case 3:i(null!==r?r:"",e,n);break;default:return t}},length:function(){return t?t.length:0},clear:function(){t=null}})}return e.extend(t.prototype,{littleEndian:!1,read:function(e,t){var i,n,r;if(e+t>this.length())throw new Error("You are trying to read outside the source boundaries.");for(n=this.littleEndian?0:-8*(t-1),r=0,i=0;t>r;r++)i|=this.readByteAt(e+r)<this.length())throw new Error("You are trying to write outside the source boundaries.");for(n=this.littleEndian?0:-8*(i-1),r=0;i>r;r++)this.writeByteAt(e+r,255&t>>Math.abs(n+8*r))},BYTE:function(e){return this.read(e,1)},SHORT:function(e){return this.read(e,2)},LONG:function(e){return this.read(e,4)},SLONG:function(e){var t=this.read(e,4);return t>2147483647?t-4294967296:t},CHAR:function(e){return String.fromCharCode(this.read(e,1))},STRING:function(e,t){return this.asArray("CHAR",e,t).join("")},asArray:function(e,t,i){for(var n=[],r=0;i>r;r++)n[r]=this[e](t+r);return n}}),t}),n("moxie/runtime/html5/image/JPEGHeaders",["moxie/runtime/html5/utils/BinaryReader","moxie/core/Exceptions"],function(e,t){return function i(n){var r,o,s,a=[],u=0;if(r=new e(n),65496!==r.SHORT(0))throw r.clear(),new t.ImageError(t.ImageError.WRONG_FORMAT);for(o=2;o<=r.length();)if(s=r.SHORT(o),s>=65488&&65495>=s)o+=2;else{if(65498===s||65497===s)break;u=r.SHORT(o+2)+2,s>=65505&&65519>=s&&a.push({hex:s,name:"APP"+(15&s),start:o,length:u,segment:r.SEGMENT(o,u)}),o+=u}return r.clear(),{headers:a,restore:function(t){var i,n,r;for(r=new e(t),o=65504==r.SHORT(2)?4+r.SHORT(4):2,n=0,i=a.length;i>n;n++)r.SEGMENT(o,0,a[n].segment),o+=a[n].length;return t=r.SEGMENT(),r.clear(),t},strip:function(t){var n,r,o,s;for(o=new i(t),r=o.headers,o.purge(),n=new e(t),s=r.length;s--;)n.SEGMENT(r[s].start,r[s].length,"");return t=n.SEGMENT(),n.clear(),t},get:function(e){for(var t=[],i=0,n=a.length;n>i;i++)a[i].name===e.toUpperCase()&&t.push(a[i].segment);return t},set:function(e,t){var i,n,r,o=[];for("string"==typeof t?o.push(t):o=t,i=n=0,r=a.length;r>i&&(a[i].name===e.toUpperCase()&&(a[i].segment=o[n],a[i].length=o[n].length,n++),!(n>=o.length));i++);},purge:function(){this.headers=a=[]}}}}),n("moxie/runtime/html5/image/ExifParser",["moxie/core/utils/Basic","moxie/runtime/html5/utils/BinaryReader","moxie/core/Exceptions"],function(e,i,n){function r(o){function s(i,r){var o,s,a,u,c,m,f,h,p=this,g=[],x={},v={1:"BYTE",7:"UNDEFINED",2:"ASCII",3:"SHORT",4:"LONG",5:"RATIONAL",9:"SLONG",10:"SRATIONAL"},y={BYTE:1,UNDEFINED:1,ASCII:1,SHORT:2,LONG:4,RATIONAL:8,SLONG:4,SRATIONAL:8};for(o=p.SHORT(i),s=0;o>s;s++)if(g=[],f=i+2+12*s,a=r[p.SHORT(f)],a!==t){if(u=v[p.SHORT(f+=2)],c=p.LONG(f+=2),m=y[u],!m)throw new n.ImageError(n.ImageError.INVALID_META_ERR);if(f+=4,m*c>4&&(f=p.LONG(f)+d.tiffHeader),f+m*c>=this.length())throw new n.ImageError(n.ImageError.INVALID_META_ERR);"ASCII"!==u?(g=p.asArray(u,f,c),h=1==c?g[0]:g,x[a]=l.hasOwnProperty(a)&&"object"!=("undefined"==typeof h?"undefined":_typeof(h))?l[a][h]:h):x[a]=e.trim(p.STRING(f,c).replace(/\0$/,""))}return x}function a(e,t,i){var n,r,o,s=0;if("string"==typeof t){var a=c[e.toLowerCase()];for(var u in a)if(a[u]===t){t=u;break}}n=d[e.toLowerCase()+"IFD"],r=this.SHORT(n);for(var l=0;r>l;l++)if(o=n+12*l+2,this.SHORT(o)==t){s=o+8;break}if(!s)return!1;try{this.write(s,i,4)}catch(m){return!1}return!0}var u,c,l,d,m,f;if(i.call(this,o),c={tiff:{274:"Orientation",270:"ImageDescription",271:"Make",272:"Model",305:"Software",34665:"ExifIFDPointer",34853:"GPSInfoIFDPointer"},exif:{36864:"ExifVersion",40961:"ColorSpace",40962:"PixelXDimension",40963:"PixelYDimension",36867:"DateTimeOriginal",33434:"ExposureTime",33437:"FNumber",34855:"ISOSpeedRatings",37377:"ShutterSpeedValue",37378:"ApertureValue",37383:"MeteringMode",37384:"LightSource",37385:"Flash",37386:"FocalLength",41986:"ExposureMode",41987:"WhiteBalance",41990:"SceneCaptureType",41988:"DigitalZoomRatio",41992:"Contrast",41993:"Saturation",41994:"Sharpness"},gps:{0:"GPSVersionID",1:"GPSLatitudeRef",2:"GPSLatitude",3:"GPSLongitudeRef",4:"GPSLongitude"},thumb:{513:"JPEGInterchangeFormat",514:"JPEGInterchangeFormatLength"}},l={ColorSpace:{1:"sRGB",0:"Uncalibrated"},MeteringMode:{0:"Unknown",1:"Average",2:"CenterWeightedAverage",3:"Spot",4:"MultiSpot",5:"Pattern",6:"Partial",255:"Other"},LightSource:{1:"Daylight",2:"Fliorescent",3:"Tungsten",4:"Flash",9:"Fine weather",10:"Cloudy weather",11:"Shade",12:"Daylight fluorescent (D 5700 - 7100K)",13:"Day white fluorescent (N 4600 -5400K)",14:"Cool white fluorescent (W 3900 - 4500K)",15:"White fluorescent (WW 3200 - 3700K)",17:"Standard light A",18:"Standard light B",19:"Standard light C",20:"D55",21:"D65",22:"D75",23:"D50",24:"ISO studio tungsten",255:"Other"},Flash:{0:"Flash did not fire",1:"Flash fired",5:"Strobe return light not detected",7:"Strobe return light detected",9:"Flash fired, compulsory flash mode",13:"Flash fired, compulsory flash mode, return light not detected",15:"Flash fired, compulsory flash mode, return light detected",16:"Flash did not fire, compulsory flash mode",24:"Flash did not fire, auto mode",25:"Flash fired, auto mode",29:"Flash fired, auto mode, return light not detected",31:"Flash fired, auto mode, return light detected",32:"No flash function",65:"Flash fired, red-eye reduction mode",69:"Flash fired, red-eye reduction mode, return light not detected",71:"Flash fired, red-eye reduction mode, return light detected",73:"Flash fired, compulsory flash mode, red-eye reduction mode",77:"Flash fired, compulsory flash mode, red-eye reduction mode, return light not detected",79:"Flash fired, compulsory flash mode, red-eye reduction mode, return light detected",89:"Flash fired, auto mode, red-eye reduction mode",93:"Flash fired, auto mode, return light not detected, red-eye reduction mode",95:"Flash fired, auto mode, return light detected, red-eye reduction mode"},ExposureMode:{0:"Auto exposure",1:"Manual exposure",2:"Auto bracket"},WhiteBalance:{0:"Auto white balance",1:"Manual white balance"},SceneCaptureType:{0:"Standard",1:"Landscape",2:"Portrait",3:"Night scene"},Contrast:{0:"Normal",1:"Soft",2:"Hard"},Saturation:{0:"Normal",1:"Low saturation",2:"High saturation"},Sharpness:{0:"Normal",1:"Soft",2:"Hard"},GPSLatitudeRef:{N:"North latitude",S:"South latitude"},GPSLongitudeRef:{E:"East longitude",W:"West longitude"}},d={tiffHeader:10},m=d.tiffHeader,u={clear:this.clear},e.extend(this,{read:function(){try{return r.prototype.read.apply(this,arguments)}catch(e){throw new n.ImageError(n.ImageError.INVALID_META_ERR)}},write:function(){try{return r.prototype.write.apply(this,arguments)}catch(e){throw new n.ImageError(n.ImageError.INVALID_META_ERR)}},UNDEFINED:function(){return this.BYTE.apply(this,arguments)},RATIONAL:function(e){return this.LONG(e)/this.LONG(e+4)},SRATIONAL:function(e){return this.SLONG(e)/this.SLONG(e+4)},ASCII:function(e){return this.CHAR(e)},TIFF:function(){return f||null},EXIF:function(){var t=null;if(d.exifIFD){try{t=s.call(this,d.exifIFD,c.exif)}catch(i){return null}if(t.ExifVersion&&"array"===e.typeOf(t.ExifVersion)){for(var n=0,r="";n=65472&&65475>=t)return n+=5,{height:e.SHORT(n),width:e.SHORT(n+=2)};i=e.SHORT(n+=2),n+=i-2}return null}function a(){var e,t,i=d.thumb();return i&&(e=new n(i),t=s(e),e.clear(),t)?(t.data=i,t):null}function u(){d&&l&&c&&(d.clear(),l.purge(),c.clear(),m=l=d=c=null)}var c,l,d,m;if(c=new n(o),65496!==c.SHORT(0))throw new t.ImageError(t.ImageError.WRONG_FORMAT);l=new i(o);try{d=new r(l.get("app1")[0])}catch(f){}m=s.call(this),e.extend(this,{type:"image/jpeg",size:c.length(),width:m&&m.width||0,height:m&&m.height||0,setExif:function(t,i){return d?("object"===e.typeOf(t)?e.each(t,function(e,t){d.setExif(t,e)}):d.setExif(t,i),void l.set("app1",d.SEGMENT())):!1},writeHeaders:function(){return arguments.length?l.restore(arguments[0]):l.restore(o)},stripHeaders:function(e){return l.strip(e)},purge:function(){u.call(this)}}),d&&(this.meta={tiff:d.TIFF(),exif:d.EXIF(),gps:d.GPS(),thumb:a()})}return o}),n("moxie/runtime/html5/image/PNG",["moxie/core/Exceptions","moxie/core/utils/Basic","moxie/runtime/html5/utils/BinaryReader"],function(e,t,i){function n(n){function r(){var e,t;return e=s.call(this,8),"IHDR"==e.type?(t=e.start,{width:a.LONG(t),height:a.LONG(t+=4)}):null}function o(){a&&(a.clear(),n=l=u=c=a=null)}function s(e){var t,i,n,r;return t=a.LONG(e),i=a.STRING(e+=4,4),n=e+=4,r=a.LONG(e+t),{length:t,type:i,start:n,CRC:r}}var a,u,c,l;a=new i(n),function(){var t=0,i=0,n=[35152,20039,3338,6666];for(i=0;ii.height?"width":"height",s=Math.round(i[o]*n),a=!1;"nearest"!==r&&(.5>n||n>2)&&(n=.5>n?.5:2,a=!0);var u=t(i,n);return a?e(u,s/u[o],r):u}function t(e,t){var i=e.width,n=e.height,r=Math.round(i*t),o=Math.round(n*t),s=document.createElement("canvas");return s.width=r,s.height=o,s.getContext("2d").drawImage(e,0,0,i,n,0,0,r,o),e=null,s}return{scale:e}}),n("moxie/runtime/html5/image/Image",["moxie/runtime/html5/Runtime","moxie/core/utils/Basic","moxie/core/Exceptions","moxie/core/utils/Encode","moxie/file/Blob","moxie/file/File","moxie/runtime/html5/image/ImageInfo","moxie/runtime/html5/image/ResizerCanvas","moxie/core/utils/Mime","moxie/core/utils/Env"],function(e,t,i,n,r,o,s,a,u){function c(){function e(){if(!v&&!g)throw new i.ImageError(i.DOMException.INVALID_STATE_ERR);return v||g}function c(){var t=e();return"canvas"==t.nodeName.toLowerCase()?t:(v=document.createElement("canvas"),v.width=t.width,v.height=t.height,v.getContext("2d").drawImage(t,0,0),v)}function l(e){return n.atob(e.substring(e.indexOf("base64,")+7))}function d(e,t){return"data:"+(t||"")+";base64,"+n.btoa(e)}function m(e){var t=this;g=new Image,g.onerror=function(){p.call(this),t.trigger("error",i.ImageError.WRONG_FORMAT)},g.onload=function(){t.trigger("load")},g.src="data:"==e.substr(0,5)?e:d(e,_.type)}function f(e,t){var n,r=this;return window.FileReader?(n=new FileReader,n.onload=function(){t.call(r,this.result)},n.onerror=function(){r.trigger("error",i.ImageError.WRONG_FORMAT)},void n.readAsDataURL(e)):t.call(this,e.getAsDataURL())}function h(e,i){var n=Math.PI/180,r=document.createElement("canvas"),o=r.getContext("2d"),s=e.width,a=e.height;switch(t.inArray(i,[5,6,7,8])>-1?(r.width=a,r.height=s):(r.width=s,r.height=a),i){case 2:o.translate(s,0),o.scale(-1,1);break;case 3:o.translate(s,a),o.rotate(180*n);break;case 4:o.translate(0,a),o.scale(1,-1);break;case 5:o.rotate(90*n),o.scale(1,-1);break;case 6:o.rotate(90*n),o.translate(0,-a);break;case 7:o.rotate(90*n),o.translate(s,-a),o.scale(-1,1);break;case 8:o.rotate(-90*n),o.translate(-s,0)}return o.drawImage(e,0,0,s,a),r}function p(){x&&(x.purge(),x=null),y=g=v=_=null,E=!1}var g,x,v,y,_,w=this,E=!1,b=!0;t.extend(this,{loadFromBlob:function(e){var t=this.getRuntime(),n=arguments.length>1?arguments[1]:!0;if(!t.can("access_binary"))throw new i.RuntimeError(i.RuntimeError.NOT_SUPPORTED_ERR);return _=e,e.isDetached()?(y=e.getSource(),void m.call(this,y)):void f.call(this,e.getSource(),function(e){n&&(y=l(e)),m.call(this,e)})},loadFromImage:function(e,t){this.meta=e.meta,_=new o(null,{name:e.name,size:e.size,type:e.type}),m.call(this,t?y=e.getAsBinaryString():e.getAsDataURL())},getInfo:function(){var t,i=this.getRuntime();return!x&&y&&i.can("access_image_binary")&&(x=new s(y)),t={width:e().width||0,height:e().height||0,type:_.type||u.getFileMime(_.name),size:y&&y.length||_.size||0,name:_.name||"",meta:null},b&&(t.meta=x&&x.meta||this.meta||{},!t.meta||!t.meta.thumb||t.meta.thumb.data instanceof r||(t.meta.thumb.data=new r(null,{type:"image/jpeg",data:t.meta.thumb.data}))),t},resize:function(t,i,n){var r=document.createElement("canvas");if(r.width=t.width,r.height=t.height,r.getContext("2d").drawImage(e(),t.x,t.y,t.width,t.height,0,0,r.width,r.height),v=a.scale(r,i),b=n.preserveHeaders,!b){var o=this.meta&&this.meta.tiff&&this.meta.tiff.Orientation||1;v=h(v,o)}this.width=v.width,this.height=v.height,E=!0,this.trigger("Resize")},getAsCanvas:function(){return v||(v=c()),v.id=this.uid+"_canvas",v},getAsBlob:function(e,t){return e!==this.type?(E=!0,new o(null,{name:_.name||"",type:e,data:w.getAsDataURL(e,t)})):new o(null,{name:_.name||"",type:e,data:w.getAsBinaryString(e,t)})},getAsDataURL:function(e){var t=arguments[1]||90;if(!E)return g.src;if(c(),"image/jpeg"!==e)return v.toDataURL("image/png");try{return v.toDataURL("image/jpeg",t/100)}catch(i){return v.toDataURL("image/jpeg")}},getAsBinaryString:function(e,t){if(!E)return y||(y=l(w.getAsDataURL(e,t))),y;if("image/jpeg"!==e)y=l(w.getAsDataURL(e,t));else{var i;t||(t=90),c();try{i=v.toDataURL("image/jpeg",t/100)}catch(n){i=v.toDataURL("image/jpeg")}y=l(i),x&&(y=x.stripHeaders(y),b&&(x.meta&&x.meta.exif&&x.setExif({PixelXDimension:this.width,PixelYDimension:this.height}),y=x.writeHeaders(y)),x.purge(),x=null)}return E=!1,y},destroy:function(){w=null,p.call(this),this.getRuntime().getShim().removeInstance(this.uid)}})}return e.Image=c}),n("moxie/runtime/flash/Runtime",["moxie/core/utils/Basic","moxie/core/utils/Env","moxie/core/utils/Dom","moxie/core/Exceptions","moxie/runtime/Runtime"],function(e,t,i,n,o){function s(){var e;try{e=navigator.plugins["Shockwave Flash"],e=e.description}catch(t){try{e=new ActiveXObject("ShockwaveFlash.ShockwaveFlash").GetVariable("$version")}catch(i){e="0.0"}}return e=e.match(/\d+/g),parseFloat(e[0]+"."+e[1])}function a(e){var n=i.get(e);n&&"OBJECT"==n.nodeName&&("IE"===t.browser?(n.style.display="none",function r(){4==n.readyState?u(e):setTimeout(r,10)}()):n.parentNode.removeChild(n))}function u(e){var t=i.get(e);if(t){for(var n in t)"function"==typeof t[n]&&(t[n]=null);t.parentNode.removeChild(t)}}function c(u){var c,m=this;u=e.extend({swf_url:t.swf_url},u),o.call(this,u,l,{access_binary:function(e){return e&&"browser"===m.mode},access_image_binary:function(e){return e&&"browser"===m.mode},display_media:o.capTest(r("moxie/image/Image")),do_cors:o.capTrue,drag_and_drop:!1,report_upload_progress:function(){return"client"===m.mode},resize_image:o.capTrue,return_response_headers:!1,return_response_type:function(t){return"json"===t&&window.JSON?!0:!e.arrayDiff(t,["","text","document"])||"browser"===m.mode},return_status_code:function(t){return"browser"===m.mode||!e.arrayDiff(t,[200,404])},select_file:o.capTrue,select_multiple:o.capTrue,send_binary_string:function(e){return e&&"browser"===m.mode},send_browser_cookies:function(e){return e&&"browser"===m.mode},send_custom_headers:function(e){return e&&"browser"===m.mode},send_multipart:o.capTrue,slice_blob:function(e){return e&&"browser"===m.mode},stream_upload:function(e){return e&&"browser"===m.mode},summon_file_dialog:!1,upload_filesize:function(t){return e.parseSizeStr(t)<=2097152||"client"===m.mode},use_http_method:function(t){return!e.arrayDiff(t,["GET","POST"])}},{access_binary:function(e){return e?"browser":"client"},access_image_binary:function(e){return e?"browser":"client"},report_upload_progress:function(e){return e?"browser":"client"},return_response_type:function(t){return e.arrayDiff(t,["","text","json","document"])?"browser":["client","browser"]},return_status_code:function(t){return e.arrayDiff(t,[200,404])?"browser":["client","browser"]},send_binary_string:function(e){return e?"browser":"client"},send_browser_cookies:function(e){return e?"browser":"client"},send_custom_headers:function(e){return e?"browser":"client"},slice_blob:function(e){return e?"browser":"client"},stream_upload:function(e){return e?"client":"browser"},upload_filesize:function(t){return e.parseSizeStr(t)>=2097152?"client":"browser"}},"client"),s()<11.3&&(this.mode=!1),e.extend(this,{getShim:function(){return i.get(this.uid)},shimExec:function(e,t){var i=[].slice.call(arguments,2);return m.getShim().exec(this.uid,e,t,i)},init:function(){var i,r,s;s=this.getShimContainer(),e.extend(s.style,{position:"absolute",top:"-8px",left:"-8px",width:"9px",height:"9px",overflow:"hidden"}),i='',"IE"===t.browser?(r=document.createElement("div"),s.appendChild(r),r.outerHTML=i,r=s=null):s.innerHTML=i,c=setTimeout(function(){m&&!m.initialized&&m.trigger("Error",new n.RuntimeError(n.RuntimeError.NOT_INIT_ERR))},5e3)},destroy:function(e){return function(){a(m.uid),e.call(m),clearTimeout(c),u=c=e=m=null}}(this.destroy)},d)}var l="flash",d={};return o.addConstructor(l,c),d}),n("moxie/runtime/flash/file/Blob",["moxie/runtime/flash/Runtime","moxie/file/Blob"],function(e,t){var i={slice:function(e,i,n,r){var o=this.getRuntime();return 0>i?i=Math.max(e.size+i,0):i>0&&(i=Math.min(i,e.size)),0>n?n=Math.max(e.size+n,0):n>0&&(n=Math.min(n,e.size)),e=o.shimExec.call(this,"Blob","slice",i,n,r||""),e&&(e=new t(o.uid,e)),e}};return e.Blob=i}),n("moxie/runtime/flash/file/FileInput",["moxie/runtime/flash/Runtime","moxie/file/File","moxie/core/utils/Dom","moxie/core/utils/Basic"],function(e,t,i,n){var r={init:function(e){var r=this,o=this.getRuntime(),s=i.get(e.browse_button);s&&(s.setAttribute("tabindex",-1),s=null),this.bind("Change",function(){var e=o.shimExec.call(r,"FileInput","getFiles");r.files=[],n.each(e,function(e){r.files.push(new t(o.uid,e))})},999),this.getRuntime().shimExec.call(this,"FileInput","init",{accept:e.accept,multiple:e.multiple}),this.trigger("ready")}};return e.FileInput=r}),n("moxie/runtime/flash/file/FileReader",["moxie/runtime/flash/Runtime","moxie/core/utils/Encode"],function(e,t){function i(e,i){switch(i){case"readAsText":return t.atob(e,"utf8");case"readAsBinaryString":return t.atob(e);case"readAsDataURL":return e}return null}var n={read:function(e,t){var n=this;return n.result="","readAsDataURL"===e&&(n.result="data:"+(t.type||"")+";base64,"),n.bind("Progress",function(t,r){r&&(n.result+=i(r,e))},999),n.getRuntime().shimExec.call(this,"FileReader","readAsBase64",t.uid)}};return e.FileReader=n}),n("moxie/runtime/flash/file/FileReaderSync",["moxie/runtime/flash/Runtime","moxie/core/utils/Encode"],function(e,t){function i(e,i){switch(i){case"readAsText":return t.atob(e,"utf8");case"readAsBinaryString":return t.atob(e);case"readAsDataURL":return e}return null}var n={read:function(e,t){var n,r=this.getRuntime();return(n=r.shimExec.call(this,"FileReaderSync","readAsBase64",t.uid))?("readAsDataURL"===e&&(n="data:"+(t.type||"")+";base64,"+n),i(n,e,t.type)):null}};return e.FileReaderSync=n}),n("moxie/runtime/flash/runtime/Transporter",["moxie/runtime/flash/Runtime","moxie/file/Blob"],function(e,t){var i={getAsBlob:function(e){var i=this.getRuntime(),n=i.shimExec.call(this,"Transporter","getAsBlob",e);return n?new t(i.uid,n):null}};return e.Transporter=i}),n("moxie/runtime/flash/xhr/XMLHttpRequest",["moxie/runtime/flash/Runtime","moxie/core/utils/Basic","moxie/file/Blob","moxie/file/File","moxie/file/FileReaderSync","moxie/runtime/flash/file/FileReaderSync","moxie/xhr/FormData","moxie/runtime/Transporter","moxie/runtime/flash/runtime/Transporter"],function(e,t,i,n,r,o,s,a){var u={send:function(e,n){function r(){e.transport=l.mode,l.shimExec.call(c,"XMLHttpRequest","send",e,n)}function o(e,t){l.shimExec.call(c,"XMLHttpRequest","appendBlob",e,t.uid),n=null,r()}function u(e,t){var i=new a;i.bind("TransportingComplete",function(){t(this.result)}),i.transport(e.getSource(),e.type,{ruid:l.uid})}var c=this,l=c.getRuntime();if(t.isEmptyObj(e.headers)||t.each(e.headers,function(e,t){l.shimExec.call(c,"XMLHttpRequest","setRequestHeader",t,e.toString())}),n instanceof s){var d;if(n.each(function(e,t){e instanceof i?d=t:l.shimExec.call(c,"XMLHttpRequest","append",t,e)}),n.hasBlob()){var m=n.getBlob();m.isDetached()?u(m,function(e){m.destroy(),o(d,e)}):o(d,m)}else n=null,r()}else n instanceof i?n.isDetached()?u(n,function(e){n.destroy(),n=e.uid,r()}):(n=n.uid,r()):r()},getResponse:function(e){var i,o,s=this.getRuntime();if(o=s.shimExec.call(this,"XMLHttpRequest","getResponseAsBlob")){if(o=new n(s.uid,o),"blob"===e)return o;try{if(i=new r,~t.inArray(e,["","text"]))return i.readAsText(o);if("json"===e&&window.JSON)return JSON.parse(i.readAsText(o))}finally{o.destroy()}}return null},abort:function(){var e=this.getRuntime();e.shimExec.call(this,"XMLHttpRequest","abort"),this.dispatchEvent("readystatechange"),this.dispatchEvent("abort")}};return e.XMLHttpRequest=u}),n("moxie/runtime/flash/image/Image",["moxie/runtime/flash/Runtime","moxie/core/utils/Basic","moxie/runtime/Transporter","moxie/file/Blob","moxie/file/FileReaderSync"],function(e,t,i,n,r){var o={loadFromBlob:function(e){function t(e){r.shimExec.call(n,"Image","loadFromBlob",e.uid),n=r=null}var n=this,r=n.getRuntime();if(e.isDetached()){var o=new i;o.bind("TransportingComplete",function(){t(o.result.getSource())}),o.transport(e.getSource(),e.type,{ruid:r.uid})}else t(e.getSource())},loadFromImage:function(e){var t=this.getRuntime();return t.shimExec.call(this,"Image","loadFromImage",e.uid)},getInfo:function(){var e=this.getRuntime(),t=e.shimExec.call(this,"Image","getInfo");return t.meta&&t.meta.thumb&&t.meta.thumb.data&&!(e.meta.thumb.data instanceof n)&&(t.meta.thumb.data=new n(e.uid,t.meta.thumb.data)),t},getAsBlob:function(e,t){var i=this.getRuntime(),r=i.shimExec.call(this,"Image","getAsBlob",e,t);return r?new n(i.uid,r):null},getAsDataURL:function(){var e,t=this.getRuntime(),i=t.Image.getAsBlob.apply(this,arguments);return i?(e=new r,e.readAsDataURL(i)):null}};return e.Image=o}),n("moxie/runtime/silverlight/Runtime",["moxie/core/utils/Basic","moxie/core/utils/Env","moxie/core/utils/Dom","moxie/core/Exceptions","moxie/runtime/Runtime"],function(e,t,i,n,o){function s(e){var t,i,n,r,o,s=!1,a=null,u=0;try{try{a=new ActiveXObject("AgControl.AgControl"),a.IsVersionSupported(e)&&(s=!0),a=null}catch(c){var l=navigator.plugins["Silverlight Plug-In"];if(l){for(t=l.description,"1.0.30226.2"===t&&(t="2.0.30226.2"),i=t.split(".");i.length>3;)i.pop();for(;i.length<4;)i.push(0);for(n=e.split(".");n.length>4;)n.pop();do r=parseInt(n[u],10),o=parseInt(i[u],10),u++;while(u=r&&!isNaN(r)&&(s=!0)}}}catch(d){s=!1}return s}function a(a){var l,d=this;a=e.extend({xap_url:t.xap_url},a),o.call(this,a,u,{access_binary:o.capTrue,access_image_binary:o.capTrue,display_media:o.capTest(r("moxie/image/Image")),do_cors:o.capTrue,drag_and_drop:!1,report_upload_progress:o.capTrue,resize_image:o.capTrue,return_response_headers:function(e){return e&&"client"===d.mode},return_response_type:function(e){return"json"!==e?!0:!!window.JSON},return_status_code:function(t){return"client"===d.mode||!e.arrayDiff(t,[200,404])},select_file:o.capTrue,select_multiple:o.capTrue,send_binary_string:o.capTrue,send_browser_cookies:function(e){return e&&"browser"===d.mode},send_custom_headers:function(e){return e&&"client"===d.mode},send_multipart:o.capTrue,slice_blob:o.capTrue,stream_upload:!0,summon_file_dialog:!1,upload_filesize:o.capTrue,use_http_method:function(t){return"client"===d.mode||!e.arrayDiff(t,["GET","POST"])}},{return_response_headers:function(e){return e?"client":"browser"},return_status_code:function(t){return e.arrayDiff(t,[200,404])?"client":["client","browser"]},send_browser_cookies:function(e){return e?"browser":"client"},send_custom_headers:function(e){return e?"client":"browser"},use_http_method:function(t){return e.arrayDiff(t,["GET","POST"])?"client":["client","browser"]}}),s("2.0.31005.0")&&"Opera"!==t.browser||(this.mode=!1),e.extend(this,{getShim:function(){return i.get(this.uid).content.Moxie},shimExec:function(e,t){var i=[].slice.call(arguments,2);return d.getShim().exec(this.uid,e,t,i)},init:function(){var e;e=this.getShimContainer(),e.innerHTML='',l=setTimeout(function(){d&&!d.initialized&&d.trigger("Error",new n.RuntimeError(n.RuntimeError.NOT_INIT_ERR)); },"Windows"!==t.OS?1e4:5e3)},destroy:function(e){return function(){e.call(d),clearTimeout(l),a=l=e=d=null}}(this.destroy)},c)}var u="silverlight",c={};return o.addConstructor(u,a),c}),n("moxie/runtime/silverlight/file/Blob",["moxie/runtime/silverlight/Runtime","moxie/core/utils/Basic","moxie/runtime/flash/file/Blob"],function(e,t,i){return e.Blob=t.extend({},i)}),n("moxie/runtime/silverlight/file/FileInput",["moxie/runtime/silverlight/Runtime","moxie/file/File","moxie/core/utils/Dom","moxie/core/utils/Basic"],function(e,t,i,n){function r(e){for(var t="",i=0;ii;i++)t=a.keys[i],s=a[t],s&&(/^(\d|[1-9]\d+)$/.test(s)?s=parseInt(s,10):/^\d*\.\d+$/.test(s)&&(s=parseFloat(s)),r.meta[e][t]=s)}),r.meta&&r.meta.thumb&&r.meta.thumb.data&&!(e.meta.thumb.data instanceof i)&&(r.meta.thumb.data=new i(e.uid,r.meta.thumb.data))),r.width=parseInt(o.width,10),r.height=parseInt(o.height,10),r.size=parseInt(o.size,10),r.type=o.type,r.name=o.name,r},resize:function(e,t,i){this.getRuntime().shimExec.call(this,"Image","resize",e.x,e.y,e.width,e.height,t,i.preserveHeaders,i.resample)}})}),n("moxie/runtime/html4/Runtime",["moxie/core/utils/Basic","moxie/core/Exceptions","moxie/runtime/Runtime","moxie/core/utils/Env"],function(e,t,i,n){function o(t){var o=this,u=i.capTest,c=i.capTrue;i.call(this,t,s,{access_binary:u(window.FileReader||window.File&&File.getAsDataURL),access_image_binary:!1,display_media:u((n.can("create_canvas")||n.can("use_data_uri_over32kb"))&&r("moxie/image/Image")),do_cors:!1,drag_and_drop:!1,filter_by_extension:u(function(){return!("Chrome"===n.browser&&n.verComp(n.version,28,"<")||"IE"===n.browser&&n.verComp(n.version,10,"<")||"Safari"===n.browser&&n.verComp(n.version,7,"<")||"Firefox"===n.browser&&n.verComp(n.version,37,"<"))}()),resize_image:function(){return a.Image&&o.can("access_binary")&&n.can("create_canvas")},report_upload_progress:!1,return_response_headers:!1,return_response_type:function(t){return"json"===t&&window.JSON?!0:!!~e.inArray(t,["text","document",""])},return_status_code:function(t){return!e.arrayDiff(t,[200,404])},select_file:function(){return n.can("use_fileinput")},select_multiple:!1,send_binary_string:!1,send_custom_headers:!1,send_multipart:!0,slice_blob:!1,stream_upload:function(){return o.can("select_file")},summon_file_dialog:function(){return o.can("select_file")&&!("Firefox"===n.browser&&n.verComp(n.version,4,"<")||"Opera"===n.browser&&n.verComp(n.version,12,"<")||"IE"===n.browser&&n.verComp(n.version,10,"<"))},upload_filesize:c,use_http_method:function(t){return!e.arrayDiff(t,["GET","POST"])}}),e.extend(this,{init:function(){this.trigger("Init")},destroy:function(e){return function(){e.call(o),e=o=null}}(this.destroy)}),e.extend(this.getShim(),a)}var s="html4",a={};return i.addConstructor(s,o),a}),n("moxie/runtime/html4/file/FileInput",["moxie/runtime/html4/Runtime","moxie/file/File","moxie/core/utils/Basic","moxie/core/utils/Dom","moxie/core/utils/Events","moxie/core/utils/Mime","moxie/core/utils/Env"],function(e,t,i,n,r,o,s){function a(){function e(){var o,c,d,m,f,h,p=this,g=p.getRuntime();h=i.guid("uid_"),o=g.getShimContainer(),a&&(d=n.get(a+"_form"),d&&(i.extend(d.style,{top:"100%"}),d.firstChild.setAttribute("tabindex",-1))),m=document.createElement("form"),m.setAttribute("id",h+"_form"),m.setAttribute("method","post"),m.setAttribute("enctype","multipart/form-data"),m.setAttribute("encoding","multipart/form-data"),i.extend(m.style,{overflow:"hidden",position:"absolute",top:0,left:0,width:"100%",height:"100%"}),f=document.createElement("input"),f.setAttribute("id",h),f.setAttribute("type","file"),f.setAttribute("accept",l.join(",")),g.can("summon_file_dialog")&&f.setAttribute("tabindex",-1),i.extend(f.style,{fontSize:"999px",opacity:0}),m.appendChild(f),o.appendChild(m),i.extend(f.style,{position:"absolute",top:0,left:0,width:"100%",height:"100%"}),"IE"===s.browser&&s.verComp(s.version,10,"<")&&i.extend(f.style,{filter:"progid:DXImageTransform.Microsoft.Alpha(opacity=0)"}),f.onchange=function(){var i;this.value&&(i=this.files?this.files[0]:{name:this.value},i=new t(g.uid,i),this.onchange=function(){},e.call(p),p.files=[i],f.setAttribute("id",i.uid),m.setAttribute("id",i.uid+"_form"),p.trigger("change"),f=m=null)},g.can("summon_file_dialog")&&(c=n.get(u.browse_button),r.removeEvent(c,"click",p.uid),r.addEvent(c,"click",function(e){f&&!f.disabled&&f.click(),e.preventDefault()},p.uid)),a=h,o=d=c=null}var a,u,c,l=[];i.extend(this,{init:function(t){var i,s=this,a=s.getRuntime();u=t,l=o.extList2mimes(t.accept,a.can("filter_by_extension")),i=a.getShimContainer(),function(){var e,o,l;e=n.get(t.browse_button),c=n.getStyle(e,"z-index")||"auto",a.can("summon_file_dialog")?("static"===n.getStyle(e,"position")&&(e.style.position="relative"),s.bind("Refresh",function(){o=parseInt(c,10)||1,n.get(u.browse_button).style.zIndex=o,this.getRuntime().getShimContainer().style.zIndex=o-1})):e.setAttribute("tabindex",-1),l=a.can("summon_file_dialog")?e:i,r.addEvent(l,"mouseover",function(){s.trigger("mouseenter")},s.uid),r.addEvent(l,"mouseout",function(){s.trigger("mouseleave")},s.uid),r.addEvent(l,"mousedown",function(){s.trigger("mousedown")},s.uid),r.addEvent(n.get(t.container),"mouseup",function(){s.trigger("mouseup")},s.uid),e=null}(),e.call(this),i=null,s.trigger({type:"ready",async:!0})},setOption:function(e,t){var i,r=this.getRuntime();"accept"==e&&(l=t.mimes||o.extList2mimes(t,r.can("filter_by_extension"))),i=n.get(a),i&&i.setAttribute("accept",l.join(","))},disable:function(e){var t;(t=n.get(a))&&(t.disabled=!!e)},destroy:function(){var e=this.getRuntime(),t=e.getShim(),i=e.getShimContainer(),o=u&&n.get(u.container),s=u&&n.get(u.browse_button);o&&r.removeAllEvents(o,this.uid),s&&(r.removeAllEvents(s,this.uid),s.style.zIndex=c),i&&(r.removeAllEvents(i,this.uid),i.innerHTML=""),t.removeInstance(this.uid),a=l=u=i=o=s=t=null}})}return e.FileInput=a}),n("moxie/runtime/html4/file/FileReader",["moxie/runtime/html4/Runtime","moxie/runtime/html5/file/FileReader"],function(e,t){return e.FileReader=t}),n("moxie/runtime/html4/xhr/XMLHttpRequest",["moxie/runtime/html4/Runtime","moxie/core/utils/Basic","moxie/core/utils/Dom","moxie/core/utils/Url","moxie/core/Exceptions","moxie/core/utils/Events","moxie/file/Blob","moxie/xhr/FormData"],function(e,t,i,n,r,o,s,a){function u(){function e(e){var t,n,r,s,a=this,u=!1;if(l){if(t=l.id.replace(/_iframe$/,""),n=i.get(t+"_form")){for(r=n.getElementsByTagName("input"),s=r.length;s--;)switch(r[s].getAttribute("type")){case"hidden":r[s].parentNode.removeChild(r[s]);break;case"file":u=!0}r=[],u||n.parentNode.removeChild(n),n=null}setTimeout(function(){o.removeEvent(l,"load",a.uid),l.parentNode&&l.parentNode.removeChild(l);var t=a.getRuntime().getShimContainer();t.children.length||t.parentNode.removeChild(t),t=l=null,e()},1)}}var u,c,l;t.extend(this,{send:function(d,m){function f(){var i=y.getShimContainer()||document.body,r=document.createElement("div");r.innerHTML='',l=r.firstChild,i.appendChild(l),o.addEvent(l,"load",function(){var i;try{i=l.contentWindow.document||l.contentDocument||window.frames[l.id].document,/^4(0[0-9]|1[0-7]|2[2346])\s/.test(i.title)?u=i.title.replace(/^(\d+).*$/,"$1"):(u=200,c=t.trim(i.body.innerHTML),v.trigger({type:"progress",loaded:c.length,total:c.length}),x&&v.trigger({type:"uploadprogress",loaded:x.size||1025,total:x.size||1025}))}catch(r){if(!n.hasSameOrigin(d.url))return void e.call(v,function(){v.trigger("error")});u=404}e.call(v,function(){v.trigger("load")})},v.uid)}var h,p,g,x,v=this,y=v.getRuntime();if(u=c=null,m instanceof a&&m.hasBlob()){if(x=m.getBlob(),h=x.uid,g=i.get(h),p=i.get(h+"_form"),!p)throw new r.DOMException(r.DOMException.NOT_FOUND_ERR)}else h=t.guid("uid_"),p=document.createElement("form"),p.setAttribute("id",h+"_form"),p.setAttribute("method",d.method),p.setAttribute("enctype","multipart/form-data"),p.setAttribute("encoding","multipart/form-data"),y.getShimContainer().appendChild(p);p.setAttribute("target",h+"_iframe"),m instanceof a&&m.each(function(e,i){if(e instanceof s)g&&g.setAttribute("name",i);else{var n=document.createElement("input");t.extend(n,{type:"hidden",name:i,value:e}),g?p.insertBefore(n,g):p.appendChild(n)}}),p.setAttribute("action",d.url),f(),p.submit(),v.trigger("loadstart")},getStatus:function(){return u},getResponse:function(e){if("json"===e&&"string"===t.typeOf(c)&&window.JSON)try{return JSON.parse(c.replace(/^\s*]*>/,"").replace(/<\/pre>\s*$/,""))}catch(i){return null}return c},abort:function(){var t=this;l&&l.contentWindow&&(l.contentWindow.stop?l.contentWindow.stop():l.contentWindow.document.execCommand?l.contentWindow.document.execCommand("Stop"):l.src="about:blank"),e.call(this,function(){t.dispatchEvent("abort")})},destroy:function(){this.getRuntime().getShim().removeInstance(this.uid)}})}return e.XMLHttpRequest=u}),n("moxie/runtime/html4/image/Image",["moxie/runtime/html4/Runtime","moxie/runtime/html5/image/Image"],function(e,t){return e.Image=t}),s(["moxie/core/utils/Basic","moxie/core/utils/Encode","moxie/core/utils/Env","moxie/core/Exceptions","moxie/core/utils/Dom","moxie/core/EventTarget","moxie/runtime/Runtime","moxie/runtime/RuntimeClient","moxie/file/Blob","moxie/core/I18n","moxie/core/utils/Mime","moxie/file/FileInput","moxie/file/File","moxie/file/FileDrop","moxie/file/FileReader","moxie/core/utils/Url","moxie/runtime/RuntimeTarget","moxie/xhr/FormData","moxie/xhr/XMLHttpRequest","moxie/image/Image","moxie/core/utils/Events","moxie/runtime/html5/image/ResizerCanvas"])}(this)}),!function(e,t){var i=function(){var e={};return t.apply(e,arguments),e.plupload};"function"==typeof define&&define.amd?define("plupload",["moxie"],i):"object"==("undefined"==typeof module?"undefined":_typeof(module))&&module.exports?module.exports=i(require("moxie")):e.plupload=i(e.moxie)}(this||window,function(e){!function(e,t,i){function n(e){function t(e,t,i){var r={chunks:"slice_blob",jpgresize:"send_binary_string",pngresize:"send_binary_string",progress:"report_upload_progress",multi_selection:"select_multiple",dragdrop:"drag_and_drop",drop_element:"drag_and_drop",headers:"send_custom_headers",urlstream_upload:"send_binary_string",canSendBinary:"send_binary",triggerDialog:"summon_file_dialog"};r[e]?n[r[e]]=t:i||(n[e]=t)}var i=e.required_features,n={};return"string"==typeof i?u.each(i.split(/\s*,\s*/),function(e){t(e,!0)}):"object"==("undefined"==typeof i?"undefined":_typeof(i))?u.each(i,function(e,i){t(i,e)}):i===!0&&(e.chunk_size&&e.chunk_size>0&&(n.slice_blob=!0),u.isEmptyObj(e.resize)&&e.multipart!==!1||(n.send_binary_string=!0),e.http_method&&(n.use_http_method=e.http_method),u.each(e,function(e,i){t(i,!!e,!0)})),n}var r=window.setTimeout,o={},s=t.core.utils,a=t.runtime.Runtime,u={VERSION:"2.3.6",STOPPED:1,STARTED:2,QUEUED:1,UPLOADING:2,FAILED:4,DONE:5,GENERIC_ERROR:-100,HTTP_ERROR:-200,IO_ERROR:-300,SECURITY_ERROR:-400,INIT_ERROR:-500,FILE_SIZE_ERROR:-600,FILE_EXTENSION_ERROR:-601,FILE_DUPLICATE_ERROR:-602,IMAGE_FORMAT_ERROR:-700,MEMORY_ERROR:-701,IMAGE_DIMENSIONS_ERROR:-702,moxie:t,mimeTypes:s.Mime.mimes,ua:s.Env,typeOf:s.Basic.typeOf,extend:s.Basic.extend,guid:s.Basic.guid,getAll:function(e){var t,i=[];"array"!==u.typeOf(e)&&(e=[e]);for(var n=e.length;n--;)t=u.get(e[n]),t&&i.push(t);return i.length?i:null},get:s.Dom.get,each:s.Basic.each,getPos:s.Dom.getPos,getSize:s.Dom.getSize,xmlEncode:function(e){var t={"<":"lt",">":"gt","&":"amp",'"':"quot","'":"#39"},i=/[<>&\"\']/g;return e?(""+e).replace(i,function(e){return t[e]?"&"+t[e]+";":e}):e},toArray:s.Basic.toArray,inArray:s.Basic.inArray,inSeries:s.Basic.inSeries,addI18n:t.core.I18n.addI18n,translate:t.core.I18n.translate,sprintf:s.Basic.sprintf,isEmptyObj:s.Basic.isEmptyObj,hasClass:s.Dom.hasClass,addClass:s.Dom.addClass,removeClass:s.Dom.removeClass,getStyle:s.Dom.getStyle,addEvent:s.Events.addEvent,removeEvent:s.Events.removeEvent,removeAllEvents:s.Events.removeAllEvents,cleanName:function(e){var t,i;for(i=[/[\300-\306]/g,"A",/[\340-\346]/g,"a",/\307/g,"C",/\347/g,"c",/[\310-\313]/g,"E",/[\350-\353]/g,"e",/[\314-\317]/g,"I",/[\354-\357]/g,"i",/\321/g,"N",/\361/g,"n",/[\322-\330]/g,"O",/[\362-\370]/g,"o",/[\331-\334]/g,"U",/[\371-\374]/g,"u"],t=0;t0?"&":"?")+i),e},formatSize:function(e){function t(e,t){return Math.round(e*Math.pow(10,t))/Math.pow(10,t)}if(e===i||/\D/.test(e))return u.translate("N/A");var n=Math.pow(1024,4);return e>n?t(e/n,1)+" "+u.translate("tb"):e>(n/=1024)?t(e/n,1)+" "+u.translate("gb"):e>(n/=1024)?t(e/n,1)+" "+u.translate("mb"):e>1024?Math.round(e/1024)+" "+u.translate("kb"):e+" "+u.translate("b")},parseSize:s.Basic.parseSizeStr,predictRuntime:function(e,t){var i,n;return i=new u.Uploader(e),n=a.thatCan(i.getOption().required_features,t||e.runtimes),i.destroy(),n},addFileFilter:function(e,t){o[e]=t}};u.addFileFilter("mime_types",function(e,t,i){e.length&&!e.regexp.test(t.name)?(this.trigger("Error",{code:u.FILE_EXTENSION_ERROR,message:u.translate("File extension error."),file:t}),i(!1)):i(!0)}),u.addFileFilter("max_file_size",function(e,t,i){var n;e=u.parseSize(e),t.size!==n&&e&&t.size>e?(this.trigger("Error",{code:u.FILE_SIZE_ERROR,message:u.translate("File size error."),file:t}),i(!1)):i(!0)}),u.addFileFilter("prevent_duplicates",function(e,t,i){if(e)for(var n=this.files.length;n--;)if(t.name===this.files[n].name&&t.size===this.files[n].size)return this.trigger("Error",{code:u.FILE_DUPLICATE_ERROR,message:u.translate("Duplicate file error."),file:t}),void i(!1);i(!0)}),u.addFileFilter("prevent_empty",function(e,t,n){e&&!t.size&&t.size!==i?(this.trigger("Error",{code:u.FILE_SIZE_ERROR,message:u.translate("File size error."),file:t}),n(!1)):n(!0)}),u.Uploader=function(e){function s(){var e,t,i=0;if(this.state==u.STARTED){for(t=0;t0?Math.ceil(100*(e.loaded/e.size)):100,l()}function l(){var e,t,n,r=0;for(A.reset(),e=0;eI)&&(r+=n),A.loaded+=n):A.size=i,t.status==u.DONE?A.uploaded++:t.status==u.FAILED?A.failed++:A.queued++;A.size===i?A.percent=O.length>0?Math.ceil(100*(A.uploaded/O.length)):0:(A.bytesPerSec=Math.ceil(r/((+new Date-I||1)/1e3)),A.percent=A.size>0?Math.ceil(100*(A.loaded/A.size)):0)}function d(){var e=C[0]||N[0];return e?e.getRuntime().uid:!1}function m(){this.bind("FilesAdded FilesRemoved",function(e){e.trigger("QueueChanged"),e.refresh()}),this.bind("CancelUpload",_),this.bind("BeforeUpload",g),this.bind("UploadFile",x),this.bind("UploadProgress",v),this.bind("StateChanged",y),this.bind("QueueChanged",l),this.bind("Error",E),this.bind("FileUploaded",w),this.bind("Destroy",b)}function f(e,i){var n=this,r=0,o=[],s={runtime_order:e.runtimes,required_caps:e.required_features,preferred_caps:D,swf_url:e.flash_swf_url,xap_url:e.silverlight_xap_url};u.each(e.runtimes.split(/\s*,\s*/),function(t){e[t]&&(s[t]=e[t])}),e.browse_button&&u.each(e.browse_button,function(i){o.push(function(o){var c=new t.file.FileInput(u.extend({},s,{accept:e.filters.mime_types,name:e.file_data_name,multiple:e.multi_selection,container:e.container,browse_button:i}));c.onready=function(){var e=a.getInfo(this.ruid);u.extend(n.features,{chunks:e.can("slice_blob"),multipart:e.can("send_multipart"),multi_selection:e.can("select_multiple")}),r++,C.push(this),o()},c.onchange=function(){n.addFile(this.files)},c.bind("mouseenter mouseleave mousedown mouseup",function(t){L||(e.browse_button_hover&&("mouseenter"===t.type?u.addClass(i,e.browse_button_hover):"mouseleave"===t.type&&u.removeClass(i,e.browse_button_hover)),e.browse_button_active&&("mousedown"===t.type?u.addClass(i,e.browse_button_active):"mouseup"===t.type&&u.removeClass(i,e.browse_button_active)))}),c.bind("mousedown",function(){n.trigger("Browse")}),c.bind("error runtimeerror",function(){c=null,o()}),c.init()})}),e.drop_element&&u.each(e.drop_element,function(e){o.push(function(i){var o=new t.file.FileDrop(u.extend({},s,{drop_zone:e}));o.onready=function(){var e=a.getInfo(this.ruid);u.extend(n.features,{chunks:e.can("slice_blob"),multipart:e.can("send_multipart"),dragdrop:e.can("drag_and_drop")}),r++,N.push(this),i()},o.ondrop=function(){n.addFile(this.files)},o.bind("error runtimeerror",function(){o=null,i()}),o.init()})}),u.inSeries(o,function(){"function"==typeof i&&i(r)})}function h(e,n,r,o){var s=new t.image.Image;try{s.onload=function(){n.width>this.width&&n.height>this.height&&n.quality===i&&n.preserve_headers&&!n.crop?(this.destroy(),o(e)):s.downsize(n.width,n.height,n.crop,n.preserve_headers)},s.onresize=function(){var t=this.getAsBlob(e.type,n.quality);this.destroy(),o(t)},s.bind("error runtimeerror",function(){this.destroy(),o(e)}),s.load(e,r)}catch(a){o(e)}}function p(e,i,r){function o(e,i,n){var r=R[e];switch(e){case"max_file_size":"max_file_size"===e&&(R.max_file_size=R.filters.max_file_size=i);break;case"chunk_size":(i=u.parseSize(i))&&(R[e]=i,R.send_file_name=!0);break;case"multipart":R[e]=i,i||(R.send_file_name=!0);break;case"http_method":R[e]="PUT"===i.toUpperCase()?"PUT":"POST";break;case"unique_names":R[e]=i,i&&(R.send_file_name=!0);break;case"filters":"array"===u.typeOf(i)&&(i={mime_types:i}),n?u.extend(R.filters,i):R.filters=i,i.mime_types&&("string"===u.typeOf(i.mime_types)&&(i.mime_types=t.core.utils.Mime.mimes2extList(i.mime_types)),i.mime_types.regexp=function(e){var t=[];return u.each(e,function(e){u.each(e.extensions.split(/,/),function(e){/^\s*\*\s*$/.test(e)?t.push("\\.*"):t.push("\\."+e.replace(new RegExp("["+"/^$.*+?|()[]{}\\".replace(/./g,"\\$&")+"]","g"),"\\$&"))})}),new RegExp("("+t.join("|")+")$","i")}(i.mime_types),R.filters.mime_types=i.mime_types);break;case"resize":R.resize=i?u.extend({preserve_headers:!0,crop:!1},i):!1;break;case"prevent_duplicates":R.prevent_duplicates=R.filters.prevent_duplicates=!!i;break;case"container":case"browse_button":case"drop_element":i="container"===e?u.get(i):u.getAll(i);case"runtimes":case"multi_selection":case"flash_swf_url":case"silverlight_xap_url":R[e]=i,n||(c=!0);break;default:R[e]=i}n||s.trigger("OptionChanged",e,i,r)}var s=this,c=!1;"object"==("undefined"==typeof e?"undefined":_typeof(e))?u.each(e,function(e,t){o(t,e,r)}):o(e,i,r),r?(R.required_features=n(u.extend({},R)),D=n(u.extend({},R,{required_features:!0}))):c&&(s.trigger("Destroy"),f.call(s,R,function(e){e?(s.runtime=a.getInfo(d()).type,s.trigger("Init",{runtime:s.runtime}),s.trigger("PostInit")):s.trigger("Error",{code:u.INIT_ERROR,message:u.translate("Init error.")})}))}function g(e,t){if(e.settings.unique_names){var i=t.name.match(/\.([^.]+)$/),n="part";i&&(n=i[1]),t.target_name=t.id+"."+n}}function x(e,i){function n(){d-- >0?r(o,1e3):(i.loaded=f,e.trigger("Error",{code:u.HTTP_ERROR,message:u.translate("HTTP Error."),file:i,response:T.responseText,status:T.status,responseHeaders:T.getAllResponseHeaders()}))}function o(){var t,n,r={};i.status===u.UPLOADING&&e.state!==u.STOPPED&&(e.settings.send_file_name&&(r.name=i.target_name||i.name),l&&m.chunks&&a.size>l?(n=Math.min(l,a.size-f),t=a.slice(f,f+n)):(n=a.size,t=a),l&&m.chunks&&(e.settings.send_chunk_number?(r.chunk=Math.ceil(f/l),r.chunks=Math.ceil(a.size/l)):(r.offset=f,r.total=a.size)),e.trigger("BeforeChunkUpload",i,r,t,f)&&s(r,t,n))}function s(s,l,h){var g;T=new t.xhr.XMLHttpRequest,T.upload&&(T.upload.onprogress=function(t){i.loaded=Math.min(i.size,f+t.loaded),e.trigger("UploadProgress",i)}),T.onload=function(){return T.status<200||T.status>=400?void n():(d=e.settings.max_retries,h=a.size?(i.size!=i.origSize&&(a.destroy(),a=null),e.trigger("UploadProgress",i),i.status=u.DONE,i.completeTimestamp=+new Date,e.trigger("FileUploaded",i,{response:T.responseText,status:T.status,responseHeaders:T.getAllResponseHeaders()})):r(o,1)))},T.onerror=function(){n()},T.onloadend=function(){this.destroy()},e.settings.multipart&&m.multipart?(T.open(e.settings.http_method,c,!0),u.each(e.settings.headers,function(e,t){T.setRequestHeader(t,e)}),g=new t.xhr.FormData,u.each(u.extend(s,e.settings.multipart_params),function(e,t){g.append(t,e)}),g.append(e.settings.file_data_name,l),T.send(g,p)):(c=u.buildUrl(e.settings.url,u.extend(s,e.settings.multipart_params)),T.open(e.settings.http_method,c,!0),u.each(e.settings.headers,function(e,t){T.setRequestHeader(t,e)}),T.hasRequestHeader("Content-Type")||T.setRequestHeader("Content-Type","application/octet-stream"),T.send(l,p))}var a,c=e.settings.url,l=e.settings.chunk_size,d=e.settings.max_retries,m=e.features,f=0,p={runtime_order:e.settings.runtimes,required_caps:e.settings.required_features,preferred_caps:D,swf_url:e.settings.flash_swf_url,xap_url:e.settings.silverlight_xap_url};i.loaded&&(f=i.loaded=l?l*Math.floor(i.loaded/l):0),a=i.getSource(),u.isEmptyObj(e.settings.resize)||-1===u.inArray(a.type,["image/jpeg","image/png"])?o():h(a,e.settings.resize,p,function(e){a=e,i.size=e.size,o()})}function v(e,t){c(t)}function y(e){if(e.state==u.STARTED)I=+new Date;else if(e.state==u.STOPPED)for(var t=e.files.length-1;t>=0;t--)e.files[t].status==u.UPLOADING&&(e.files[t].status=u.QUEUED,l())}function _(){T&&T.abort()}function w(e){l(),r(function(){s.call(e)},1)}function E(e,t){t.code===u.INIT_ERROR?e.destroy():t.code===u.HTTP_ERROR&&(t.file.status=u.FAILED,t.file.completeTimestamp=+new Date,c(t.file),e.state==u.STARTED&&(e.trigger("CancelUpload"),r(function(){s.call(e)},1)))}function b(e){e.stop(),u.each(O,function(e){e.destroy()}),O=[],C.length&&(u.each(C,function(e){e.destroy()}),C=[]),N.length&&(u.each(N,function(e){e.destroy()}),N=[]),D={},L=!1,I=T=null,A.reset()}var R,I,A,T,S=u.guid(),O=[],D={},C=[],N=[],L=!1;R={chunk_size:0,file_data_name:"file",filters:{mime_types:[],max_file_size:0,prevent_duplicates:!1,prevent_empty:!0},flash_swf_url:"js/Moxie.swf",http_method:"POST",max_retries:0,multipart:!0,multi_selection:!0,resize:!1,runtimes:a.order,send_file_name:!0,send_chunk_number:!0,silverlight_xap_url:"js/Moxie.xap"},p.call(this,e,null,!0),A=new u.QueueProgress,u.extend(this,{id:S,uid:S,state:u.STOPPED,features:{},runtime:null,files:O,settings:R,total:A,init:function(){var e,t,i=this;return e=i.getOption("preinit"),"function"==typeof e?e(i):u.each(e,function(e,t){i.bind(t,e)}),m.call(i),u.each(["container","browse_button","drop_element"],function(e){return null===i.getOption(e)?(t={code:u.INIT_ERROR,message:u.sprintf(u.translate("%s specified, but cannot be found."),e)},!1):void 0}),t?i.trigger("Error",t):R.browse_button||R.drop_element?void f.call(i,R,function(e){var t=i.getOption("init");"function"==typeof t?t(i):u.each(t,function(e,t){i.bind(t,e)}),e?(i.runtime=a.getInfo(d()).type,i.trigger("Init",{runtime:i.runtime}),i.trigger("PostInit")):i.trigger("Error",{code:u.INIT_ERROR,message:u.translate("Init error.")})}):i.trigger("Error",{code:u.INIT_ERROR,message:u.translate("You must specify either browse_button or drop_element.")})},setOption:function(e,t){p.call(this,e,t,!this.runtime)},getOption:function(e){return e?R[e]:R},refresh:function(){C.length&&u.each(C,function(e){e.trigger("Refresh")}),this.trigger("Refresh")},start:function(){this.state!=u.STARTED&&(this.state=u.STARTED,this.trigger("StateChanged"),s.call(this))},stop:function(){this.state!=u.STOPPED&&(this.state=u.STOPPED,this.trigger("StateChanged"),this.trigger("CancelUpload"))},disableBrowse:function(){L=arguments[0]!==i?arguments[0]:!0,C.length&&u.each(C,function(e){e.disable(L)}),this.trigger("DisableBrowse",L)},getFile:function(e){var t;for(t=O.length-1;t>=0;t--)if(O[t].id===e)return O[t]},addFile:function(e,i){function n(e,t){var i=[];u.each(c.settings.filters,function(t,n){o[n]&&i.push(function(i){o[n].call(c,t,e,function(e){i(!e)})})}),u.inSeries(i,t)}function s(e){var o=u.typeOf(e);if(e instanceof t.file.File){if(!e.ruid&&!e.isDetached()){if(!a)return!1;e.ruid=a,e.connectRuntime(a)}s(new u.File(e))}else e instanceof t.file.Blob?(s(e.getSource()),e.destroy()):e instanceof u.File?(i&&(e.name=i),l.push(function(t){n(e,function(i){i||(O.push(e),m.push(e),c.trigger("FileFiltered",e)),r(t,1)})})):-1!==u.inArray(o,["file","blob"])?s(new t.file.File(null,e)):"node"===o&&"filelist"===u.typeOf(e.files)?u.each(e.files,s):"array"===o&&(i=null,u.each(e,s))}var a,c=this,l=[],m=[];a=d(),s(e),l.length&&u.inSeries(l,function(){m.length&&c.trigger("FilesAdded",m)})},removeFile:function(e){for(var t="string"==typeof e?e:e.id,i=O.length-1;i>=0;i--)if(O[i].id===t)return this.splice(i,1)[0]},splice:function(e,t){var n=O.splice(e===i?0:e,t===i?O.length:t),r=!1;return this.state==u.STARTED&&(u.each(n,function(e){return e.status===u.UPLOADING?(r=!0,!1):void 0}),r&&this.stop()),this.trigger("FilesRemoved",n),u.each(n,function(e){e.destroy()}),r&&this.start(),n},dispatchEvent:function(e){var t,i;if(e=e.toLowerCase(),t=this.hasEventListener(e)){t.sort(function(e,t){return t.priority-e.priority}),i=[].slice.call(arguments),i.shift(),i.unshift(this);for(var n=0;n>> file start: js/core/angular/plupload.js */ //= require js/lib/plupload/plupload-2.3.6.full.min.js !function(){"use strict";angular.module("angular-plupload",[]).provider("pluploadOption",function(){var l={flash_swf_url:LJ.get("siteroot")+"/js/lib/plupload/Moxie.cdn.swf",runtimes:"html5,flash",max_file_size:"10mb",multipart:!0,filters:[{title:"Image files",extensions:"jpg,jpeg,gif,png"}],chunk_size:0};return{setOptions:function(e){angular.extend(l,e)},$get:function(){return l}}}).directive("plupload",["$timeout","pluploadOption",function(l,e){function a(l){return l.charAt(0).toLowerCase()+l.slice(1)}return{scope:{url:"=plupload",options:"=pluploadOptions",callbacks:"=pluploadCallbacks",disbled:"=pluploadDisableOnUpload",delayed:"=pluploadDelayed"},link:function o(n,i){if(n.delayed&&!n.loaded)return l(function(){o(n,i)},10),void(n.loaded=!0);var t=e;t.url=n.url,angular.extend(t,n.options);var d=n.disbled,p=new plupload.Uploader(t);if(n.callbacks){var r=["Init","PostInit","OptionChanged","Refresh","StateChanged","UploadFile","BeforeUpload","QueueChanged","UploadProgress","FilesRemoved","FileFiltered","FilesAdded","FileUploaded","ChunkUploaded","UploadComplete","Error","Destroy"];angular.forEach(r,function(l){var e=n.callbacks[a(l)]||angular.noop;p.bind(l,function(){e.apply(null,arguments),n.$$phase||n.$root.$$phase||n.$apply()})})}p.init(),d&&p.bind("BeforeUpload",function(){p.addFile=angular.noop})}}}])}(); /* <<< file end: js/core/angular/plupload.js */ //# map link was there [plupload.js.map] /* >>> file start: js/core/angular/checked.js */ angular.module("LJ.Checked",[]).factory("checkedGroup",[function(){function e(){this._models={}}function t(t){return r[t]?r[t]:(r[t]=new e,r[t])}var r={};return e.prototype.reset=function(e){var t,r=this.models();for(t in r)r.hasOwnProperty(t)&&delete r[t];return angular.isObject(e)&&angular.extend(r,e),this},e.prototype.length=function(){return Object.keys(this.models()).length},e.prototype.count=function(){var e,t=this.models(),r=0;for(e in t)t.hasOwnProperty(e)&&t[e]&&(r+=1);return r},e.prototype.models=function(){return this._models},e.prototype.toggle=function(e,t){var r=this.models(),n="undefined"!=typeof t;Array.isArray(e)||(e=[e]),e.forEach(function(e){r[e]=n?t:!Boolean(r[e])})},e.prototype.isChecked=function(e){return Boolean(this.models()[e])},e.prototype.isAllChecked=function(e){var t=this.models();return"undefined"==typeof e?this.count()===this.length():(Array.isArray(e)||(e=[e]),e.every(function(e){return t[e]}))},e.prototype.isNoneChecked=function(e){var t=this.models();return"undefined"==typeof e?0===this.count():(Array.isArray(e)||(e=[e]),e.every(function(e){return!t[e]}))},e.prototype.getChecked=function(e){var t,r=this.models(),n=[];for(t in r)r.hasOwnProperty(t)&&r[t]&&n.push(t);return"undefined"!=typeof e&&(Array.isArray(e)||(e=[e]),e=e.map(String),n=n.filter(function(t){return-1!==e.indexOf(t)})),n},t}]); /* <<< file end: js/core/angular/checked.js */ //# map link was there [checked.js.map] /* >>> file start: js/core/angular/privacy.js */ //= require js/core/angular/api.js //= require js/core/angular/checked.js Site.page.template['angular/privacy.ng.tmpl'] = ' \n\n \n\n
      \n
    • \n \n
    • \n
    \n\n
    \n'; //= require_ml flatmedia.security //= require_ml admin.writers_block.answer.private //= require_ml admin.writers_block.answer.public //= require_ml admin.writers_block.answer.custom //= require_ml admin.writers_block.answer.friends //= require_ml admin.writers_block.answer.default //= require_ml admin.writers_block.answer.members //= require_ml admin.writers_block.answer.maintainers !function(e){return e}(),function(){"use strict";angular.module("LJ.Privacy",["LJ.Templates","LJ.Api","LJ.Checked"]).factory("Privacy",["Api",function(e){function t(t){return e.call("user.get_privacy_list",t,{cache:!0}).then(function(e){return e.list})}function n(t){return t=t||{},e.call("groups.list",t,{cache:!0}).then(function(e){return e.groups})}return{getGroups:n,getPrivacyList:t}}]).directive("ljPrivacy",["$timeout","Privacy","checkedGroup",function(e,t,n){return{scope:{model:"=ljPrivacy",scope:"=ljPrivacyScope",user:"=ljPrivacyUser",tab:"=ljPrivacyTabindex",init:"=ljPrivacyInit",disabled:"=ljPrivacyDisabled"},templateUrl:"privacy.ng.tmpl",controllerAs:"privacy",controller:["$scope","$attrs",function(r,i){function c(){r.$watchCollection(function(){return a.getChecked()},function(e){r.model.groupids=e.map(Number)})}function o(){l&&""!==r.user&&(u.selected=a.models(),t.getPrivacyList({scope:r.scope,user:r.user}).then(function(e){if(u.all=[],e.forEach(function(e){u.all.push({title:LJ.ml("admin.writers_block.answer."+e),value:e})}),i.hasOwnProperty("ljPrivacyDeafult")&&u.all.unshift({title:LJ.ml("admin.writers_block.answer.default"),value:""}),!r.communityChanged)var t=u.all.find(function(e){return e.value===r.model.privacy});t||(r.model.privacy=u.all[0].value)}),t.getGroups({journal:r.user}).then(function(e){u.groups=e,a.toggle(r.model.groupids,!0),c()}))}var u=this,a=n("custom"),l=!0;i.hasOwnProperty("ljPrivacyInit")&&r.$watch("init",function(t){t&&(l=t,e(o))}),r.$watch("user",o),r.$watchCollection("model.groupids",function(){a.toggle(r.model.groupids,!0)}),r.$on("privacy:customGroups:reset",function(){a.reset()}),LJ.Event.on("community:change",function(){r.needStateRestore?r.needStateRestore=!1:r.communityChanged=!0}),LJ.Event.on("state_restore",function(){r.needStateRestore=!0})}]}}])}(); /* <<< file end: js/core/angular/privacy.js */ //# map link was there [privacy.js.map] /* >>> file start: js/video/video.js */ var _extends=Object.assign||function(e){for(var t=1;t>> file start: js/video/selectAlbum.js */ //= require js/video/video.js Site.page.template['angular/video/selectVideoAlbum.ng.tmpl'] = '
    \n\n
    \n \n \n \n \n
    \n\n
    \n \n \n \n
    \n
    \n'; //= require_ml flatmedia.album.create.new //= require_ml flatmedia.album.name //= require_ml flatmedia.button.back //= require_ml flatmedia.or //= require_ml flatmedia.select.album !function(e){return e}(),function(){"use strict";angular.module("Video.SelectAlbum",["LJ.Templates","Video.Service"]).directive("selectVideoAlbum",["Video",function(e){return{templateUrl:"selectVideoAlbum.ng.tmpl",controllerAs:"directive",scope:{album:"=selectVideoAlbum",allowNonSelected:"=?allowNonSelected"},controller:["$scope","$attrs","Video",function(e,t,l){function n(){var l=t.allowNonSelected;return"string"==typeof l&&0===l.length?!0:e.allowNonSelected}function u(e){var t=[];return n()&&t.push(l.defaults.NON_SELECTED_ALBUM),t.concat(e?e:l.getAlbums())}var o=this,i=this.state={init:!1,create:!1};this.newAlbum={name:""},this.init=function(){i.init=!0,o.albums=angular.copy(l.getAlbums()),e.album.id?this.selectedAlbumId=e.album.id:0!==o.albums.length&&(this.selectedAlbumId=o.albums[0].id),e.$watch(function(){return o.selectedAlbumId+o.newAlbum.name+i.create},function(){e.album=i.create?o.newAlbum:l.getAlbumById(o.selectedAlbumId)}),e.$watchCollection(l.getAlbums,function(e){o.albums=u(e),0===e.length&&(i.create=!0)}),"undefined"!=typeof t.allowNonSelected&&e.$watch("allowNonSelected",function(){o.albums=u()})},this.toggle=function(e){i.create=e,this.newAlbum.name=""}}],link:function(t,l,n,u){if("undefined"==typeof t.album)throw new TypeError("You should provide album object");e.fetchAlbums().then(function(){u.init()})}}}])}(); /* <<< file end: js/video/selectAlbum.js */ //# map link was there [selectAlbum.js.map] /* >>> file start: js/video/uploader.js */ //= require js/core/angular/api.js //= require js/core/angular/adult.js //= require js/core/angular/plupload.js //= require js/core/angular/privacy.js //= require js/video/video.js //= require js/video/selectAlbum.js Site.page.template['angular/video/uploaderVideo.ng.tmpl'] = '\n \n \n \n
    \n\n
    \n \n
    \n\n
    \n \n
    \n\n
    \n
    \n \n
    \n
    \n \n
    \n
    \n\n
    \n
    \n
    \n\n
    \n \n \n
    \n\n
    \n\n
    \n \n \n
    \n\n\n\n
    \n \n
    \n'; //= require_ml flatmedia.button.cancel //= require_ml flatmedia.name //= require_ml flatmedia.upload.video //= require_ml videouploader.upload.dragOrClick //= require_ml videouploader.upload.selectedFile //= require_ml photouploader.upload.initFail !function(e){return e}(),function(){"use strict";angular.module("Video.Uploader",["LJ.Templates","LJ.Api","LJ.Adult","LJ.Privacy","LJ.Messages","angular-plupload","Video.SelectAlbum","Video.Service"]).directive("ljVideoUploader",["$timeout",function(e){return{templateUrl:"uploaderVideo.ng.tmpl",scope:{albumId:"=ljVideoUploader",callback:"&ljVideoUploaderCallback",onError:"&ljVideoUploaderError",cancelUpload:"&ljVideoUploaderCancel"},controllerAs:"directive",controller:["$scope","$q","$rootScope","$element","$attrs","Video","Messages",function(o,t,n,l,i,a,r){function d(){return{name:a.defaults.ALBUM_NAME,privacy:a.defaults.RECORD_PRIVACY,album:a.getAlbumById(o.albumId)||{},adult_content:a.defaults.RECORD_ADULT}}function u(t,n){return c.state.uploadInProgress=!1,c.state.uploadDone=!1,c.state.error=!0,n.code===window.plupload.INIT_ERROR?void(c.state.init=!1):(n.code===window.plupload.HTTP_ERROR&&c.file&&a.removeRecords([c.file.id]),e(function(){r.error({body:n.message})}),void(angular.isFunction(o.onError)&&o.onError()))}var s,c=this,p=this.state={init:!1,error:!1,uploadInProgress:!1,uploadDone:!1,fileAdded:!1};this.isUploadAllowed=function(){return s&&0!==s.trim().length&&0!==this.model.name.trim().length&&(this.model.album.id||0!==this.model.album.name.trim().length)&&!this.state.uploadInProgress},this.init=function(){p.init=!0,this.model=d()},this.upload=function(){c.state.uploadInProgress=!0,this.beforeUpload().then(function(e){var t=c.uploader.files;c.state.error||(LJ.Event.trigger("video:upload:start"),t[0].name=e.name,c.file.id=e.id,c.uploader.settings.url=e.upload_link,c.uploader.setOption({chunk_size:"1000kb"}),c.uploader.setOption({send_chunk_number:!1}),c.uploader.start(),LJ.Event.once("video:upload:done",function(){o.callback({record:e})}))})},this.cancel=function(){LJ.Event.trigger("video:upload:cancel"),c.state.uploadInProgress=!1,"function"==typeof o.cancelUpload&&o.cancelUpload()},this.beforeUpload=function(){var e=angular.copy(c.model),o=t.defer(),n=o.promise;return"undefined"==typeof e.album.id?n=a.createAlbum({name:e.album.name}):o.resolve(e.album),delete e.album,n.then(function(o){var t=c.uploader.files[0],n=angular.extend(e,{name:c.model.name.trim(),size:t.size});return e.albumid=o.id,a.createRecord(n).then(function(e){return e})["catch"](function(e){u(null,e)})})},this.uploadUrl="sampleUrl",this.uploadOptions={drop_element:"upload-panel-video",browse_button:"pickfiles-video",multi_selection:!1,filters:{max_file_size:"10240mb",mime_types:[{title:"Video files",extensions:"avi,mp4,mov,3gp,wmv,mkv,webm"}]},multipart:!0,file_data_name:"media"},this.uploadCallbacks={init:function(e){c.uploader=e},filesAdded:function(o,t){e(function(){c.state.uploadDone=!1,c.file=angular.copy(t[0]),o.splice(0,o.files.length-1),s=c.model.name=t[0].name})},uploadProgress:function(e,o){c.file.percent=o.percent},uploadComplete:function(){c.state.error||(c.state.uploadInProgress=!1,c.state.uploadDone=!0,LJ.Event.trigger("video:upload:done"))},error:u.bind(this)},LJ.Event.on("Uploader:filesAdded:video",function(o){e(function(){c.file=angular.copy(o[0])})})}],link:function(o,t,n,l){e(function(){l.init()})}}}])}(); /* <<< file end: js/video/uploader.js */ //# map link was there [uploader.js.map] /* >>> file start: js/video/editor.js */ //= require js/editor/editor.js //= require js/editor/media.js //= require js/core/string.js //!= require js/core/angular/messages.js //= require js/core/angular/api.js //= require js/core/angular/pills.js //= require js/core/angular/authHelper.js //= require js/video/uploader.js //= require js/video/video.js LJ.injectStyle('/* >>> file start: stc/photouploader.css */\n.b-photouploader-item-upload-start .b-photouploader-panel-controls,.b-photouploader-item-upload-start .b-photouploader-panel-pictures,.flatmedia-create-field{display:none}.flatpopup-loading .flatpopup__body:after,.flatpopup-loading-state:before{z-index:1;top:0;left:0;opacity:.6;background:#FFF;right:0;bottom:0}.b-photouploader{width:480px}.b-photouploader-items{margin:0}.b-photouploader-item{margin:0;padding:1em 0 0}.b-photouploader-item-noalbums{padding:1em 0;text-align:center}.b-photouploader-item-noalbums:not(.ng-hide)+.b-photouploader-item-instagram{padding-top:0}.b-photouploader-item-upload-start .b-photouploader-panel-upload{margin-bottom:0}.b-photouploader-item-upload-uploaded .b-photouploader-panel-pictures{margin-bottom:15px;overflow:auto;max-height:250px}.flatpopup-create-state .flatmedia-create-field,.flatpopup-loading .flatpopup__preloader,.flatpopup-success-state .flatpopup__msg-success,.flatpopup-warning-state .flatpopup__msg-warning{display:block}.flatpopup-loading .flatpopup__body:after{display:block;position:absolute}.flatpopup-create-state .flatmedia-edit-field{display:none}.flatpopup-loading-state{position:relative;width:100%;min-height:34px}.flatpopup-loading-state:after,.flatpopup-loading-state:before{display:block;position:absolute;content:\"\"}.flatpopup-loading-state:after{z-index:2;top:50%;left:50%;width:34px;height:34px;margin-top:-17px;margin-left:-17px;background:url(/img/preloader/preloader-disc-blue-white.gif?v=39255) 50% 50% no-repeat}.upload__box,.upload__box-label{border:4px dashed #DAE3E6;background:#FFF}.upload__item,.upload__item_remove{background-color:#FFF;cursor:pointer}.flatpopup-delete-btn{display:none}.flatpopup-edit-state .flatpopup-delete-btn{display:inline-block}.flatpopup SELECT,.flatpopup-label+SELECT{max-width:160px;margin:0 5px 0 0;font-size:14px;vertical-align:middle}.flatpopup-label{color:#004359}.b-ljform-field .flatpopup-label{margin-right:6px;vertical-align:middle}.upload__box{overflow:hidden;position:relative;min-height:49px;text-align:center}.upload__box-label{display:block;margin:-5px;padding:15px;cursor:pointer}.upload__input{position:absolute!important;top:0;right:0;width:100%;height:50px;margin:0;padding:0;border:0;opacity:0;filter:alpha(opacity=0);zoom:1;font-size:10000px;cursor:pointer}.upload__items{position:relative;margin:25px 0 19px;padding:0;list-style:none}.upload__item{display:inline-block;position:relative;width:144px;height:144px;margin:0 20px 30px;padding:22px;box-shadow:0 7px 22px -9px #999;box-sizing:border-box}.upload__item_pic{display:block;width:100px;height:100px;background-position:0 0;background-repeat:no-repeat;background-size:cover;text-align:center}.upload__item_remove{display:inline-block;position:absolute;top:-11px;right:-11px;width:20px;height:20px;border:2px solid #cf0011;border-radius:50%;box-shadow:0 3px 5px -3px #000}.upload__item_remove .svgicon{position:absolute;top:50%;left:50%;width:12px;height:12px;margin-top:-6px;margin-left:-6px}.upload-bar{opacity:0;position:relative;height:6px;margin:0 0 10px;border-radius:6px;background-color:#CCC}.upload-bar__inner{position:absolute;left:0;top:0;height:6px;border-radius:6px;background-color:#09C}.upload-bar__inner:after{content:\"\";z-index:1;position:absolute;overflow:hidden;top:0;left:0;bottom:0;right:0;background-image:-webkit-linear-gradient(135deg,rgba(255,255,255,.2) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.2) 50%,rgba(255,255,255,.2) 75%,transparent 75%,transparent);background-image:linear-gradient(-45deg,rgba(255,255,255,.2) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.2) 50%,rgba(255,255,255,.2) 75%,transparent 75%,transparent);background-size:50px 50px;-webkit-animation:move 2s linear infinite;animation:move 2s linear infinite}@-webkit-keyframes move{0%{background-position:0 0}100%{background-position:50px 50px}}@keyframes move{0%{background-position:0 0}100%{background-position:50px 50px}}.flatpopup-uploading .upload-bar{opacity:1}.flatpopup-uploading .upload-bar,.flatpopup-uploading .upload-bar__inner{-webkit-transition-property:all;transition-property:all;-webkit-transition-duration:.3s;transition-duration:.3s}.flatpopup-uploading-complete .upload-bar{opacity:0;-webkit-transition-property:opacity;transition-property:opacity;-webkit-transition-duration:.3s;transition-duration:.3s}.flatpopup__msg-text{display:none;margin:1em 0}.b-photouploader-byurl:after,.b-photouploader-instahead:after,.b-photouploader-panel:after{display:table;border-collapse:collapse;clear:both}.flatpopup-action-link{font:600 .875em/1 ProximaNova,Tahoma,Arial,sans-serif;margin-right:4px;white-space:nowrap;text-transform:uppercase;color:#00a3d9;border:0;background-color:transparent}.flatpopup-aside-link{float:right}.b-photouploader-item-upload .sharp-select{font-size:14px;vertical-align:middle}.b-photouploader-item-upload .flatpopup-label{vertical-align:middle}.b-photouploader-action-panel,.b-videouploader-action-panel{text-align:right;margin-bottom:0}.b-photouploader-panel-dropbox,.b-photouploader-panel-instalogin{text-align:center}.b-photouploader-panel{margin:0}.b-photouploader-panel:after{content:\"\"}.b-photouploader-panel-upload{margin:0 0 15px}.b-photouploader-panel-albums,.b-photouploader-panel-pictures{margin:0}.b-photouploader-panel-url{margin:0 0 15px}.b-photouploader-panel-dropbox-intro{width:75%;margin:0 auto 1em;line-height:1.4}.b-photouploader-panel-instalogin-intro{width:70%;margin:0 auto 1em;text-align:left;line-height:1.4}.b-photouploader-byurl{margin:0 0 0 110px;padding:0}.b-photouploader-byurl:after{content:\"\"}.b-photouploader-byurl-picture{position:relative;left:-110px;float:left;width:100px;max-height:100px;margin:0 -100px 0 0;padding:0;box-shadow:0 0 10px #BBB;background:#FFF}.b-photouploader-byurl-image{max-width:100px;max-height:100px;margin:0;vertical-align:top}.b-photouploader-byurl-sub{display:block;margin:0;padding:10px;font-size:86%;color:#999}.b-photouploader-byurl-form{margin:0 0 1em}.b-photouploader-byurl-label{display:block;margin:0 0 .5em}.b-photouploader-byurl-link,.b-photouploader-byurl-src{width:100%;margin:0;box-sizing:border-box}.b-photouploader-byurl-br{display:none}.b-photouploader-byurl-note{display:block;margin:.5em 0 0;font-size:86%;font-style:normal;color:#666}.b-photouploader-albumsettings-separator{display:none}.b-photouploader-albumsettings-wrap{float:right}.b-photouploader-panel-controls{margin:0 -15px;padding:15px 15px 0;border-top:1px solid #FFF}.b-photouploader-albumselector-item,.b-photouploader-panel-controls .b-photouploader-albumsettings{margin:0 0 .5em}.b-photouploader-panel-controls .b-photouploader-albumselector{width:70%}.b-photouploader-albumselector-input{width:280px}.b-photouploader-albumsettings-select{margin:0 1em 0 0}.b-photouploader-panel-controls .b-photouploader-urlsettings{margin:0 0 1em}.b-photouploader-urlsettings-label{margin:0 .5em 0 0}.b-photouploader-panel-controls .b-photouploader-instasettings{float:left;width:75%}.b-photouploader-instasettings-label{margin:0 1em 0 0}.b-photouploader-instasettings-annex{display:block;margin:0 0 0 1.7em;color:#999}.b-photouploader-panel-controls .b-flatbutton,.b-photouploader-panel-controls .b-ljbutton{float:right}.b-photouploader-panel-controls .b-ljbutton{display:inline-block}.b-photouploader-panel-controls .b-flatbutton,.s-schemius .b-photouploader-panel-controls .b-ljbutton{display:none}.s-schemius .b-photouploader-panel-controls .b-flatbutton{display:inline-block}.b-photouploader-uploader{margin:0;padding:25px 15px;border:1px solid #BBB;border-radius:5px;text-align:center;line-height:2;color:#666}.drag-and-drop .b-photouploader-uploader{box-shadow:inset 0 0 15px #526283;border:2px dashed #999;border-radius:0;background:#FFF}.b-photouploader-uploader-drop{display:none;margin:0;padding:0;color:#666}.b-photouploader-uploader-drop STRONG{font-size:1.5em;font-weight:400;color:#666}.b-photouploader-uploader-nodrop{margin:0}.b-photouploader-uploader-nodrop STRONG{font-size:1.5em;font-weight:400;color:#666}.drag-and-drop .b-photouploader-uploader-drop{display:block}.drag-and-drop .b-photouploader-uploader-nodrop{display:none}.b-photouploader-uploader-input{color:#666}.b-photouploader-uploader-list{width:40%;margin:5px auto;padding:0;list-style-type:decimal;text-align:left;line-height:1.2}.b-photouploader-uploader-list-item{margin:0 0 .5em;padding:0}.b-photouploader-pictures{margin:0;padding:0;list-style:none}.b-photouploader-pictures-item{position:relative;display:inline-block;width:142px;margin:0 5px 5px 0;padding:10px;vertical-align:top}.b-photouploader-pictures-pic{display:table-cell;width:132px;height:132px;margin:0;padding:5px;vertical-align:middle;box-shadow:0 5px 10px #CCC;background:#FFF;text-align:center}.b-photouploader-pictures-img{max-width:132px;max-height:132px;vertical-align:top}.b-photouploader-pictures-remove{display:none;overflow:hidden;position:absolute;top:0;right:0;z-index:1;width:21px;height:21px;background:url(/img/icons/remove.png?v=37651) no-repeat;font:0/0 a;cursor:pointer}.b-photouploader-pictures-title{display:none;overflow:hidden;margin:0;padding:5px 5px 0;white-space:nowrap;text-overflow:ellipsis;text-align:center;font-size:90%;font-weight:400}.b-photouploader-pictures-item.selected{border-radius:3px;box-shadow:inset 0 0 4px #444;background:#2C5188;background:-webkit-linear-gradient(top,#2C5188 0,#2E8FED 100%) #2C5188;background:linear-gradient(to bottom,#2C5188 0,#2E8FED 100%) #2C5188;color:#FFF}.b-photouploader-pictures-item.selected .b-photouploader-pictures-pic{box-shadow:0 2px 4px #666}.b-photouploader-pictures-item.selected .b-photouploader-pictures-title{color:#FFF}.b-photouploader-pictures-withremove .b-photouploader-pictures-remove,.b-photouploader-pictures-withtitle .b-photouploader-pictures-title{display:block}.b-photouploader-pictures-withmove .b-photouploader-pictures-pic{cursor:move}.b-photouploader-nav{position:absolute;top:0;left:0;z-index:2;width:100%;margin:0;padding:10px 0 25px;list-style:none;background:-webkit-linear-gradient(top,rgba(247,249,250,1) 0,rgba(247,249,250,0) 100%);background:linear-gradient(to bottom,rgba(247,249,250,1) 0,rgba(247,249,250,0) 100%)}.b-photouploader-nav-item{display:inline;margin:0;padding:0}.b-photouploader-nav-item:before{content:\"default.htm\"}.b-photouploader-nav-item:first-child:before{content:\"\"}.b-photouploader-nav-item A:link,.b-photouploader-nav-item A:visited{border-bottom:1px dotted;text-decoration:none;color:#0051B7!important}.b-photouploader-nav-item A:active,.b-photouploader-nav-item A:hover{border-bottom:1px dotted;text-decoration:none;color:#C00!important}.b-photouploader-nav>SELECT{width:100%}.b-photouploader-albums{position:relative}.b-photouploader-albums-inner{overflow:auto;height:250px;margin:0 -25px 0 -15px;padding:10px 15px 0;background:#F7F9FA}.b-photouploader-albums-withnav .b-photouploader-albums-inner{padding-top:40px}.b-photouploader-albums-loading .b-photouploader-albums-inner:after{content:\" \";position:absolute;bottom:0;left:50%;width:30px;height:30px;margin:0 0 0 -15px;padding:0;background:url(/img/preloader/preloader-blue-blue.gif?v=16423) no-repeat;font:0/0 a}.b-photouploader-search{margin:0 -15px 1px;padding:0 15px 15px;border-bottom:1px solid #CCC;box-shadow:0 1px 0 #FFF}.b-photouploader-search-input{width:100%;box-sizing:border-box}.b-photouploader-subhead{margin:0 0 .5em;font-weight:700;font-size:1em}.b-photouploader-subhead-annex{font-weight:400}.b-photouploader-subtext{margin:0 0 1em;font-size:1em;line-height:1.4}.b-photouploader-instahead,.b-photouploader-logout{margin:0}.b-photouploader .b-photouploader-logout:link,.b-photouploader .b-photouploader-logout:visited{border-bottom:1px dotted;text-decoration:none;color:#0051B7!important}.b-photouploader .b-photouploader-logout:active,.b-photouploader .b-photouploader-logout:hover{text-decoration:none;color:#C00!important}.b-photouploader-instahead--center{text-align:center}.b-photouploader-instahead:after{content:\"\"}.b-photouploader-instahead .b-photouploader-subhead{float:left}.b-photouploader-instahead:not(.b-photouploader-instahead--center) .b-photouploader-logout{float:right}.b-photouploader-instagram-signup:link{display:inline-block;position:relative;margin:0 0 1px;padding:.5em 1.75em .5em 1em;border:1px solid #CCC;border-right:.25em solid #00558D;border-radius:.25em;background:#F8F8F8;text-shadow:1px 1px #FFF;text-decoration:none;font-size:1.5em;color:#333}:root *>.b-photouploader-instagram-signup:after,:root *>.b-photouploader-instagram-signup:before{content:\' \';display:block;position:absolute}.b-photouploader-instagram-signup:before{top:0;right:0;width:.25em;height:100%;background:#FBB03B;border-left:.25em solid #D4145A;border-right:.25em solid #00A99D}.b-photouploader-instagram-signup:after{width:100%;height:100%;top:0;left:0;border-radius:.25em;padding-left:.25em;box-shadow:inset 1px 1px 0 rgba(255,255,255,.5),inset -1px -1px 0 rgba(0,0,0,.1);background:-webkit-linear-gradient(top,rgba(255,255,255,.35) 0,rgba(255,255,255,.2) 49%,rgba(255,255,255,0) 50%,rgba(0,0,0,.1) 100%);background:linear-gradient(to bottom,rgba(255,255,255,.35) 0,rgba(255,255,255,.2) 49%,rgba(255,255,255,0) 50%,rgba(0,0,0,.1) 100%)}.b-photouploader-instagram-signup,.b-photouploader-instagram-signup:before{-webkit-transition:.1s ease-in;transition:.1s ease-in}.b-photouploader-instagram-signup:focus,.b-photouploader-instagram-signup:hover{background:#FFF}.b-photouploader-instagram-signup:hover{border-right:.25em solid #09C}.b-photouploader-instagram-signup:hover:before{background:#FC6;border-left:.25em solid #F06;border-right:.25em solid #0CC}.b-photouploader-instagram-signup:hover:after{background:-webkit-linear-gradient(top,rgba(255,255,255,.25) 0,rgba(255,255,255,.1) 49%,rgba(255,255,255,0) 50%,rgba(0,0,0,.05) 100%);background:linear-gradient(to bottom,rgba(255,255,255,.25) 0,rgba(255,255,255,.1) 49%,rgba(255,255,255,0) 50%,rgba(0,0,0,.05) 100%)}.b-photouploader-instagram-signup:active{margin:1px 0 0}.b-popup .b-photouploader-instagram-signup:active,.b-popup .b-photouploader-instagram-signup:hover,.b-popup .b-photouploader-instagram-signup:link,.b-popup .b-photouploader-instagram-signup:visited{border:1px solid #CCC;border-right:.25em solid #00558D;text-decoration:none}@media all and (max-width:650px){.b-photouploader{width:auto}.b-photouploader-item{padding-bottom:0}.b-photouploader-albums-withnav .b-photouploader-albums-inner{margin-right:0}.b-photouploader-nav{width:calc(100% - 15px)}.b-photouploader-albumsettings-separator{display:block}.b-photouploader-albumsettings-wrap{float:none}.b-photouploader-byurl{margin-left:0}.b-photouploader-byurl-picture{left:auto;float:none;width:100%;max-width:380px;margin:0 auto 20px;text-align:center}.b-photouploader-byurl-link,.b-photouploader-byurl-src{width:100%}}.b-updateform-bubble-video-button{padding:15px 0 0 15px}.b-updateform-bubble-video-button:after{content:\"\";display:table;clear:both}.b-updateform-bubble-video-button .b-flatbutton{float:right}\n/* <<< file end: stc/photouploader.css */\n\n/*# sourceMappingURL=photouploader.css.map */\n'); LJ.injectStyle('/* >>> file start: stc/menu_v2.css */\n.b-menu,.b-menu-item-link{position:relative;padding:0;margin:0}.b-menu{list-style:none}.b-menu:after{content:\"\";display:table;border-collapse:collapse;clear:both}.b-menu-item{display:block;font-family:ProximaNova,Helvetica,sans-serif;font-weight:600;text-transform:uppercase}.b-menu-item .b-menu-item-link:not(.b-menu-item-link-external):link,.b-menu-item .b-menu-item-link:not(.b-menu-item-link-external):visited{color:#7A9199}.b-menu-item .b-menu-item-link:not(.b-menu-item-link-external):active,.b-menu-item .b-menu-item-link:not(.b-menu-item-link-external):hover{color:#242F33}.b-menu-item-disabled{opacity:.5;color:#7A9199}.b-menu-item-disabled .b-menu-item-link{pointer-events:none}.b-menu-item-active{color:#242F33}.b-menu-hrz .b-menu-item{display:inline-block}.b-menu-pills{margin:0;font-size:.8125rem}.b-menu-pills .b-menu-item-link{display:inline-block;padding:10px 13px}.b-menu-pills .b-menu-item-active,.b-menu-pills.b-menu-hrz .b-menu-item-active{padding:0}.b-menu-pills .b-menu-item-link:link,.b-menu-pills .b-menu-item-link:visited{color:#7A9199}.b-menu-pills .b-menu-item-link:active,.b-menu-pills .b-menu-item-link:hover{color:#00A3D9}.b-menu-pills .b-menu-item-active .b-menu-item-link{background:#DAE3E6;cursor:default}.b-menu-pills .b-menu-item-active .b-menu-item-link:active,.b-menu-pills .b-menu-item-active .b-menu-item-link:hover{color:#7A9199}.b-menu-pills.b-menu-hrz{margin:0}.b-menu-tabs{overflow:hidden;margin:0;padding:0}.b-menu-tabs:before{content:\" \";position:absolute;bottom:0;left:0;right:0;height:0;border-bottom:1px solid #dae3e6}.b-menu-tabs .b-menu-item{position:relative;display:inline-block;margin:0;padding:1em 1.5em;text-align:center;border:1px solid transparent;border-bottom:none;vertical-align:top;white-space:nowrap;text-transform:uppercase;letter-spacing:.05em;font-size:13px}.b-menu-tabs .b-menu-item-active{padding:1em 2em;border-color:#dae3e6;border-radius:2px 2px 0 0;background:#FFF}.b-menu-tabs .b-menu-item-active .b-menu-item-link{display:inline;margin:0;padding:0;border-radius:0;box-shadow:none;background:0 0;color:#242F33}.b-menu-tabs-min .b-menu-item{padding:.4em .7em}@media screen and (max-width:1260px){.b-menu-tabs:not(.b-menu-little)::before{content:none}.b-menu-tabs:not(.b-menu-little) .b-menu-item-active{border:1px solid #DAE3E6}}@media screen and (max-width:1050px){.b-menu-tabs .b-menu-item{padding:1em}.b-menu-tabs-min .b-menu-item{padding:.4em .7em}}@media screen and (max-width:880px){.b-menu-tabs .b-menu-item:last-child{margin-bottom:10px}.b-menu-tabs .b-menu-item-active{border-bottom:1px solid #DAE3E6}}@media print{.b-menu{display:none}}\n/* <<< file end: stc/menu_v2.css */\n\n/*# sourceMappingURL=menu_v2.css.map */\n'); Site.page.template['angular/video.ng.tmpl'] = '\n\n\n\n \n \n \n \n \n \n \n \n\n\n \n
    \n\n\n\n \n \n \n
    \n\n
    \n\n\n\n \n \n\n \n \n\n \n\n
    \n \n \n \n \n \n \n
    \n\n \n \n \n \n \n \n \n\n
    \n \n\n \n\n \n \n \n \n \n \n \n\n \n\n\n \n
    \n\n \n
    \n\n \n\n \n
    \n\n
    \n \n \n \n
    \n \n \n \n \n\n \n\n\n\n\n'; //= require_ml videouploader.embed.title //= require_ml videouploader.upload.title //= require_ml videouploader.byUrl.title //= require_ml videouploader.album.title //= require_ml videouploader.album.select //= require_ml videouploader.album.insert //= require_ml videouploader.noalbum //= require_ml tour.video_update_tour.tip //= require_ml talk.video //= require_ml talk.video.paste //= require_ml talk.video.insert !function(e){return e}(),function(){"use strict";function e(e,t,r,n,o,l,i,u,s){function d(e){var t=r.defer();return t.resolve(e),t.promise}function a(){var e=LiveJournal.parseGetArgs().video_id,t=LiveJournal.parseGetArgs().record_id;e&&(s.find("#body").val(""),m.records.insertRecords(e.split(","),{user:LiveJournal.parseGetArgs().user})),t&&u.fetchRecordByStorageId(t).then(function(e){m.records.all=[e],m.records.toggleRecord(e),m.insert()})}function c(){angular.element(".cke_button_LJEmbedLink").attr({ljTour:"",dataTour:"video_update_tour",dataStep:"1",dataTourText:"tour.regionalrating.step1.tip"})}var m=this;this.state={canUpload:LJ.get("remote")&&!LJ.get("remote_is_identity"),isOpen:!1},this.bubble=e.bubble,this.isPill=function(e){return l.group("uploadVideo")===e},this.pill=function(e){e=e||LJ.Storage.getItem("videoUploadPill")||"upload",l.group("uploadVideo",e),LJ.Storage.setItem("videoUploadPill",e)},this.albums={init:function(){return u.fetchAlbums({user:LJ.get("remote.username")}).then(function(){u.getAlbums().length&&(m.albums.all=u.getAlbums(),m.albums.current=u.getAlbums()[0])})},mapped:function(e){return m.albums._mappedAlbums||(m.albums._mappedAlbums=u.getAlbums().reduce(function(e,t){return e[t.id]=t,e},{})),e?m.albums._mappedAlbums[e]:m.albums._mappedAlbums[m.albums.current.id]}},this.records={request:function(e){return e=e||{},m.state.canUpload?n.call("video.get_records",e).then(function(e){return e.records?(m.records.all=e.records.slice(),e.records):void 0}):r.reject()},insertRecords:function(e,t){return t=t||{},Array.isArray(e)||(e=[e]),t.ids=e,m.records.request(t).then(function(e){m.records.all=e.map(function(e){return e.selected=!0,e}),m.insert()})},insertUploadedRecord:function(e){m.records.toggleRecord(e),m.records.all=[e],m.insert()},toggleRecord:function(e){e.selected=!e.selected},noneSelected:function(){return 0===(m.records.all||[]).filter(LJ.Function.get("selected")).length}},e.$watch(function(){return m.albums.current},function(e,t){e&&e!==t&&u.fetchRecords(e.id,{user:LJ.get("remote.username")}).then(function(){m.records.all=u.getRecordsByAlbumId(e.id),i.scrollTo("videoUploader",{toParent:!0})})}),m.insert=function(){function r(){try{o.insertContent("video",l.map(LJ.Function.get("embed")).join("\n"),l.map(d),l),e.bubble.close()}catch(n){m.state.isOpen&&t(r)}}if(m.records.all){var n='',l=m.records.all.filter(LJ.Function.get("selected")).map(function(e){return e.thumbnail=e.screenshot,e.embed=n.supplant(e),e.link=e.url,e});r()}},e.$on("bubble:open:video",function(){m.state.canUpload&&m.albums.init(),m.state.isOpen=!0}),e.$on("bubble:close:video",function(){m.state.canUpload&&m.albums.all&&m.records.all&&m.records.all.filter(LJ.Function.get("selected")).map(function(e){delete e.selected}),m.state.isOpen=!1}),LJ.Event.on("video:upload:done",function(){m.bubble.close()}),LJ.get("is_dev_server")?LJ.Event.on("rte_embed_ready",function(){a(),c()}):t(function(){a(),c()})}e.$inject=["$scope","$timeout","$q","Api","Editor","Pills","Ref","Video","$document"],angular.module("Video.Editor",["LJ.AuthHelper","LJ.Messages","LJ.Pills","LJ.Api","Video.Uploader","Video.Service","Editor"]).controller("VideoEditorCtrl",e)}(); /* <<< file end: js/video/editor.js */ //# map link was there [editor.js.map] /* >>> file start: js/lib/jquery-ui/jquery.ui.mouse.min.js */ !function(e,t){var s=!1;e(document).mouseup(function(e){s=!1}),e.widget("ui.mouse",{options:{cancel:":input,option",distance:1,delay:0},_mouseInit:function(){var t=this;this.element.bind("mousedown."+this.widgetName,function(e){return t._mouseDown(e)}).bind("click."+this.widgetName,function(s){return!0===e.data(s.target,t.widgetName+".preventClickEvent")?(e.removeData(s.target,t.widgetName+".preventClickEvent"),s.stopImmediatePropagation(),!1):void 0}),this.started=!1},_mouseDestroy:function(){this.element.unbind("."+this.widgetName),this._mouseMoveDelegate&&e(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate)},_mouseDown:function(t){if(!s){this._mouseStarted&&this._mouseUp(t),this._mouseDownEvent=t;var o=this,i=1==t.which,u="string"==typeof this.options.cancel&&t.target.nodeName?e(t.target).closest(this.options.cancel).length:!1;return i&&!u&&this._mouseCapture(t)?(this.mouseDelayMet=!this.options.delay,this.mouseDelayMet||(this._mouseDelayTimer=setTimeout(function(){o.mouseDelayMet=!0},this.options.delay)),this._mouseDistanceMet(t)&&this._mouseDelayMet(t)&&(this._mouseStarted=this._mouseStart(t)!==!1,!this._mouseStarted)?(t.preventDefault(),!0):(!0===e.data(t.target,this.widgetName+".preventClickEvent")&&e.removeData(t.target,this.widgetName+".preventClickEvent"),this._mouseMoveDelegate=function(e){return o._mouseMove(e)},this._mouseUpDelegate=function(e){return o._mouseUp(e)},e(document).bind("mousemove."+this.widgetName,this._mouseMoveDelegate).bind("mouseup."+this.widgetName,this._mouseUpDelegate),t.preventDefault(),s=!0,!0)):!0}},_mouseMove:function(t){return!e.browser.msie||document.documentMode>=9||t.button?this._mouseStarted?(this._mouseDrag(t),t.preventDefault()):(this._mouseDistanceMet(t)&&this._mouseDelayMet(t)&&(this._mouseStarted=this._mouseStart(this._mouseDownEvent,t)!==!1,this._mouseStarted?this._mouseDrag(t):this._mouseUp(t)),!this._mouseStarted):this._mouseUp(t)},_mouseUp:function(t){return e(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate),this._mouseStarted&&(this._mouseStarted=!1,t.target==this._mouseDownEvent.target&&e.data(t.target,this.widgetName+".preventClickEvent",!0),this._mouseStop(t)),!1},_mouseDistanceMet:function(e){return Math.max(Math.abs(this._mouseDownEvent.pageX-e.pageX),Math.abs(this._mouseDownEvent.pageY-e.pageY))>=this.options.distance},_mouseDelayMet:function(e){return this.mouseDelayMet},_mouseStart:function(e){},_mouseDrag:function(e){},_mouseStop:function(e){},_mouseCapture:function(e){return!0}})}(jQuery); /* <<< file end: js/lib/jquery-ui/jquery.ui.mouse.min.js */ //# map link was there [jquery.ui.mouse.min.js.map] /* >>> file start: js/lib/jquery-ui/jquery.ui.sortable.min.js */ !function(t,e){t.widget("ui.sortable",t.ui.mouse,{widgetEventPrefix:"sort",ready:!1,options:{appendTo:"parent",axis:!1,connectWith:!1,containment:!1,cursor:"auto",cursorAt:!1,dropOnEmpty:!0,forcePlaceholderSize:!1,forceHelperSize:!1,grid:!1,handle:!1,helper:"original",items:"> *",opacity:!1,placeholder:!1,revert:!1,scroll:!0,scrollSensitivity:20,scrollSpeed:20,scope:"default",tolerance:"intersect",zIndex:1e3},_create:function(){var t=this.options;this.containerCache={},this.element.addClass("ui-sortable"),this.refresh(),this.floating=this.items.length?"x"===t.axis||/left|right/.test(this.items[0].item.css("float"))||/inline|table-cell/.test(this.items[0].item.css("display")):!1,this.offset=this.element.offset(),this._mouseInit(),this.ready=!0},destroy:function(){t.Widget.prototype.destroy.call(this),this.element.removeClass("ui-sortable ui-sortable-disabled"),this._mouseDestroy();for(var e=this.items.length-1;e>=0;e--)this.items[e].item.removeData(this.widgetName+"-item");return this},_setOption:function(e,i){"disabled"===e?(this.options[e]=i,this.widget()[i?"addClass":"removeClass"]("ui-sortable-disabled")):t.Widget.prototype._setOption.apply(this,arguments)},_mouseCapture:function(e,i){var s=this;if(this.reverting)return!1;if(this.options.disabled||"static"==this.options.type)return!1;this._refreshItems(e);var r=null,o=this;t(e.target).parents().each(function(){return t.data(this,s.widgetName+"-item")==o?(r=t(this),!1):void 0});if(t.data(e.target,s.widgetName+"-item")==o&&(r=t(e.target)),!r)return!1;if(this.options.handle&&!i){var n=!1;if(t(this.options.handle,r).find("*").andSelf().each(function(){this==e.target&&(n=!0)}),!n)return!1}return this.currentItem=r,this._removeCurrentsFromItems(),!0},_mouseStart:function(e,i,s){var r=this.options,o=this;if(this.currentContainer=this,this.refreshPositions(),this.helper=this._createHelper(e),this._cacheHelperProportions(),this._cacheMargins(),this.scrollParent=this.helper.scrollParent(),this.offset=this.currentItem.offset(),this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left},t.extend(this.offset,{click:{left:e.pageX-this.offset.left,top:e.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()}),this.helper.css("position","absolute"),this.cssPosition=this.helper.css("position"),this.originalPosition=this._generatePosition(e),this.originalPageX=e.pageX,this.originalPageY=e.pageY,r.cursorAt&&this._adjustOffsetFromHelper(r.cursorAt),this.domPosition={prev:this.currentItem.prev()[0],parent:this.currentItem.parent()[0]},this.helper[0]!=this.currentItem[0]&&this.currentItem.hide(),this._createPlaceholder(),r.containment&&this._setContainment(),r.cursor&&(t("body").css("cursor")&&(this._storedCursor=t("body").css("cursor")),t("body").css("cursor",r.cursor)),r.opacity&&(this.helper.css("opacity")&&(this._storedOpacity=this.helper.css("opacity")),this.helper.css("opacity",r.opacity)),r.zIndex&&(this.helper.css("zIndex")&&(this._storedZIndex=this.helper.css("zIndex")),this.helper.css("zIndex",r.zIndex)),this.scrollParent[0]!=document&&"HTML"!=this.scrollParent[0].tagName&&(this.overflowOffset=this.scrollParent.offset()),this._trigger("start",e,this._uiHash()),this._preserveHelperProportions||this._cacheHelperProportions(),!s)for(var n=this.containers.length-1;n>=0;n--)this.containers[n]._trigger("activate",e,o._uiHash(this));return t.ui.ddmanager&&(t.ui.ddmanager.current=this),t.ui.ddmanager&&!r.dropBehaviour&&t.ui.ddmanager.prepareOffsets(this,e),this.dragging=!0,this.helper.addClass("ui-sortable-helper"),this._mouseDrag(e),!0},_mouseDrag:function(e){if(this.position=this._generatePosition(e),this.positionAbs=this._convertPositionTo("absolute"),this.lastPositionAbs||(this.lastPositionAbs=this.positionAbs),this.options.scroll){var i=this.options,s=!1;this.scrollParent[0]!=document&&"HTML"!=this.scrollParent[0].tagName?(this.overflowOffset.top+this.scrollParent[0].offsetHeight-e.pageY=0;r--){var o=this.items[r],n=o.item[0],h=this._intersectsWithPointer(o);if(h&&o.instance===this.currentContainer&&n!=this.currentItem[0]&&this.placeholder[1==h?"next":"prev"]()[0]!=n&&!t.ui.contains(this.placeholder[0],n)&&("semi-dynamic"==this.options.type?!t.ui.contains(this.element[0],n):!0)){if(this.direction=1==h?"down":"up","pointer"!=this.options.tolerance&&!this._intersectsWithSides(o))break;this._rearrange(e,o),this._trigger("change",e,this._uiHash());break}}return this._contactContainers(e),t.ui.ddmanager&&t.ui.ddmanager.drag(this,e),this._trigger("sort",e,this._uiHash()),this.lastPositionAbs=this.positionAbs,!1},_mouseStop:function(e,i){if(e){if(t.ui.ddmanager&&!this.options.dropBehaviour&&t.ui.ddmanager.drop(this,e),this.options.revert){var s=this,r=s.placeholder.offset();s.reverting=!0,t(this.helper).animate({left:r.left-this.offset.parent.left-s.margins.left+(this.offsetParent[0]==document.body?0:this.offsetParent[0].scrollLeft),top:r.top-this.offset.parent.top-s.margins.top+(this.offsetParent[0]==document.body?0:this.offsetParent[0].scrollTop)},parseInt(this.options.revert,10)||500,function(){s._clear(e)})}else this._clear(e,i);return!1}},cancel:function(){var e=this;if(this.dragging){this._mouseUp({target:null}),"original"==this.options.helper?this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper"):this.currentItem.show();for(var i=this.containers.length-1;i>=0;i--)this.containers[i]._trigger("deactivate",null,e._uiHash(this)),this.containers[i].containerCache.over&&(this.containers[i]._trigger("out",null,e._uiHash(this)),this.containers[i].containerCache.over=0)}return this.placeholder&&(this.placeholder[0].parentNode&&this.placeholder[0].parentNode.removeChild(this.placeholder[0]),"original"!=this.options.helper&&this.helper&&this.helper[0].parentNode&&this.helper.remove(),t.extend(this,{helper:null,dragging:!1,reverting:!1,_noFinalSort:null}),this.domPosition.prev?t(this.domPosition.prev).after(this.currentItem):t(this.domPosition.parent).prepend(this.currentItem)),this},serialize:function(e){var i=this._getItemsAsjQuery(e&&e.connected),s=[];return e=e||{},t(i).each(function(){var i=(t(e.item||this).attr(e.attribute||"id")||"").match(e.expression||/(.+)[-=_](.+)/);i&&s.push((e.key||i[1]+"[]")+"="+(e.key&&e.expression?i[1]:i[2]))}),!s.length&&e.key&&s.push(e.key+"="),s.join("&")},toArray:function(e){var i=this._getItemsAsjQuery(e&&e.connected),s=[];return e=e||{},i.each(function(){s.push(t(e.item||this).attr(e.attribute||"id")||"")}),s},_intersectsWith:function(t){var e=this.positionAbs.left,i=e+this.helperProportions.width,s=this.positionAbs.top,r=s+this.helperProportions.height,o=t.left,n=o+t.width,h=t.top,a=h+t.height,l=this.offset.click.top,c=this.offset.click.left,p=s+l>h&&a>s+l&&e+c>o&&n>e+c;return"pointer"==this.options.tolerance||this.options.forcePointerForContainers||"pointer"!=this.options.tolerance&&this.helperProportions[this.floating?"width":"height"]>t[this.floating?"width":"height"]?p:o0?"down":"up")},_getDragHorizontalDirection:function(){var t=this.positionAbs.left-this.lastPositionAbs.left;return 0!=t&&(t>0?"right":"left")},refresh:function(t){return this._refreshItems(t),this.refreshPositions(),this},_connectWith:function(){var t=this.options;return t.connectWith.constructor==String?[t.connectWith]:t.connectWith},_getItemsAsjQuery:function(e){var i=[],s=[],r=this._connectWith();if(r&&e)for(var o=r.length-1;o>=0;o--)for(var n=t(r[o]),h=n.length-1;h>=0;h--){var a=t.data(n[h],this.widgetName);a&&a!=this&&!a.options.disabled&&s.push([t.isFunction(a.options.items)?a.options.items.call(a.element):t(a.options.items,a.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),a])}s.push([t.isFunction(this.options.items)?this.options.items.call(this.element,null,{options:this.options,item:this.currentItem}):t(this.options.items,this.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),this]);for(var o=s.length-1;o>=0;o--)s[o][0].each(function(){i.push(this)});return t(i)},_removeCurrentsFromItems:function(){for(var t=this.currentItem.find(":data("+this.widgetName+"-item)"),e=0;e=0;o--)for(var n=t(r[o]),h=n.length-1;h>=0;h--){var a=t.data(n[h],this.widgetName);a&&a!=this&&!a.options.disabled&&(s.push([t.isFunction(a.options.items)?a.options.items.call(a.element[0],e,{item:this.currentItem}):t(a.options.items,a.element),a]),this.containers.push(a))}for(var o=s.length-1;o>=0;o--)for(var l=s[o][1],c=s[o][0],h=0,p=c.length;p>h;h++){var f=t(c[h]);f.data(this.widgetName+"-item",l),i.push({item:f,instance:l,width:0,height:0,left:0,top:0})}},refreshPositions:function(e){this.offsetParent&&this.helper&&(this.offset.parent=this._getParentOffset());for(var i=this.items.length-1;i>=0;i--){var s=this.items[i];if(s.instance==this.currentContainer||!this.currentContainer||s.item[0]==this.currentItem[0]){var r=this.options.toleranceElement?t(this.options.toleranceElement,s.item):s.item;e||(s.width=r.outerWidth(),s.height=r.outerHeight());var o=r.offset();s.left=o.left,s.top=o.top}}if(this.options.custom&&this.options.custom.refreshContainers)this.options.custom.refreshContainers.call(this);else for(var i=this.containers.length-1;i>=0;i--){var o=this.containers[i].element.offset();this.containers[i].containerCache.left=o.left,this.containers[i].containerCache.top=o.top,this.containers[i].containerCache.width=this.containers[i].element.outerWidth(),this.containers[i].containerCache.height=this.containers[i].element.outerHeight()}return this},_createPlaceholder:function(e){var i=e||this,s=i.options;if(!s.placeholder||s.placeholder.constructor==String){var r=s.placeholder;s.placeholder={element:function(){var e=t(document.createElement(i.currentItem[0].nodeName)).addClass(r||i.currentItem[0].className+" ui-sortable-placeholder").removeClass("ui-sortable-helper")[0];return r||(e.style.visibility="hidden"),e},update:function(t,e){r&&!s.forcePlaceholderSize||(e.height()||e.height(i.currentItem.innerHeight()-parseInt(i.currentItem.css("paddingTop")||0,10)-parseInt(i.currentItem.css("paddingBottom")||0,10)),e.width()||e.width(i.currentItem.innerWidth()-parseInt(i.currentItem.css("paddingLeft")||0,10)-parseInt(i.currentItem.css("paddingRight")||0,10)))}}}i.placeholder=t(s.placeholder.element.call(i.element,i.currentItem)),i.currentItem.after(i.placeholder),s.placeholder.update(i,i.placeholder)},_contactContainers:function(e){for(var i=null,s=null,r=this.containers.length-1;r>=0;r--)if(!t.ui.contains(this.currentItem[0],this.containers[r].element[0]))if(this._intersectsWith(this.containers[r].containerCache)){if(i&&t.ui.contains(this.containers[r].element[0],i.element[0]))continue;i=this.containers[r],s=r}else this.containers[r].containerCache.over&&(this.containers[r]._trigger("out",e,this._uiHash(this)),this.containers[r].containerCache.over=0);if(i)if(1===this.containers.length)this.containers[s]._trigger("over",e,this._uiHash(this)),this.containers[s].containerCache.over=1;else if(this.currentContainer!=this.containers[s]){for(var o=1e4,n=null,h=this.positionAbs[this.containers[s].floating?"left":"top"],a=this.items.length-1;a>=0;a--)if(t.ui.contains(this.containers[s].element[0],this.items[a].item[0])){var l=this.containers[s].floating?this.items[a].item.offset().left:this.items[a].item.offset().top;Math.abs(l-h)0?"down":"up")}if(!n&&!this.options.dropOnEmpty)return;this.currentContainer=this.containers[s],n?this._rearrange(e,n,null,!0):this._rearrange(e,null,this.containers[s].element,!0),this._trigger("change",e,this._uiHash()),this.containers[s]._trigger("change",e,this._uiHash(this)),this.options.placeholder.update(this.currentContainer,this.placeholder),this.containers[s]._trigger("over",e,this._uiHash(this)),this.containers[s].containerCache.over=1}},_createHelper:function(e){var i=this.options,s=t.isFunction(i.helper)?t(i.helper.apply(this.element[0],[e,this.currentItem])):"clone"==i.helper?this.currentItem.clone():this.currentItem;return s.parents("body").length||t("parent"!=i.appendTo?i.appendTo:this.currentItem[0].parentNode)[0].appendChild(s[0]),s[0]==this.currentItem[0]&&(this._storedCSS={width:this.currentItem[0].style.width,height:this.currentItem[0].style.height,position:this.currentItem.css("position"),top:this.currentItem.css("top"),left:this.currentItem.css("left")}),(""==s[0].style.width||i.forceHelperSize)&&s.width(this.currentItem.width()),(""==s[0].style.height||i.forceHelperSize)&&s.height(this.currentItem.height()),s},_adjustOffsetFromHelper:function(e){"string"==typeof e&&(e=e.split(" ")),t.isArray(e)&&(e={left:+e[0],top:+e[1]||0}),"left"in e&&(this.offset.click.left=e.left+this.margins.left),"right"in e&&(this.offset.click.left=this.helperProportions.width-e.right+this.margins.left),"top"in e&&(this.offset.click.top=e.top+this.margins.top),"bottom"in e&&(this.offset.click.top=this.helperProportions.height-e.bottom+this.margins.top)},_getParentOffset:function(){this.offsetParent=this.helper.offsetParent();var e=this.offsetParent.offset();return"absolute"==this.cssPosition&&this.scrollParent[0]!=document&&t.ui.contains(this.scrollParent[0],this.offsetParent[0])&&(e.left+=this.scrollParent.scrollLeft(),e.top+=this.scrollParent.scrollTop()),(this.offsetParent[0]==document.body||this.offsetParent[0].tagName&&"html"==this.offsetParent[0].tagName.toLowerCase()&&t.browser.msie)&&(e={top:0,left:0}),{top:e.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:e.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if("relative"==this.cssPosition){var t=this.currentItem.position();return{top:t.top-(parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),left:t.left-(parseInt(this.helper.css("left"),10)||0)+this.scrollParent.scrollLeft()}}return{top:0,left:0}},_cacheMargins:function(){this.margins={left:parseInt(this.currentItem.css("marginLeft"),10)||0,top:parseInt(this.currentItem.css("marginTop"),10)||0}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var e=this.options;if("parent"==e.containment&&(e.containment=this.helper[0].parentNode),"document"!=e.containment&&"window"!=e.containment||(this.containment=[0-this.offset.relative.left-this.offset.parent.left,0-this.offset.relative.top-this.offset.parent.top,t("document"==e.containment?document:window).width()-this.helperProportions.width-this.margins.left,(t("document"==e.containment?document:window).height()||document.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]),!/^(document|window|parent)$/.test(e.containment)){var i=t(e.containment)[0],s=t(e.containment).offset(),r="hidden"!=t(i).css("overflow");this.containment=[s.left+(parseInt(t(i).css("borderLeftWidth"),10)||0)+(parseInt(t(i).css("paddingLeft"),10)||0)-this.margins.left,s.top+(parseInt(t(i).css("borderTopWidth"),10)||0)+(parseInt(t(i).css("paddingTop"),10)||0)-this.margins.top,s.left+(r?Math.max(i.scrollWidth,i.offsetWidth):i.offsetWidth)-(parseInt(t(i).css("borderLeftWidth"),10)||0)-(parseInt(t(i).css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left,s.top+(r?Math.max(i.scrollHeight,i.offsetHeight):i.offsetHeight)-(parseInt(t(i).css("borderTopWidth"),10)||0)-(parseInt(t(i).css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top]}},_convertPositionTo:function(e,i){i||(i=this.position);var s="absolute"==e?1:-1,r=(this.options,"absolute"!=this.cssPosition||this.scrollParent[0]!=document&&t.ui.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent),o=/(html|body)/i.test(r[0].tagName);return{top:i.top+this.offset.relative.top*s+this.offset.parent.top*s-(t.browser.safari&&"fixed"==this.cssPosition?0:("fixed"==this.cssPosition?-this.scrollParent.scrollTop():o?0:r.scrollTop())*s),left:i.left+this.offset.relative.left*s+this.offset.parent.left*s-(t.browser.safari&&"fixed"==this.cssPosition?0:("fixed"==this.cssPosition?-this.scrollParent.scrollLeft():o?0:r.scrollLeft())*s)}},_generatePosition:function(e){var i=this.options,s="absolute"!=this.cssPosition||this.scrollParent[0]!=document&&t.ui.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent,r=/(html|body)/i.test(s[0].tagName);"relative"==this.cssPosition&&(this.scrollParent[0]==document||this.scrollParent[0]==this.offsetParent[0])&&(this.offset.relative=this._getRelativeOffset());var o=e.pageX,n=e.pageY;if(this.originalPosition&&(this.containment&&(e.pageX-this.offset.click.leftthis.containment[2]&&(o=this.containment[2]+this.offset.click.left),e.pageY-this.offset.click.top>this.containment[3]&&(n=this.containment[3]+this.offset.click.top)),i.grid)){var h=this.originalPageY+Math.round((n-this.originalPageY)/i.grid[1])*i.grid[1];n=this.containment&&(h-this.offset.click.topthis.containment[3])?h-this.offset.click.topthis.containment[2])?a-this.offset.click.left=0;r--)i||s.push(function(t){return function(e){t._trigger("deactivate",e,this._uiHash(this))}}.call(this,this.containers[r])),this.containers[r].containerCache.over&&(s.push(function(t){return function(e){t._trigger("out",e,this._uiHash(this))}}.call(this,this.containers[r])),this.containers[r].containerCache.over=0);if(this._storedCursor&&t("body").css("cursor",this._storedCursor),this._storedOpacity&&this.helper.css("opacity",this._storedOpacity),this._storedZIndex&&this.helper.css("zIndex","auto"==this._storedZIndex?"":this._storedZIndex),this.dragging=!1,this.cancelHelperRemoval){if(!i){this._trigger("beforeStop",e,this._uiHash());for(var r=0;r>> file start: js/lib/angular/ui/sortable.js */ angular.module("ui.sortable",[]).value("uiSortableConfig",{}).directive("uiSortable",["uiSortableConfig","$timeout","$log",function(e,t,n){return{require:"?ngModel",link:function(o,i,l,a){function r(e,t){return t&&"function"==typeof t?function(n,o){e(n,o),t(n,o)}:e}var c,s={},u={receive:null,remove:null,start:null,stop:null,update:null};angular.extend(s,e),a?(o.$watch(l.ngModel+".length",function(){t(function(){i.sortable("refresh")})}),u.start=function(e,t){t.item.sortable={index:t.item.index(),cancel:function(){t.item.sortable._isCanceled=!0},isCanceled:function(){return t.item.sortable._isCanceled},_isCanceled:!1}},u.activate=function(){c=i.contents();var e=i.sortable("option","placeholder");if(e&&e.element&&"function"==typeof e.element){var t=e.element();t.jquery||(t=angular.element(t));var n=i.find('[class="'+t.attr("class")+'"]');c=c.not(n)}},u.update=function(e,t){t.item.sortable.received||(t.item.sortable.dropindex=t.item.index(),t.item.sortable.droptarget=t.item.parent(),i.sortable("cancel")),c.detach(),"clone"===i.sortable("option","helper")&&(c=c.not(c.last())),c.appendTo(i),t.item.sortable.received&&!t.item.sortable.isCanceled()&&o.$apply(function(){a.$modelValue.splice(t.item.sortable.dropindex,0,t.item.sortable.moved)})},u.stop=function(e,t){!t.item.sortable.received&&"dropindex"in t.item.sortable&&!t.item.sortable.isCanceled()?o.$apply(function(){a.$modelValue.splice(t.item.sortable.dropindex,0,a.$modelValue.splice(t.item.sortable.index,1)[0])}):"dropindex"in t.item.sortable&&!t.item.sortable.isCanceled()||"clone"===i.sortable("option","helper")||c.detach().appendTo(i)},u.receive=function(e,t){t.item.sortable.received=!0},u.remove=function(e,t){t.item.sortable.isCanceled()||o.$apply(function(){t.item.sortable.moved=a.$modelValue.splice(t.item.sortable.index,1)[0]})},o.$watch(l.uiSortable,function(e){angular.forEach(e,function(e,t){u[t]&&("stop"===t&&(e=r(e,function(){o.$apply()})),e=r(u[t],e)),i.sortable("option",t,e)})},!0),angular.forEach(u,function(e,t){s[t]=r(e,s[t])})):n.info("ui.sortable: ngModel not provided!",i),i.sortable(s)}}}]); /* <<< file end: js/lib/angular/ui/sortable.js */ //# map link was there [sortable.js.map] /* >>> file start: js/editor/photouploader.js */ //= require js/lib/jquery-ui/jquery.ui.mouse.min.js //= require js/lib/jquery-ui/jquery.ui.sortable.min.js //= require js/lib/angular/ui/sortable.js //= require js/core/string.js //!= require js/core/angular/messages.js //= require js/core/angular/pills.js //= require js/core/angular/plupload.js //= require js/core/angular/authHelper.js //= require js/editor/basicToolbar.js // error: photouploader.css is already included // error: menu_v2.css is already included Site.page.template['angular/photouploader.ng.tmpl'] = '\n\n\n\n \n \n \n \n \n \n \n \n \n \n \n \n\n\n \n
    \n\n\n\n \n \n\n \n \n
    \n

    \n

    \n \n
      \n \n {{ file.name }} — {{ file.percent }}% ({{ file.formattedSize }})\n\n \n \n
    \n
    \n
    \n \n
    \n
    \n\n \n \n \n \n \n \n \n \n \n\n \n \n
    \n
    \n \n \n \n \n \n \n \n \n \n \n
    \n \n \n
    \n
    \n \n \n \n
    \n\n
    \n \n \n \n
    \n\n\n
    \n \n \n
    \n\n
    \n\n \n \n \n\n \n\n \n\n \n\n \n\n\n\n \n \n\n \n \n\n \n\n
    \n \n \n \n \n \n \n
    \n\n \n \n \n \n \n \n \n\n \n \n\n \n\n \n \n
    \n \n \n \n \n \n
    \n \n \n \n \n \n \n \n\n \n\n\n\n \n \n\n
    \n\n \n \n\n
    \n\n
    \n \n \n
    \n\n
    \n \n
    \n \n
    \n \n
    \n\n
    \n \n
    \n \n
    \n\n
    \n\n \n\n \n \n
    \n \n \n \n
    \n \n \n \n\n \n \n \n\n\n \n\n \n\n \n\n\n\n \n \n \n

    \n \n \n \n\n\n\n \n \n\n \n \n

    \n \n \n\n \n \n\n
    \n

    \n \n \n

    \n\n \n
    \n\n \n \n \n \n \n {{ media.caption.text }}\n \n \n \n \n\n \n\n \n \n \n \n \n \n\n \n \n \n\n \n\n\n\n \n\n\n\n\n'; //= require_ml photouploader.paste.correctUrl //= require_ml photouploader.paste.pasteURL //= require_ml photouploader.paste.notice //= require_ml photouploader.paste.link //= require_ml photouploader.paste.size //= require_ml photouploader.paste.insert //= require_ml photouploader.paste.insert //= require_ml photouploader.paste.title //= require_ml photouploader.dropbox.title //= require_ml photouploader.dropbox.choose //= require_ml photouploader.instagram.title //= require_ml photouploader.instagram.intro //= require_ml photouploader.instagram.loginButton //= require_ml photouploader.instagram.select //= require_ml photouploader.instagram.select.help //= require_ml photouploader.instagram.logout //= require_ml photouploader.instagram.asEmbeds //= require_ml photouploader.instagram.asEmbeds.help //= require_ml photouploader.instagram.needTitle //= require_ml photouploader.instagram.needTitle.help //= require_ml photouploader.instagram.nophoto //= require_ml photouploader.instagram.insert //= require_ml photouploader.instagram.insert //= require_ml photouploader.album.your //= require_ml photouploader.album.size //= require_ml photouploader.album.addlink !function(e){"use strict";angular.module("LJ.Photouploader",["ui.sortable","LJ.AuthHelper","LJ.Messages","LJ.Pills","angular-plupload"]).factory("Photouploader",["$timeout","$log",function(t,o){var n={};if(LJ.get("fotki")||o.warn("Missing `fotki` data on page from server"),n.albums=angular.copy(LJ.get("fotki.uploader.albumsData")||[]),n.sizesData=LJ.get("fotki.uploader.sizesData")||[],n.space=LJ.get("fotki.uploader.availableSpace"),n.albums.forEach(function(e){e.photos=[]}),n.album=n.albums[0],n.hasUploadAbilities=Boolean(LJ.get("remote.username")&&!LJ.get("remote.is_identity")),n.keys={dropbox:"7ye0n6mhwlsdh9u",instagram:"2f36cf1bb0b74b4dbc3bf155321370b4"},n.getUnsortedAlbum=function(){return n.albums[0]},n.fetchAlbum=function(o,a){var r=20;n.hasUploadAbilities&&o.album.album_id&&(o.album.allFetched||e.ajax({url:(LJ.get("photo_prefix")||"")+"/__rpc_fotki_imgs?func=get_photos",dataType:"json",data:{album_id:o.album.album_id,start:o.start||0,required_size:100,count:r}}).then(function(e){var n=e.filter(LJ.Function.get("photo_url"));n.length0?"uploaded":"start"}},t.pills={isActive:function(e){return a.group("photouploader")===e},select:function(e){a.group("photouploader",e),LJ.Storage.setItem("photouploader2_state",e)}},t.paste={url:"",link:"",insertUrl:function(){var e,o=Number(t.ui.size.current.size)||"",n='';e=t.paste.link?''+n+"":n,r.insertContent("photouploader",e,[e]),t.paste.url="",t.paste.link="",t.bubble.close(),LJ.Track.event("Photouploader","Paste","Insert")}},t.albums={current:{photos:[]},list:i.albums,originalLink:!1,noneSelected:function(){return t.hasAlbums()?0===t.albums.current.photos.filter(LJ.Function.get("selected")).length:!0},togglePhoto:function(e){e.selected=!e.selected},insert:function(){if(!t.ui.insertInProgress){t.ui.insertInProgress=!0;var e=t.ui.size.current.size,o=t.albums.current.photos.filter(LJ.Function.get("selected"));"custom"!==e?i.updatePhotos(o,{required_size:e},function(){LJ.Event.trigger("albumInsert",e,o)}):LJ.Event.trigger("albumInsert",e,o)}},loadMore:function(){i.fetchAlbum({album:t.albums.current,start:t.albums.current.photos.length},function(e){i.addPhotos(t.albums.current.album_id,e)})}},t.$watch("albums.current",function(e){e&&e.album_id&&(i.album=e,i.fetchAlbum({album:e},function(t){i.addPhotos(e.album_id,t)}),LJ.Storage.setItem("photouploader_album_id",e.album_id))}),t.instagram={media:[],asEmbed:!0,_token:null,token:function(e){var o=LJ.get("remote.username"),n="instagram_token",a={domain:LJ.get("siteroot").replace(/^https?:\/\/www/,"")};return o&&(n="instagram_token_"+o),"undefined"==typeof e?t.instagram._token||LJ.Cookie.get(n):(t.instagram._token=e,void LJ.Cookie.set(n,e,a))},noneSelected:function(){return 0===this.media.filter(LJ.Function.get("selected")).length},select:function(e){e.selected=!e.selected},insert:function(){var e,n,a=t.instagram.media.filter(LJ.Function.get("selected"));t.instagram.asEmbed?(n=a.map(function(e){return LJ.Media.parse(e.link).then(LJ.Function.get("embed"))}),o.all(n).then(function(e){r.insertContent("video",e.join("\n"),e)})):(e=a.map(function(e){return''.supplant({url:e.images.standard_resolution.url,caption:LJ.String.encodeHTML(e.caption&&e.caption.text||"")})}),r.insertContent("photouploader",e.join("\n"),e),LJ.Track.event("Photouploader","Instagram","Insert")),t.instagram.media.forEach(LJ.Function.set("selected",!1)),t.bubble.close()},login:function(){l.open(["../https@instagram.com/oauth/authorize/@client_id=",i.keys.instagram,"&redirect_uri=","../https@www.livejournal.com","auth_helper.html&response_type=token"].join("")).then(function(e){e&&LJ.Event.trigger("instagram_token",e)})},logout:function(){(new Image).src="../https@instagram.com/accounts/logout/default.htm",t.instagram.token(null),t.instagram.allFetched=!1,t.instagram.media.length=0},loadMore:function(){var o=t.instagram;if(o.token()&&!o.loading&&!o.allFetched){o.loading=!0;var a=["../https@api.instagram.com","/v1/users/self/media/recent/?callback=?&access_token=",o.token()];if(o.media.length>0){var r=o.media[o.media.length-1].id;a.push("&max_id="+r)}e.getJSON(a.join("")).then(function(e){n(function(){e.data&&0===e.data.length&&(o.allFetched=!0),Array.prototype.push.apply(o.media,e.data),o.loading=!1})})}}},t.$watch(function(){return t.instagram.token()},t.instagram.loadMore),LJ.Event.on("instagram_token",function(e){n(function(){t.instagram.token(e)})}),t.dropbox={init:function(){window.Dropbox||LJ.injectScript("../https@www.dropbox.com/static/api/2/dropins.js").done(function(){window.Dropbox&&(window.Dropbox.appKey=i.keys.dropbox),LJ.Event.trigger("dropbox_loaded",{linkType:"preview",multiselect:!0,extensions:["images"],success:function(e){n(function(){var o=e.map(function(e){return''.supplant({url:e.link.replace("www.dropbox.com","dl.dropboxusercontent.com")})});r.insertContent("photouploader",o.join("\n"),o),t.bubble.close(),LJ.Track.event("Photouploader","Dropbox","Success")})}})})}},t.dropbox.init(),t.uploaderInit=!0,t.pluploadCallbacks={filesAdded:function(e,o){t.upload.inProgress=!0,n(function(){t.upload.files.length=0,Array.prototype.push.apply(t.upload.files,angular.copy(o)),e.start()})},fileUploaded:function(e,o,n){return n=JSON.parse(n.response),"error"===n.status?(t.upload.files.shift(),void t.pluploadCallbacks.uploadError(e,n)):(n.photo_name=-1!==o.name.lastIndexOf(".")?o.name.substr(0,o.name.lastIndexOf(".")):o.name,void s.push(n))},uploadComplete:function(){s.length&&n(function(){var e,o=s[0].album_id;t.upload.inProgress=!1,s.forEach(LJ.Function.set("uploaded",!0)),i.getAlbumById(o)||(e=i.addAlbum({album_id:o,album_title:LJ.ml("fotki.album.default_album_name"),allFetched:!0},{prepend:!0}),t.albums.current=t.upload.album=e),i.addPhotos(o,s,{prepend:!0}),t.upload.files.length=0,s.length=0})},uploadProgress:function(e,o){n(function(){var e=t.upload.files.find(function(e){return e.id===o.id});e&&isFinite(o.percent)&&(e.percent=o.percent)})},uploadError:function(e,o){t.upload.inProgress=!1,o.code===plupload.INIT_ERROR?t.uploaderInit=!1:n(function(){u.error({body:o.message})})}},LJ.Event.on("uploadInsert",function(e,o){n(function(){var n=o.map(function(o){var n='{name}'.supplant({url:o["size_"+e],name:o.photo_name||""});return t.albums.originalLink?''+n+"":n});r.insertContent("photouploader",n.join("\n"),n),t.ui.insertInProgress=!1,o.forEach(LJ.Function.set("uploaded",!1)),t.bubble.close()})}),LJ.Event.on("albumInsert",function(e,o){var n=o.map(function(o){var n='{name}'.supplant({url:o["size_"+e],name:o.photo_title||""});return t.albums.originalLink?''+n+"":n});r.insertContent("photouploader",n.join("\n"),n),t.ui.insertInProgress=!1,t.albums.current.photos.forEach(LJ.Function.set("selected",!1)),t.bubble.close(),LJ.Track.event("Photouploader","Albums","Insert")})}}]).directive("ljWhenScrolled",function(){return function(e,t,o){var n=t[0];t.bind("scroll",function(){n.scrollTop+n.offsetHeight>=n.scrollHeight&&e.$apply(o.ljWhenScrolled)})}})}(jQuery); /* <<< file end: js/editor/photouploader.js */ //# map link was there [photouploader.js.map] /* >>> file start: js/core/array.js */ !function(n){return n}(),function(){"use strict";LJ.define("LJ.Array"),LJ.Array.intersection=function(n,r){var t;return r.length>n.length&&(t=r,r=n,n=t),n.filter(function(n){return-1!==r.indexOf(n)})}}(); /* <<< file end: js/core/array.js */ //# map link was there [array.js.map] /* >>> file start: js/angularHttps.js */ var _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(r){return typeof r}:function(r){return r&&"function"==typeof Symbol&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r}; //= require js/core/angular/api.js !function(){function r(r,e){function t(e){return new Promise(function(t,u){var i=n[e];return i?t(i.proxied):void r.call("imageproxy.get_proxy_url",{url:e}).then(function(r){i={proxied:r.url},n[e]=i,t(i.proxied)})["catch"](u)})}var n={},u={getSecureUrlVariation:function(r,e){if(!/^http/.test(r))return null;if(/^https:\/\//.test(r))return r;if(angular.isArray(e)&&e.length){var t=function(){var t=void 0,n=r.split("/");return e.some(function(e){return n[2]&&(n[2]===e||n[2].indexOf(e)>-1)?(t=r.replace(/^http/,"https"),!0):!1}),t?{v:t}:void 0}();if("object"===("undefined"==typeof t?"undefined":_typeof(t)))return t.v}return null},isSecureSrc:function(r){return angular.isString(u.getSecureUrlVariation(r))},getSecureImageUrl:function(r,e){if(!/^http/.test(r))return Promise.reject({url:r,reason:new Error('Url does not start with "http"')});var n=u.getSecureUrlVariation(r,e);return n?Promise.resolve({secureUrl:n}):t(r).then(function(r){return{secureUrl:r}})},getMetaFromHtmlString:function(r){var e=(new DOMParser).parseFromString(r,"text/html"),t=Array.prototype.slice.call(e.getElementsByTagName("img"));return t.map(function(r){return r.getAttribute("src")}).filter(function(r,e,t){return t.indexOf(r)===e}).map(function(r){return{src:r}})},isSecureHtmlString:function(r){var e=u.getMetaFromHtmlString(r);return e.every(function(r){return u.isSecureSrc(r.src)})},secureImgSrcInString:function(r,e,t){if(!t||!e)return r;var n=function(r){return new RegExp("src=['\"]"+r+"['\"]","g")},u="src='"+t+"' originalsrc='"+e+"'",i=e.replace(/\?/gi,"\\?"),c=i.encodeHTML(),o=n(i),a=n(c);return o.test(r)?r.replace(o,u):a.test(r)?r.replace(a,u):r},secureHtmlString:function(r,t){var n=u.getMetaFromHtmlString(r),i=n.map(function(r){return e(function(e){var n=r.src;u.getSecureImageUrl(n,t).then(function(t){var n=t.secureUrl;r.secureUrl=n,e()})["catch"](function(){e()})})});return e.all(i).then(function(){return n.reduce(function(r,e){return u.secureImgSrcInString(r,e.src,e.secureUrl)},r)})},desecureHtmlString:function(r){var e=r,t=e.match(new RegExp("]+>","g"));return t&&t.length?(t.forEach(function(r){var t=r.match(new RegExp("originalsrc=['\"]([^'\"]+)['\"]"));if(t&&t.length){var n=t[1],u=r.replace(new RegExp("originalsrc=['\"][^'\"]+['\"] "),"").replace(new RegExp("src=['\"][^'\"]+['\"]"),"src='"+n+"'");e=e.replace(r,u)}}),e):e}};return u}r.$inject=["Api","$q"],angular.module("LJ.Https",["LJ.Api"]),angular.module("LJ.Https").factory("ljHttpsService",r)}(); /* <<< file end: js/angularHttps.js */ //# map link was there [angularHttps.js.map] /* >>> file start: js/photo/photo.js */ var _extends=Object.assign||function(e){for(var t=1;t=n&&e.indexn)return e.reject();var o=angular.extend({offset:n,limit:1},r);return i(t,o).then(function(e){return e[0]})}function _(e){return t.call("photo.update_records",e).then(function(e){var t=e.records;return t.forEach(x),t})}function A(e){return t.call("photo.update_record",e).then(function(e){var t=e.record;return x(t),t})}function x(e){var n=g(e.id);t.invalidate("photo.get_records",{albumid:e.albumid,user:C,offset:Math.floor(e.index/20),limit:20}),t.invalidate("photo.get_album",{user:C,id:e.albumid}),t.invalidate("photo.get_albums",{user:C}),n&&(t.invalidate("photo.get_records",{albumid:n.albumid,user:C,offset:Math.floor(n.index/20),limit:20}),t.invalidate("photo.get_album",{user:C,id:n.albumid})),u(e.albumid),y(e)}function R(e,n){return t.call("photo.delete_records",{ids:e}).then(function(){n&&n.notCached||e.forEach(function(e){h(e)})})}function y(e){Array.isArray(e)||(e=[e]),e.forEach(function(e){O[e.id]=e})}var L={NON_SELECTED_ALBUM:{id:-1,name:LJ.ml("flatmedia.select.album.none")},RECORD_ADULT:!1,RECORD_PRIVACY:"public",ALBUM_PRIVACY:"public",ALBUM_NAME:""},E={createRecord:r,fetchAlbums:o,getAlbums:m,fetchAlbum:u,getAlbumById:p,fetchRecords:i,fetchRecordById:a,getRecordById:g,getRecordByIndex:v,getRecordsByAlbumId:b,createAlbum:l,updateAlbum:c,removeAlbum:d,updateRecord:A,updateRecords:_,removeRecords:R,defaults:L},C=LJ.get("journal.username")||LJ.get("remote.username"),J={},O={},z=[];return E}]).factory("PhotoSize",function(){function e(){var e=LJ.Cookie.get("photo_size"),t=e?LJ.Function.get("size",e.toString()):LJ.Function.get("is_default");return n&&(t&&n.filter(t)[0]||n[0])}function t(e){for(var t=n.map(LJ.Function.get("size")),r=0,o=e.length;o>r;r++)t=LJ.Array.intersection(e[r],t);return n.filter(function(e){return-1!==t.indexOf(e.size)})}var n=LJ.get("fotki.uploader.sizesData")||[{is_default:1,text:"Оригинал",size:"original"}];return{list:n,current:e(),insertInProgress:!1,sortableOptions:{helper:"clone"},intersect:t,getDefaultSize:e}}).filter("decodeRecord",[function(){return function(e){function t(e){return"<"===e?"<":">"}return e.name=(e.name||"").replace(/(&(gt|lt);)/g,t),e.description=(e.description||"").replace(/(&(gt|lt);)/g,t),e}}])}(); /* <<< file end: js/photo/photo.js */ //# map link was there [photo.js.map] /* >>> file start: js/photo/selectAlbum.js */ //= require js/photo/photo.js Site.page.template['angular/photo/selectPhotoAlbum.ng.tmpl'] = '
    \n\n
    \n \n \n \n \n
    \n\n
    \n \n \n \n
    \n
    \n'; //= require_ml flatmedia.album.create.new //= require_ml flatmedia.album.name //= require_ml flatmedia.button.back //= require_ml flatmedia.or //= require_ml flatmedia.select.album !function(e){return e}(),function(){"use strict";angular.module("Photo.SelectAlbum",["LJ.Templates","Photo.Service"]).directive("selectPhotoAlbum",["Photo",function(e){return{templateUrl:"selectPhotoAlbum.ng.tmpl",controllerAs:"directive",scope:{album:"=selectPhotoAlbum",allowNonSelected:"=?allowNonSelected",scope:"=selectPhotoAlbumScope"},controller:["$scope","$attrs","Photo",function(e,t,l){function n(){var l=t.allowNonSelected;return"string"==typeof l&&0===l.length?!0:e.allowNonSelected}function o(e){var t=[];return n()&&t.push(l.defaults.NON_SELECTED_ALBUM),t.concat(e?e:l.getAlbums())}var u=this,c=this.state={init:!1,create:!1};this.newAlbum={name:""},this.init=function(){c.init=!0,u.albums=angular.copy(l.getAlbums()),e.album.id?this.selectedAlbumId=e.album.id:0!==u.albums.length&&(this.selectedAlbumId=u.albums[0].id),e.$watch(function(){return u.selectedAlbumId+u.newAlbum.name+c.create},function(){e.album=c.create?u.newAlbum:l.getAlbumById(u.selectedAlbumId)}),e.$watchCollection(l.getAlbums,function(e){u.albums=o(e),0===e.length&&(c.create=!0)}),"undefined"!=typeof t.allowNonSelected&&e.$watch("allowNonSelected",function(){u.albums=o()})},this.toggle=function(e){c.create=e,this.newAlbum.name=""}}],link:function(t,l,n,o){var u={};if("undefined"==typeof t.album)throw new TypeError("You should provide album object");"photo"!==t.scope&&(u={user:LJ.get("remote.username")}),e.fetchAlbums(u).then(function(){o.init()})}}}])}(); /* <<< file end: js/photo/selectAlbum.js */ //# map link was there [selectAlbum.js.map] /* >>> file start: js/photo/uploader.js */ //= require js/core/angular/api.js //= require js/core/angular/plupload.js //!= require js/core/angular/messages.js //= require js/photo/photo.js //= require js/editor/editor.js //= require js/photo/selectAlbum.js Site.page.template['angular/photo/uploaderPhoto.ng.tmpl'] = '\n \n = 2 && directive.modulo() <= 4,\n \'photouploader.upload.filesAdded5\': directive.modulo() === 0 || directive.modulo() >= 5\n }\"\n lj-ml-resolve=\"{ number: directive.files.length }\"\n lj-ml-dynamic=\"directive.uploaded.length || directive.files.length\"\n >\n \n \n\n \n \n \n \n \n \n\n
    \n \n
    \n\n
    \n \n
    \n\n
    \n
    \n
    \n\n
    \n \n \n
    \n\n \n \n \n \n\n \n \n \n \n\n
    \n \n \n
    \n\n\n\n
    \n \n
    \n'; //= require_ml flatmedia.button.cancel //= require_ml flatmedia.name //= require_ml flatmedia.upload.photo //= require_ml photouploader.upload.initFail //= require_ml photouploader.upload.dragOrClick //= require_ml photouploader.upload.filesAdded1 //= require_ml photouploader.upload.filesAdded2-4 //= require_ml photouploader.upload.filesAdded5 //= require_ml photouploader.upload.insert !function(e){return e}(),function(){"use strict";angular.module("Photo.Uploader",["LJ.Templates","LJ.Messages","LJ.Api","angular-plupload","Photo.SelectAlbum","Photo.Service","Editor"]).directive("ljPhotoUploader",["$timeout",function(e){return{templateUrl:"uploaderPhoto.ng.tmpl",scope:{albumId:"=ljPhotoUploader",scope:"@ljPhotoUploaderScope",callback:"&ljPhotoUploaderCallback",onError:"&ljPhotoUploaderError",cancelUpload:"&ljPhotoUploaderCancel"},controllerAs:"directive",controller:["$scope","$q","$rootScope","$element","$attrs","Photo","Editor","Bubble","Messages","PhotoSize",function(o,t,r,a,n,l,i,p,s,u){function d(){_.model=m(),J("ready")}function c(){function e(e){"function"==typeof o.callback&&o.callback({photo:e}),"photo"===_.scope&&LJ.Event.trigger("upload:photo:back"),U(),J("init")}LJ.Event.trigger("photo:upload:save"),L().then(y).then(e)}function g(){"function"==typeof o.cancelUpload&&o.cancelUpload(),J("cancel"),_.uploaded.map(f),j.length=0,p.close()}function f(e){l.removeRecords([e.id],{notCached:!0}).then(function(){_.uploaded.splice(_.uploaded.indexOf(e),1)})}function m(){return{name:l.defaults.ALBUM_NAME,privacy:l.defaults.RECORD_PRIVACY,album:l.getAlbumById(o.albumId)||{}}}function h(){return j.length&&j.every(function(e){return 0!==e.trim().length})&&(_.model.album.id||0!==_.model.album.name.trim().length)&&!_.state.inProgress}function v(){var e=_.files.length;return 0===e?-1:10>e||e>20?e%10:0}function b(){return _.state.inProgress?void LJ.Event.once("photo:upload:done",b):(J("uploading"),void _.uploader.start())}function P(){_.state.isWaiting||(_.state.isWaiting=!0,LJ.Event.once("photo:upload:save",b))}function y(){var e=_.uploaded.map(function(e,o){return l.updateRecord({id:e.id,albumid:_.model.album.id,privacy:_.model.privacy,groupids:_.model.groupids,name:j[o]})});return t.all(e)}function L(){if("photo"===_.scope&&!_.uploaded.length)return LJ.Event.once("photo:upload:done",c),t.reject();"editor"===_.scope&&J("progress");var e=angular.copy(_.model),o=t.defer(),r=o.promise;return"undefined"==typeof e.album.id?r=l.createAlbum({name:e.album.name}):o.resolve(e.album),delete e.album,r.then(function(e){_.model.album.id=e.id})}function k(e,t){return J("error"),t.code&&t.code===window.plupload.INIT_ERROR?void(_.state.init=!1):(_.files.pop(),s.error({body:t.message}),"function"==typeof o.onError&&o.onError(),void e.splice(_.uploaded.length))}function J(e){var t={inProgress:!1,uploadInProgress:!1,uploadDone:!1,error:!1,preview:n.hasOwnProperty("ljPhotoUploaderPreview"),selectSize:n.hasOwnProperty("ljPhotoUploaderSize")};switch(_.state&&"init"!==e||(_.state=angular.extend({},_.state,t)),e){default:case"init":break;case"progress":_.state.inProgress=!0;break;case"cancel":LJ.Event.trigger("photo:upload:cancel");break;case"uploading":LJ.Event.trigger("photo:upload:start"),_.state.inProgress=!0,_.state.uploadInProgress=!0;break;case"uploaded":_.uploaded.length&&(LJ.Event.trigger("photo:upload:done"),_.state.uploadDone=!0,_.state.inProgress=!1,_.state.uploadInProgress=!1);break;case"ready":_.state.init=!0,o.$apply();break;case"error":_.state.error=!0,_.state.inProgress=!1,_.state.uploadInProgress=!1}}function E(){var e=_.state.selectSize&&_.sizes.current.size,o='{name}',t='{img}';return _.uploaded.map(function(r){var a=o.supplant({url:e?r.url.replace("original",e):r.url,name:r.photo_name||r.name});return _.originalLink?t.supplant({originalLink:r.url,img:a}):a})}function U(){var e=E();i.insertContent("photouploader",e.join("\n"),e),_.uploaded.length=0,p.close()}var _=this,j=[];J(),_.init=d,_.files=[],_.uploaded=[],_.save=c,_.cancel=g,_.remove=f,_.isSaveAllowed=h,_.modulo=v,_.scope=o.scope,_.sizes=u,_.uploadUrl=(LJ.get("photo_prefix")||"")+"/up";var A=LJ.Object.resolve(LJ,"GlobalConfig.photoUploadMaxSize")+"mb"||"20mb";_.uploadOptions={drop_element:"upload-panel-photo",browse_button:"pickfiles-photo",multi_selection:!0,filters:{max_file_size:A,mime_types:[{title:"Image files",extensions:"jpg,jpeg,gif,png"}]},multipart:!0,multipart_params:{form_auth:LJ.get("fotki.uploader.guid")||LJ.get("page.guid")},file_data_name:"file"},_.uploadCallbacks={init:function(e){_.uploader=e,e.refresh()},filesAdded:function(o,t){J("init"),_.files.lenght=0,Array.prototype.push.apply(_.files,angular.copy(t)),Array.prototype.push.apply(j,t.map(LJ.Function.get("name"))),e("photo"!==_.scope?b:P)},fileUploaded:function(e,t,r){return r=JSON.parse(r.response),_.files.shift(),o.$apply(),"error"===r.status?void k(e,r):void(_.state.error||_.uploaded.push(r))},uploadProgress:function(e,o){var t=100/(_.files.length+_.uploaded.length);_.progress=isFinite(t)?Math.floor(t*(_.uploaded.length+o.percent/100)):0},uploadComplete:function(){_.progress=0,J("uploaded")},error:function(e,o){k(e,o)}}}],link:function(o,t,r,a){e(a.init)}}}])}(); /* <<< file end: js/photo/uploader.js */ //# map link was there [uploader.js.map] /* >>> file start: js/misc/tempImageChecker.js */ //= require_ml message.warnings.temporary_url_insertion LJ.define("LJ.Misc"),LJ.Misc.checkForTempImageURLs=function(){var e=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],n=e.event,t=e.string,a="";if(t)a=t;else if(n)try{var r=n.originalEvent||n;a=r.clipboardData.getData("text/plain")}catch(i){console.log("Could not parse text content from pasted text")}var s=a.match(/https?:\/\/[^\s'"\r\n]+/g)||[],o=s.filter(function(e){return e.indexOf("imgprx.livejournal.net/")>0?!0:e.indexOf("downloader.disk.yandex.ru/")>0?!0:e.indexOf("fna.fbcdn.net/")>0});return o.length&&LJ.Messages&&LJ.Messages.add({body:LJ.ml("message.warnings.temporary_url_insertion"),type:"warning"}),o}; /* <<< file end: js/misc/tempImageChecker.js */ //# map link was there [tempImageChecker.js.map] /* >>> file start: js/photo/editor.js */ //= require js/editor/editor.js //= require js/editor/photouploader.js //= require js/editor/media.js //= require js/core/string.js //= require js/core/array.js //= require js/core/angular/api.js //= require js/core/angular/pills.js //= require js/core/angular/authHelper.js //= require js/angularHttps.js //= require js/photo/uploader.js //= require js/photo/photo.js //= require js/misc/tempImageChecker.js // error: photouploader.css is already included // error: menu_v2.css is already included Site.page.template['angular/photo.ng.tmpl'] = '\n\n\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n\n\n \n
    \n \n \n
    \n
    \n\n\n \n \n\n \n \n\n \n\n
    \n \n \n \n \n \n \n
    \n\n \n \n \n \n \n \n \n\n \n \n\n \n\n \n \n
    \n \n \n \n
    \n
    \n \n \n
    \n
    \n \n \n \n \n \n\n \n\n\n \n \n\n
    \n\n \n \n\n
    \n\n
    \n \n \n
    \n\n
    \n \n
    \n \n
    \n \n
    \n\n
    \n \n
    \n \n
    \n\n
    \n\n \n\n \n \n
    \n \n \n \n
    \n \n \n \n \n \n\n \n\n \n\n\n\n \n \n \n

    \n \n \n \n\n\n\n \n \n\n\n\n \n \n\n \n \n

    \n \n \n\n \n \n\n \n \n \n \n \n\n \n \n\n \n \n \n \n \n {{ media.caption.text }}\n \n \n \n \n\n \n\n \n \n \n \n \n \n \n\n \n\n\n \n\n'; //= require_ml photouploader.embed.title //= require_ml photouploader.upload.title //= require_ml photouploader.upload.addlink //= require_ml photouploader.byUrl.title //= require_ml photouploader.album.title //= require_ml photouploader.album.select //= require_ml photouploader.album.insert //= require_ml fotki.album.edit.empty.photo.title //= require_ml photo.migrate.title //= require_ml tour.photo_update_tour.tip //= require_ml talk.photo //= require_ml talk.photo.paste //= require_ml talk.photo.insert !function(t){return t}(),function(){"use strict";function t(t,e,o,n,r,i,a,u,l,s,c,p,d){function h(){var t=LiveJournal.parseGetArgs().photo_id,e=LiveJournal.parseGetArgs().albums_id;return t?m(t):e?(L.requestAlbumId=+e,f(L.requestAlbumId)):void 0}function m(t){var e;e=t.split(",").map(function(t){return i.fetchRecordById({id:t})}),e.push(i.fetchAlbums()),o.all(e).then(function(t){t.splice(-1),L.albums.current=b(t.map(n("decodeRecord")))})}function f(t){LJ.Event.on("photo:albums:loaded",function(){var e=L.albums.list.find(function(e){return e.id===t});e.selected=!0,L.albums.current=e})}function g(){L.state.canUpload&&i.fetchAlbums({user:LJ.get("remote.username")}).then(function(){L.albums.list=i.getAlbums(),L.albums.current=L.albums.list[0],LJ.Event.trigger("photo:albums:loaded")})}function b(t){var e={id:"selected",name:LJ.ml("photouploader.album.scrapbookSelected"),photos:t.map(LJ.Function.set("selected",!0))};return L.albums.list.push(e),e}var L=this,J=L;L.state={canUpload:LJ.get("remote")&&!LJ.get("remote_is_identity"),isMigrated:LJ.get("is_images_migrated"),insertInProgress:!1,uploadInProgress:!1,isOpen:!1},L.instagram=l,L.paste=s,L.albums=c,L.ui=p,L.siteroot=LJ.get("siteroot"),L.hasAlbums=function(){return 0!==c.length},L.isPill=function(t){return r.group("uploadPhoto")===t},L.pill=function(t){t=t||LJ.Storage.getItem("photoUploadPill")||"paste",r.group("uploadPhoto",t),LJ.Storage.setItem("photoUploadPill",t)},t.$watch(function(){return L.state.isOpen},function(t){t===!0&&(u.init(),g())});var v=LJ.Function.debounce(L.paste.updateSecureUrl,1500);t.$watch(function(){return L.paste.url},function(t,e){angular.isString(t)&&t!==e&&(L.paste.secureUrl="",v(t))}),t.$watch(function(){return L.instagram.token()},L.instagram.loadMore),LJ.Event.on("instagram_token",function(t){e(function(){L.instagram.token(t)})}),t.$watch(function(){return L.ui&&L.ui.current},function(t,e){t&&t!==e&&LJ.Cookie.set("photo_size",t.size)}),t.$watch(function(){return L.albums.current},function(t){if(t&&t.id&&/\d/.test(t.id)){if(LJ.get("fotki.insert")&&t.id===L.requestAlbumId){if(!L.cachedRequestPhotos){var e=LJ.get("fotki.insert").map(function(t){return{id:t.photo_id,name:t.photo_title?t.photo_title:LJ.ml("fotki.album.edit.empty.photo.title"),description:t.photo_desc,thumbnail_url:t.photo_url,url:t.photo_orig,available_sizes:t.available_sizes,selected:!0}});L.cachedRequestPhotos=e.map(n("decodeRecord"))}L.albums.current.photos=L.cachedRequestPhotos}else i.fetchRecords(t.id,{offset:0,limit:20,user:LJ.get("remote.username")}).then(function(t){L.albums.current.photos=t.map(n("decodeRecord"))});LJ.Storage.setItem("photouploader_album_id",t.id)}}),t.$on("bubble:open:photouploader",function(){var t=LiveJournal.parseGetArgs().albums_id||LiveJournal.parseGetArgs().photo_id;L.state.isOpen=!0,LJ.get("fotki.insert")||t&&L.state.canUpload?(L.pill("album"),h()):(L.pill(L.state.canUpload?LJ.Storage.getItem("photouploader2_state")||"upload":"paste"),L.isPill("album")&&!L.hasAlbums()&&L.pill("upload"))}),t.$on("bubble:close:photouploader",function(){L.state.isOpen=!1}),LJ.Event.on("photo:upload:start",function(){L.state.uploadInProgress=!0}),LJ.Event.on("upload:photo:cancel",function(){L.state.uploadInProgress=!1}),LJ.Event.on("upload:photo:done",function(){d.close()}),J.handlePasteEvent=function(t){var e=LJ.Object.resolve(LJ,"Misc.checkForTempImageURLs")||function(){};e({event:t})}}angular.module("Photo.Editor",["LJ.AuthHelper","LJ.Pills","LJ.Api","LJ.Bubble","Photo.Service","Photo.Uploader","LJ.Photouploader","Editor","LJ.Https"]).factory("DropboxPhoto",["$timeout","Editor","Bubble","Photouploader",function(t,e,o,n){var r={};return r.init=function(){window.Dropbox||LJ.injectScript("https://www.dropbox.com/static/api/2/dropins.js").done(function(){window.Dropbox&&(window.Dropbox.appKey=n.keys.dropbox),LJ.Event.trigger("dropbox_loaded",{linkType:"preview",multiselect:!0,extensions:["images"],success:function(n){t(function(){var t=n.map(function(t){return''.supplant({url:t.link.replace("www.dropbox.com","dl.dropboxusercontent.com")})});e.insertContent("photouploader",t.join("\n"),t),o.close(),LJ.Track.event("Photouploader","Dropbox","Success")})}})})},r}]).factory("InstagramPhoto",["$timeout","$q","Editor","Bubble","AuthHelper","Photouploader",function(t,e,o,n,r,i){var a={media:[],asEmbed:!0},u=null;return a.token=function(t){var e=LJ.get("remote.username"),o="instagram_token",n={domain:LJ.get("siteroot").replace(/^https?:\/\/www/,"")};return e&&(o="instagram_token_"+e),"undefined"==typeof t?u||LJ.Cookie.get(o):(u=t,void LJ.Cookie.set(o,t,n))},a.insert=function(){var t,r,i=a.media.filter(LJ.Function.get("selected"));a.asEmbed?(r=i.map(function(t){return LJ.Media.parse(t.link).then(LJ.Function.get("embed"))}),e.all(r).then(function(t){o.insertContent("video",t.join("\n"),t)})):(t=i.map(function(t){var e=LJ.String.encodeHTML(t.caption&&t.caption.text||"");return'
    {title}{caption}
    '.supplant({url:t.images.standard_resolution.url,caption:e,title:a.needTitle?"

    "+e+"

    ":""})}),o.insertContent("photouploader",t.join("\n"),t),LJ.Track.event("Photouploader","Instagram","Insert")),a.media.forEach(LJ.Function.set("selected",!1)),n.close()},a.noneSelected=function(){return 0===a.media.filter(LJ.Function.get("selected")).length},a.select=function(t){t.selected=!t.selected},a.login=function(){r.open(["../https@instagram.com/oauth/authorize/@client_id=",i.keys.instagram,"&redirect_uri=","../https@www.livejournal.com","auth_helper.html&response_type=token"].join("")).then(function(t){t&&LJ.Event.trigger("instagram_token",t)})},a.logout=function(){(new Image).src="../https@instagram.com/accounts/logout/default.htm",a.token(null),a.allFetched=!1,a.media.length=0},a.loadMore=function(){if(a.token()&&!a.loading&&!a.allFetched){a.loading=!0;var e=["../https@api.instagram.com","/v1/users/self/media/recent/?callback=?&access_token=",a.token()];if(a.media.length>0){var o=a.media[a.media.length-1].id;e.push("&max_id="+o)}jQuery.getJSON(e.join("")).then(function(e){t(function(){e.data&&0===e.data.length&&(a.allFetched=!0),Array.prototype.push.apply(a.media,e.data),a.loading=!1})})}},a}]).factory("PastePhoto",["$rootScope","$timeout","$q","Editor","Bubble","PhotoSize","ljHttpsService",function(t,e,o,n,r,i,a){var u={url:"",link:"",secureUrl:""},l=LJ.get("whitelist_https")||[];return u.insertUrl=function(){return u.updateSecureUrl().then(function(){var t=n.htmlMode()?u.url:u.secureUrl,e=n.htmlMode()?null:"originalSrc='"+u.url+"'",o=void 0,a=''.supplant({url:t,width:Number(i.current.size)?'width="'+i.current.size+'" ':"",originalSrc:e?e+" ":""});o=u.link?''+a+"":a,n.insertContent("photouploader",o,[o]),u.url="",u.link="",r.close(),LJ.Track.event("Photouploader","Paste","Insert")})},u.updateSecureUrl=function(){return u.url?a.getSecureImageUrl(u.url,l).then(function(t){var o=t.secureUrl;return e(function(){u.secureUrl=o},0)})["catch"](function(){}):(u.secureUrl="",o.resolve())},u}]).factory("AlbumPhoto",["$q","Editor","PhotoSize","Photouploader","Bubble","Photo",function(t,e,o,n,r,i){var a=o.list,u={current:{photos:[]},list:i.getAlbums(),originalLink:!1};return u.noneSelected=function(){return u.list.length&&u.current.photos?0===u.current.photos.filter(LJ.Function.get("selected")).length:!0},u.insert=function(){var t,e;o.insertInProgress||(o.insertInProgress=!0,t=o.current.size,e=u.current.photos.filter(LJ.Function.get("selected")),LJ.Event.trigger("albumInsert",t,e))},u.loadMore=function(e){var o=u.current;return o.photos&&o.photos.length!==o.count&&"selected"!==o.id?i.fetchRecords(o.id,{offset:o.photos.length||0,limit:e||20,user:LJ.get("remote.username")}).then(function(t){Array.prototype.push.apply(o.photos,t)}):t.when(null)},u.togglePhoto=function(t){t.selected=!t.selected,o.list=o.intersect(u.current.photos.filter(LJ.Function.get("selected")).map(LJ.Function.get("available_sizes"))),-1===o.list.indexOf(o.current)&&(o.current=o.list.slice(-2)[0])},LJ.Event.on("albumInsert",function(t,n){var i=n.map(function(e){var o='{description}'.supplant({url:e.url.replace("original",t),name:(e.name||"").encodeHTML(),description:(e.description||e.name).encodeHTML()});return u.originalLink?''+o+"":o});e.insertContent("photouploader",i.join("\n"),i),o.insertInProgress=!1,o.list=a,u.current.photos.forEach(LJ.Function.set("selected",!1)),r.close(),LJ.Track.event("Photouploader","Albums","Insert")}),u}]).controller("PhotoEditorCtrl",["$scope","$timeout","$q","$filter","Pills","Photo","Photouploader","DropboxPhoto","InstagramPhoto","PastePhoto","AlbumPhoto","PhotoSize","Bubble",t]).directive("ljDropboxButton",function(){return function(t,e){LJ.Event.on("dropbox_loaded",function(t){e[0].appendChild(window.Dropbox.createChooseButton(t))})}})}(); /* <<< file end: js/photo/editor.js */ //# map link was there [editor.js.map] /* >>> file start: js/editor/basicToolbar.js */ //= require js/core/string.js //= require js/core/angular/api.js //= require js/core/angular/autocomplete.js //= require js/core/angular/bubble.js //= require js/core/angular/users.js //= require js/editor/editor.js //= require js/editor/media.js //= require js/video/editor.js //= require js/editor/photouploader.js //= require js/photo/editor.js !function(e){return e}(),function(e){"use strict";angular.module("BasicToolbar",["LJ.Api","LJ.Autocomplete","LJ.Bubble","LJ.Photouploader","Photo.Editor","Video.Editor","Editor","Users"]).controller("MediaCtrl",["$scope","Editor",function(t,n){t.media="",t.setHint=function(e){var n=e.target,r=n.getAttribute("href");r&&(t.media=r),e.preventDefault()},t.getMedia=function(t){var n=LJ.Media.parse(t,{thumbnail:!1}),r=e.Deferred();return n?n.then(function(e){e&&e.embed&&(r.resolve(e),LJ.Track.event("Editor","Embed",e.site))}):/^<(embed|iframe|object).*>$/.test(t)?(r.resolve({embed:["",t,""].join("\n")}),LJ.Track.event("Editor","Embed","lj-embed")):(r.resolve({embed:'{caret}{link}{caret}'.supplant({link:t})}),LJ.Track.event("Editor","Embed","link (not parsed)")),r},t.insert=function(){e.when(t.getMedia(t.media)).done(function(e){n.insertContent("video",e.embed,t.media),t.media=""}),t.bubble.close()}}]).controller("LinkCtrl",["$scope","Editor",function(e,t){e.newWindow="undefined"!=typeof LJ.Storage.getItem("newWindow")?LJ.Storage.getItem("newWindow"):!0,e.unlink=function(){LJ.Event.trigger("unlink"),e.bubble.close()},e.saveOption=function(){LJ.Storage.setItem("newWindow",e.newWindow)},e.$on("bubble:open:link",function(){e.link=e.bubble.options.defaultText||"",e.showUnlink=!(!e.bubble.options.rangeNotCollapsed&&!e.bubble.options.editMode),"undefined"!=typeof e.bubble.options.hasTarget?e.newWindow=e.bubble.options.hasTarget:"undefined"!=typeof LJ.Storage.getItem("newWindow")&&(e.newWindow=LJ.Storage.getItem("newWindow"))}),e.insertOrSave=function(n){n.preventDefault(),t.insertContent("link",'{caret}{text}{caret}'.supplant({text:LJ.String.linkify(e.link),target:e.newWindow?' target="_blank"':""}),{url:e.link,target:e.newWindow?"_blank":""}),e.link="",e.bubble.close()}}]).controller("UserCtrl",["$scope","Editor","Api","Users",function(e,t,n,r){e.friends=null,e.$on("bubble:open:user",function(){e.user=e.bubble.options.user||"",LJ.get("remote")&&!e.friends&&r.fetchFriends().then(function(t){e.friends=t.map(LJ.Function.get("username"))}),e.title="undefined"===e.bubble.options.title?"":e.bubble.options.title||"",e.error=!1}),e.$watch("user",function(){e.error=!1}),e.insertOrSave=function(){if(e.user){var r=arguments[0];angular.isString(r)&&r.length>e.user.length&&(e.user=r),n.call("ljuser.get",{user:e.user,raw:!0},function(n){n.error?e.error=!0:(t.insertContent("user",''.supplant({text:e.user}),n,e.title),e.user="",e.title="",e.bubble.close())})}}}])}(jQuery); /* <<< file end: js/editor/basicToolbar.js */ //# map link was there [basicToolbar.js.map] /* >>> file start: js/discovery/directives.js */ //= require js/core/angular/api.js Site.page.template['angular/ljImage.ng.tmpl'] = '\n
    \n \n
    \n
    \n
    \n'; Site.page.template['angular/ljGallery.ng.tmpl'] = '\n \n state.index\n }\"\n >\n \n
    \n \n
    \n
    \n \n
    \n \n \n \n \n \n\n'; Site.page.template['angular/discovery/ljSuggest.ng.tmpl'] = '\n\n \n \n\n \n
      \n \n \n \n \n \n \n \n \n \n
    \n\n\n'; Site.page.template['angular/widgets/authors/posts.ng.tmpl'] = '\n\n\n\n \n
    \n \n \n
    \n\n \n
    \n\n \n
      \n\n \n
    • \n\n \n \n \n \n \n \n \n\n
    • \n\n
    \n\n \n
    \n
    \n \n
    \n \n
    \n
    \n
    \n \n
    \n \n
    \n
    \n
    \n \n
    \n \n
    \n
    \n
    \n\n
    \n\n\n\n\n'; LJ.injectStyle('/* >>> file start: stc/lj_gallery.css */\n.b-journalgallery{overflow:hidden;display:block;position:relative;width:100%;margin:0 auto;padding:0 0 70px;font:600 13px/1.1 ProximaNova,Tahoma,Arial,sans-serif;font:600 .8125rem/1.1 ProximaNova,Tahoma,Arial,sans-serif}.b-journalgallery-container{position:relative;margin:0 auto;background:#FFF}.b-journalgallery-picture{position:absolute;top:0;width:100%;margin:0!important;-webkit-transition:.5s cubic-bezier(.25,.25,.75,.75) all;transition:.5s cubic-bezier(.25,.25,.75,.75) all;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;text-align:center}.b-journalgallery-picture::after{content:\'\';display:inline-block;height:100%;margin:0 0 0 -.05em;vertical-align:middle}.b-journalgallery-preloader.svgpreloader{position:absolute;top:50%;left:50%;margin:-8px 0 0 -8px}.b-journalgallery-wrapper{position:absolute;top:0;right:0;bottom:0;left:0;margin:auto;background-size:contain;background-repeat:no-repeat;background-position:50% 50%}.b-journalgallery-hightpriority .b-journalgallery-wrapper{display:inline}.b-journalgallery-image{display:none}.b-journalgallery.b-journalgallery-hightpriority .b-journalgallery-picture .b-journalgallery-wrapper .b-journalgallery-image{width:auto;max-height:100%}.b-journalgallery-caption{position:absolute;top:100%;left:0;right:0;height:70px;margin:0;padding:0;border:0;text-align:center;background:#FFF;color:#829399}.b-journalgallery-caption-title{overflow:hidden;position:absolute;top:0;right:40px;left:40px;height:3.3em;margin:0;padding:10px 2px 0;line-height:1.1}.b-journalgallery-picture-loaded{background-image:none}.b-journalgallery-picture-loaded .b-journalgallery-image{opacity:1}.b-journalgallery-picture-prev{-webkit-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0);opacity:0}.b-journalgallery-picture-next{-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0);opacity:0}.b-journalgallery-picture-current{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}.b-journalgallery-counter{position:absolute;bottom:44px;right:0;margin:0;padding:2px;border:0;text-align:right;color:#829399}.b-journalgallery-nav{position:absolute;top:0;bottom:70px;margin:0;padding:0;border:0;cursor:pointer;font:0/0 a}.b-journalgallery-nav:after,.b-journalgallery-nav:before{content:\" \";position:absolute;top:50%;padding:0}.b-journalgallery-nav:before{width:50px;height:50px;margin:-25px 0 0;border:0;border-radius:3px;background:#839399}.b-journalgallery-nav:hover:before{background:#09C}.b-discoveryarticle .b-journalgallery-nav:hover:before{background:#39BF71}.b-journalgallery-nav:after{width:9px;height:16px;margin:-8px 0 0;background:url(/img/icons/journalgallery.png?v=39648) no-repeat}.b-journalgallery-nav-prev{left:0;width:30%}.b-journalgallery-nav-prev::before{left:20px}.b-journalgallery-nav-prev::after{left:40px}.b-journalgallery-nav-next{right:0;width:70%}.b-journalgallery-nav-next::before{right:20px}.b-journalgallery-nav-next::after{right:40px;background-position:0 -17px}@media all and (max-width:480px){.b-journalgallery-nav-prev::before{left:0}.b-journalgallery-nav-prev::after{left:20px}.b-journalgallery-nav-next::before{right:0}.b-journalgallery-nav-next::after{right:20px}}\n/* <<< file end: stc/lj_gallery.css */\n\n/*# sourceMappingURL=lj_gallery.css.map */\n'); angular.module("Discovery.Tags",["LJ.Templates","LJ.Api"]).directive("ljDiscoveryTags",["$compile",function(t){var e=["lj-gallery","[lj-memories]","[lj-lazy]","[lj-share]","[lj-likus]","[lj-cut]","[lj-screenable]","[feed-promo-control]","[feed-promo-click]","[lj-remove-repost]","[lj-quick-comments]","[ng-bind]","[ng-show]","[lj-sticky]"];return{restrict:"A",terminal:!0,link:function(i,n){t(n.find(e.join(",")))(i)}}}]).directive("ljGallery",["$templateCache","$compile",function(t,e){return{restrict:"E",scope:!0,link:function(i,n,l){i.paddingTop=75,i.maxWidth=l.width||2e3,i.maxHeight=l.height||350,i.containersDimensions={paddingTop:i.paddingTop+"%"},i.galleryDimensions={maxWidth:i.maxWidth+"px",maxHeight:i.maxHeight+"px"},i.items=n.find("lj-gallery-item").map(function(){var t=angular.element(this).find("img"),e=angular.element(this).find("a"),n=angular.element(this).find("lj-gallery-item-capture"),a={content:n.html(),src:t.attr("src"),href:e.attr("href")},s=void 0,o=void 0,r=void 0,d=void 0,c=function(){s=t[0].naturalHeight,o=t[0].naturalWidth,r=s/o,d=100*r,d>> file start: js/core/angular/ljUser.js */ //= require js/core/angular/api.js //= require js/core/angular/users.js Site.page.template['angular/ljUser.ng.tmpl'] = '\n'; !function(){"use strict";function e(e,r,n,t,a,s,u){function l(e){var r=n.defer(),t=u.Cache.get(e);return t&&t.userhead_url?(r.resolve(t),r.promise):u.fetchUser(e,u.USERHEAD_FIELDS,{cache:!0,silent:!0})}function i(e){var r=n.defer(),t=u.Cache.getById(e);return t&&t.userhead_url?(r.resolve(t),r.promise):u.fetchUserById(e,u.USERHEAD_FIELDS,{cache:!0,silent:!0})}function c(r,t){var i=n.defer(),c=e.$new();return l(r).then(function(){var e;c.user=angular.extend({},u.Cache.get(r),t||{}),e=a(d)(c),s(function(){i.resolve(p.empty().append(e).html()),c.$destroy()})}),i.promise}function o(r,t){var l=n.defer(),c=e.$new();return i(r).then(function(){var e;c.user=angular.extend({},u.Cache.getById(r),t||{}),e=a(d)(c),s(function(){l.resolve(p.empty().append(e).html()),c.$destroy()})}),l.promise}var p=angular.element("
    "),d=t.get("ljUser.ng.tmpl");return{prepare:l,prepareById:i,getById:o,get:c}}function r(e,r,n){return{templateUrl:"ljUser.ng.tmpl",replace:!0,scope:!0,compile:function(t,a){var s=e(a.ljUserDynamic),u=e(a.ljUserDynamicOptions);return function(e){var t=u(e);e.$watch(function(){return s(e)},function(a){var s=a;e.user=angular.extend({username:s,display_username:s},t||{}),n.prepare(s).then(function(){e.$watch(function(){return r.Cache.get(s)},function(r){angular.extend(e.user,r)},!0)})})}}}}function n(e,r,n){return{template:'',scope:!0,compile:function(t,a){return function(t){var s=e(a.ljUserAvatarImg)(t),u=e(a.ljUserAvatarImgOptions)(t),l=+s;return NaN!==l&&s.toString().length===l.toString().length?void(t.user=angular.extend({id:s},u||{})):(function(e){return e}(),t.user=angular.extend({username:s},u||{}),void n.prepare(s).then(function(e){t.$watch(function(){return r.Cache.get(s)},function(e){angular.extend(t.user,e)},!0)}))}}}}function t(e,r,n){return{templateUrl:"ljUser.ng.tmpl",replace:!0,scope:!0,compile:function(t,a){return function(t){var s=e(a.ljUserById)(t),u=e(a.ljUserByIdOptions)(t);t.user=angular.extend({username:"user-"+s,display_username:"user-"+s},u||{}),n.prepareById(s).then(function(){t.$watch(function(){return r.Cache.getById(s)},function(e){angular.extend(t.user,e)},!0)})}}}}function a(e){var r="https:";return{templateUrl:"ljUser.ng.tmpl",replace:!0,scope:!0,compile:function(n,t){var a=e(t.ljUserStatic),s=e(t.ljUserStaticId),u=e(t.ljUserStaticOptions);return function(e){var n=a(e),t=s(e),l=u(e)||{},i=l.journal_url||r+"//"+n+".livejournal.com/",c=r+"//"+n+".livejournal.com/profile";"zyalt"===n&&(c=i+"profile",n="varlamov.ru"),e.user={alias:"",display_name:l.display_name||n,display_username:l.display_username||n,id:t,is_invisible:!1,journal_url:i,journaltype:"P",profile_url:c,userhead_url:r+"//l-files.livejournal.net/userhead/default/"+t,username:n,noctxpopup:l.noctxpopup}}}}}function s(e,r){var n="https:";return{template:'\n ',scope:!0,compile:function(r,n){var t=e(n.ljUserAvatarStaticId),a=e(n.ljUserAvatarStaticOptions);return function(e){var r=t(e),n=a(e);e.user={id:r,"class":n["class"]||""}}}}}a.$inject=["$parse"],s.$inject=["$parse","$location"],angular.module("LJ.User",["LJ.Api","LJ.Templates","Users"]),angular.module("LJ.User").factory("ljUser",e).directive("ljUserById",t).directive("ljUserDynamic",r).directive("ljUserAvatarImg",n).directive("ljUserStatic",a).directive("ljUserAvatarStatic",s),e.$inject=["$rootScope","Api","$q","$templateCache","$compile","$timeout","Users"],r.$inject=["$parse","Users","ljUser"],n.$inject=["$parse","Users","ljUser"],t.$inject=["$parse","Users","ljUser"]}(); /* <<< file end: js/core/angular/ljUser.js */ //# map link was there [ljUser.js.map] /* >>> file start: js/widgets/likus.js */ function _defineProperty(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}var _extends=Object.assign||function(e){for(var n=1;n\n{{likus.formattedCount || likus.count}}\n\n\n
    \n\n\n'; LJ.injectStyle('/* >>> file start: stc/popup/popup-memories.css */\n.b-addtomemories{width:150px;margin:0;padding:0;text-align:left}.b-addtomemories-head{margin:0 0 .5em;padding:0;font:700 1.13em/1.1 Arial,sans-serif;color:#000}.b-addtomemories-intro{margin:0 0 .3em}.b-addtomemories-items{margin:0;padding:0;list-style:none}.b-addtomemories-item{margin:0;padding:0}.b-addtomemories-label{display:block;margin:0 -5px;padding:5px;cursor:pointer}.b-addtomemories-item:hover .b-addtomemories-label{background:#C8E6FF}.b-addtomemories-footer{margin:1em 0}.b-addtomemories-options{margin:.3em -5px 0;padding:.3em 5px 0;border-top:1px solid #DAE3E6}.b-addtomemories-loading{background:url(/img/preloader/preloader-blue-gray.gif?v=16423) 50% 50% no-repeat}.b-addtomemories-loading .b-addtomemories-footer,.b-addtomemories-loading .b-addtomemories-head,.b-addtomemories-loading .b-addtomemories-intro,.b-addtomemories-loading .b-addtomemories-items,.b-addtomemories-loading .b-addtomemories-options{visibility:hidden}\n/* <<< file end: stc/popup/popup-memories.css */\n\n/*# sourceMappingURL=popup-memories.css.map */\n'); !function(e){angular.module("LJ.Memories",["LJ.Bubble","LJ.Api"]).directive("ljMemories",["$parse","$timeout","Bubble",function(o,i,t){return{scope:{ljMemories:"&"},link:function(o,i){function n(n){n.preventDefault(),t.open("memories",r,e(i)),o.$apply()}var r="function"==typeof o.ljMemories?o.ljMemories({element:i}):o.ljMemories;t.exists("memories")||t.register({name:"memories",template:"memories.ng.tmpl",disableClick:!0,closeOnScroll:r.closeOnScroll}),i.on("click",n),o.$on("$destroy",function(){i.off("click",n)})}}}]).controller("MemoriesCtrl",["$scope","Api",function(o,i){var t=o.bubble;o.security=null,o.$watch("removeButton",function(){e(window).trigger("resize")}),o.$on("bubble:open:memories",function(){i.call("memories.get",t.options,function(e){o.security=e.result?e.result.security:null,o.removeButton=Boolean(o.security)})}),o.$on("bubble:close:memories",function(){o.removeButton=!1}),o.siteroot=LJ.get("siteroot"),o.update=function(){var e=t.options.title.decodeHTML(),n=e.indexOf(t.options.journal+":")?t.options.journal+": "+e:e;i.call("memories.set",{journal:t.options.journal,ditemid:t.options.ditemid,description:n,security:o.security},function(e){o.security=e,t.close(),o.removeButton=!0})},o.remove=function(){var e=t.options.ditemid;i.call("memories.remove",{journal:t.options.journal,ditemid:t.options.ditemid},function(){o.security=null,t.close(),o.removeButton=!1,LJ.Event.trigger("memories:remove",e)})},LJ.Event.on("api:request:change",function(e,i){/^memories/.test(e)&&(o.loading=i)})}])}(jQuery); /* <<< file end: js/core/angular/ljMemories.js */ //# map link was there [ljMemories.js.map] /* >>> file start: js/core/angular/ljEmbed.js */ //= require js/core/angular/api.js Site.page.template['angular/embed.ng.tmpl'] = '\n
    \n \n
    \n

    \n \n
    \n \n \n \n
    \n
    \n
    \n \n
    \n \n \n
    \n\n\n'; //= require_ml embed.post.btn.copy //= require_ml embed.post.btn.copy_to_post //= require_ml embed.post.title //= require_ml embed.post.desc !function(){function e(){return{scope:!0,templateUrl:"embed.ng.tmpl",controllerAs:"embed",controller:n}}function n(e,n,t,r){function a(n){n.data&&n.data.height&&(o.height=n.data.height,o.spinner=!1,o.code=l(o.plainUrl,o.width,o.height),e.$$phase||e.$apply())}function l(e,n,t){return''}var o=this,i="ljembed-bubble--full",d=angular.element("body");o.show=!1,o.spinner=!0,o.width=502,o.height=252,o.fader=angular.element("[lj-embed-share]"),o.fader.on("click",function(n){return n.target!==n.currentTarget?!1:(o.close(n),void e.$apply())}),o.close=function(e){e&&e.preventDefault(),d.removeClass(i),o.show=!1,o.spinner=!0,o.width=502,o.height=252,t.removeEventListener("message",a)},o.copy=function(e){e&&e.preventDefault();var n=angular.element(".ljembed-bubble__code")[0];n.select();try{return document.execCommand("copy")}catch(t){return console.warn("Copy to clipboard failed.",t),!1}},o.copyToPost=function(){var e=encodeURIComponent(angular.element(".ljembed-bubble__code").val()),n=LJ.get("siteroot")+"/update.bml?event="+e;t.open(n,"_blank")},LJ.Event.on("lj:embed",function(e){d.addClass(i),o.show=!0,o.pre=!0,o.plainUrl=e,o.url=r.trustAsResourceUrl(e),o.code=l(o.plainUrl,o.width,o.height),n(function(){o.pre=!1,t.addEventListener("message",a)},0)})}n.$inject=["$scope","$timeout","$window","$sce"],angular.module("LJ.Embed",["LJ.Directives","LJ.Api"]).run(function(){angular.element("body").addClass("j-p-embed"),angular.element("[ng-app]").append("
    ")}).directive("ljEmbedShare",e)}(jQuery); /* <<< file end: js/core/angular/ljEmbed.js */ //# map link was there [ljEmbed.js.map] /* >>> file start: js/core/angular/share.js */ //= require js/core/angular/bubble.js //= require js/core/string.js Site.page.template['angular/share.ng.tmpl'] = '

    \n\n\n \n \n \n \n {{service.title}}\n \n \n \n \n\n \n \n \n \n \n \n \n \n \n \n \n'; //= require_ml sharing.popup.title !function(e){return e}(),function(){"use strict";angular.module("LJ.Share",["LJ.Directives","LJ.Templates","LJ.Bubble"]).config(["$compileProvider",function(e){e.aHrefSanitizationWhitelist(/^\s*(https?|viber):/)}]).directive("ljShare",["Bubble",function(e){return{restrict:"A",scope:!0,link:function(t,r,i){function l(){e.open("share",{params:a,services:n},r),t.$evalAsync()}var a=t.$eval(i.ljShare),n=t.$eval(i.ljShareServices),o=t.$eval(i.ljShareServicesExclude);if(n=n?LJ.String.smartSplit(n):LJ.Social.Share.services(),o=o?LJ.String.smartSplit(o):[],o.length&&(n=n.filter(function(e){return-1===o.indexOf(e)})),n.length){var s=e.register({name:"share",template:"share.ng.tmpl",alwaysBottom:a.alwaysBottom,recalculateOnScroll:i.hasOwnProperty("ljShareScrollable")});r.on("click",l),t.$on("$destroy",function(){r.off("click",l),s()})}}}}]).controller("ShareBubbleCtrl",["$scope","Bubble",function(e,t){var r=this,i=r;this.ljRepostFlag=LJ.Flags.isEnabled("lj_repost"),e.isAdvState=!1,e.$on("bubble:open:share",function(){i.version=LJ.Flags.isEnabled("adaptive_lj_mobile")?"v4":"v3",i.services=e.bubble.options.services.map(function(t){return{name:t,link:LJ.Social.Share.getUrl(t,e.bubble.options.params),title:LJ.Social.Share.getTitle(t)}}),r.entryUrl=e.bubble.options.params.url}),e.isToogleAdv=function(){e.isAdvState=!e.isAdvState},i.openPopup=function(e,r,i){return LJ.Social.Share.isTab(r)?void t.close("share"):(e.preventDefault(),LJ.Social.Share.openPopup(r,i),void t.close("share"))}}])}(); /* <<< file end: js/core/angular/share.js */ //# map link was there [share.js.map] /* >>> file start: js/core/angular/components/colMen2018.js */ var _extends=Object.assign||function(e){for(var t=1;tv;l.toggleClass(f,g),g&&(v-=C);var p=function(){for(var e=-1,t=0,i=L[0];v>=i&&n>=e+2;)e++,t=i,i=t+L[e+1];return e}();c(h,p),d(m,p)}function c(e,t){return-1===t?void e.hide():void e.show().filter(":gt("+t+")").hide()}function d(e,t){return-1===t?void e.show():void e.hide().filter(":gt("+t+")").show()}function u(){var e,n=!1;!LJ.Support.isMobile()&&LJ.Support.touch?p.click(function(e){n=!n,p.toggleClass(v,n),e.stopImmediatePropagation()}):p.on("mouseenter",function(){n||(p.addClass(v),n=!0,D()),t.cancel(e)}).on("mouseleave",function(){n&&(e=t(function(){p.removeClass(v),n=!1},500))}),angular.element("body").click(function(){n=!1,p.removeClass(v)}),angular.element(window).on("keydown",function(e){e.key&&"tab"===e.key.toLowerCase()&&angular.element(":focus")[0]===p.find("a")[0]&&(p.addClass(v),n=!0)})}var f="categories__wrap-outer--expandable",v="categories__item--more-open",g=angular.element(e),h=l.find(".js--item"),p=l.find(".js--more-item"),m=h.clone(!0).appendTo(p.find("ul")),w=0,C=0,L=[],k=void 0,b=40,j="morePopupButton",_="sideArrows",y=16,M=LJ.Support.isMobile()?_:j,B={itemLinkClickHandler:function(){}},R=_extends({},B,r.directiveOptions);h.find("a").add(m.find("a")).on("click",function(e){R.itemLinkClickHandler(e)});var W=l.find(".js--list-with-ballast"),A=l.find(".js--limited-list"),I=l.find(".js--sideblock.js--right"),S=l.find(".js--arrow-button"),x=(n.find(".mainpage__category .js--content-container"),!!I[0]),J=!x,O=i({jQButtons:S,scrollableNode:A[0]}),T=LJ.Function.debounce(O.doScrollChangeTracking,150);A.on("touchmove",T);var D=function(){var t=p[0].getBoundingClientRect(),n=e.innerWidth-t.right,i=l.find(".js--dropdown-popup"),o=i.find(".js--arrow"),r=i[0].getBoundingClientRect(),a=r.width,s=-(a/2+3),c=25,d=a/2+c-n;d>0?i.css({right:s+d}):i.css({right:s});var u={pos:{popupCenterAligned:{left:a/2-20}}};if(d>0){var f=15,v=a/2-f;d>v?o.css({display:"none"}):o.css({display:"",left:u.pos.popupCenterAligned.left+d})}else o.css({display:"",left:u.pos.popupCenterAligned.left})},E=function(){var t=16,n=1400;return Math.min(n,e.innerWidth-2*t)},N=function(){k=E(),s();var t=A[0].scrollLeft;A.css({left:"",width:""});var n=void 0,i=void 0,o=void 0,r=void 0;x?(o=I[0].getBoundingClientRect(),r=o.width+b):(o={width:0,left:0},r=0);var a=l[0].getBoundingClientRect(),c=Math.min(a.width,k),d=Math.max((a.width-k)/2,0),u=A[0].getBoundingClientRect(),f=Math.max(e.innerWidth-u.width,0),v=W[0].getBoundingClientRect(),g=Math.max(e.innerWidth-v.width,0);if(M===_){S.show();var p=S.toArray().map(function(e){return angular.element(e).width()}).reduce(function(e,t){return e+t},0),m=0>=c-r-w;m||!x?(x&&(h.last().after(I),I.css({position:"relative",right:""})),n=Math.min(a.width,k),i=n-p+2*y,J?W.css({left:g/2}):W.css({left:d-y})):(S.hide(),W.after(I),I.css({position:"",right:d}),i="",W.css({left:d})),A.css({width:i,overflow:"auto"}),A[0].scrollLeft=t}else J?W.css({left:f/2}):(W.css({left:d}),I.css({right:d})),S.hide()},P=function(){if(M===_){var e=A[0].querySelector(".categories__link--active");if(e){var t=e.closest(".js--item");o.scrollAlign({targetItemNode:t})}}};t(function(){a(),N(),u(),P(),O.updateLook(),W.css({opacity:""}),l.css("visibility","");var e=g[0].innerWidth;g.on("resize",function(){var t=g[0].innerWidth;e!==t&&(N(),O.updateLook(),e=t)})}),r.redraw=s,r.remeasure=a}return{link:r,scope:{directiveOptions:"=colMen2018"}}}function t(){var e={};return e.highlightItem=function(e){var t=angular.element(e);t.closest(".js--limited-list").find(".categories__link").removeClass("categories__link--active"),t.find("a").addClass("categories__link--active")},e.scrollAlign=function(){var e=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],t=e.targetItemNode;if(t){var n=t.getBoundingClientRect(),i=t.closest(".js--limited-list"),o=i.getBoundingClientRect(),r=i.querySelector(".js--item"),l=r.getBoundingClientRect(),a=n.left-l.left,s=o.width/2,c=n.width/2,d=a-s+c;i.scrollLeft=d}},e}e.$inject=["$window","$timeout","$document","collapsibleMenuService"],angular.module("LJ.Components.CollapsibleMenu2018",[]),angular.module("LJ.Components.CollapsibleMenu2018").directive("colMen2018",e).factory("collapsibleMenuService",t);var n=LJ.Util.getWindow(),i=function(e){var t=e.jQButtons,i=e.scrollableNode,o=10,r=.5,l=16,a=void 0,s=void 0,c=void 0,d=void 0,u=t.filter(".js--left"),f=t.filter(".js--right"),v=function(){var e=i.scrollLeft;u[0].classList.toggle("categories__nav-btn--lim",0===e);var t=i.getBoundingClientRect(),n=i.scrollWidth-t.width-e;f[0].classList.toggle("categories__nav-btn--lim",Math.abs(n)<1.5)};v();var g=function(){if(!d){var e=i.scrollLeft,t=function(){var t=i.scrollLeft;t===e&&(v(),clearInterval(d),d=null),e=i.scrollLeft};d=setInterval(t,100)}},h=void 0;return t.on("mousedown touchstart",function(e){e.preventDefault();var t=this.classList.contains("js--right");a=(t?1:-1)*o;var d=160,u=200,f=Date.now(),v=void 0;setTimeout(function(){v=!0},u),clearTimeout(h);var p=function w(){if(v)a=0;else{var e=Date.now()-f;h=setTimeout(function(){a=0},d-e)}n.removeEventListener("mouseup",w),n.removeEventListener("touchend",w)};if(n.addEventListener("mouseup",p),n.addEventListener("touchend",p),!c){s=0;var m=function(){s=s*r+a,i.scrollLeft+=s,Math.abs(s)<.5&&(clearInterval(c),c=null)};c=setInterval(m,l),g()}}),t.on("mouseup mousemove touchend touchmove click",function(e){e.preventDefault()}),{doScrollChangeTracking:g,updateLook:v}}}(); /* <<< file end: js/core/angular/components/colMen2018.js */ //# map link was there [colMen2018.js.map] /* >>> file start: js/lib/jquery.qrcode.min.js */ !function(t){t.fn.qrcode=function(e){function r(t){this.mode=u,this.data=t}function o(t,e){this.typeNumber=t,this.errorCorrectLevel=e,this.modules=null,this.moduleCount=0,this.dataCache=null,this.dataList=[]}function n(t,e){if(void 0==t.length)throw Error(t.length+"/"+e);for(var r=0;rt||this.moduleCount<=t||0>e||this.moduleCount<=e)throw Error(t+","+e);return this.modules[t][e]},getModuleCount:function(){return this.moduleCount},make:function(){if(1>this.typeNumber){for(var t=1,t=1;40>t;t++){for(var e=i.getRSBlocks(t,this.errorCorrectLevel),r=new s,o=0,n=0;n=r;r++)if(!(-1>=t+r||this.moduleCount<=t+r))for(var o=-1;7>=o;o++)-1>=e+o||this.moduleCount<=e+o||(this.modules[t+r][e+o]=r>=0&&6>=r&&(0==o||6==o)||o>=0&&6>=o&&(0==r||6==r)||r>=2&&4>=r&&o>=2&&4>=o)},getBestMaskPattern:function(){for(var t=0,e=0,r=0;8>r;r++){this.makeImpl(!0,r);var o=a.getLostPoint(this);(0==r||t>o)&&(t=o,e=r)}return e},createMovieClip:function(t,e,r){for(t=t.createEmptyMovieClip(e,r),this.make(),e=0;e=i;i++)for(var s=-2;2>=s;s++)this.modules[o+i][n+s]=-2==i||2==i||-2==s||2==s||0==i&&0==s}},setupTypeNumber:function(t){for(var e=a.getBCHTypeNumber(this.typeNumber),r=0;18>r;r++){var o=!t&&1==(e>>r&1);this.modules[Math.floor(r/3)][r%3+this.moduleCount-8-3]=o}for(r=0;18>r;r++)o=!t&&1==(e>>r&1),this.modules[r%3+this.moduleCount-8-3][Math.floor(r/3)]=o},setupTypeInfo:function(t,e){for(var r=a.getBCHTypeInfo(this.errorCorrectLevel<<3|e),o=0;15>o;o++){var n=!t&&1==(r>>o&1);6>o?this.modules[o][8]=n:8>o?this.modules[o+1][8]=n:this.modules[this.moduleCount-15+o][8]=n}for(o=0;15>o;o++)n=!t&&1==(r>>o&1),8>o?this.modules[8][this.moduleCount-o-1]=n:9>o?this.modules[8][15-o-1+1]=n:this.modules[8][15-o-1]=n;this.modules[this.moduleCount-8][8]=!t},mapData:function(t,e){for(var r=-1,o=this.moduleCount-1,n=7,i=0,s=this.moduleCount-1;s>0;s-=2)for(6==s&&s--;;){for(var u=0;2>u;u++)if(null==this.modules[o][s-u]){var h=!1;i>>n&1)),a.getMask(e,o,s-u)&&(h=!h),this.modules[o][s-u]=h,n--,-1==n&&(i++,n=7)}if(o+=r,0>o||this.moduleCount<=o){o-=r,r=-r;break}}}},o.PAD0=236,o.PAD1=17,o.createData=function(t,e,r){for(var e=i.getRSBlocks(t,e),n=new s,u=0;u8*t)throw Error("code length overflow. ("+n.getLengthInBits()+">"+8*t+")");for(n.getLengthInBits()+4<=8*t&&n.put(0,4);0!=n.getLengthInBits()%8;)n.putBit(!1);for(;!(n.getLengthInBits()>=8*t)&&(n.put(o.PAD0,8),!(n.getLengthInBits()>=8*t));)n.put(o.PAD1,8);return o.createBytes(n,e)},o.createBytes=function(t,e){for(var r=0,o=0,i=0,s=Array(e.length),u=Array(e.length),h=0;h=0?l.get(g):0}for(f=h=0;ff;f++)for(h=0;hf;f++)for(h=0;h>>=1;return e},getPatternPosition:function(t){return a.PATTERN_POSITION_TABLE[t-1]},getMask:function(t,e,r){switch(t){case 0:return 0==(e+r)%2;case 1:return 0==e%2;case 2:return 0==r%3;case 3:return 0==(e+r)%3;case 4:return 0==(Math.floor(e/2)+Math.floor(r/3))%2;case 5:return 0==e*r%2+e*r%3;case 6:return 0==(e*r%2+e*r%3)%2;case 7:return 0==(e*r%3+(e+r)%2)%2;default:throw Error("bad maskPattern:"+t)}},getErrorCorrectPolynomial:function(t){for(var e=new n([1],0),r=0;t>r;r++)e=e.multiply(new n([1,h.gexp(r)],0));return e},getLengthInBits:function(t,e){if(e>=1&&10>e)switch(t){case 1:return 10;case 2:return 9;case u:return 8;case 8:return 8;default:throw Error("mode:"+t)}else if(27>e)switch(t){case 1:return 12;case 2:return 11;case u:return 16;case 8:return 10;default:throw Error("mode:"+t)}else{if(!(41>e))throw Error("type:"+e);switch(t){case 1:return 14;case 2:return 13;case u:return 16;case 8:return 12;default:throw Error("mode:"+t)}}},getLostPoint:function(t){for(var e=t.getModuleCount(),r=0,o=0;e>o;o++)for(var n=0;e>n;n++){for(var i=0,s=t.isDark(o,n),u=-1;1>=u;u++)if(!(0>o+u||o+u>=e))for(var a=-1;1>=a;a++)0>n+a||n+a>=e||0==u&&0==a||s==t.isDark(o+u,n+a)&&i++;i>5&&(r+=3+i-5)}for(o=0;e-1>o;o++)for(n=0;e-1>n;n++)i=0,t.isDark(o,n)&&i++,t.isDark(o+1,n)&&i++,t.isDark(o,n+1)&&i++,t.isDark(o+1,n+1)&&i++,(0==i||4==i)&&(r+=3);for(o=0;e>o;o++)for(n=0;e-6>n;n++)t.isDark(o,n)&&!t.isDark(o,n+1)&&t.isDark(o,n+2)&&t.isDark(o,n+3)&&t.isDark(o,n+4)&&!t.isDark(o,n+5)&&t.isDark(o,n+6)&&(r+=40);for(n=0;e>n;n++)for(o=0;e-6>o;o++)t.isDark(o,n)&&!t.isDark(o+1,n)&&t.isDark(o+2,n)&&t.isDark(o+3,n)&&t.isDark(o+4,n)&&!t.isDark(o+5,n)&&t.isDark(o+6,n)&&(r+=40);for(n=i=0;e>n;n++)for(o=0;e>o;o++)t.isDark(o,n)&&i++;return t=Math.abs(100*i/e/e-50)/5,r+10*t}},h={glog:function(t){if(1>t)throw Error("glog("+t+")");return h.LOG_TABLE[t]},gexp:function(t){for(;0>t;)t+=255;for(;t>=256;)t-=255;return h.EXP_TABLE[t]},EXP_TABLE:Array(256),LOG_TABLE:Array(256)},l=0;8>l;l++)h.EXP_TABLE[l]=1<l;l++)h.EXP_TABLE[l]=h.EXP_TABLE[l-4]^h.EXP_TABLE[l-5]^h.EXP_TABLE[l-6]^h.EXP_TABLE[l-8];for(l=0;255>l;l++)h.LOG_TABLE[h.EXP_TABLE[l]]=l;return n.prototype={get:function(t){return this.num[t]},getLength:function(){return this.num.length},multiply:function(t){for(var e=Array(this.getLength()+t.getLength()-1),r=0;rthis.getLength()-t.getLength())return this;for(var e=h.glog(this.get(0))-h.glog(t.get(0)),r=Array(this.getLength()),o=0;os;s++)for(var u=r[3*s+0],a=r[3*s+1],h=r[3*s+2],l=0;u>l;l++)n.push(new i(a,h));return n},i.getRsBlockTable=function(t,e){switch(e){case 1:return i.RS_BLOCK_TABLE[4*(t-1)+0];case 0:return i.RS_BLOCK_TABLE[4*(t-1)+1];case 3:return i.RS_BLOCK_TABLE[4*(t-1)+2];case 2:return i.RS_BLOCK_TABLE[4*(t-1)+3]}},s.prototype={get:function(t){return 1==(this.buffer[Math.floor(t/8)]>>>7-t%8&1)},put:function(t,e){for(var r=0;e>r;r++)this.putBit(1==(t>>>e-r-1&1))},getLengthInBits:function(){return this.length},putBit:function(t){var e=Math.floor(this.length/8);this.buffer.length<=e&&this.buffer.push(0),t&&(this.buffer[e]|=128>>>this.length%8),this.length++}},"string"==typeof e&&(e={text:e}),e=t.extend({},{render:"canvas",width:256,height:256,typeNumber:-1,correctLevel:2,background:"#ffffff",foreground:"#000000"},e),this.each(function(){var r;if("canvas"==e.render){r=new o(e.typeNumber,e.correctLevel),r.addData(e.text),r.make();var n=document.createElement("canvas");n.width=e.width,n.height=e.height;for(var i=n.getContext("2d"),s=e.width/r.getModuleCount(),u=e.height/r.getModuleCount(),a=0;a").css("width",e.width+"px").css("height",e.height+"px").css("border","0px").css("border-collapse","collapse").css("background-color",e.background),i=e.width/r.getModuleCount(),s=e.height/r.getModuleCount(),u=0;u").css("height",s+"px").appendTo(n),h=0;h").css("width",i+"px").css("background-color",r.isDark(u,h)?e.foreground:e.background).appendTo(a);r=n,jQuery(r).appendTo(this)})}}(jQuery); /* <<< file end: js/lib/jquery.qrcode.min.js */ //# map link was there [jquery.qrcode.min.js.map] /* >>> file start: js/widgets/angular/mediusCardPager.js */ !function(){"use strict";function e(){function e(e,r,n,t){var i="[medius-card-pager-next]",l="[medius-card-pager-list]",a="medius-card-pager-disable-arrow-class",s="[medius-card-pager-prev]";t.list=r.find(l),t.nextEl=r.find(i),t.prevEl=r.find(s),t.nextEl.on("click",t.next),t.prevEl.on("click",t.prev),t.arrowDisableClass=t.nextEl.attr(a)||t.prevEl.attr(a),t.init()}return{scope:!0,restrict:"AE",controller:"mediusCardPagerCtrl",controllerAs:"pager",link:e}}function r(e,r,n){function t(e,r){e&&e.toggleClass(C.arrowDisableClass,!!r)}function i(){c=C.list.children().outerWidth(),v=C.list.width(),p=C.list.children().length,g=c*p,e.$watch(u,t.bind(null,C.nextEl)),e.$watch(d,t.bind(null,C.prevEl))}function l(){if(f||u())return void t(C.nextEl,u());if(!(v>=g)){var e=g-v+h;if(e>v){var r=2*c;E.push(r),h-=r}else E.push(e),h-=e;o(h)}}function a(){f=!1,t(C.nextEl,u()),t(C.prevEl,d())}function s(){if(f||d())return void t(C.prevEl,d());var e=E.pop();h+=e,o(h)}function u(){var e=void 0,n=C.list.children();return w>=n.length?!0:(e=n.last(),e.length?e.offset().left+c<=r.innerWidth:!0)}function d(){return!E.length}function o(e){f=!0,C.list.css({marginLeft:e}),n(a,m),n(a,2*m)}var c=0,f=!1,p=0,g=0,v=0,h=0,E=[],m=800,w=0,C=this;C.init=i,C.next=l,C.prev=s,jQuery(window).resize(LJ.Function.debounce(function(){v=C.list.parent().width(),a()},400))}r.$inject=["$scope","$window","$timeout"],angular.module("Medius.CardPager",[]),angular.module("Medius.CardPager").controller("mediusCardPagerCtrl",r).directive("mediusCardPager",e)}(); /* <<< file end: js/widgets/angular/mediusCardPager.js */ //# map link was there [mediusCardPager.js.map] /* >>> file start: js/widgets/angular/mediusSubscribe.js */ //!= require js/core/angular/messages.js //= require_ml medius.subscribe.banner.title //= require_ml medius.subscribe.banner.text //= require_ml medius.subscribe.button.text //= require_ml medius.subscribe.subscribed //= require_ml medius.footer.newsletter //= require_ml medius.main.subscription.text //= require_ml medius.main.subscription.success //= require_ml medius.main.subscription //= require_ml schemius.medius.subscribe //= require_ml schemius.medius.subscribetonews //= require_ml schemius.medius.dailynewsletter //= require_ml schemius.medius.youremail //= require_ml schemius.medius.subscribed //= require_ml schemius.medius.unsubscribe Site.page.template['Widgets/Medius/subscribe.tmpl'] = '\n\n
    \n

    \n
    \n

    \n

    \n
    \n
    \n \n
    \n
    \n'; Site.page.template['Widgets/Medius/subscribe137.tmpl'] = '\n\n
    \n
    \n \n \n \n \n \n \n
    \n
    \n'; Site.page.template['Widgets/Medius/schemius_header_subscribe.tmpl'] = '\n \n\n\n\n\n \n \n \n\n \n \n \n \n\n'; !function(){"use strict";function e(e,i){function s(i){return LJ.get("is_subscribed")?void 0:LJ.get("remote")?e.call("discovery.subscribe",null,{silent:!0}).then(r.hideWidget)["catch"](t):LJ.Util.Action.login(i)}function t(e){var s=e.message;"Access Denied"===s?LJ.Util.Action.login():i.add({type:"error",body:s})}var r=this;r["do"]=s}function i(){function e(e,i,s,t){var r=LJ.get("is_subscribed");return t.widget=i,t.hideWidget=function(e){var i=e.status;"OK"===i&&t.widget.addClass("stories__subscription--hidden")},r||angular.isUndefined(r)?t.hideWidget({status:"OK"}):void 0}return{restrict:"AE",templateUrl:"subscribe.tmpl",controller:"mediusSubscribeCtrl",controllerAs:"subscribe",link:e}}function s(e){function i(i,s,t,r){var u=LJ.get("is_subscribed");return r.widget=s,r.hideWidget=function(i){var s=i.status;"OK"===s&&(r.subscribed=!0,e(function(){r.hide=!0},3e3))},u||angular.isUndefined(u)?r.hideWidget({status:"OK"}):void 0}return{restrict:"AE",templateUrl:"subscribe137.tmpl",controller:"mediusSubscribeCtrl",controllerAs:"subscribe",link:i}}function t(e){function i(e,i,s,t){t.widget=i,t.subscribed=LJ.get("is_subscribed"),t.hideWidget=function(e){var i=e.status;"OK"===i&&(t.subscribed=!0)}}return{restrict:"AE",templateUrl:"schemius_header_subscribe.tmpl",controller:"mediusSubscribeCtrl",controllerAs:"subscribe",link:i}}e.$inject=["Api","Messages"],s.$inject=["$timeout"],t.$inject=["$timeout"],angular.module("Medius.Subscribe",["LJ.Messages","LJ.Api"]),angular.module("Medius.Subscribe").controller("mediusSubscribeCtrl",e).directive("mediusSubscribe",i).directive("mediusSubscribe137",s).directive("mediusSchemiusHeaderSubscribe",t),LJ.Flags.isEnabled("medius_schemius")&&angular.element(window.document).ready(function(){angular.bootstrap(".s-header-menu-subscription",["Medius.Subscribe"])})}(); /* <<< file end: js/widgets/angular/mediusSubscribe.js */ //# map link was there [mediusSubscribe.js.map] /* >>> file start: js/widgets/angular/mediusFooter.js */ !function(){function t(){function t(){u.list=angular.element(s),a=u.list.children().length}function e(){r()||(c++,i(-1*u.columnWidth))}function n(){o()||(c--,i(u.columnWidth))}function i(t){var e=u.list.css("marginLeft");e=Number(e.toString().match(/(-?\d+)/)[1]),u.list.animate({marginLeft:e+t},300)}function r(){return c===a-2}function o(){return!c}var u=this,l=".stories__categories-column",a=0,c=0,s=".stories__categories-list";u.next=e,u.prev=n,u.disableNext=r,u.disablePrev=o,Object.defineProperty(u,"columnWidth",{get:function(){return angular.element(l).width()}}),t()}angular.module("Medius.Footer",[]),angular.module("Medius.Footer").controller("MediusFooterCategoriesCtrl",t)}(); /* <<< file end: js/widgets/angular/mediusFooter.js */ //# map link was there [mediusFooter.js.map] /* >>> file start: js/node_modules/moment/min/moment.min.js */ var _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};!function(t,e){"object"==("undefined"==typeof exports?"undefined":_typeof(exports))&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):t.moment=e()}(this,function(){"use strict";function t(){return Pn.apply(null,arguments)}function e(t){Pn=t}function n(t){return"[object Array]"===Object.prototype.toString.call(t)}function i(t){return t instanceof Date||"[object Date]"===Object.prototype.toString.call(t)}function r(t,e){var n,i=[];for(n=0;n0)for(n in Hn)i=Hn[n],r=e[i],"undefined"!=typeof r&&(t[i]=r);return t}function h(e){f(this,e),this._d=new Date(null!=e._d?e._d.getTime():NaN),Ln===!1&&(Ln=!0,t.updateOffset(this),Ln=!1)}function m(t){return t instanceof h||null!=t&&null!=t._isAMomentObject}function _(t){return 0>t?Math.ceil(t):Math.floor(t)}function y(t){var e=+t,n=0;return 0!==e&&isFinite(e)&&(n=_(e)),n}function p(t,e,n){var i,r=Math.min(t.length,e.length),s=Math.abs(t.length-e.length),o=0;for(i=0;r>i;i++)(n&&t[i]!==e[i]||!n&&y(t[i])!==y(e[i]))&&o++;return o+s}function g(){}function v(t){return t?t.toLowerCase().replace("_","-"):t}function D(t){for(var e,n,i,r,s=0;s0;){if(i=M(r.slice(0,e).join("-")))return i;if(n&&n.length>=e&&p(r,n,!0)>=e-1)break;e--}s++}return null}function M(t){var e=null;if(!In[t]&&"undefined"!=typeof module&&module&&module.exports)try{e=xn._abbr,require("locale/"+t),Y(e)}catch(n){}return In[t]}function Y(t,e){var n;return t&&(n="undefined"==typeof e?S(t):w(t,e),n&&(xn=n)),xn._abbr}function w(t,e){return null!==e?(e.abbr=t,In[t]=In[t]||new g,In[t].set(e),Y(t),In[t]):(delete In[t],null)}function S(t){var e;if(t&&t._locale&&t._locale._abbr&&(t=t._locale._abbr),!t)return xn;if(!n(t)){if(e=M(t))return e;t=[t]}return D(t)}function k(t,e){var n=t.toLowerCase();An[n]=An[n+"s"]=An[e]=t}function T(t){return"string"==typeof t?An[t]||An[t.toLowerCase()]:void 0}function b(t){var e,n,i={};for(n in t)s(t,n)&&(e=T(n),e&&(i[e]=t[n]));return i}function O(e,n){return function(i){return null!=i?(W(this,e,i),t.updateOffset(this,n),this):U(this,e)}}function U(t,e){return t._d["get"+(t._isUTC?"UTC":"")+e]()}function W(t,e,n){return t._d["set"+(t._isUTC?"UTC":"")+e](n)}function C(t,e){var n;if("object"==("undefined"==typeof t?"undefined":_typeof(t)))for(n in t)this.set(n,t[n]);else if(t=T(t),"function"==typeof this[t])return this[t](e);return this}function G(t,e,n){var i=""+Math.abs(t),r=e-i.length,s=t>=0;return(s?n?"+":"":"-")+Math.pow(10,Math.max(0,r)).toString().substr(1)+i}function F(t,e,n,i){var r=i;"string"==typeof i&&(r=function(){return this[i]()}),t&&(jn[t]=r),e&&(jn[e[0]]=function(){return G(r.apply(this,arguments),e[1],e[2])}),n&&(jn[n]=function(){return this.localeData().ordinal(r.apply(this,arguments),t)})}function P(t){return t.match(/\[[\s\S]/)?t.replace(/^\[|\]$/g,""):t.replace(/\\/g,"")}function x(t){var e,n,i=t.match(zn);for(e=0,n=i.length;n>e;e++)jn[i[e]]?i[e]=jn[i[e]]:i[e]=P(i[e]);return function(r){var s="";for(e=0;n>e;e++)s+=i[e]instanceof Function?i[e].call(r,t):i[e];return s}}function H(t,e){return t.isValid()?(e=L(e,t.localeData()),Zn[e]=Zn[e]||x(e),Zn[e](t)):t.localeData().invalidDate()}function L(t,e){function n(t){return e.longDateFormat(t)||t}var i=5;for(Nn.lastIndex=0;i>=0&&Nn.test(t);)t=t.replace(Nn,n),Nn.lastIndex=0,i-=1;return t}function I(t){return"function"==typeof t&&"[object Function]"===Object.prototype.toString.call(t)}function A(t,e,n){ri[t]=I(e)?e:function(t){return t&&n?n:e}}function z(t,e){return s(ri,t)?ri[t](e._strict,e._locale):new RegExp(N(t))}function N(t){return t.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(t,e,n,i,r){return e||n||i||r}).replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function Z(t,e){var n,i=e;for("string"==typeof t&&(t=[t]),"number"==typeof e&&(i=function(t,n){n[e]=y(t)}),n=0;ni;i++){if(r=a([2e3,i]),n&&!this._longMonthsParse[i]&&(this._longMonthsParse[i]=new RegExp("^"+this.months(r,"").replace(".","")+"$","i"),this._shortMonthsParse[i]=new RegExp("^"+this.monthsShort(r,"").replace(".","")+"$","i")),n||this._monthsParse[i]||(s="^"+this.months(r,"")+"|^"+this.monthsShort(r,""),this._monthsParse[i]=new RegExp(s.replace(".",""),"i")),n&&"MMMM"===e&&this._longMonthsParse[i].test(t))return i;if(n&&"MMM"===e&&this._shortMonthsParse[i].test(t))return i;if(!n&&this._monthsParse[i].test(t))return i}}function R(t,e){var n;return"string"==typeof e&&(e=t.localeData().monthsParse(e),"number"!=typeof e)?t:(n=Math.min(t.date(),V(t.year(),e)),t._d["set"+(t._isUTC?"UTC":"")+"Month"](e,n),t)}function B(e){return null!=e?(R(this,e),t.updateOffset(this,!0),this):U(this,"Month")}function Q(){return V(this.year(),this.month())}function X(t){var e,n=t._a;return n&&-2===d(t).overflow&&(e=n[ai]<0||n[ai]>11?ai:n[ui]<1||n[ui]>V(n[oi],n[ai])?ui:n[di]<0||n[di]>24||24===n[di]&&(0!==n[li]||0!==n[ci]||0!==n[fi])?di:n[li]<0||n[li]>59?li:n[ci]<0||n[ci]>59?ci:n[fi]<0||n[fi]>999?fi:-1,d(t)._overflowDayOfYear&&(oi>e||e>ui)&&(e=ui),d(t).overflow=e),t}function K(e){t.suppressDeprecationWarnings===!1&&"undefined"!=typeof console&&console.warn&&console.warn("Deprecation warning: "+e)}function tt(t,e){var n=!0;return o(function(){return n&&(K(t+"\n"+(new Error).stack),n=!1),e.apply(this,arguments)},e)}function et(t,e){_i[t]||(K(e),_i[t]=!0)}function nt(t){var e,n,i=t._i,r=yi.exec(i);if(r){for(d(t).iso=!0,e=0,n=pi.length;n>e;e++)if(pi[e][1].exec(i)){t._f=pi[e][0];break}for(e=0,n=gi.length;n>e;e++)if(gi[e][1].exec(i)){t._f+=(r[6]||" ")+gi[e][0];break}i.match(ei)&&(t._f+="Z"),Mt(t)}else t._isValid=!1}function it(e){var n=vi.exec(e._i);return null!==n?void(e._d=new Date(+n[1])):(nt(e),void(e._isValid===!1&&(delete e._isValid,t.createFromInputFallback(e))))}function rt(t,e,n,i,r,s,o){var a=new Date(t,e,n,i,r,s,o);return 1970>t&&a.setFullYear(t),a}function st(t){var e=new Date(Date.UTC.apply(null,arguments));return 1970>t&&e.setUTCFullYear(t),e}function ot(t){return at(t)?366:365}function at(t){return t%4===0&&t%100!==0||t%400===0}function ut(){return at(this.year())}function dt(t,e,n){var i,r=n-e,s=n-t.day();return s>r&&(s-=7),r-7>s&&(s+=7),i=Ut(t).add(s,"d"),{week:Math.ceil(i.dayOfYear()/7),year:i.year()}}function lt(t){return dt(t,this._week.dow,this._week.doy).week}function ct(){return this._week.dow}function ft(){return this._week.doy}function ht(t){var e=this.localeData().week(this);return null==t?e:this.add(7*(t-e),"d")}function mt(t){var e=dt(this,1,4).week;return null==t?e:this.add(7*(t-e),"d")}function _t(t,e,n,i,r){var s,o=6+r-i,a=st(t,0,1+o),u=a.getUTCDay();return r>u&&(u+=7),n=null!=n?1*n:r,s=1+o+7*(e-1)-u+n,{year:s>0?t:t-1,dayOfYear:s>0?s:ot(t-1)+s}}function yt(t){var e=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return null==t?e:this.add(t-e,"d")}function pt(t,e,n){return null!=t?t:null!=e?e:n}function gt(t){var e=new Date;return t._useUTC?[e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate()]:[e.getFullYear(),e.getMonth(),e.getDate()]}function vt(t){var e,n,i,r,s=[];if(!t._d){for(i=gt(t),t._w&&null==t._a[ui]&&null==t._a[ai]&&Dt(t),t._dayOfYear&&(r=pt(t._a[oi],i[oi]),t._dayOfYear>ot(r)&&(d(t)._overflowDayOfYear=!0),n=st(r,0,t._dayOfYear),t._a[ai]=n.getUTCMonth(),t._a[ui]=n.getUTCDate()),e=0;3>e&&null==t._a[e];++e)t._a[e]=s[e]=i[e];for(;7>e;e++)t._a[e]=s[e]=null==t._a[e]?2===e?1:0:t._a[e];24===t._a[di]&&0===t._a[li]&&0===t._a[ci]&&0===t._a[fi]&&(t._nextDay=!0,t._a[di]=0),t._d=(t._useUTC?st:rt).apply(null,s),null!=t._tzm&&t._d.setUTCMinutes(t._d.getUTCMinutes()-t._tzm),t._nextDay&&(t._a[di]=24)}}function Dt(t){var e,n,i,r,s,o,a;e=t._w,null!=e.GG||null!=e.W||null!=e.E?(s=1,o=4,n=pt(e.GG,t._a[oi],dt(Ut(),1,4).year),i=pt(e.W,1),r=pt(e.E,1)):(s=t._locale._week.dow,o=t._locale._week.doy,n=pt(e.gg,t._a[oi],dt(Ut(),s,o).year),i=pt(e.w,1),null!=e.d?(r=e.d,s>r&&++i):r=null!=e.e?e.e+s:s),a=_t(n,i,r,o,s),t._a[oi]=a.year,t._dayOfYear=a.dayOfYear}function Mt(e){if(e._f===t.ISO_8601)return void nt(e);e._a=[],d(e).empty=!0;var n,i,r,s,o,a=""+e._i,u=a.length,l=0;for(r=L(e._f,e._locale).match(zn)||[],n=0;n0&&d(e).unusedInput.push(o),a=a.slice(a.indexOf(i)+i.length),l+=i.length),jn[s]?(i?d(e).empty=!1:d(e).unusedTokens.push(s),E(s,i,e)):e._strict&&!i&&d(e).unusedTokens.push(s);d(e).charsLeftOver=u-l,a.length>0&&d(e).unusedInput.push(a),d(e).bigHour===!0&&e._a[di]<=12&&e._a[di]>0&&(d(e).bigHour=void 0),e._a[di]=Yt(e._locale,e._a[di],e._meridiem),vt(e),X(e)}function Yt(t,e,n){var i;return null==n?e:null!=t.meridiemHour?t.meridiemHour(e,n):null!=t.isPM?(i=t.isPM(n),i&&12>e&&(e+=12),i||12!==e||(e=0),e):e}function wt(t){var e,n,i,r,s;if(0===t._f.length)return d(t).invalidFormat=!0,void(t._d=new Date(NaN));for(r=0;rs)&&(i=s,n=e));o(t,n||e)}function St(t){if(!t._d){var e=b(t._i);t._a=[e.year,e.month,e.day||e.date,e.hour,e.minute,e.second,e.millisecond],vt(t)}}function kt(t){var e=new h(X(Tt(t)));return e._nextDay&&(e.add(1,"d"),e._nextDay=void 0),e}function Tt(t){var e=t._i,r=t._f;return t._locale=t._locale||S(t._l),null===e||void 0===r&&""===e?c({nullInput:!0}):("string"==typeof e&&(t._i=e=t._locale.preparse(e)),m(e)?new h(X(e)):(n(r)?wt(t):r?Mt(t):i(e)?t._d=e:bt(t),t))}function bt(e){var s=e._i;void 0===s?e._d=new Date:i(s)?e._d=new Date(+s):"string"==typeof s?it(e):n(s)?(e._a=r(s.slice(0),function(t){return parseInt(t,10)}),vt(e)):"object"==("undefined"==typeof s?"undefined":_typeof(s))?St(e):"number"==typeof s?e._d=new Date(s):t.createFromInputFallback(e)}function Ot(t,e,n,i,r){var s={};return"boolean"==typeof n&&(i=n,n=void 0),s._isAMomentObject=!0,s._useUTC=s._isUTC=r,s._l=n,s._i=t,s._f=e,s._strict=i,kt(s)}function Ut(t,e,n,i){return Ot(t,e,n,i,!1)}function Wt(t,e){var i,r;if(1===e.length&&n(e[0])&&(e=e[0]),!e.length)return Ut();for(i=e[0],r=1;rt&&(t=-t,n="-"),n+G(~~(t/60),2)+e+G(~~t%60,2)})}function Ht(t){var e=(t||"").match(ei)||[],n=e[e.length-1]||[],i=(n+"").match(Si)||["-",0,0],r=+(60*i[1])+y(i[2]);return"+"===i[0]?r:-r}function Lt(e,n){var r,s;return n._isUTC?(r=n.clone(),s=(m(e)||i(e)?+e:+Ut(e))-+r,r._d.setTime(+r._d+s),t.updateOffset(r,!1),r):Ut(e).local()}function It(t){return 15*-Math.round(t._d.getTimezoneOffset()/15)}function At(e,n){var i,r=this._offset||0;return null!=e?("string"==typeof e&&(e=Ht(e)),Math.abs(e)<16&&(e=60*e),!this._isUTC&&n&&(i=It(this)),this._offset=e,this._isUTC=!0,null!=i&&this.add(i,"m"),r!==e&&(!n||this._changeInProgress?ee(this,Bt(e-r,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,t.updateOffset(this,!0),this._changeInProgress=null)),this):this._isUTC?r:It(this)}function zt(t,e){return null!=t?("string"!=typeof t&&(t=-t),this.utcOffset(t,e),this):-this.utcOffset()}function Nt(t){return this.utcOffset(0,t)}function Zt(t){return this._isUTC&&(this.utcOffset(0,t),this._isUTC=!1,t&&this.subtract(It(this),"m")),this}function jt(){return this._tzm?this.utcOffset(this._tzm):"string"==typeof this._i&&this.utcOffset(Ht(this._i)),this}function Et(t){return t=t?Ut(t).utcOffset():0,(this.utcOffset()-t)%60===0}function Vt(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function qt(){if("undefined"!=typeof this._isDSTShifted)return this._isDSTShifted;var t={};if(f(t,this),t=Tt(t),t._a){var e=t._isUTC?a(t._a):Ut(t._a);this._isDSTShifted=this.isValid()&&p(t._a,e.toArray())>0}else this._isDSTShifted=!1;return this._isDSTShifted}function Jt(){return!this._isUTC}function $t(){return this._isUTC}function Rt(){return this._isUTC&&0===this._offset}function Bt(t,e){var n,i,r,o=t,a=null;return Pt(t)?o={ms:t._milliseconds,d:t._days,M:t._months}:"number"==typeof t?(o={},e?o[e]=t:o.milliseconds=t):(a=ki.exec(t))?(n="-"===a[1]?-1:1,o={y:0,d:y(a[ui])*n,h:y(a[di])*n,m:y(a[li])*n,s:y(a[ci])*n,ms:y(a[fi])*n}):(a=Ti.exec(t))?(n="-"===a[1]?-1:1,o={y:Qt(a[2],n),M:Qt(a[3],n),d:Qt(a[4],n),h:Qt(a[5],n),m:Qt(a[6],n),s:Qt(a[7],n),w:Qt(a[8],n)}):null==o?o={}:"object"==("undefined"==typeof o?"undefined":_typeof(o))&&("from"in o||"to"in o)&&(r=Kt(Ut(o.from),Ut(o.to)),o={},o.ms=r.milliseconds,o.M=r.months),i=new Ft(o),Pt(t)&&s(t,"_locale")&&(i._locale=t._locale),i}function Qt(t,e){var n=t&&parseFloat(t.replace(",","."));return(isNaN(n)?0:n)*e}function Xt(t,e){var n={milliseconds:0,months:0};return n.months=e.month()-t.month()+12*(e.year()-t.year()),t.clone().add(n.months,"M").isAfter(e)&&--n.months,n.milliseconds=+e-+t.clone().add(n.months,"M"),n}function Kt(t,e){var n;return e=Lt(e,t),t.isBefore(e)?n=Xt(t,e):(n=Xt(e,t),n.milliseconds=-n.milliseconds,n.months=-n.months),n}function te(t,e){return function(n,i){var r,s;return null===i||isNaN(+i)||(et(e,"moment()."+e+"(period, number) is deprecated. Please use moment()."+e+"(number, period)."),s=n,n=i,i=s),n="string"==typeof n?+n:n,r=Bt(n,i),ee(this,r,t),this}}function ee(e,n,i,r){var s=n._milliseconds,o=n._days,a=n._months;r=null==r?!0:r,s&&e._d.setTime(+e._d+s*i),o&&W(e,"Date",U(e,"Date")+o*i),a&&R(e,U(e,"Month")+a*i),r&&t.updateOffset(e,o||a)}function ne(t,e){var n=t||Ut(),i=Lt(n,this).startOf("day"),r=this.diff(i,"days",!0),s=-6>r?"sameElse":-1>r?"lastWeek":0>r?"lastDay":1>r?"sameDay":2>r?"nextDay":7>r?"nextWeek":"sameElse";return this.format(e&&e[s]||this.localeData().calendar(s,this,Ut(n)))}function ie(){return new h(this)}function re(t,e){var n;return e=T("undefined"!=typeof e?e:"millisecond"),"millisecond"===e?(t=m(t)?t:Ut(t),+this>+t):(n=m(t)?+t:+Ut(t),n<+this.clone().startOf(e))}function se(t,e){var n;return e=T("undefined"!=typeof e?e:"millisecond"),"millisecond"===e?(t=m(t)?t:Ut(t),+t>+this):(n=m(t)?+t:+Ut(t),+this.clone().endOf(e)e-s?(n=t.clone().add(r-1,"months"),i=(e-s)/(s-n)):(n=t.clone().add(r+1,"months"),i=(e-s)/(n-s)),-(r+i)}function le(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")}function ce(){var t=this.clone().utc();return 0e;e++)if(this._weekdaysParse[e]||(n=Ut([2e3,1]).day(e),i="^"+this.weekdays(n,"")+"|^"+this.weekdaysShort(n,"")+"|^"+this.weekdaysMin(n,""),this._weekdaysParse[e]=new RegExp(i.replace(".",""),"i")),this._weekdaysParse[e].test(t))return e}function Ne(t){var e=this._isUTC?this._d.getUTCDay():this._d.getDay();return null!=t?(t=He(t,this.localeData()),this.add(t-e,"d")):e}function Ze(t){var e=(this.day()+7-this.localeData()._week.dow)%7;return null==t?e:this.add(t-e,"d")}function je(t){return null==t?this.day()||7:this.day(this.day()%7?t:t-7)}function Ee(t,e){F(t,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),e)})}function Ve(t,e){return e._meridiemParse}function qe(t){return"p"===(t+"").toLowerCase().charAt(0)}function Je(t,e,n){return t>11?n?"pm":"PM":n?"am":"AM"}function $e(t,e){e[fi]=y(1e3*("0."+t))}function Re(){return this._isUTC?"UTC":""}function Be(){return this._isUTC?"Coordinated Universal Time":""}function Qe(t){return Ut(1e3*t)}function Xe(){return Ut.apply(null,arguments).parseZone()}function Ke(t,e,n){var i=this._calendar[t];return"function"==typeof i?i.call(e,n):i}function tn(t){var e=this._longDateFormat[t],n=this._longDateFormat[t.toUpperCase()];return e||!n?e:(this._longDateFormat[t]=n.replace(/MMMM|MM|DD|dddd/g,function(t){return t.slice(1)}),this._longDateFormat[t])}function en(){return this._invalidDate}function nn(t){return this._ordinal.replace("%d",t)}function rn(t){return t}function sn(t,e,n,i){var r=this._relativeTime[n];return"function"==typeof r?r(t,e,n,i):r.replace(/%d/i,t)}function on(t,e){var n=this._relativeTime[t>0?"future":"past"];return"function"==typeof n?n(e):n.replace(/%s/i,e)}function an(t){var e,n;for(n in t)e=t[n],"function"==typeof e?this[n]=e:this["_"+n]=e;this._ordinalParseLenient=new RegExp(this._ordinalParse.source+"|"+/\d{1,2}/.source)}function un(t,e,n,i){var r=S(),s=a().set(i,e);return r[n](s,t)}function dn(t,e,n,i,r){if("number"==typeof t&&(e=t,t=void 0),t=t||"",null!=e)return un(t,e,n,r);var s,o=[];for(s=0;i>s;s++)o[s]=un(t,s,n,r);return o}function ln(t,e){return dn(t,e,"months",12,"month")}function cn(t,e){return dn(t,e,"monthsShort",12,"month")}function fn(t,e){return dn(t,e,"weekdays",7,"day")}function hn(t,e){return dn(t,e,"weekdaysShort",7,"day")}function mn(t,e){return dn(t,e,"weekdaysMin",7,"day")}function _n(){var t=this._data;return this._milliseconds=Ri(this._milliseconds),this._days=Ri(this._days),this._months=Ri(this._months),t.milliseconds=Ri(t.milliseconds),t.seconds=Ri(t.seconds),t.minutes=Ri(t.minutes),t.hours=Ri(t.hours),t.months=Ri(t.months),t.years=Ri(t.years),this}function yn(t,e,n,i){var r=Bt(e,n);return t._milliseconds+=i*r._milliseconds,t._days+=i*r._days,t._months+=i*r._months,t._bubble()}function pn(t,e){return yn(this,t,e,1)}function gn(t,e){return yn(this,t,e,-1)}function vn(t){return 0>t?Math.floor(t):Math.ceil(t)}function Dn(){var t,e,n,i,r,s=this._milliseconds,o=this._days,a=this._months,u=this._data;return s>=0&&o>=0&&a>=0||0>=s&&0>=o&&0>=a||(s+=864e5*vn(Yn(a)+o),o=0,a=0),u.milliseconds=s%1e3,t=_(s/1e3),u.seconds=t%60,e=_(t/60),u.minutes=e%60,n=_(e/60),u.hours=n%24,o+=_(n/24),r=_(Mn(o)),a+=r,o-=vn(Yn(r)),i=_(a/12),a%=12,u.days=o,u.months=a,u.years=i,this}function Mn(t){return 4800*t/146097}function Yn(t){return 146097*t/4800}function wn(t){var e,n,i=this._milliseconds;if(t=T(t),"month"===t||"year"===t)return e=this._days+i/864e5,n=this._months+Mn(e),"month"===t?n:n/12;switch(e=this._days+Math.round(Yn(this._months)),t){case"week":return e/7+i/6048e5;case"day":return e+i/864e5;case"hour":return 24*e+i/36e5;case"minute":return 1440*e+i/6e4;case"second":return 86400*e+i/1e3;case"millisecond":return Math.floor(864e5*e)+i;default:throw new Error("Unknown unit "+t)}}function Sn(){return this._milliseconds+864e5*this._days+this._months%12*2592e6+31536e6*y(this._months/12)}function kn(t){return function(){return this.as(t)}}function Tn(t){return t=T(t),this[t+"s"]()}function bn(t){return function(){return this._data[t]}}function On(){return _(this.days()/7)}function Un(t,e,n,i,r){return r.relativeTime(e||1,!!n,t,i)}function Wn(t,e,n){var i=Bt(t).abs(),r=cr(i.as("s")),s=cr(i.as("m")),o=cr(i.as("h")),a=cr(i.as("d")),u=cr(i.as("M")),d=cr(i.as("y")),l=r0,l[4]=n,Un.apply(null,l)}function Cn(t,e){return void 0===fr[t]?!1:void 0===e?fr[t]:(fr[t]=e,!0)}function Gn(t){var e=this.localeData(),n=Wn(this,!t,e);return t&&(n=e.pastFuture(+this,n)),e.postformat(n)}function Fn(){var t,e,n,i=hr(this._milliseconds)/1e3,r=hr(this._days),s=hr(this._months);t=_(i/60),e=_(t/60),i%=60,t%=60,n=_(s/12),s%=12;var o=n,a=s,u=r,d=e,l=t,c=i,f=this.asSeconds();return f?(0>f?"-":"")+"P"+(o?o+"Y":"")+(a?a+"M":"")+(u?u+"D":"")+(d||l||c?"T":"")+(d?d+"H":"")+(l?l+"M":"")+(c?c+"S":""):"P0D"}var Pn,xn,Hn=t.momentProperties=[],Ln=!1,In={},An={},zn=/(\[[^\[]*\])|(\\)?(Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Q|YYYYYY|YYYYY|YYYY|YY|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,Nn=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,Zn={},jn={},En=/\d/,Vn=/\d\d/,qn=/\d{3}/,Jn=/\d{4}/,$n=/[+-]?\d{6}/,Rn=/\d\d?/,Bn=/\d{1,3}/,Qn=/\d{1,4}/,Xn=/[+-]?\d{1,6}/,Kn=/\d+/,ti=/[+-]?\d+/,ei=/Z|[+-]\d\d:?\d\d/gi,ni=/[+-]?\d+(\.\d{1,3})?/,ii=/[0-9]*['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+|[\u0600-\u06FF\/]+(\s*?[\u0600-\u06FF]+){1,2}/i,ri={},si={},oi=0,ai=1,ui=2,di=3,li=4,ci=5,fi=6;F("M",["MM",2],"Mo",function(){return this.month()+1}),F("MMM",0,0,function(t){return this.localeData().monthsShort(this,t)}),F("MMMM",0,0,function(t){return this.localeData().months(this,t)}),k("month","M"),A("M",Rn),A("MM",Rn,Vn),A("MMM",ii),A("MMMM",ii),Z(["M","MM"],function(t,e){e[ai]=y(t)-1}),Z(["MMM","MMMM"],function(t,e,n,i){var r=n._locale.monthsParse(t,i,n._strict);null!=r?e[ai]=r:d(n).invalidMonth=t});var hi="January_February_March_April_May_June_July_August_September_October_November_December".split("_"),mi="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),_i={};t.suppressDeprecationWarnings=!1;var yi=/^\s*(?:[+-]\d{6}|\d{4})-(?:(\d\d-\d\d)|(W\d\d$)|(W\d\d-\d)|(\d\d\d))((T| )(\d\d(:\d\d(:\d\d(\.\d+)?)?)?)?([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/,pi=[["YYYYYY-MM-DD",/[+-]\d{6}-\d{2}-\d{2}/],["YYYY-MM-DD",/\d{4}-\d{2}-\d{2}/],["GGGG-[W]WW-E",/\d{4}-W\d{2}-\d/],["GGGG-[W]WW",/\d{4}-W\d{2}/],["YYYY-DDD",/\d{4}-\d{3}/]],gi=[["HH:mm:ss.SSSS",/(T| )\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss",/(T| )\d\d:\d\d:\d\d/],["HH:mm",/(T| )\d\d:\d\d/],["HH",/(T| )\d\d/]],vi=/^\/?Date\((\-?\d+)/i;t.createFromInputFallback=tt("moment construction falls back to js Date. This is discouraged and will be removed in upcoming major release. Please refer to https://github.com/moment/moment/issues/1407 for more info.",function(t){t._d=new Date(t._i+(t._useUTC?" UTC":""))}),F(0,["YY",2],0,function(){return this.year()%100}),F(0,["YYYY",4],0,"year"),F(0,["YYYYY",5],0,"year"),F(0,["YYYYYY",6,!0],0,"year"),k("year","y"),A("Y",ti),A("YY",Rn,Vn),A("YYYY",Qn,Jn),A("YYYYY",Xn,$n),A("YYYYYY",Xn,$n),Z(["YYYYY","YYYYYY"],oi),Z("YYYY",function(e,n){n[oi]=2===e.length?t.parseTwoDigitYear(e):y(e)}),Z("YY",function(e,n){n[oi]=t.parseTwoDigitYear(e)}),t.parseTwoDigitYear=function(t){return y(t)+(y(t)>68?1900:2e3)};var Di=O("FullYear",!1);F("w",["ww",2],"wo","week"),F("W",["WW",2],"Wo","isoWeek"),k("week","w"),k("isoWeek","W"),A("w",Rn),A("ww",Rn,Vn),A("W",Rn),A("WW",Rn,Vn),j(["w","ww","W","WW"],function(t,e,n,i){e[i.substr(0,1)]=y(t)});var Mi={dow:0,doy:6};F("DDD",["DDDD",3],"DDDo","dayOfYear"),k("dayOfYear","DDD"),A("DDD",Bn),A("DDDD",qn),Z(["DDD","DDDD"],function(t,e,n){n._dayOfYear=y(t)}),t.ISO_8601=function(){};var Yi=tt("moment().min is deprecated, use moment.min instead. https://github.com/moment/moment/issues/1548",function(){var t=Ut.apply(null,arguments);return this>t?this:t}),wi=tt("moment().max is deprecated, use moment.max instead. https://github.com/moment/moment/issues/1548",function(){var t=Ut.apply(null,arguments);return t>this?this:t});xt("Z",":"),xt("ZZ",""),A("Z",ei),A("ZZ",ei),Z(["Z","ZZ"],function(t,e,n){n._useUTC=!0,n._tzm=Ht(t)});var Si=/([\+\-]|\d\d)/gi;t.updateOffset=function(){};var ki=/(\-)?(?:(\d*)\.)?(\d+)\:(\d+)(?:\:(\d+)\.?(\d{3})?)?/,Ti=/^(-)?P(?:(?:([0-9,.]*)Y)?(?:([0-9,.]*)M)?(?:([0-9,.]*)D)?(?:T(?:([0-9,.]*)H)?(?:([0-9,.]*)M)?(?:([0-9,.]*)S)?)?|([0-9,.]*)W)$/;Bt.fn=Ft.prototype;var bi=te(1,"add"),Oi=te(-1,"subtract");t.defaultFormat="YYYY-MM-DDTHH:mm:ssZ";var Ui=tt("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(t){return void 0===t?this.localeData():this.locale(t)});F(0,["gg",2],0,function(){return this.weekYear()%100}),F(0,["GG",2],0,function(){return this.isoWeekYear()%100}),Ue("gggg","weekYear"),Ue("ggggg","weekYear"),Ue("GGGG","isoWeekYear"),Ue("GGGGG","isoWeekYear"),k("weekYear","gg"),k("isoWeekYear","GG"),A("G",ti),A("g",ti),A("GG",Rn,Vn),A("gg",Rn,Vn),A("GGGG",Qn,Jn),A("gggg",Qn,Jn),A("GGGGG",Xn,$n),A("ggggg",Xn,$n),j(["gggg","ggggg","GGGG","GGGGG"],function(t,e,n,i){e[i.substr(0,2)]=y(t)}),j(["gg","GG"],function(e,n,i,r){n[r]=t.parseTwoDigitYear(e)}),F("Q",0,0,"quarter"),k("quarter","Q"),A("Q",En),Z("Q",function(t,e){e[ai]=3*(y(t)-1)}),F("D",["DD",2],"Do","date"),k("date","D"),A("D",Rn),A("DD",Rn,Vn),A("Do",function(t,e){return t?e._ordinalParse:e._ordinalParseLenient}),Z(["D","DD"],ui),Z("Do",function(t,e){e[ui]=y(t.match(Rn)[0],10)});var Wi=O("Date",!0);F("d",0,"do","day"),F("dd",0,0,function(t){return this.localeData().weekdaysMin(this,t)}),F("ddd",0,0,function(t){return this.localeData().weekdaysShort(this,t)}),F("dddd",0,0,function(t){return this.localeData().weekdays(this,t)}),F("e",0,0,"weekday"),F("E",0,0,"isoWeekday"),k("day","d"),k("weekday","e"),k("isoWeekday","E"),A("d",Rn),A("e",Rn),A("E",Rn),A("dd",ii),A("ddd",ii),A("dddd",ii),j(["dd","ddd","dddd"],function(t,e,n){var i=n._locale.weekdaysParse(t);null!=i?e.d=i:d(n).invalidWeekday=t}),j(["d","e","E"],function(t,e,n,i){e[i]=y(t)});var Ci="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),Gi="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),Fi="Su_Mo_Tu_We_Th_Fr_Sa".split("_");F("H",["HH",2],0,"hour"),F("h",["hh",2],0,function(){return this.hours()%12||12}),Ee("a",!0),Ee("A",!1),k("hour","h"),A("a",Ve),A("A",Ve),A("H",Rn),A("h",Rn),A("HH",Rn,Vn),A("hh",Rn,Vn),Z(["H","HH"],di),Z(["a","A"],function(t,e,n){n._isPm=n._locale.isPM(t),n._meridiem=t}),Z(["h","hh"],function(t,e,n){e[di]=y(t),d(n).bigHour=!0});var Pi=/[ap]\.?m?\.?/i,xi=O("Hours",!0);F("m",["mm",2],0,"minute"),k("minute","m"),A("m",Rn),A("mm",Rn,Vn),Z(["m","mm"],li);var Hi=O("Minutes",!1);F("s",["ss",2],0,"second"),k("second","s"),A("s",Rn),A("ss",Rn,Vn),Z(["s","ss"],ci);var Li=O("Seconds",!1);F("S",0,0,function(){return~~(this.millisecond()/100)}),F(0,["SS",2],0,function(){return~~(this.millisecond()/10)}),F(0,["SSS",3],0,"millisecond"),F(0,["SSSS",4],0,function(){return 10*this.millisecond()}),F(0,["SSSSS",5],0,function(){return 100*this.millisecond()}),F(0,["SSSSSS",6],0,function(){return 1e3*this.millisecond()}),F(0,["SSSSSSS",7],0,function(){return 1e4*this.millisecond()}),F(0,["SSSSSSSS",8],0,function(){return 1e5*this.millisecond()}),F(0,["SSSSSSSSS",9],0,function(){return 1e6*this.millisecond()}),k("millisecond","ms"),A("S",Bn,En),A("SS",Bn,Vn),A("SSS",Bn,qn);var Ii;for(Ii="SSSS";Ii.length<=9;Ii+="S")A(Ii,Kn);for(Ii="S";Ii.length<=9;Ii+="S")Z(Ii,$e);var Ai=O("Milliseconds",!1);F("z",0,0,"zoneAbbr"),F("zz",0,0,"zoneName");var zi=h.prototype;zi.add=bi,zi.calendar=ne,zi.clone=ie,zi.diff=ue,zi.endOf=De,zi.format=fe,zi.from=he,zi.fromNow=me,zi.to=_e,zi.toNow=ye,zi.get=C,zi.invalidAt=Oe,zi.isAfter=re,zi.isBefore=se,zi.isBetween=oe,zi.isSame=ae,zi.isValid=Te,zi.lang=Ui,zi.locale=pe,zi.localeData=ge,zi.max=wi,zi.min=Yi,zi.parsingFlags=be,zi.set=C,zi.startOf=ve,zi.subtract=Oi,zi.toArray=Se,zi.toObject=ke,zi.toDate=we,zi.toISOString=ce,zi.toJSON=ce,zi.toString=le, zi.unix=Ye,zi.valueOf=Me,zi.year=Di,zi.isLeapYear=ut,zi.weekYear=Ce,zi.isoWeekYear=Ge,zi.quarter=zi.quarters=xe,zi.month=B,zi.daysInMonth=Q,zi.week=zi.weeks=ht,zi.isoWeek=zi.isoWeeks=mt,zi.weeksInYear=Pe,zi.isoWeeksInYear=Fe,zi.date=Wi,zi.day=zi.days=Ne,zi.weekday=Ze,zi.isoWeekday=je,zi.dayOfYear=yt,zi.hour=zi.hours=xi,zi.minute=zi.minutes=Hi,zi.second=zi.seconds=Li,zi.millisecond=zi.milliseconds=Ai,zi.utcOffset=At,zi.utc=Nt,zi.local=Zt,zi.parseZone=jt,zi.hasAlignedHourOffset=Et,zi.isDST=Vt,zi.isDSTShifted=qt,zi.isLocal=Jt,zi.isUtcOffset=$t,zi.isUtc=Rt,zi.isUTC=Rt,zi.zoneAbbr=Re,zi.zoneName=Be,zi.dates=tt("dates accessor is deprecated. Use date instead.",Wi),zi.months=tt("months accessor is deprecated. Use month instead",B),zi.years=tt("years accessor is deprecated. Use year instead",Di),zi.zone=tt("moment().zone is deprecated, use moment().utcOffset instead. https://github.com/moment/moment/issues/1779",zt);var Ni=zi,Zi={sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},ji={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},Ei="Invalid date",Vi="%d",qi=/\d{1,2}/,Ji={future:"in %s",past:"%s ago",s:"a few seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},$i=g.prototype;$i._calendar=Zi,$i.calendar=Ke,$i._longDateFormat=ji,$i.longDateFormat=tn,$i._invalidDate=Ei,$i.invalidDate=en,$i._ordinal=Vi,$i.ordinal=nn,$i._ordinalParse=qi,$i.preparse=rn,$i.postformat=rn,$i._relativeTime=Ji,$i.relativeTime=sn,$i.pastFuture=on,$i.set=an,$i.months=q,$i._months=hi,$i.monthsShort=J,$i._monthsShort=mi,$i.monthsParse=$,$i.week=lt,$i._week=Mi,$i.firstDayOfYear=ft,$i.firstDayOfWeek=ct,$i.weekdays=Le,$i._weekdays=Ci,$i.weekdaysMin=Ae,$i._weekdaysMin=Fi,$i.weekdaysShort=Ie,$i._weekdaysShort=Gi,$i.weekdaysParse=ze,$i.isPM=qe,$i._meridiemParse=Pi,$i.meridiem=Je,Y("en",{ordinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(t){var e=t%10,n=1===y(t%100/10)?"th":1===e?"st":2===e?"nd":3===e?"rd":"th";return t+n}}),t.lang=tt("moment.lang is deprecated. Use moment.locale instead.",Y),t.langData=tt("moment.langData is deprecated. Use moment.localeData instead.",S);var Ri=Math.abs,Bi=kn("ms"),Qi=kn("s"),Xi=kn("m"),Ki=kn("h"),tr=kn("d"),er=kn("w"),nr=kn("M"),ir=kn("y"),rr=bn("milliseconds"),sr=bn("seconds"),or=bn("minutes"),ar=bn("hours"),ur=bn("days"),dr=bn("months"),lr=bn("years"),cr=Math.round,fr={s:45,m:45,h:22,d:26,M:11},hr=Math.abs,mr=Ft.prototype;mr.abs=_n,mr.add=pn,mr.subtract=gn,mr.as=wn,mr.asMilliseconds=Bi,mr.asSeconds=Qi,mr.asMinutes=Xi,mr.asHours=Ki,mr.asDays=tr,mr.asWeeks=er,mr.asMonths=nr,mr.asYears=ir,mr.valueOf=Sn,mr._bubble=Dn,mr.get=Tn,mr.milliseconds=rr,mr.seconds=sr,mr.minutes=or,mr.hours=ar,mr.days=ur,mr.weeks=On,mr.months=dr,mr.years=lr,mr.humanize=Gn,mr.toISOString=Fn,mr.toString=Fn,mr.toJSON=Fn,mr.locale=pe,mr.localeData=ge,mr.toIsoString=tt("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",Fn),mr.lang=Ui,F("X",0,0,"unix"),F("x",0,0,"valueOf"),A("x",ti),A("X",ni),Z("X",function(t,e,n){n._d=new Date(1e3*parseFloat(t,10))}),Z("x",function(t,e,n){n._d=new Date(y(t))}),t.version="2.10.6",e(Ut),t.fn=Ni,t.min=Ct,t.max=Gt,t.utc=a,t.unix=Qe,t.months=ln,t.isDate=i,t.locale=Y,t.invalid=c,t.duration=Bt,t.isMoment=m,t.weekdays=fn,t.parseZone=Xe,t.localeData=S,t.isDuration=Pt,t.monthsShort=cn,t.weekdaysMin=mn,t.defineLocale=w,t.weekdaysShort=hn,t.normalizeUnits=T,t.relativeTimeThreshold=Cn;var _r=t;return _r}); /* <<< file end: js/node_modules/moment/min/moment.min.js */ //# map link was there [moment.min.js.map] /* >>> file start: js/node_modules/moment/locale/ru.js */ var _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};!function(e,t){"object"===("undefined"==typeof exports?"undefined":_typeof(exports))&&"undefined"!=typeof module?t(require("moment")):"function"==typeof define&&define.amd?define(["moment"],t):t(e.moment)}(this,function(e){"use strict";function t(e,t){var n=e.split("_");return t%10===1&&t%100!==11?n[0]:t%10>=2&&4>=t%10&&(10>t%100||t%100>=20)?n[1]:n[2]}function n(e,n,_){var i={mm:n?"минута_минуты_минут":"минуту_минуты_минут",hh:"час_часа_часов",dd:"день_дня_дней",MM:"месяц_месяца_месяцев",yy:"год_года_лет"};return"m"===_?n?"минута":"минуту":e+" "+t(i[_],+e)}function _(e,t){var n={nominative:"январь_февраль_март_апрель_май_июнь_июль_август_сентябрь_октябрь_ноябрь_декабрь".split("_"),accusative:"января_февраля_марта_апреля_мая_июня_июля_августа_сентября_октября_ноября_декабря".split("_")},_=/D[oD]?(\[[^\[\]]*\]|\s+)+MMMM?/.test(t)?"accusative":"nominative";return n[_][e.month()]}function i(e,t){var n={nominative:"янв_фев_март_апр_май_июнь_июль_авг_сен_окт_ноя_дек".split("_"),accusative:"янв_фев_мар_апр_мая_июня_июля_авг_сен_окт_ноя_дек".split("_")},_=/D[oD]?(\[[^\[\]]*\]|\s+)+MMMM?/.test(t)?"accusative":"nominative";return n[_][e.month()]}function d(e,t){var n={nominative:"воскресенье_понедельник_вторник_среда_четверг_пятница_суббота".split("_"),accusative:"воскресенье_понедельник_вторник_среду_четверг_пятницу_субботу".split("_")},_=/\[ ?[Вв] ?(?:прошлую|следующую|эту)? ?\] ?dddd/.test(t)?"accusative":"nominative";return n[_][e.day()]}var r=e.defineLocale("ru",{months:_,monthsShort:i,weekdays:d,weekdaysShort:"вс_пн_вт_ср_чт_пт_сб".split("_"),weekdaysMin:"вс_пн_вт_ср_чт_пт_сб".split("_"),monthsParse:[/^янв/i,/^фев/i,/^мар/i,/^апр/i,/^ма[й|я]/i,/^июн/i,/^июл/i,/^авг/i,/^сен/i,/^окт/i,/^ноя/i,/^дек/i],longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY г.",LLL:"D MMMM YYYY г., HH:mm",LLLL:"dddd, D MMMM YYYY г., HH:mm"},calendar:{sameDay:"[Сегодня в] LT",nextDay:"[Завтра в] LT",lastDay:"[Вчера в] LT",nextWeek:function(){return 2===this.day()?"[Во] dddd [в] LT":"[В] dddd [в] LT"},lastWeek:function(e){if(e.week()===this.week())return 2===this.day()?"[Во] dddd [в] LT":"[В] dddd [в] LT";switch(this.day()){case 0:return"[В прошлое] dddd [в] LT";case 1:case 2:case 4:return"[В прошлый] dddd [в] LT";case 3:case 5:case 6:return"[В прошлую] dddd [в] LT"}},sameElse:"L"},relativeTime:{future:"через %s",past:"%s назад",s:"несколько секунд",m:n,mm:n,h:"час",hh:n,d:"день",dd:n,M:"месяц",MM:n,y:"год",yy:n},meridiemParse:/ночи|утра|дня|вечера/i,isPM:function(e){return/^(дня|вечера)$/.test(e)},meridiem:function(e,t,n){return 4>e?"ночи":12>e?"утра":17>e?"дня":"вечера"},ordinalParse:/\d{1,2}-(й|го|я)/,ordinal:function(e,t){switch(t){case"M":case"d":case"DDD":return e+"-й";case"D":return e+"-го";case"w":case"W":return e+"-я";default:return e}},week:{dow:1,doy:7}});return r}); /* <<< file end: js/node_modules/moment/locale/ru.js */ //# map link was there [ru.js.map] /* >>> file start: js/widgets/angular/mediusTimeAgo.js */ //= require js/node_modules/moment/min/moment.min.js //= require js/node_modules/moment/locale/ru.js !function(){function e(){function e(e,i){var t=LJ.get("server_time")-moment().unix(),m=moment.unix(e.timeAgo-t).locale("ru");moment.locale("ru",{relativeTime:{future:"через %s",past:"%s назад",s:"%d с.",m:"%d мин.",mm:"%d мин.",h:"%d ч.",hh:"%d ч.",d:"%d д.",dd:"%d д.",M:"%d м.",MM:"%d м.",y:"%d г.",yy:"%d г."}}),m.isValid()&&(e.timeAgoText=m.fromNow(!0),i.attr("title",m.calendar()))}return{template:"{{timeAgoText}}",scope:{timeAgo:">> file start: js/widgets/angular/mediusShareButtons.js */ //= require js/node_modules/moment/min/moment.min.js //= require js/node_modules/moment/locale/ru.js !function(t){"use strict";function e(e,n){function i(t,e){if(t){var n={facebook:"fbsharing",vkontakte:"vksharing",odnoklassniki:"oksharing",twitter:"twsharing"};if(!n[e])return t;var i=~t.indexOf("?")?"&":"?";return""+t+i+"utm_source="+n[e]+"&utm_medium=social"}}function r(t){var r=t.title,a=t.service,c=t.text,u=t.link;return c=c||"",r=r||e.document.title,u=u||e.location.href,"livejournal"===a?LJ.get("remote")?n.call("repost.create",{url:u,timezone:s}):(LJ.Util.Action.login(),Promise.resolve()):new Promise(function(t){var e=l[a]({title:r,text:c,link:i(u,a)});o(e,{allowScrollbars:"pocket"===a}),t()})}function o(t){var n=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],i=n.allowScrollbars||!1,r=i?1:0;e.open(t,"","left="+(u.width-630)/2+",top="+(u.height-440)/2+",toolbar=0,status=0,scrollbars="+r+",menubar=0,location=0,width=630,height=440")}var l,a={},s=t().format("ZZ");a.share=r;var c=e.encodeURIComponent.bind(e),u=e.screen||{width:1e3,height:1e3};return l={facebook:function(t){var e=t.link;return"https://www.facebook.com/sharer.php?u="+c(e)},livejournal:function(t){var e=t.text,n=t.title,i=t.link;return"https:../https@livejournal.com/update.bml@subject="+c(n)+"&event="+c(''+n+" "+e)},twitter:function(t){var e=t.link,n=t.title;return"https://twitter.com/share?text="+c(n)+"&via=livejournalru&url="+c(e)},vkontakte:function(t){var e=t.link,n=t.title,i=t.text;return"https:../https@vk.com/share.php@url="+c(e)+"&title="+c(n)+"&description="+c(i)},odnoklassniki:function(t){var e=t.link,n=t.title;return"../https@www.odnoklassniki.ru/dk@st.cmd=addShare&st.s=1&st.comments="+c(n)+"&st._surl="+c(e)},mailru:function(t){var e=t.link,n=t.title,i=t.text;return"https://connect.mail.ru/share?url="+c(e)+"&title="+c(n)+"&description="+c(i)},pocket:function(t){var e=t.link,n=t.title;return"https:../https@getpocket.com/save@url="+c(e)+"&title="+c(n)},tumblr:function(t){var e=t.link,n=t.title,i=t.text;return"../https@www.tumblr.com/widgets/share/tool@canonicalUrl="+c(e)+"&title="+c(n)+"&caption="+c(i)+"&posttype=link"}},a}function n(t,e){var n=this;n.bottomPanel={},n.bottomPanel.visible=!0,t.$on("mediusSharings:bottomInited",function(){e(function(){n.bottomPanel=t.bottomPanelVisible},100)})}function i(t){function e(e,n){n.one("click",function(n){n&&(n.preventDefault(),n.stopPropagation()),t.share(e).then(LJ.Event.emit.bind(LJ.Event,"Sharings:add")).then(function(){var t=LJ.get("entry"),n=t.ditemid,i=t.poster;LJ.Track.event("Medius","Post","Share",e.service,i,n)})})}return{restrict:"AE",scope:{service:"@",text:"@",title:"@",link:"@"},link:e}}function r(t){function e(e,n){function i(){var t=n.position().top+n.height()>r.scrollTop()+l-a;t!==s&&(s=t,e.bottomPanelVisible.visible=!s)}var r=angular.element(t),o=LJ.get("ljlive").is_enabled,l=t.innerHeight;e.bottomPanelVisible={};var a=0,s=void 0;o&&r.width()>650&&(a=50),r.scroll(function(){i(),e.$apply()}),i(),e.$broadcast("mediusSharings:bottomInited")}return{link:e}}function o(){return{controllerAs:"stickyShare",controller:n}}e.$inject=["$window","Api"],i.$inject=["shareService"],angular.module("Medius.ShareButtons",["LJ.Api"]),angular.module("Medius.ShareButtons").factory("shareService",e).controller("ShareCtrl",n).directive("mediusShareButton",i).directive("stickyPanel",o).directive("shareBottomPanel",r),n.$inject=["$scope","$timeout"],r.$inject=["$window"]}(moment); /* <<< file end: js/widgets/angular/mediusShareButtons.js */ //# map link was there [mediusShareButtons.js.map] /* >>> file start: js/widgets/sharings.js */ //!= require js/entry/likes.js //!= require js/core/social-caching.js Site.page.template['angular/widgets/sharings.ng.tmpl'] = '
    \n \n \n
    \n'; //= require_ml medius.entry.shared !function(){"use strict";function n(n){return function(t){try{return n(t)}catch(e){return console.warn(e),0}}}function t(t,e,r){function o(n){function t(n,e,r){var o=n[0],u=n.slice(1);return r=r||window,u.length?t(u,e,r[o]={}):r[o]=e}var r=n.page,o=n.jsonpUrlPrefix,u=n.callbackFnPath,c=n.utmMark,a=n.shtype,i=r.split("?")[0],s=u[0];return new Promise(function(n){LJ.SocialCaching.get(i,function(n){n=n.split("?")[0];var r=["","?media","@utm_source="+c+"&utm_medium=social","@media&utm_source="+c+"&utm_medium=social"],a=r.map(function(t){return n+t}),i=a.map(function(n){return new Promise(function(r){var c=void 0;angular.isObject(window[s])&&(c=window[s]),t(u,function(n,t){r(Number(t)||0),c&&(window[s]=c)}),e.jsonp(""+o+encodeURIComponent(n)+"&callback=JSON_CALLBACK")}).then(function(n){return Number(n)||0})["catch"](function(){return 0})});return Promise.all(i).then(function(n){return n.reduce(function(n,t){return n+t},0)})},a).then(function(t){return n(Number(t)||0)})["catch"](function(){return 0})})}function u(n){return new Promise(function(t){return l?t(l):p?void p.push(t):(p=[t],a(n).then(function(n){return p.forEach(function(t){t(n)}),p=[],n}))})}function c(n,t){return LJ.get("remote")?(h!==t&&(h=t,r.call("entry.set_sharings",{count:t,url:n},{silent:!0})),t):t}function a(n){var t=Object.keys(f);return Promise.all(t.map(function(t){return f[t].count(n)})).then(function(n){return n.reduce(function(n,e,r){return n[t[r]]=e,n},{})})["catch"](s(0))}function i(n){return u(n).then(function(n){return Object.values(n).reduce(function(n,t){return n+=Number(t)},0)})["catch"](s(0))}function s(n){return function(){return n}}var l,h,p,m=encodeURIComponent(t.location.href),f={};return f.facebook={count:function(t){return t=t||m,LJ.SocialCaching.get(t,function(t){return e.jsonp("../https@graph.facebook.com/@id="+encodeURIComponent(t)+"&callback=JSON_CALLBACK").then(n(function(n){return Number(n.data.share&&n.data.share.share_count||n.data.shares||0)}))},"fb")["catch"](s(0))}},f.twitter={count:function(n){return new Promise(function(n,t){n(0)}).then(function(n){return n})}},f.vkontakte={count:function(n){return n=n||m,LJ.define("VK.Share"),o({page:n,jsonpUrlPrefix:"../https@vk.com/share.php@act=count&index=1&url=",callbackFnPath:["VK","Share","count"],utmMark:"vksharing",shtype:"vk"})}},f.odnoklassniki={count:function(n){return n=n||m,o({page:n,jsonpUrlPrefix:"../https@connect.ok.ru/dk@st.cmd=extLike&uid=1&ref=",callbackFnPath:["ODKL","updateCount"],utmMark:"oksharing",shtype:"ok"})}},f.googleplus={count:function(t){return t=t||m,e.post("https://clients6.google.com/rpc",{method:"pos.plusones.get",id:t,params:{nolog:!0,id:t,source:"widget",userId:"@viewer",groupId:"@self"},jsonrpc:"2.0",key:"p",apiVersion:"v1"},{processData:!0,contentType:"application/json"}).then(n(function(n){return n.results?Number(n.result.metadata.globalCounts.count):0}))["catch"](s(0))}},f.mailru={count:function(t){return t=t||m,e.jsonp("https:../https@connect.mail.ru/share_count@url_list="+encodeURIComponent(t)+"&callback=1&func=JSON_CALLBACK").then(n(function(n){var e=n.data;return e[t]?Number(e[t].shares):0}))["catch"](s(0))}},f.pinterest={count:function(t){return t=t||m,e.jsonp("https://api.pinterest.com/v1/urls/count.json?url="+encodeURIComponent(t)+"&callback=JSON_CALLBACK").then(n(function(n){return Number(n.data.count)||0}))["catch"](s(0))}},f.livejournal={count:function(n){var t=n||m;return r.call("repost.get_status",{url:t},{silent:!0}).then(function(n){var t=n.count;return parseInt(t)||0})["catch"](s(0))}},f.linkedin={count:function(t){return t=t||m,e.jsonp("https://www.linkedin.com/countserv/count/share?url="+encodeURIComponent(t)+"&callback=JSON_CALLBACK").then(n(function(n){return Number(n.data.count)||0}))["catch"](s(0))}},f.tumblr={count:function(t){return t=t||m,e.jsonp("../https@api.tumblr.com/v2/share/stats@url="+encodeURIComponent(t)+"&callback=JSON_CALLBACK").then(n(function(n){return Number(n.data.response.note_count)||0}))["catch"](s(0))}},f.reddit={count:function(t){return t=t||m,e.jsonp("https://www.reddit.com/api/info.json?url="+encodeURIComponent(t)+"&jsonp=JSON_CALLBACK").then(n(function(n){var t=n.data.data.children;return 0===t.length?0:Number(t[0].data.score)}))["catch"](s(0))}},f.stumbleupon={count:function(t){return e.jsonp("https:../https@query.yahooapis.com/v1/public/yql@q="+encodeURIComponent('select * from html where url="http://www.stumbleupon.com/services/1.01/badge.getinfo?url='+t+'" and xpath="*"')+"&format=json&callback=JSON_CALLBACK").then(n(function(n){var t=void 0;try{var e=angular.fromJson(n.data.query.results.html.body);t=Number(e.result.views)||0}catch(r){console.warn("stumbleupon answer parse error",r),t=0}return t}))["catch"](s(0))}},f.pocket={count:function(t){return t=t||m,e.jsonp("https:../https@query.yahooapis.com/v1/public/yql@q="+encodeURIComponent('select * from html where url="https://widgets.getpocket.com/v1/button?count=horizontal&url='+t+'" and xpath="*"')+"&format=json&callback=JSON_CALLBACK").then(n(function(n){var t=void 0;try{t=Number(n.data.query.results.html.body.div.a.span.em.content)||0}catch(e){console.warn("pocket answer parse error",e),t=0}return t}))["catch"](s(0))}},f.buffer={count:function(t){return t=t||m,e.jsonp("https:../https@api.bufferapp.com/1/links/shares.json@url="+encodeURIComponent(t)+"&callback=JSON_CALLBACK").then(n(function(n){return Number(n.data.shares)||0}))["catch"](s(0))}},f.xing={count:function(t){return t=t||m,e.jsonp("../https@query.yahooapis.com/v1/public/yql@q="+encodeURIComponent('select * from html where url="../https@www.xing-share.com/app/share@op=get_share_button;counter=top;url='+t+'" and xpath="*"')+"&format=json&callback=JSON_CALLBACK").then(n(function(n){var t=void 0;try{t=Number(n.data.query.results.html.body.div[0].div[0].span.content)||0}catch(e){console.warn("xing answer parse error",e),t=0}return t}))["catch"](s(0))}},{total:i,saveSharings:c,service:f}}function e(){function n(n,t){LJ.Flags.isDisabled("medius_sharings")}return{restrict:"AE",link:n,controller:"mediusSharingsCtrl",templateUrl:"sharings.ng.tmpl",controllerAs:"sharings"}}function r(n,t,e,r,o){var u=this;if(!LJ.Flags.isDisabled("medius_sharings")){u.count=0;var c=n.location.href;e.total(c).then(function(n){return r.$apply(function(){return u.count=n}),n}).then(e.saveSharings.bind(e,c)),LJ.Event.on("Sharings:add",function(){return o(function(){return r.$apply(function(){return u.count++})})})}}t.$inject=["$window","$http","Api"],r.$inject=["$window","Api","likesCount","$scope","$timeout"],angular.module("LJ.Sharings",["LJ.Api"]),angular.module("LJ.Sharings").factory("likesCount",t).controller("mediusSharingsCtrl",r).directive("mediusSharings",e)}(); /* <<< file end: js/widgets/sharings.js */ //# map link was there [sharings.js.map] /* >>> file start: js/referral/mamydirectControl.js */ !function(){if(LJ.Util.runMamydirect=function(){},!LJ.get("remote")){LJ.Util.getWindow().ao_subid="Moneylink";var i=!1;LJ.Util.runMamydirect=function(){i=!0},LJ.Api.authInitPromise.then(function(){LJ.Api.call("site.settings").then(function(t){t.referral_substitution_enabled&&(LJ.Util.getWindow().ao_subid="Moneylink",LJ.Util.runMamydirect=function(){LJ.injectScript("../https@js.mamydirect.com/js/@h=R6USVIac")},i&&LJ.Util.runMamydirect())})})}}(); /* <<< file end: js/referral/mamydirectControl.js */ //# map link was there [mamydirectControl.js.map] /* >>> file start: js/ljShareButton.js */ Site.page.template['angular/ljShareButton.ng.tmpl'] = '\n \n \n \n \n \n {{title}}\n'; //= require js/core/angular/api.js function LJShareButtonCtrl(t,e){var r=this;r.reposted=!1,r.loading=!0,e.call("repost.get_status",{url:t.entryUrl},function(t){r.reposted=!!t.reposted,r.loading=!1});var l=(t.entryUrl.match(/https?:\/\/([^\.]+)/)||[])[1],n=5===t.entryUrl.split("/").length;"users"===l&&n&&(l=t.entryUrl.split("/")[3]),l=l.replace("-","_"),r.disabled=function(){return LJ.get("preview")?!0:LJ.get("remoteUser")?LJ.get("remote_is_identity")?!0:LJ.get("remoteUser")===l:!0},r.onClick=function(){if(!r.disabled()){var l={url:t.entryUrl};r.reposted?e.call("repost.delete",l,function(){r.reposted=!1,LJ.Event.trigger("afterRepostDelete",{postURL:t.entryUrl})}):(l.timezone=LJ.Util.Date.timezone(),e.call("repost.create",l,function(){r.reposted=!0}))}}}function ljShareButtonDirective(){return{controller:LJShareButtonCtrl,controllerAs:"LJShareButtonCtrl",restrict:"A",scope:{entryUrl:"@ljShareButton",title:"@ljShareButtonTitle"},templateUrl:"ljShareButton.ng.tmpl",link:function(t,e,r){}}}LJShareButtonCtrl.$inject=["$scope","Api"],angular.module("LJShareButtonModule",["LJ.Api","LJ.Directives","LJ.Templates"]).directive("ljShareButton",ljShareButtonDirective); /* <<< file end: js/ljShareButton.js */ //# map link was there [ljShareButton.js.map] /* >>> file start: js/widgets/angular/pinterestHelpers.js */ var _extends=Object.assign||function(t){for(var e=1;e>> file start: stc/widgets/pinterestHelpers.css */\n.customPinterestHoverSaveButton{position:absolute;border-radius:2px;text-indent:20px;width:auto;padding:0 4px 0 0;text-align:center;text-decoration:none;font:11px/20px \"Helvetica Neue\",Helvetica,sans-serif;font-weight:700;color:#fff;background:url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMzBweCIgd2lkdGg9IjMwcHgiIHZpZXdCb3g9Ii0xIC0xIDMxIDMxIj48Zz48cGF0aCBkPSJNMjkuNDQ5LDE0LjY2MiBDMjkuNDQ5LDIyLjcyMiAyMi44NjgsMjkuMjU2IDE0Ljc1LDI5LjI1NiBDNi42MzIsMjkuMjU2IDAuMDUxLDIyLjcyMiAwLjA1MSwxNC42NjIgQzAuMDUxLDYuNjAxIDYuNjMyLDAuMDY3IDE0Ljc1LDAuMDY3IEMyMi44NjgsMC4wNjcgMjkuNDQ5LDYuNjAxIDI5LjQ0OSwxNC42NjIiIGZpbGw9IiNmZmYiIHN0cm9rZT0iI2ZmZiIgc3Ryb2tlLXdpZHRoPSIxIj48L3BhdGg+PHBhdGggZD0iTTE0LjczMywxLjY4NiBDNy41MTYsMS42ODYgMS42NjUsNy40OTUgMS42NjUsMTQuNjYyIEMxLjY2NSwyMC4xNTkgNS4xMDksMjQuODU0IDkuOTcsMjYuNzQ0IEM5Ljg1NiwyNS43MTggOS43NTMsMjQuMTQzIDEwLjAxNiwyMy4wMjIgQzEwLjI1MywyMi4wMSAxMS41NDgsMTYuNTcyIDExLjU0OCwxNi41NzIgQzExLjU0OCwxNi41NzIgMTEuMTU3LDE1Ljc5NSAxMS4xNTcsMTQuNjQ2IEMxMS4xNTcsMTIuODQyIDEyLjIxMSwxMS40OTUgMTMuNTIyLDExLjQ5NSBDMTQuNjM3LDExLjQ5NSAxNS4xNzUsMTIuMzI2IDE1LjE3NSwxMy4zMjMgQzE1LjE3NSwxNC40MzYgMTQuNDYyLDE2LjEgMTQuMDkzLDE3LjY0MyBDMTMuNzg1LDE4LjkzNSAxNC43NDUsMTkuOTg4IDE2LjAyOCwxOS45ODggQzE4LjM1MSwxOS45ODggMjAuMTM2LDE3LjU1NiAyMC4xMzYsMTQuMDQ2IEMyMC4xMzYsMTAuOTM5IDE3Ljg4OCw4Ljc2NyAxNC42NzgsOC43NjcgQzEwLjk1OSw4Ljc2NyA4Ljc3NywxMS41MzYgOC43NzcsMTQuMzk4IEM4Ljc3NywxNS41MTMgOS4yMSwxNi43MDkgOS43NDksMTcuMzU5IEM5Ljg1NiwxNy40ODggOS44NzIsMTcuNiA5Ljg0LDE3LjczMSBDOS43NDEsMTguMTQxIDkuNTIsMTkuMDIzIDkuNDc3LDE5LjIwMyBDOS40MiwxOS40NCA5LjI4OCwxOS40OTEgOS4wNCwxOS4zNzYgQzcuNDA4LDE4LjYyMiA2LjM4NywxNi4yNTIgNi4zODcsMTQuMzQ5IEM2LjM4NywxMC4yNTYgOS4zODMsNi40OTcgMTUuMDIyLDYuNDk3IEMxOS41NTUsNi40OTcgMjMuMDc4LDkuNzA1IDIzLjA3OCwxMy45OTEgQzIzLjA3OCwxOC40NjMgMjAuMjM5LDIyLjA2MiAxNi4yOTcsMjIuMDYyIEMxNC45NzMsMjIuMDYyIDEzLjcyOCwyMS4zNzkgMTMuMzAyLDIwLjU3MiBDMTMuMzAyLDIwLjU3MiAxMi42NDcsMjMuMDUgMTIuNDg4LDIzLjY1NyBDMTIuMTkzLDI0Ljc4NCAxMS4zOTYsMjYuMTk2IDEwLjg2MywyNy4wNTggQzEyLjA4NiwyNy40MzQgMTMuMzg2LDI3LjYzNyAxNC43MzMsMjcuNjM3IEMyMS45NSwyNy42MzcgMjcuODAxLDIxLjgyOCAyNy44MDEsMTQuNjYyIEMyNy44MDEsNy40OTUgMjEuOTUsMS42ODYgMTQuNzMzLDEuNjg2IiBmaWxsPSIjYmQwODFjIj48L3BhdGg+PC9nPjwvc3ZnPg==) 3px 50% no-repeat #bd081c;background-size:14px 14px;-webkit-font-smoothing:antialiased;display:inline-block;box-sizing:border-box;box-shadow:inset 0 0 1px #888;height:20px;vertical-align:baseline;cursor:pointer}\n/* <<< file end: stc/widgets/pinterestHelpers.css */\n\n/*# sourceMappingURL=pinterestHelpers.css.map */\n'); //= require_ml widget.pinterest.save !function(){function t(t,e,n,r){var i={},o=t.find("body"),l=!1;return i.mountHoverSaveButton=function(i){var a={left:10,top:10},c={width:200,height:200};if(angular.isObject(i)){l||(LJ.injectScript("../https@assets.pinterest.com/js/pinit.js"),l=!0);var u=i.container,s=i.filterImgFn,f=void 0===s?function(){return!0}:s,p=i.getPinDataForImage,v=void 0===p?function(){return{}}:p,d=null,h=null,m=function(){if(h){var t=angular.element(d).offset(),e=Math.max(t.left,0),n={left:e+a.left,top:t.top+a.top};h.css({left:n.left,top:n.top})}},g=function(){var n=0,r=null,i=function(){var e=t[0].body.scrollHeight;n!==e&&(n=e,m())},o=function(){r||(r=e(i,100))},l=function(){r&&(e.cancel(r),r=null)};return{start:o,stop:l,doSingleCheck:i}}();t.on("mouseover",function(t){var e=t.target;e!==d&&e!==(h&&h[0])&&(d=null,h&&(h.css({display:"none"}),g.stop()))});var b={},j=function(t){var e=t.replace(/lj-[0-9]+.dev.lj.rambler.tech\//,"").replace(/livejournal.com\//,"").match(/^https?:\/\/ic.pics./);return e&&!!e[0]},H=function(t){var e=t.url;return j(e)?b[e]?n.resolve("public"===b[e]):r({method:"HEAD",url:e}).then(function(t){var n=t.headers();return 0===n["cache-control"].indexOf("public")?void(b[e]="public"):void(b[e]="non-public")},function(){b[e]="non-public"}).then(function(){return"public"===b[e]}):n.resolve(!0)};angular.element(u).on("mouseover",function(t){var e=t.target,n=function(){if(e===d&&h)return h.css({display:"block"}),void g.start();if(f(e)){h&&h.remove(),d=e;var t=LJ.ml("widget.pinterest.save");h=angular.element(""+t+""),h.addClass("customPinterestHoverSaveButton"),h.on("click",function(t){t.preventDefault(),PinUtils.pinOne(_extends({media:d.src},v(d)))}),m(),o.append(h),g.start()}};"IMG"!==e.tagName||e.clientWidth>> file start: js/hashtag.js */ var _extends=Object.assign||function(n){for(var t=1;t=r})[0]:null},n.getTagNearCaret=function(t,r){var e=arguments.length<=2||void 0===arguments[2]?{}:arguments[2],a=e.minBodyLength,g=void 0===a?3:a,o=n.tagsFromInput(t);return o&&o.length?o.filter(function(n){return n.body.length>=g&&r>n.tagStartIndex&&r<=n.tagEndIndex})[0]:null},LJ.define("LJ.Hashtag"),LJ.Hashtag=n}(); /* <<< file end: js/hashtag.js */ //# map link was there [hashtag.js.map] /* >>> file start: js/widgets/angular/hints/inputHint.js */ var _extends=Object.assign||function(t){for(var e=1;e{{suggestion}}\n \n'; LJ.injectStyle('/* >>> file start: stc/popup/hint-popup.css */\n.b-popup-lite{font:400 14px/20px ProximaNova,Helvetica,sans-serif;color:#333;position:absolute;display:inline-block;box-sizing:border-box;min-width:160px;padding:7px 0;margin-top:.8em;border:1px solid #D4DDE1;box-shadow:0 0 1px rgba(0,0,0,.12),0 8px 12px rgba(0,0,0,.12);border-radius:6px;z-index:4;text-align:left;background-color:#FFF}.b-popup-lite__button{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;box-sizing:border-box;width:100%;padding:6px 15px;outline:0;border:0;text-align:inherit;text-decoration:none;-webkit-transition:background-color .15s;transition:background-color .15s;background-color:transparent;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:pointer;color:#333}.b-popup-lite__button--selected,.b-popup-lite__button:focus,.b-popup-lite__button:not(:disabled):hover{background-color:#F5F7F8}.b-popup-lite__arrow{font-size:16px;position:absolute;top:-.5em;left:1em;overflow:hidden;width:1em;height:.5em}.b-popup-lite__arrow::before{content:\"\";font-size:11.31px;position:absolute;left:0;bottom:0;display:block;box-sizing:border-box;width:1em;height:1em;border:1px solid #D4DDE1;-webkit-transform-origin:bottom left;-ms-transform-origin:bottom left;transform-origin:bottom left;-webkit-transform:rotate(45deg);-ms-transform:rotate(45deg);transform:rotate(45deg);background-color:#FFF}\n/* <<< file end: stc/popup/hint-popup.css */\n\n/*# sourceMappingURL=hint-popup.css.map */\n'); !function(){function t(t,e,n,i,o,r){var u=function(){var t=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],e=t.angularController,n={};n.renderPopup=e.renderPopup,n.setWordCoordinates=e.setTargetRect,n.hideHints=e.hidePopup,n.isShown=e.isShown;var i="";return n.setContent=function(t){var n=t.word,o=t.hints;e&&n&&(i!==n&&e.resetSelection(),i=n,e.setSuggestions(o))},n.inputOnKeydown=function(t){if(e.isShown()&&e.hasData()){var i=40,o=38,r=13;t.keyCode===i?(e.adjustSelection(1),t.preventDefault()):t.keyCode===o?(e.adjustSelection(-1),t.preventDefault()):t.keyCode===r&&(LJ.Event.trigger("inputHint::hintActivated",{hint:e.suggestions[e.selectedHintIndex]}),n.hideHints(),t.preventDefault())}},n},l=function(){var t=i.$new(),e=angular.element("body"),n="
    ",l=0===e.closest("[ng-app]").length;return l&&(n=o("
    ")(t)),angular.element("body").append(n),r(function(t,e){LJ.Event.on("inputHint::angularControllerReady",function(){var n=arguments.length<=0||void 0===arguments[0]?{}:arguments[0];n.controller||e();var i=u({angularController:n.controller});t(i)})})},p={},s={};return s.getInputHint=function(){var t=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],e=p[t.id];return e?r.resolve(e):(p[t.id]=l().then(function(e){return p[t.id]=e,e}),p[t.id])},s}function e(t){var e={};return e.getPositionData=function(){var e=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],n=e.targetRect,i=e.popupRect,o={popup:{left:0,top:0},arrow:{side:"top",left:0,top:0}};if(!n||!i)return o;var r=i.width/2,u=(n.left+n.right)/2;o.popup.left=n.right,o.popup.left=u-r,o.popup.right=o.popup.left+i.width,o.popup.top=n.bottom,o.arrow.left=r;var l=15,p=t[0].body.getBoundingClientRect(),s=p.width-l,a=Math.max(0,o.popup.right-s),c=Math.max(0,l-o.popup.left);return a>0&&!c?(o.popup.left-=a,o.arrow.left+=a,o):c>0&&!a?(o.popup.left+=c,o.arrow.left-=c,o):o},e}function n(t,e,n,i,o,r,u,l,p){var s=this;s.suggestions=[],s.selectedHintIndex=0,s.containerStyle={top:0,left:0,display:"none"};var a={baseWidth:16,apexHeight:8},c={},d=l.getPositionData(),g=p.resolve();s.getPopupRect=function(){var t=s.getPopupElement()[0];if(s.isShown())return t.getBoundingClientRect();var e={display:t.style.display,visibility:t.style.visibility};t.style.visibility="hidden",t.style.display="block";var n=t.getBoundingClientRect();return t.style.visibility=e.visibility,t.style.display=e.display,n},s.renderPopup=function(){return s.suggestions.length?void g.then(function(){var t=s.getPopupRect();d=l.getPositionData({targetRect:c,popupRect:t}),s.containerStyle.display="block",delete s.containerStyle.visibility,s.containerStyle.top=d.popup.top,s.containerStyle.left=d.popup.left}):void s.hidePopup()},s.setTargetRect=function(t){c=t},s.hidePopup=function(){n(function(){s.containerStyle.display="none"})},s.getPopupElement=function(){return o.find(".b-popup-lite")},s.adjustSelection=function(t){n(function(){return s.suggestions.length<2?void(s.selectedHintIndex=0):void(s.selectedHintIndex=(s.selectedHintIndex+t+s.suggestions.length)%s.suggestions.length)})},s.getContainerStyle=function(){return _extends({},s.containerStyle)},s.getArrowStyle=function(){return{left:d.arrow.left-a.baseWidth/2,right:"auto"}},s.resetSelection=function(){n(function(){s.selectedHintIndex=0})},s.onSuggestionMouseDown=function(t,e){t.preventDefault(),LJ.Event.trigger("inputHint::hintActivated",{hint:e}),s.hidePopup()},s.setSuggestions=function(t){s.suggestions=t,g=n(function(){})},s.suggestionIsSelected=function(t){return t===s.selectedHintIndex},s.styleForHintByIndex=function(t){return s.suggestionIsSelected(t)?{background:"#c5e7ff"}:null},s.isShown=function(){return"none"!==s.containerStyle.display},s.hasData=function(){return!!s.suggestions.length},i.on("mousedown",function(t){s.isShown()&&!angular.element(t.target).closest(o).length&&s.hidePopup()}),LJ.Event.trigger("inputHint::angularControllerReady",{controller:s})}function i(){return{controller:"inputHintCtrl",controllerAs:"widget",templateUrl:"inputHintPopup.ng.tmpl"}}t.$inject=["Api","$document","$window","$rootScope","$compile","$q"],n.$inject=["$scope","inputHintService","$timeout","$document","$element","$window","$log","inputHintPositioner","$q"],e.$inject=["$document"],angular.module("InputHintModule",[]),angular.module("InputHintModule").factory("inputHintService",t).controller("inputHintCtrl",n).directive("inputHint",i).factory("inputHintPositioner",e)}(); /* <<< file end: js/widgets/angular/hints/inputHint.js */ //# map link was there [inputHint.js.map] /* >>> file start: js/lib/textareaCaretPosition.js */ !function(){function e(e,r,i){if(!o)throw new Error("textarea-caret-position#getCaretCoordinates should only be called in a browser");var d=i&&i.debug||!1;if(d){var a=document.querySelector("#input-textarea-caret-position-mirror-div");a&&a.parentNode.removeChild(a)}var l=document.createElement("div");l.id="input-textarea-caret-position-mirror-div",document.body.appendChild(l);var p=l.style,f=window.getComputedStyle?window.getComputedStyle(e):e.currentStyle,h="INPUT"===e.nodeName;p.whiteSpace="pre-wrap",h||(p.wordWrap="break-word"),p.position="absolute",d||(p.visibility="hidden"),t.forEach(function(e){h&&"lineHeight"===e?p.lineHeight=f.height:p[e]=f[e]}),n?e.scrollHeight>parseInt(f.height)&&(p.overflowY="scroll"):p.overflow="hidden",i&&i.textareaStyle&&"overflow"in i.textareaStyle&&(p.overflow=i.textareaStyle.overflow),i&&i.adjustStyleObj&&(p=i.adjustStyleObj(p)),l.textContent=e.value.substring(0,r),h&&(l.textContent=l.textContent.replace(/\s/g," "));var s=document.createElement("span");s.textContent=e.value.substring(r)||".","string"==typeof i.tailSpanContent&&(s.textContent=i.tailSpanContent),l.appendChild(s);var u={top:s.offsetTop+parseInt(f.borderTopWidth),left:s.offsetLeft+parseInt(f.borderLeftWidth),height:parseInt(f.lineHeight)};return d?s.style.backgroundColor="#aaa":document.body.removeChild(l),u}var t=["direction","boxSizing","width","height","overflowX","overflowY","borderTopWidth","borderRightWidth","borderBottomWidth","borderLeftWidth","borderStyle","paddingTop","paddingRight","paddingBottom","paddingLeft","fontStyle","fontVariant","fontWeight","fontStretch","fontSize","fontSizeAdjust","lineHeight","fontFamily","textAlign","textTransform","textIndent","textDecoration","letterSpacing","wordSpacing","tabSize","MozTabSize"],o="undefined"!=typeof window,n=o&&null!=window.mozInnerScreenX;"undefined"!=typeof module&&"undefined"!=typeof module.exports?module.exports=e:o&&(window.textareaCaretPosition={getCoordinates:e})}(); /* <<< file end: js/lib/textareaCaretPosition.js */ //# map link was there [textareaCaretPosition.js.map] /* >>> file start: js/widgets/angular/hints/inputHintHelpers.js */ var _extends=Object.assign||function(t){for(var e=1;er;if(o)return void e.hideHints();e.setWordCoordinates(t),e.renderPopup()}}}),angular.element(t).on("resize orientationchange",function(){e.hideHints()}),LJ.Event.on("inputHint::hintActivated",f)})}},r}t.$inject=["$window","inputHintService","$document"],angular.module("InputHintHelpersModule",["InputHintModule"]),angular.module("InputHintHelpersModule").factory("inputHintHelpersService",t)}(); /* <<< file end: js/widgets/angular/hints/inputHintHelpers.js */ //# map link was there [inputHintHelpers.js.map] /* >>> file start: js/widgets/angular/hints/hashHint.js */ //= require js/hashtag.js //= require js/core/angular/api.js //= require js/widgets/angular/hints/inputHintHelpers.js !function(){function t(t,n,e,r){var a={};a.doStandardTextareaMount=function(){var t=arguments.length<=0||void 0===arguments[0]?{}:arguments[0];return n.doStandardTextareaMount({inputHintID:"hashtag",textarea:t.textarea,getTriggerWordNearCaret:function(){var t=LJ.Hashtag.getTagNearCaret.apply(this,arguments);return t?{word:t.tag,wordStartIndex:t.tagStartIndex,wordEndIndex:t.tagEndIndex}:null},getHintsForWord:function(t){return/[\]\[\/\\\(\)]/.test(t)?r.resolve([]):e.call("hashtags.search",{journaltype:"P",query:t,size:8}).then(function(t){var n=t.tags||[],e=function(t,n,e){return e.indexOf(t)===n};return n.filter(e).map(function(t){return"#"+t})})}})};var i=function(){return LJ.Event.trigger("api::broadcast",{name:"hashHint",api:a})};return i(),LJ.Event.on("api::request",function(t){t&&"hashHint"===t.name&&i()}),a}t.$inject=["$window","inputHintHelpersService","Api","$q"],angular.module("HashHintModule",["LJ.Api","InputHintHelpersModule"]),angular.module("HashHintModule").factory("hashHintService",t)}(); /* <<< file end: js/widgets/angular/hints/hashHint.js */ //# map link was there [hashHint.js.map] /* >>> file start: js/misc/catSuggester.js */ !function(e){return e}(),function(){function e(e){function t(e,t,n){var a=this,r=[];t.find(".js--cat-item").toArray().forEach(function(e){r.push({humanName:e.dataset.humanName,accepted:!0})}),a.isShown=function(){return r.length>0},a.initCat=function(){var e=arguments.length<=0||void 0===arguments[0]?{}:arguments[0];r.push({humanName:e.humanName,accepted:!0})},a.catIsShown=function(){var e=arguments.length<=0||void 0===arguments[0]?{}:arguments[0];return e.humanName?r.filter(function(t){return t.humanName===e.humanName&&t.accepted}).length>0:!1};var u=function(){var e=r.filter(function(e){return e.accepted}).map(function(e){return e.humanName});n.call("entry.set_categories_adjusted",{journal:LJ.get("entry.journal"),ditemid:LJ.get("entry.ditemid"),categories:e})};a.rejectCat=function(){var e=arguments.length<=0||void 0===arguments[0]?{}:arguments[0];e.humanName&&(r.filter(function(t){return t.humanName===e.humanName}).forEach(function(e){e.accepted=!1}),u())},a.getCancelledCats=function(){return r.filter(function(e){return!e.accepted})},a.reacceptAll=function(){r.forEach(function(e){e.accepted=!0}),u()}}return t.$inject=["$scope","$element","Api"],{controller:t,controllerAs:"catSuggester"}}e.$inject=["$window"],angular.module("LJ.CategorySuggester",["LJ.Api"]),angular.module("LJ.CategorySuggester").directive("ngljCatSuggester",e)}(); /* <<< file end: js/misc/catSuggester.js */ //# map link was there [catSuggester.js.map] /* >>> file start: js/entry/main.js */ //= require js/core/string.js //= require js/editor/basicToolbar.js //= require js/discovery/directives.js //= require js/widgets/likus.js //= require js/core/angular/ljMemories.js //= require js/core/angular/ljEmbed.js //= require js/core/angular/share.js //= require js/core/angular/components/colMen2018.js //= require js/lib/jquery.qrcode.min.js //= require js/widgets/angular/mediusCardPager.js //= require js/widgets/angular/mediusSubscribe.js //= require js/widgets/angular/mediusFooter.js //= require js/widgets/angular/mediusTimeAgo.js //= require js/widgets/angular/mediusShareButtons.js //= require js/widgets/sharings.js //= require js/core/angular/api.js //= require js/referral/mamydirectControl.js //= require js/ljShareButton.js //= require js/widgets/angular/pinterestHelpers.js //= require js/widgets/angular/hints/hashHint.js //= require js/misc/catSuggester.js //= require_ml tretyakovskaya.postpage.toreviewlist //= require_ml talk.goback.tomain //= require_ml talk.goback.tomedius //= require_ml talk.wrote //= require_ml portal.recent.nosubject Site.page.template['Widgets/Medius/likesItemsPopup.ng.tmpl'] = '
  • \n'; LJ.UI.registerTemplate('templates-Comments-PrevNext', " {{if $data.previous_entry_link || $data.next_entry_link}}
    {{/if}} ", 'JQuery.stat'); !function(e){"use strict";function t(){function e(e,t){var r=t.find(".mdspost-extra-allauthors__button"),i=t.find(".mdspost-extra-follow");r.click(function(){i.removeClass("mdspost-extra-follow--collapsed"),r.hide()})}return{link:e}}function r(e){function t(t,r){var i=LJ.get("siteroot"),n=LJ.get("remote_is_sup");return r.css("display","block"),LJ.get("is_tretyakovgallery")?(r.attr("href",LJ.get("category_url")),void r.find("[go-back-text]").text(LJ.ml("tretyakovskaya.postpage.toreviewlist"))):e.document.referrer.match(i)&&e.history.length>1?n?void 0:(r.attr("href",LJ.get("siteroot")+"/media"),void r.find("[go-back-text]").text(LJ.ml("talk.goback.tomedius"))):(r.attr("href",LJ.get("siteroot")),void r.find("[go-back-text]").text(LJ.ml("talk.goback.tomain")))}return{link:t}}function i(){return{scope:!0,link:function(e,t){e.firstCharacterIsPunctuation=/[-−–—+]/.test(t.text()[0])}}}function n(e,t){function r(r,i){function n(){c--,c>0||i.append(e(LJ.UI.template("templates-Comments-PrevNext",l))(r))}var o=LJ.get("entry")||{},a={journal:o.journal,ditemid:o.ditemid},s={silent:!0},c=2,l={};l.ehtml=function(e){return LJ.String.encodeHTML(e.replace(/&/g,"&"))},[{direction:"previous",apiMethod:"entry.get_itemid_before"},{direction:"next",apiMethod:"entry.get_itemid_after"}].forEach(function(e){t.call(e.apiMethod,a,s).then(function(t){var r=e.direction+"_";l[r+"poster"]=t.poster,l[r+"entry_link"]=t.link,l[r+"entry_subject"]=t.subject,t.is_community&&!l.is_community&&(l.is_community=t.is_community,l.journal_ljuser=t.journal),n()},function(){n()})})}return{link:r}}function o(t,r,i,n){function o(){e("a:not([target])").attr("target","_self")}LJ.Util.isMediusJournal()&&d&&n.find(".mdspost-text-container .aentry-post__embed--big iframe").each(function(e,t){var r,i=LJ.GlobalConfig.POST2017_EMBED_FORMATS.postWidth;t.setAttribute("width",i.width),t.setAttribute("height",i.height);var n=["aentry-post__embed--big--1000px","aentry-post__embed--big"];(r=t.closest("figure").classList).remove.apply(r,n)}),LJ.get("preview")&&LJ.Social.parseWidgets(),t(function(){o()}),LJ.Event.on("entry/fixLinks",o),LJ.Util.runMamydirect(),!LJ.Support.isMobile()&&d&&LJ.get("entry.is_public")&&i.mountHoverSaveButton({container:n.find(".mdspost-text")[0]})}function a(e,t){e.enabled(!1),t.html5Mode({enabled:!0,requireBase:!1})}function s(){function e(){function e(e,n){function o(o,a){if(e.className===p||n===f||!~l.indexOf(e.nodeName)||d.filter(t(e)).length)return void o();var s=e.appendChild(document.createElement("div"));s.className=p,[].reduce.call(e.childNodes,r,[]).reduce(i,Promise.resolve({reffer:e.firstChild,offset:0,level:n,prev:null})).then(o)["catch"](function(e){a(e)})}return new Promise(o)}function t(e){return function(t){return~e.className.indexOf(t)}}function r(e,t){var r,i=e[e.length-1];return i&&!i.el||(e.push({el:null}),i=e[e.length-1]),(~m.indexOf(t.nodeName)||t.querySelectorAll&&t.querySelectorAll(m).length)&&(i.el=t,r=getComputedStyle(t,null).display),e}function i(e,t){return e.then(function(e){return n(t.el).then(a.bind(null,t.el,e))})}function n(e){var t="IMG"===e.nodeName?[e]:e.querySelectorAll("img");return Promise.all([].map.call(t,o))}function o(e){function t(t){e.complete?t():e.onload=t}return new Promise(t)}function a(t,r){function i(i,u){return l&&r.prev&&t.offsetTop-r.prev.top>c?void u(r.prev.reffer):(l&&n-a>s?r.prev=r.prev?r.prev:{top:r.offset,reffer:r.reffer}:r.prev=null,l&&r.prev&&o-r.prev.top>c?void u(r.prev.reffer):l&&t.offsetTop-r.offset>c?void u(r.reffer):void e(t,r.level+1).then(function(){i({reffer:t.nextSibling,offset:o,prev:r.prev})})["catch"](function(e){u(e)}))}var n=window.innerWidth-2*g.winmarg,o=t.offsetTop+t.offsetHeight,a=t.offsetLeft+t.offsetWidth,s=g.width+g.margin,c=g.height+2*g.margin,l=n<=g.wmax&&n>=g.wmin;return new Promise(i)}function s(e){var t,r,i,n,o=window.innerWidth-2*g.winmarg;t=document.createElement("div"),t.setAttribute("lj-sale","s1_right"),t.setAttribute("lj-sale-hide-cookie","s1_rightbanner_closed"),t.className="ljsale ljsale--empty b-singlepost-postbanner",n=g.post-o>> file start: js/jquery/jquery.calendarEvents.js */ !function(e){var t={};e.fn.calendarEvents=function(n){function a(e,t){return"cache_"+e+t}function s(e,t){var n=this;this.calendar=e,this.events=null,this.options=t,this._ajaxActive=!1,this._currentDate;var s,i=function(t,i){"string"!=typeof e.data("noFetch")&&(clearTimeout(s),n._currentDate=a(t.getFullYear(),t.getMonth()+1),s=setTimeout(function(){n.fetchEvents(t.getFullYear(),t.getMonth()+1,i)},200))};this.calendar.bind("dateChange",function(e){var t=n.calendar[n.options.calendarType]("option","displayedMonth"),a=1===Math.abs(12*(e.date.getFullYear()-t.getFullYear())+(e.date.getMonth()-t.getMonth()));i(e.date,a)}),this.options.fetchOnFirstDisplay&&this.calendar.one("calendarshow",function(e){i(new Date,!0)})}var i={calendarType:"calendar",classNames:{idle:"idle"},fetchOnFirstDisplay:!1};return s.prototype={getEvents:function(e,t,n){var a={};return a[+e]={},a[+e][+t-1]=n,a},fetchEvents:function(n,s,i){i=arguments.length>=3?!!i:!0;var o=this,r=(this.calendar[this.options.calendarType]("option","displayedMonth"),this.calendar[this.options.calendarType]("getElement",i?"month":"year")),c=this.options.classNames.idle,l=!0,h=function(){o._ajaxActive||l||r.removeClass(c)};this.calendar[this.options.calendarType]("getElement","year").removeClass(c),this.calendar[this.options.calendarType]("getElement","month").removeClass(c),r.addClass(c),this._ajaxActive=!0,setTimeout(function(){l=!1,h()},500);var d=a(n,s);processResults=function(e){d===o._currentDate&&(o.events=t[d],o.calendar[o.options.calendarType]("option","events",o.getEvents(o.events.year,o.events.month,o.events.days)),o._ajaxActive=!1,h())},d in t?processResults(t[d]):e.getJSON(LiveJournal.getAjaxUrl("calendar"),{year:n,month:s},function(e){t[d]=e,processResults(e)})}},this.each(function(){new s(e(this),e.extend({},i,n))})}}(jQuery); /* <<< file end: js/jquery/jquery.calendarEvents.js */ //# map link was there [jquery.calendarEvents.js.map] /* >>> file start: js/settings/services/filters/filters.js */ //= require js/core/angular/api.js //= require js/core/angular/options.js //= require js/core/angular/users.js !function(t){return t}(),function(){"use strict";angular.module("GroupsAndFilters.Services.Filters",["LJ.Api","LJ.Options","Users"]).filter("filtersOrder",function(){return function(t){var r=t.slice(0);return r.sort(function(t,r){if(31===t.id)return-1;if(31===r.id)return 1;var e=t.name.toLowerCase(),i=r.name.toLowerCase();return e>i?1:-1}),r}}).factory("FilterGroupFactory",["$q","$timeout","Api","Options","Users",function(t,r,e,i,n){function o(){angular.extend(this,{MAX_COUNT:31,filters:[],key:"filters",rpc:{}},i.create({journal:LJ.get("remoteUser")}))}return o.prototype.toJSON=function(t){var r=angular.copy(t);return delete r.checked,delete r.users,r},o.prototype.nextId=function(){for(var t=null,r=this.filters.map(LJ.Function.get("id")),e=1,i=this.MAX_COUNT;i>e&&null===t;)-1===r.indexOf(e)&&(t=e),e+=1;return t},o.prototype.sync=function(t){var r={};return angular.isArray(t)||(t=[t]),r[this.key]=t.map(this.toJSON),r.journal=this.get("journal"),e.call(this.rpc.update,r)},o.prototype.fetch=function(r){if(!this.rpc.read)return t.reject();var i=this,n={journal:this.get("journal")};return r=angular.extend(r||{},{cache:!1}),e.call(this.rpc.read,n,r).then(function(t){return i.filters=t[i.key],i.filters})},o.prototype._isNameUniq=function(t){var r=this.filters.map(function(t){return t.name.toLowerCase()});return t=t.toLowerCase(),-1===r.indexOf(t)},o.prototype.create=function(r){var i;return r=r.trim(),0===r.length?t.reject("filters"===this.key?LJ.ml("api.error.filters.filter_name_not_specified"):LJ.ml("api.error.groups.group_name_not_specified")):this._isNameUniq(r)?(i={id:this.nextId(),name:r,users:[],"public":!1,journal:this.get("journal")},this.filters.push(i),e.call(this.rpc.create,i)):t.reject("filters"===this.key?LJ.ml("api.error.filters.filter_already_exist",{name:r}):LJ.ml("api.error.groups.group_already_exist",{name:r}))},o.prototype.remove=function(t){var r=this,i={};return t=Array.isArray(t)?t:[t],i[this.key]=t.map(LJ.Function.get("id")),i.journal=this.get("journal"),t.forEach(function(t){r.filters.splice(r.filters.indexOf(t),1)}),e.call(this.rpc.remove,i)},o.prototype.getCount=function(){return e.call(this.rpc.count,{journal:this.get("journal")}).then(LJ.Function.get("count"))},o.prototype.by=function(t){var r=n.Cache.get(t);return r?this.filters.filter(function(r){return n.isUserInGroup(t,r.id)}):[]},o}]).factory("Filter",["FilterGroupFactory",function(t){function r(){this.rpc={create:"filters.create",update:"filters.update",remove:"filters.remove",count:"filters.count"},this.key="filters"}return r.prototype=new t,r.prototype._setPrivacy=function(t,r){return t=Array.isArray(t)?t:[t],t.forEach(LJ.Function.set("public","public"===r)),this.sync(t)},r.prototype["private"]=function(t){return this._setPrivacy(t,"private")},r.prototype["public"]=function(t){return this._setPrivacy(t,"public")},new r}]).factory("Group",["FilterGroupFactory",function(t){function r(){this.rpc={create:"groups.create",read:"groups.list",update:"groups.update",remove:"groups.remove",count:"groups.count"},this.key="groups"}return r.prototype=new t,new r}])}(); /* <<< file end: js/settings/services/filters/filters.js */ //# map link was there [filters.js.map] /* >>> file start: js/settings/directives/filtersFor.js */ //!= require js/core/angular/messages.js LJ.injectStyle('/* >>> file start: stc/widgets/filter-settings.css */\n.b-filterset{max-width:290px;font:14px/1.4 Arial,sans-serif;color:#000}.b-filterset-addnew-input,.b-filterset-list LABEL{display:block;white-space:nowrap;line-height:1.333}.b-filterset B,.b-filterset CODE,.b-filterset DD,.b-filterset DIV,.b-filterset DT,.b-filterset EM,.b-filterset I,.b-filterset KBD,.b-filterset LABEL,.b-filterset LI,.b-filterset P,.b-filterset PRE,.b-filterset SPAN,.b-filterset STRONG,.b-filterset TD,.b-filterset TH{font-size:100%}.b-filterset .i-ljuser-userhead{vertical-align:top!important;margin:1px 0 0!important;border:none!important}.b-filterset .i-ljuser-username:active,.b-filterset .i-ljuser-username:hover,.b-filterset .i-ljuser-username:link,.b-filterset .i-ljuser-username:visited{color:#0051B7!important;text-decoration:none!important;border:none!important}.b-filterset .b-filterset-subtitle,.b-filterset .b-filterset-title{margin:0 1.142em .5em 0!important;color:#222!important}.b-filterset .b-filterset-title{font-weight:700!important}.b-filterset-list{position:relative;z-index:1;overflow:auto;max-height:14em;min-width:220px;margin:0 0 .3em;padding:0;background-attachment:scroll;background-clip:border-box;background-image:-webkit-radial-gradient(50% 0,farthest-side,rgba(0,0,0,.1),transparent),-webkit-radial-gradient(50% 100%,farthest-side,rgba(0,0,0,.1),transparent);background-image:radial-gradient(farthest-side at 50% 0,rgba(0,0,0,.1),transparent),radial-gradient(farthest-side at 50% 100%,rgba(0,0,0,.1),transparent);background-origin:padding-box;background-position:0 0,0 100%;background-repeat:no-repeat;background-size:100% 7px}.b-filterset-list:after,.b-filterset-list:before{position:relative;z-index:-1;display:block;content:\"\";height:14px;margin:0 0 -14px;background:-webkit-linear-gradient(top,#F4F5F6,#F4F5F6 30%,rgba(244,245,246,0));background:linear-gradient(to bottom,#F4F5F6,#F4F5F6 30%,rgba(244,245,246,0))}.b-filterset-list:after{margin:-14px 0 0;background:-webkit-linear-gradient(top,rgba(228,229,233,0),#E4E5E9 70%,#E4E5E9);background:linear-gradient(to bottom,rgba(228,229,233,0),#E4E5E9 70%,#E4E5E9)}.b-filterset-list LI{margin:0;padding:0;list-style-type:none}.b-filterset-list LI.loading{background:url(/img/preloader/preloader-blue-gray.gif?v=16423) 100% 50% no-repeat}.b-filterset-list LABEL{font-size:.857em}.b-filterset-list LABEL:hover{background:#7292BD;color:#FFF}.b-filterset-addnew-input{margin:0 0 .5em;font-size:.857em}.b-filterset-addnew{margin:.5em 0 0}.b-filterset-pseudo{font-size:.857em;color:#0051B7}.b-filterset-submit{text-align:right}.b-filterset-loader:after,.b-filterset-loader:before{display:inline-block;visibility:hidden;content:\'\';width:21px;height:21px;margin:-2px 0 0 4px;background:url(/img/preloader/preloader-blue-gray.gif?v=16423) 50% 50% no-repeat;vertical-align:middle}.b-filterset-loader-after:before,.b-filterset-loader-before:after{display:none}.b-filterset-loading .b-filterset-loader-after:after,.b-filterset-loading .b-filterset-loader-before:before{visibility:visible}\n/* <<< file end: stc/widgets/filter-settings.css */\n\n/*# sourceMappingURL=filter-settings.css.map */\n'); Site.page.template['angular/controlstrip/filters.ng.tmpl'] = '
    \n
      \n
    • \n \n
    • \n\n
    • \n \n
      \n \n \n \n
      \n
    • \n
    \n\n \n \n \n
    \n\n'; !function(e){return e}(),function(){"use strict";function e(e,r,t,n,o,i){function l(){return Array.isArray(e.usernames)?e.usernames:[e.usernames]}e.loading={},e.filters=[],t.fetch({cache:!0}).then(function(r){e.filters=r}),e.model={newFilter:"",showCreateDialog:!1},e.toggleFilter=function(r,t){var o;i.clear(),e.loading[r]=!0,o=t?n.addToGroup(r,l()):n.removeFromGroup(r,l()),o.then(function(){e.loading[r]=!1})},e.isActive=function(e){var r=l().every(function(r){return n.isUserInGroup(r,e)});return r},e.isCountReached=function(){return e.filters.length>=t.MAX_COUNT},e.createFilter=function(){var r=e.model.newFilter.trim();e.resetFilter(),0!==r.length&&(e.model.loading=!0,t.create(r).then(function(r){var t=r.filter;n.addToGroup(t.id,l()).then(function(){e.model.loading=!1})}))},e.resetFilter=function(){e.model.newFilter="",e.model.showCreateDialog=!1},e.$on("bubble:open:controlstrip",e.resetFilter)}angular.module("Filters.List",[]).controller("FiltersForCtrl",["$scope","$q","Filter","Users","Bubble","Messages",e]).controller("GroupsForCtrl",["$scope","$q","Group","Users","Bubble","Messages",e]).directive("filtersFor",[function(){return{controller:"FiltersForCtrl",scope:{usernames:"=filtersFor"},templateUrl:"filters.ng.tmpl",link:function(e){e.isFiltersFor=!0}}}]).directive("groupsFor",[function(){return{controller:"GroupsForCtrl",scope:{usernames:"=groupsFor"},templateUrl:"filters.ng.tmpl",link:function(e){e.isGroupsFor=!0}}}])}(); /* <<< file end: js/settings/directives/filtersFor.js */ //# map link was there [filtersFor.js.map] /* >>> file start: js/relations/menu.js */ //= require js/core/angular/bubble.js //= require js/core/angular/ljUser.js //!= require js/core/angular/messages.js //= require js/settings/services/filters/filters.js //= require js/core/angular/users.js //= require js/settings/directives/filtersFor.js Site.page.template['angular/controlstrip/controlstrip.ng.tmpl'] = '\n\n \n
    \n\n \n
    \n
    \n\n \n
    \n\n \n
    \n
    \n
    \n
    \n \n
    \n
    \n\n \n \n\n
    \n
    \n
    \n \n\n'; !function(e){return e}(),function(e){"use strict";function t(e){LJ.Track.event("Relations","Menu",e)}angular.module("Relations.Menu",["LJ.Templates","LJ.Bubble","LJ.Directives","LJ.User","LJ.Messages","GroupsAndFilters.Services.Filters","Users","Filters.List"]).value("$anchorScroll",null).controller("MenuCtrl",["$scope","Bubble","$timeout","$q","ljUser","Filter","Users","Relations","Messages",function(n,s,r,i,o,u,c,a,l){function b(e,t){var s;switch(t&&d(t),e){case"addFriend":s=a.toggleFriend(h,!0,{wait:!0});break;case"removeFriend":s=a.toggleFriend(h,!1,{wait:!0});break;case"join":s=a.toggleMember(h,!0,{wait:!0});break;case"leave":s=a.toggleMember(h,!1,{wait:!0});break;case"subscribe":s=a.toggleSubscription(h,!0,{wait:!0});break;case"unsubscribe":s=a.toggleSubscription(h,!1,{wait:!0})}return s["finally"](m).then(function(t){return ContextualPopup.currentElement===v.find(".ljuser img").get(0)&&ContextualPopup.hide(),t.error?i.reject(t.error.message):(t.message&&(t.message.body=t.message.content,l.add(t.message)),"undefined"!=typeof t.controlstrip_status&&(n.status=t.controlstrip_status),"subscribe"===e||"addFriend"===e||"join"===e&&t.is_subscribedon?f():void(n.filters=[]))},function(e){l.error({body:e})})}function f(){var e,t=c.Cache.get(h);return t.is_subscribedon?(e=t.filtermask?i.defer().resolve():c.fetchUser(h,{filtermask:1}),i.all({filters:u.fetch({cache:!0}),user:e}).then(function(e){n.filters=e.filters})):i.reject()}function d(e){g&&m(),g=(new Hourglass).setEvent(e).show()}function m(){g&&(g.remove(),g=null)}var g,p,v=e(".w-cs-status"),h=LJ.get("journal.username");c.set({type:"subscriptions"}),n.username=h,n.filters=[],n.status=LJ.get("controlstrip.status"),c.Cache.add(LJ.get("journal")),ContextualPopup.showNote=angular.identity,p=i.defer(),n.mlResolve={promise:p.promise},o.get(h,{noctxpopup:!0}).then(function(e){p.resolve({username:e})}),n.$watch(function(){return c.Cache.get(h)},function(e){n.states=LJ.Object.pick(e,"is_friend","is_member","is_subscribedon","is_invite_sent")},!0),n.toggleLoading=function(e){n.loading=e},LJ.Event.on("relations.change",function(){r(l.clear)}),n.subscribe=function(e){e.preventDefault(),t("subscribe"),b("subscribe",e).then(function(){n.states.is_subscribedon&&(n.mode="subscribe",s.open("controlstrip","unsubscribe"))})},n.unsubscribe=function(e){e.preventDefault(),t("unsubscribe"),b("unsubscribe",e)},n.addFriend=function(e){e.preventDefault(),t("add friend"),b("addFriend",e).then(function(){n.states.is_friend&&(n.mode="add",s.open("controlstrip","removeFriend"))})},n.removeFriend=function(e){e.preventDefault(),t("remove friend"),b("removeFriend",e)},n.watch=function(e){e.preventDefault(),t("subscribe to community"),b("subscribe",e).then(function(){n.states.is_subscribedon&&(n.mode="watch",s.open("controlstrip","unwatch"))})},n.unwatch=function(e){e.preventDefault(),t("unsubscribe from community"),b("unsubscribe",e)},n.join=function(e){e.preventDefault(),t("join community"),b("join",e).then(function(){n.states.is_member&&(n.mode=n.states.is_subscribedon?"joinSubscribed":"join",s.open("controlstrip","leave"))})},n.leave=function(e){e.preventDefault(),t("leave community"),b("leave",e)},n.subscribeAfterJoin=function(){n.toggleLoading(!0),t("subscribe to community (after join)"),b("subscribe").then(function(){n.toggleLoading(!1),n.mode="watch"})}}])}(jQuery); /* <<< file end: js/relations/menu.js */ //# map link was there [menu.js.map] /* >>> file start: js/controlstrip.js */ //= require js/jquery/jquery.calendarEvents.js //= require js/relations/menu.js !function(e){return e}(),function(e){"use strict";function o(){var o,t,n,l;LJ.get("remoteUser")&&(o=e(".s-header .s-header-extra-filter, #lj_controlstrip_new .w-cs-filter-inner"),0!==o.length&&(t=e("#sortByPoster"),n=t.find("[name=poster]"),l=t.find("[type=image]"),o.bubble({target:".s-header .w-cs-filter-icon, #lj_controlstrip_new .w-cs-filter-icon",showOn:"click",closeControl:!0,classNames:{containerAddClass:"b-bubble-filter"}}),n.input(function(){this.value.length?l.css("opacity",1).prop("disabled",!1):l.css("opacity",0).prop("disabled",!0)}),t.on("submit",function(e){n.val().length||e.preventDefault()})))}function t(){e(".s-header input[placeholder], #lj_controlstrip_new input[placeholder]").labeledPlaceholder()}function n(){o(),t(),LJ.Flags.isEnabled("new_friends_and_subscriptions")&&!l&&angular.bootstrap(e("[data-controlstrip]"),["Relations.Menu"]),function(){function o(e){var o=e.split(",").map(Number);return new Date(o[0],o[1],o[2])}var t=e(".s-header .w-cs-i-calendar a, #lj_controlstrip_new .w-cs-i-calendar a"),n=/^\/friends/.test(location.pathname),l=LJ.get("current_journal.url_journal"),r=LJ.get("controlstrip.calendar.earlyDate"),a=LJ.get("controlstrip.calendar.lastDate");t.length&&(t.calendar({showOn:"click",closeControl:!0,bubbleClass:!0,dayRef:l+"/"+(n?"friends/":"")+"%Y/%M/%D",allRefs:n,startMonth:r?o(LJ.get("controlstrip.calendar.earlyDate")):new Date,endMonth:a?o(LJ.get("controlstrip.calendar.lastDate")):new Date,classNames:{container:"w-cs-calendar"},ml:{caption:LJ.ml("web.controlstrip.view.calendar")}}).on("daySelected",function(e){e.preventDefault()}),n||t.calendarEvents({fetchOnFirstDisplay:!0}))}(),e(".b-loginpopup").bubble({target:".i-auth-control",closeControl:!1,showOn:"click"}),LJ.Flags.isEnabled("move_billboard_to_scheme")&&e("body").on("ljsale-load ljsale-slotRenderEnded",function(){var o=e("body > .s-header").height();o&&e("body").css("padding-top",o)}),e("input.text").labeledPlaceholder(),e("html").trigger("controlstrip-initialized")}var l=Boolean("undefined"!=typeof document.documentMode&&document.documentMode<8);e(function(){return 0!==e(".s-header, #lj_controlstrip_new").length||"xcolibur"===Site.page.scheme?void n():void e.get(LiveJournal.getAjaxUrl("controlstrip"),{user:LJ.get("currentJournal")},function(o){e(".body-content").length?e(o).prependTo(".body-content"):(e("html").removeClass("html-adaptive"),e(o).appendTo(document.body)),n()})}),e(function(){function o(o){var t=e("."+r.showElem+":not("+o+")");e(t).removeClass(r.showElem)}function t(){var o=e("."+r.showElem);o.length>0?e(l.bodyElem).addClass(r.showFader):e(l.bodyElem).removeClass(r.showFader)}function n(){var o=e("."+r.showElem);o.length>0?a.catchBlur=!0:a.catchBlur=!1}var l={bodyElem:e("body"),controls:e(".js--show-elem"),controlsHover:e(".js--show-elem-by-hover"),fader:e(".b-fader")},r={control:"js--show-elem",controlHover:"js--show-elem-by-hover",showElem:"js--is-shown",showFader:"js--show-fader",catchBlur:"js--catch-blur"},a={catchBlur:!1};e(document).on("click",function(){a.catchBlur&&o()}),e(l.controlsHover).hover(function(){var o=e(this).find("."+r.control),t={selector:e(o).data("elem")};e(t.selector).addClass(r.showElem)},function(){var o=e(this).find("."+r.control),t={selector:e(o).data("elem")};e(t.selector).removeClass(r.showElem),e(this).addClass(r.controlHover)}),e(l.controls).on("click",function(l){var a={selector:e(this).data("elem"),isShowFader:e(this).data("fader")||!1,isUseBlur:e(this).data("blur")||!1};o(a.selector),e(a.selector).toggleClass(r.showElem),e(this).parent().hasClass(r.controlHover)&&e(this).parent().removeClass(r.controlHover),a.isShowFader&&t(),a.isUseBlur&&n(),l.stopPropagation(),l.preventDefault()}),e(l.fader).on("click",function(){o(),e(l.bodyElem).removeClass(r.showFader)})})}(jQuery); /* <<< file end: js/controlstrip.js */ //# map link was there [controlstrip.js.map] /* >>> file start: js/lib/jquery.selectric.min.js */ !function(e){"use strict";var t="selectric",s="Input Items Open Disabled TempShow HideSelect Wrapper Hover Responsive Above Scroll",o=".sl",i={onChange:function(t){e(t).change()},maxHeight:300,keySearchTimeout:500,arrowButtonMarkup:'',disableOnMobile:!0,openOnHover:!1,expandToItemText:!1,responsive:!1,preventWindowScroll:!0,inheritOriginalWidth:!1,customClass:{prefix:t,postfixes:s,camelCase:!0,overwrite:!0},optionsItemBuilder:"{text}"},n={add:function(e,t,s){this[e]||(this[e]={}),this[e][t]=s},remove:function(e,t){delete this[e][t]}},a={replaceDiacritics:function(e){for(var t="40-46 50-53 54-57 62-70 71-74 61 47 77".replace(/\d+/g,"\\3$&").split(" "),s=t.length;s--;)e=e.toLowerCase().replace(RegExp("["+t[s]+"]","g"),"aeiouncy".charAt(s));return e},format:function(e){var t=arguments;return(""+e).replace(/{(\d+|(\w+))}/g,function(e,s,o){return o&&t[1]?t[1][o]:t[s]})},nextEnabledItem:function(e,t){for(;e[t=(t+1)%e.length].disabled;);return t},previousEnabledItem:function(e,t){for(;e[t=(t>0?t:e.length)-1].disabled;);return t},toDash:function(e){return e.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()},triggerCallback:function(s,o){var i=o.element,l=o.options["on"+s];e.isFunction(l)&&l.call(i,i,o),n[s]&&e.each(n[s],function(){this.call(i,i,o)}),e(i).trigger(t+"-"+a.toDash(s),o)}},l=e(document),r=e(window),c=function(n,c){function d(t){if($.options=e.extend(!0,{},i,$.options,t),$.classes={},$.element=n,a.triggerCallback("BeforeInit",$),$.options.disableOnMobile&&L)return void($.disableOnMobile=!0);C(!0);var o=$.options.customClass,l=o.postfixes.split(" "),r=R.width();e.each(s.split(" "),function(e,t){var s=o.prefix+l[e];$.classes[t.toLowerCase()]=o.camelCase?s:a.toDash(s)}),x=e("",{"class":$.classes.input,readonly:L}),k=e("
    ",{"class":$.classes.items,tabindex:-1}),T=e("
    ",{"class":$.classes.scroll}),D=e("
    ",{"class":o.prefix,html:$.options.arrowButtonMarkup}),y=e('

    '),I=R.wrap("

    ").parent().append(D.prepend(y),k,x),A={open:v,close:g,destroy:C,refresh:u,init:d},R.on(A).wrap('
    '),e.extend($,A),$.options.inheritOriginalWidth&&r>0&&I.width(r),p()}function p(){$.items=[];var t=R.children(),s="
      ",i=t.filter(":selected").index();H=S=~i?i:0,(E=t.length)&&(t.each(function(t){var o=e(this),i=o.html(),n=o.prop("disabled"),l=$.options.optionsItemBuilder;$.items[t]={value:o.val(),text:i,slug:a.replaceDiacritics(i),disabled:n},s+=a.format('
    • {2}
    • ',e.trim([t==H?"selected":"",t==E-1?"last":"",n?"disabled":""].join(" ")),e.isFunction(l)?l($.items[t],o,t):a.format(l,$.items[t]))}),k.append(T.html(s+"
    ")),y.html($.items[H].text)),D.add(R).add(I).add(x).off(o),I.prop("class",[$.classes.wrapper,$.options.customClass.overwrite?R.prop("class").replace(/\S+/g,$.options.customClass.prefix+"-$&"):R.prop("class"),$.options.responsive?$.classes.responsive:""].join(" ")),R.prop("disabled")?(I.addClass($.classes.disabled),x.prop("disabled",!0)):(j=!0,I.removeClass($.classes.disabled).on("mouseenter"+o+" mouseleave"+o,function(t){e(this).toggleClass($.classes.hover),$.options.openOnHover&&(clearTimeout($.closeTimer),"mouseleave"==t.type?$.closeTimer=setTimeout(g,500):v())}),D.on("click"+o,function(e){Y?g():v(e)}),x.prop({tabindex:q,disabled:!1}).on("keypress"+o,h).on("keydown"+o,function(e){h(e),clearTimeout($.resetStr),$.resetStr=setTimeout(function(){x.val("")},$.options.keySearchTimeout);var t=e.keyCode||e.which;t>36&&41>t&&b(a[(39>t?"previous":"next")+"EnabledItem"]($.items,S))}).on("focusin"+o,function(e){x.one("blur",function(){x.blur()}),Y||v(e)}).on("oninput"in x[0]?"input":"keyup",function(){x.val().length&&e.each($.items,function(e,t){return RegExp("^"+x.val(),"i").test(t.slug)&&!t.disabled?(b(e),!1):void 0})}),R.prop("tabindex",!1),O=e("li",k.removeAttr("style")).click(function(){return b(e(this).index(),!0),!1})),a.triggerCallback("Init",$)}function u(){a.triggerCallback("Refresh",$),p()}function h(e){var t=e.keyCode||e.which;13==t&&e.preventDefault(),/^(9|13|27)$/.test(t)&&(e.stopPropagation(),b(S,!0))}function f(){var e=k.closest(":visible").children(":hidden"),t=$.options.maxHeight;e.addClass($.classes.tempshow);var s=k.outerWidth(),o=D.outerWidth()-(s-k.width());!$.options.expandToItemText||o>s?W=o:(k.css("overflow","scroll"),I.width(9e4),W=k.width(),k.css("overflow",""),I.width("")),k.width(W).height()>t&&k.height(t),e.removeClass($.classes.tempshow)}function v(s){a.triggerCallback("BeforeOpen",$),s&&(s.preventDefault(),s.stopPropagation()),j&&(f(),e("."+$.classes.hideselect,"."+$.classes.open).children()[t]("close"),Y=!0,B=k.outerHeight(),M=k.height(),x.val("").is(":focus")||x.focus(),l.on("click"+o,g).on("scroll"+o,m),m(),$.options.preventWindowScroll&&l.on("mousewheel"+o+" DOMMouseScroll"+o,"."+$.classes.scroll,function(t){var s=t.originalEvent,o=e(this).scrollTop(),i=0;"detail"in s&&(i=-1*s.detail),"wheelDelta"in s&&(i=s.wheelDelta),"wheelDeltaY"in s&&(i=s.wheelDeltaY),"deltaY"in s&&(i=-1*s.deltaY),(o==this.scrollHeight-M&&0>i||0==o&&i>0)&&t.preventDefault()}),I.addClass($.classes.open),w(S),a.triggerCallback("Open",$))}function m(){f(),I.toggleClass($.classes.above,I.offset().top+I.outerHeight()+B>r.scrollTop()+r.height())}function g(){if(a.triggerCallback("BeforeClose",$),H!=S){a.triggerCallback("BeforeChange",$);var e=$.items[S].text;R.prop("selectedIndex",H=S).data("value",e),y.html(e),a.triggerCallback("Change",$)}l.off(o),I.removeClass($.classes.open),Y=!1,a.triggerCallback("Close",$)}function b(e,t){$.items[e].disabled||(O.removeClass("selected").eq(S=e).addClass("selected"),w(e),t&&g())}function w(e){var t=O.eq(e).outerHeight(),s=O[e].offsetTop,o=T.scrollTop(),i=s+2*t;T.scrollTop(i>o+B?i-B:o>s-t?s-t:o)}function C(e){j&&(k.add(D).add(x).remove(),!e&&R.removeData(t).removeData("value"),R.prop("tabindex",q).off(o).off(A).unwrap().unwrap(),j=!1)}var x,k,T,D,y,I,O,S,H,B,M,W,E,A,$=this,R=e(n),Y=!1,j=!1,L=/android|ip(hone|od|ad)/i.test(navigator.userAgent),q=R.prop("tabindex");d(c)};e.fn[t]=function(s){return this.each(function(){var o=e.data(this,t);o&&!o.disableOnMobile?""+s===s&&o[s]?o[s]():o.init(s):e.data(this,t,new c(this,s))})},e.fn[t].hooks=n}(jQuery); /* <<< file end: js/lib/jquery.selectric.min.js */ //# map link was there [jquery.selectric.min.js.map] /* >>> file start: js/captcha.js */ !function(e){return e}(),function(e){function t(){return"undefined"!=typeof d}function n(){var t=e.Deferred();return s?t.resolve(s):LJ.Api.call("captcha.get_public_key",{},function(e){s=e.captcha_public,t.resolve(s)}),t.promise()}function r(){return location.protocol+"//www.google.com/recaptcha/api.js?onload=onRecaptchaLoad&render=explicit"}function a(r,a){var o=e.Deferred();return a=e.extend(C,a||{}),LJ.Captcha.current?e.when(n(),L()).then(function(){return t()?(a.sitekey=s,f(),d.render(r,a)):void console.error("Something went wrong. Captcha object is not defined.")}):(o.resolve(),o.promise())}function o(){}function c(){return t()?(f(),d.reset.apply(null,arguments)):void 0}function i(){return null}function l(e){return t()?d.getResponse(e):void 0}function p(){return h(),(d||grecaptcha).execute.apply(null,arguments)}function u(e){var t=e.attributes.title,n=e.attributes.src;if(t){var r=t.value;if(/испытание|challenge/.test(r)&&/recaptcha/.test(r))return!0}if(n){var a=n.value;if(/google\.com.*recaptcha.*bframe/.test(a))return!0}return!1}LJ.define("LJ.Captcha"),LJ.Captcha={create:a,reload:c,destroy:o,getChallenge:i,getResponse:l,isDefined:t,execute:p,current:["recaptcha"].filter(LJ.Flags.isEnabled).shift()},LJ.Captcha.available=!!LJ.Captcha.current;var s,d,f=void 0,v=void 0,h=void 0,C={lang:"ru"},g=e.Deferred();window.onRecaptchaLoad=function(){g.resolve()};var L=LJ.Function.once(function(){var t=e.Deferred();return LJ.injectScript(r()),g.then(function(){d=grecaptcha,t.resolve()}),t.promise()});LJ.Captcha.getCaptchaApiObject=function(){return d||grecaptcha},LJ.Captcha.setOnSimpleForm=function(e,t){f(),window.onCaptchaPass=function(){var t=Object.getPrototypeOf(e).submit;t.call(e)},t.addEventListener("click",function(e){e.preventDefault(),p()})},LJ.Event.on("reCAPTCHA::popup::created",function(e){var t=e.firstChild,n=e.lastChild,r=n.firstChild;e.classList.add("recaptcha-tiles"),t&&t.classList.add("recaptcha-tiles__fader"),n&&n.classList.add("recaptcha-tiles__iframe-wrapper"),r&&r.classList.add("recaptcha-tiles__iframe")}),LJ.Event.on("reCAPTCHA::popup::shown",function(){document.body.classList.add("body--recaptcha-opened")}),LJ.Event.on("reCAPTCHA::popup::hidden",function(){document.body.classList.remove("body--recaptcha-opened")}),function(){var e=void 0,t=void 0;f=function(){var n=document.body.lastChild;e=setInterval(function(){var r=document.body.lastChild;if(r!==n){n=r;var a=n.querySelector("iframe");a&&u(a)&&(t=n,console.log("reCAPTCHA popup created"),LJ.Event.trigger("reCAPTCHA::popup::created",t),clearInterval(e),e=null)}},100)};var n=void 0,r=void 0;v=function(){n=new Date,r||(r=setInterval(function(){t&&0===+t.style.opacity&&(console.log("reCAPTCHA popup hidden"),LJ.Event.trigger("reCAPTCHA::popup::hidden"),clearInterval(r),r=null)},100))};var a=1e4;h=function(){n=new Date,r||(r=setInterval(function(){t&&1===+t.style.opacity?(console.log("reCAPTCHA popup shown"),LJ.Event.trigger("reCAPTCHA::popup::shown"),clearInterval(r),r=null,v()):new Date>n+a&&(console.log("reCAPTCHA popup taking too long to appear, aborting wait"),clearInterval(r),r=null)},100))}}()}(jQuery); /* <<< file end: js/captcha.js */ //# map link was there [captcha.js.map] /* >>> file start: js/scheme/schemius/feedback.js */ !function(e){"use strict";e(function(){function t(){s.addClass("p-feedback"),o=!0,u.val(r),LJ.get("remote")||LJ.Captcha.create("b-captcha",{tabindex:50}),n.bubble("hide")}var a=this,s=e("body"),o=!1,r=e(".js-feedback").attr("data-spcatid"),n=e(".s-welcometo"),c=e(".s-do-item-feedback"),l=e(".s-feedback"),i=l.find(".s-feedback-error"),d=l.find(".b-bubble-success-inner"),u=l.find('.s-feedback-body .s-feedback-form input[name="spcatid"]'),f={inprogress:"s-feedback-creating",done:"s-feedback-successfully",error:"s-feedback-erroneously"};e(".js-feedback").on("click",function(e){e.preventDefault(),t()}),this.setState=function(e){l.toggleClass(f.inprogress,"inprogress"===e),l.toggleClass(f.done,"done"===e),l.toggleClass(f.error,"error"===e)},l.on("click",".s-feedback-submit",function(t){var s={};t.preventDefault(),a.setState("inprogress"),l.find("input, textarea, select").each(function(){s[this.name]=e(this).val()}),LJ.Api.call("support.create_request",s,function(t){return t.error?(i.html(t.error.message),a.setState("error")):(d.html(e("").attr("href",t.request.url).html(t.request.url)),void a.setState("done"))})}).on("click",".s-feedback-another",function(t){t.preventDefault(),l.find("input, textarea").each(function(){e(this).val("")}),LJ.Captcha.reload(),a.setState(null)}),n.bubble({target:c,showOn:"click",alwaysShowUnderTarget:!0,arrowWidth:"auto"}).on("click",".s-welcometo-action .b-flatbutton",function(e){e.preventDefault(),t()}).on("click",".s-welcometo-switcher",function(e){return e.preventDefault(),LJ.get("remote")?void LJ.Api.call("settings.set_old_design",{value:1},function(){location.reload()}):(LJ.Cookie.setGlobal("ljold",1,{expires:7}),void location.reload())}),s.on("click",function(t){var r=e(t.target);o&&(r.hasClass("b-fader")||r.hasClass("s-feedback-close"))&&(s.removeClass("p-feedback"),u.val(""),o=!1,a.setState(null),LJ.get("remote")||LJ.Captcha.destroy())})})}(jQuery); /* <<< file end: js/scheme/schemius/feedback.js */ //# map link was there [feedback.js.map] /* >>> file start: js/core/angular/simple-scrollbar.js */ !function(t,e){"use strict";function s(t,s){function i(t){var e=t.pageY-n;n=t.pageY,r(function(){s.el.scrollTop+=e/s.scrollRatio})}function a(){t.classList.remove("ss-grabbed"),e.body.classList.remove("ss-grabbed"),e.removeEventListener("mousemove",i),e.removeEventListener("mouseup",a)}var n;t.addEventListener("mousedown",function(s){return n=s.pageY,t.classList.add("ss-grabbed"),e.body.classList.add("ss-grabbed"),e.addEventListener("mousemove",i),e.addEventListener("mouseup",a),!1})}function i(i){for(this.target=i,this.bar='
    ',this.wrapper=e.createElement("div"),this.wrapper.setAttribute("class","ss-wrapper"),this.el=e.createElement("div"),this.el.setAttribute("class","ss-content"),this.wrapper.appendChild(this.el);this.target.firstChild;)this.el.appendChild(this.target.firstChild);this.target.appendChild(this.wrapper),this.target.insertAdjacentHTML("beforeend",this.bar),this.bar=this.target.lastChild,s(this.bar,this),this.moveBar(),this.el.addEventListener("scroll",this.moveBar.bind(this)),this.el.addEventListener("mouseenter",this.moveBar.bind(this)),this.target.classList.add("ss-container");var r=t.getComputedStyle(i);"0px"===r.height&&"0px"!==r["max-height"]&&(i.style.height=r["max-height"])}angular.module("Scrollbar",[]),angular.module("Scrollbar").constant("SimpleScrollbar",i);var r=t.requestAnimationFrame||t.setImmediate||function(t){return setTimeout(t,0)};i.prototype={moveBar:function(){var t=this.el.scrollHeight,e=this.el.clientHeight,s=this;this.scrollRatio=e/t,r(function(){1===s.scrollRatio?s.bar.classList.add("ss-hidden"):(s.bar.classList.remove("ss-hidden"),s.bar.style.cssText="height:"+100*s.scrollRatio+"%; top:"+s.el.scrollTop/t*100+"%;right:-"+(s.target.clientWidth-s.bar.clientWidth)+"px;")})},setElementHeight:function(t){this.el.style.height=t,this.moveBar()}}}(window,document); /* <<< file end: js/core/angular/simple-scrollbar.js */ //# map link was there [simple-scrollbar.js.map] /* >>> file start: js/notifications/main.js */ Site.page.template['angular/widgets/notifications/notifications.ng.tmpl'] = '\n\n
    \n
    \n \n \n
    \n
    \n
    \n
    \n
    '; Site.page.template['angular/widgets/notifications/notificationsIcon.ng.tmpl'] = '\n \n 0}\"\n ng-if=\"enabled\"\n ng-controller=\"NotificationsCountCtrl as count\"\n >{{count.count}}\n
    \n'; //= require js/core/angular/bubble.js //= require js/core/angular/api.js //= require js/core/angular/simple-scrollbar.js //= require_ml notification.centre.title //= require_ml notification.centre.read.all //= require_ml notification.centre.previous !function(n){return n}(),function(){"use strict";function n(n,t,i,o,e){function c(){var t=void 0;return d.length>0?void(t=n.$on("notifications:readPushed",function(){a(),t()})):void a()}function a(){r().then(function(t){g!==t.notifications&&(g=t.notifications,n.$broadcast("notifications:counterUpdated"))})}function r(){return i.call("notifications.getn",{silent:!0})}function u(n){return i.call("notifications.get",{page:n,silent:!0})}function f(){i.call("notifications.release",{id:d,silent:!0}),d=[],n.$broadcast("notifications:readPushed")}function s(t){d.push(t.id),t.unread=!1,g--,n.$broadcast("notifications:counterUpdated"),$()}function l(){i.call("notifications.release_all",{silent:!0}).then(function(t){"ok"===t&&(g=0,n.$broadcast("notifications:counterUpdated"))})}var d=[],p=[],g=0;c(),t(c,e);var $=LJ.Function.debounce(f,o);return{pushRead:s,entries:function(){return p},counter:function(){return g},getNotifications:u,readAll:l}}function t(n,t,i,o){function e(){(LJ.Support.isMobile()||LJ.Support.touch)&&t(c.readPage,1e3)}var c=this,a=0,r=0;c.entries=[],c.counter=o.counter(),c.loading=!1,c.defaultPic=LJ.get("statprefix")+"/img/userpics/userpic-user.png?v=15821",c.getPage=function(t){c.loading=!0,o.getNotifications(a).then(function(i){c.entries=i.notifications,r=i.pages,c.loading=!1,n.$broadcast("notifications:pageLoad:"+t)})},c.read=function(n){n.unread&&o.pushRead(n)},c.readPage=function(){c.part.forEach(c.read)},c.readAll=o.readAll,c.shouldShowMore=function(){return c.entries&&r-1>a},c.nextPage=function(){a++,c.getPage("next"),e(),n.$emit("notifications:nextPage")},n.$on("notifications:counterUpdated",function(){c.counter=o.counter()}),n.$on("bubble:open:notifications",function(){c.getPage("open"),e()}),n.$on("bubble:close:notifications",function(){a=0,c.entries=[]})}function i(n){function t(n,t){var i=LJ.Flags.isEnabled("notification_center_display");n.enabled=i,i&&t.removeClass("notices--hidden")}return{templateUrl:"notificationsIcon.ng.tmpl",link:t}}function o(n,t,i){var o=this;n.$on("notifications:counterUpdated",function(){t(function(){o.count=i.counter()})})}function e(n){function t(t,i){n.register({name:"notifications",template:"notifications.ng.tmpl"}),i.click(function(){t.$apply(function(){n.open("notifications",{alwaysBottom:!0,closeControl:!1},i)})})}return{link:t}}function c(n,t){function i(i,c){var a=c.find(".notices__body-wrapper")[0],r=new t(a);i.$on("notifications:pageLoad:open",function(){n(function(){return o(r,c)})}),i.$on("bubble:close:notifications",function(){n(function(){return e(r)})}),i.$on("notifications:pageLoad:next",function(){n(function(){e(r),o(r,c)})})}function o(n,t){n.setElementHeight(t.height()+"px")}function e(n){n.setElementHeight("100%")}return{link:i}}angular.module("Notifications",["LJ.Bubble","LJ.Api","Scrollbar"]),angular.module("Notifications").constant("READ_PUSH_DELAY",3e3).constant("CHECK_NEW_DELAY",1e4).factory("notificationService",n).directive("ljNotificationsIcon",i).directive("notificationsPanel",e).directive("notificationsContent",c).controller("NotificationCtrl",t).controller("NotificationsCountCtrl",o),n.$inject=["$rootScope","$interval","Api","READ_PUSH_DELAY","CHECK_NEW_DELAY"],t.$inject=["$scope","$timeout","$interval","notificationService"],i.$inject=["notificationService"],o.$inject=["$scope","$timeout","notificationService"],e.$inject=["Bubble"],c.$inject=["$timeout","SimpleScrollbar"]}(); /* <<< file end: js/notifications/main.js */ //# map link was there [main.js.map] /* >>> file start: js/facebookMigration/migration.js */ //= require js/core/angular/api.js //= require js/node_modules/moment/min/moment.min.js Site.page.template['Widgets/facebook_migration.tmpl'] = '\n = 2 && migration.step <= 4,\n \'fbmerge--loading\': migration.loading,\n }\"\n >\n\n \n
    \n \n
    \n

    \n\n
    \n \n \n
    \n
    \n\n \n
    \n

    \n
    \n\n \n
    \n \n \n
    \n\n \n
    \n

    \n
    \n\n \n
    \n \n

    \n \n Confirm your email here\n

    \n\n
    \n \n \n
    \n

    \n
    \n \n \n
    \n

    \n \n \n \n \n \n
    \n
    \n \n\n \n \n \n\n \n
    \n
    \n \n \n \n
    \n
    \n \n \n \n \n \n \n \n \n
    \n
    \n \n\n \n \n
      \n
    • \n \n
      \n \n \n
      \n
    • \n
    • \n \n
      \n \n \n
      \n
    • \n
    \n \n
    \n \n
    \n\n \n\n \n \n \n Facebook\n \n \n \n \n\n \n
    \n\n
    \n

    \n \n
    \n
    \n
      \n
    • \n \n
      \n \n \n
      \n \n
    • \n
    • \n \n
      \n \n \n \n
      \n
    • \n
    • \n \n
      \n \n \n
      \n \n
    • \n
    \n\n \n\n
    \n \n
    \n \n
    \n
    \n \n\n \n
    \n \n
      \n
    • \n \n
    • \n
    • \n \n
    • \n
    • \n \n
    • \n
    • \n \n
    • \n
    • \n \n
    • \n
    • \n \n
    • \n
    \n
    \n \n
    \n \n \n\n \n \n \n \n \n
    \n
    \n\n'; LJ.injectStyle('/* >>> file start: stc/widgets/facebookmigration.css */\n.fbmerge{width:820px;min-height:410px;text-align:left;font:400 15px/1.4 ProximaNova,Helvetica,sans-serif!important;letter-spacing:.01em;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.fbmerge__elem--step1,.fbmerge__elem--step2,.fbmerge__elem--step3,.fbmerge__elem--step4,.fbmerge__elem--step5,.fbmerge__elem--step6,.fbmerge__elem--step7{display:none}.fbmerge__title{margin:73px 0 0!important;width:300px;font-size:28px;line-height:31px;font-weight:700;-webkit-font-feature-settings:\"kern\" off;font-feature-settings:\"kern\" off;font-variant:none;letter-spacing:inherit;word-spacing:normal;color:#FFF!important}.fbmerge__descr{position:absolute;box-sizing:border-box;top:0;left:0;padding-left:40px;width:50%;min-height:410px;-webkit-transition:opacity ease 1s;transition:opacity ease 1s;color:#FFF!important;z-index:2}.fbmerge__descr::after,.fbmerge__descr::before{content:\'\';display:table;clear:both}.fbmerge__container{position:relative;box-sizing:border-box;margin:0 0 0 auto;padding:0 50px 0 40px;width:50%;color:#4c4c4c!important}.fbmerge--step2 .fbmerge__container,.fbmerge--step3 .fbmerge__container,.fbmerge--step4 .fbmerge__container{padding-top:40px;padding-bottom:20px}.fbmerge__text{padding:0}.fbmerge__choice-buttons{min-width:174px;display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column}.fbmerge__choice-button{margin-bottom:10px}.fbmerge__choice-button:last-child{margin-bottom:0}.fbmerge__choice-button:hover{-webkit-transform:translateY(-2px);-ms-transform:translateY(-2px);transform:translateY(-2px)}.fbmerge__choice-button--no-border{padding:8px 20px;background-color:transparent;border:0;outline:0;text-align:center;text-transform:uppercase;font-size:11px;line-height:12px;color:#fff!important;cursor:pointer}.fbmerge__choice-button--no-border:hover,.fbmerge__choice-button--no-border:visited{color:#fff!important}.fbmerge__statuses{position:absolute;top:0;bottom:0;left:0;width:100%;border-radius:5px;background-color:#1EB2EA;-webkit-transition:width ease .7s;transition:width ease .7s;z-index:1}.fbmerge__status--fb,.fbmerge__status--lj{box-sizing:border-box;position:absolute;border:3px solid #FFF;width:162px;height:162px;bottom:84px;border-radius:50%;overflow:hidden}.fbmerge__status--lj{left:564px;background-color:#FFF;box-shadow:0 0 0 7px #00B1ED inset;-webkit-transform:rotate(45deg);-ms-transform:rotate(45deg);transform:rotate(45deg);-webkit-transition:ease 1s;transition:ease 1s;-webkit-transition-property:border,bottom,left;transition-property:border,bottom,left}.fbmerge__status-img--lj{position:absolute;top:50%;left:50%;-webkit-transform:translateX(-50%) translateY(-50%) rotate(-45deg);-ms-transform:translateX(-50%) translateY(-50%) rotate(-45deg);transform:translateX(-50%) translateY(-50%) rotate(-45deg);-webkit-transition:all ease .7s;transition:all ease .7s}.fbmerge__status--fb{left:441px;-webkit-transition:all ease .7s;transition:all ease .7s}.fbmerge__status-img--fb{position:absolute;top:50%;left:50%;-webkit-transform:translateX(-50%) translateY(-50%);-ms-transform:translateX(-50%) translateY(-50%);transform:translateX(-50%) translateY(-50%);width:40px;height:76px;-webkit-transition:all ease .7s;transition:all ease .7s}.fbmerge--need-action .fbmerge__statuses{width:50%;border-radius:5px 0 0 5px}.fbmerge--need-action .fbmerge__status--lj{left:40px;bottom:48px}.fbmerge--need-action .fbmerge__status--fb{width:0;height:0;border-width:0}.fbmerge--need-action .fbmerge__status-img--fb{width:0;height:0}.fbmerge--need-action.fbmerge--loading .fbmerge__statuses{width:100%;border-radius:5px;-webkit-transition-duration:.5s;transition-duration:.5s}.fbmerge__sharing{position:absolute;left:40px;bottom:56px;margin:0;padding:0;line-height:0;list-style:none;font-size:0;opacity:0;-webkit-transition:opacity ease 1s;transition:opacity ease 1s;z-index:2}.fbmerge__sharing-item{display:inline-block;vertical-align:middle}.fbmerge__sharing-item+.fbmerge__sharing-item{margin-left:22px}.fbmerge__sharing-text{display:inline-block;width:90px;font-size:16px;line-height:18px;color:#FFF!important}.fbmerge__sharing-link{position:relative;display:inline-block;width:35px;height:35px;border:1px solid #FFF;border-radius:50%}.fbmerge__sharing-link:hover{-webkit-transform:translateY(-2px);-ms-transform:translateY(-2px);transform:translateY(-2px)}.fbmerge__sharing-img{position:absolute;top:50%;left:50%;-webkit-transform:translateX(-50%) translateY(-50%);-ms-transform:translateX(-50%) translateY(-50%);transform:translateX(-50%) translateY(-50%)}.fbmerge--step5 .fbmerge__sharing,.fbmerge--step6 .fbmerge__sharing{opacity:1}.fbmerge--hide-sharing .fbmerge__sharing{display:none}.fbmerge__notice{display:block;margin-top:15px;font-size:11px;line-height:12px}.fbmerge__flatbutton-wrapper{margin:25px 0}.fbmerge__flatbutton{min-width:140px;box-sizing:border-box;padding-left:20px;padding-right:20px;border-width:2px;border-color:currentColor}.fbmerge__flatbutton[disabled]{background-color:transparent;color:#AAB7BB!important}.fbmerge__flatbutton:active,.fbmerge__flatbutton:focus,.fbmerge__flatbutton:hover{background-color:transparent;color:#00A2D9!important}.fbmerge__flatbutton--inverse{background-color:transparent;border-color:currentColor;color:#FFF!important}.fbmerge__flatbutton--inverse:active,.fbmerge__flatbutton--inverse:focus,.fbmerge__flatbutton--inverse:hover{color:#FFF!important}.fbmerge__flatbutton--fb{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center;margin:37px 0 0;padding:0;font-size:16px}.fbmerge__flatbutton--fb,.fbmerge__flatbutton--fb:hover,.fbmerge__flatbutton--fb:link,.fbmerge__flatbutton--fb:visited{background:0 0;border:0;color:#4c4c4c!important}.fbmerge__flatbutton--fb:focus,.fbmerge__flatbutton--fb:hover{-webkit-transform:translateY(-2px);-ms-transform:translateY(-2px);transform:translateY(-2px)}.fbmerge__flatbutton--fb:focus::before{content:none}.fbmerge__flatbutton-icon--fb{width:30px;height:30px;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center;vertical-align:middle;margin-right:5px;margin-top:-2px;border:2px solid #00A2D9;border-radius:50%;line-height:32px;box-sizing:border-box}.fbmerge__flatbutton-icon--fb .svgicon{height:16px;fill:#00A2D9}.fbmerge__inputs-list{margin:0;padding:0;list-style:none}.fbmerge__inputs-item{margin-bottom:23px}.fbmerge__inputs-item:last-child{margin-bottom:0}.fbmerge__input-wrapper{position:relative;margin:6px 0}.fbmerge__text-input{display:block;width:100%;box-sizing:border-box;border-width:0;border-bottom:1px solid #979797;outline:0;font-size:14px;line-height:1.4;font-weight:700;background:0 0;color:#00A2D9!important}.fbmerge__text-input--error{color:#d20922!important}.fbmerge__text-input+.fbmerge__text-label{margin-top:25px}.fbmerge__text-label+.fbmerge__text-input{margin-top:5px}.fbmerge__input-tooltip{display:none;margin-top:5px;font-size:11px;line-height:1.2;color:#d0021b!important}.fbmerge__container input:-webkit-autofill,.fbmerge__container input:-webkit-autofill:focus,.fbmerge__container input:-webkit-autofill:hover{-webkit-box-shadow:0 0 0 1000px #fff inset}.fbmerge__subtitle,.fbmerge__text-label{display:block;margin:0;text-transform:uppercase;font-size:16px;line-height:18px;font-weight:600;color:inherit!important}.fbmerge__options{margin:18px 0 0;padding:0;list-style:none}.fbmerge__option{margin-bottom:15px}.fbmerge__option:last-child{margin-bottom:0}.fbmerge__option-input{display:none}.fbmerge__option-text{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center;font-size:14px;line-height:1.2;cursor:pointer}.fbmerge__option-text::before{content:\'\';display:inline-block;-webkit-flex-shrink:0;-ms-flex-negative:0;flex-shrink:0;width:27px;height:27px;margin-right:15px;border:2px solid #C3D3D9;border-radius:50%}.fbmerge--step1:not(.fbmerge--loading) .fbmerge__elem--step1,.fbmerge--step2:not(.fbmerge--loading) .fbmerge__elem--step2,.fbmerge--step3:not(.fbmerge--loading) .fbmerge__elem--step3,.fbmerge--step4:not(.fbmerge--loading) .fbmerge__elem--step4,.fbmerge--step5:not(.fbmerge--loading) .fbmerge__elem--step5,.fbmerge--step6:not(.fbmerge--loading) .fbmerge__elem--step6{display:block}.fbmerge--step2 .fbmerge__status--lj,.fbmerge--step3 .fbmerge__status--lj{border-bottom-color:#008CC1;border-left-color:#008CC1}.fbmerge__option-input:checked+.fbmerge__option-text::before{border-color:#00A2D9;background-image:url(\'data:image/svg+xml;charset=UTF-8, %3Csvg%20width%3D%2214px%22%20height%3D%2210px%22%20viewBox%3D%220%200%2014%2010%22%20version%3D%221.1%22%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20xmlns%3Axlink%3D%22http%3A//www.w3.org/1999/xlink%22%3E%3Cg%20id%3D%22Group-2%22%20transform%3D%22translate%28-469.000000%2C%20-152.000000%29%22%20fill%3D%22none%22%20stroke-width%3D%222%22%3E%3Cpolyline%20points%3D%22471%20156.648053%20474.882762%20160%20480.961931%20154%22%20stroke%3D%22%2300B2ED%22%3E%3C/polyline%3E%3C/g%3E%3C/svg%3E\');background-position:50% 50%;background-repeat:no-repeat}.fbmerge__option-input[disabled]+.fbmerge__option-text{pointer-events:none;cursor:default}.fbmerge__option-input[disabled]:checked+.fbmerge__option-text::before{border-color:#C3D3D9!important;background-image:url(\'data:image/svg+xml;charset=UTF-8, %3Csvg%20width%3D%2214px%22%20height%3D%2210px%22%20viewBox%3D%220%200%2014%2010%22%20version%3D%221.1%22%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20xmlns%3Axlink%3D%22http%3A//www.w3.org/1999/xlink%22%3E%3Cg%20id%3D%22Group-2%22%20transform%3D%22translate%28-469.000000%2C%20-152.000000%29%22%20fill%3D%22none%22%20stroke-width%3D%222%22%3E%3Cpolyline%20points%3D%22471%20156.648053%20474.882762%20160%20480.961931%20154%22%20stroke%3D%22%23C3D3D9%22%3E%3C/polyline%3E%3C/g%3E%3C/svg%3E\');background-position:50% 50%;background-repeat:no-repeat}.fbmerge__option--autoimport{margin-top:30px}.fbmerge__close::after,.fbmerge__close::before{content:none}.fbmerge .flaticon--cross{width:20px;height:20px;fill:#FFF!important}.fbmerge--need-action .flaticon--cross{fill:#00A2D9!important}.fbmerge--step1 .fbmerge__title{margin-bottom:60px!important}.fbmerge--loading.fbmerge--step1 .fbmerge__status--fb,.fbmerge--loading.fbmerge--step1 .fbmerge__status--lj{width:0;height:0;border-width:0}.fbmerge--step1 .fbmerge__status--lj{-webkit-transition:ease .7s;transition:ease .7s;-webkit-transition-property:border,bottom,left,width,height;transition-property:border,bottom,left,width,height}.fbmerge--step1 .fbmerge__status--fb{-webkit-transition-delay:.3s;transition-delay:.3s}.fbmerge--step2 .fbmerge__status--lj{border-right-color:#008CC1}.fbmerge--step2 .fbmerge__flatbutton{min-width:140px}.fbmerge__text--step3{margin:0 0 30px;font-size:14px;line-height:17px;font-weight:700}.fbmerge--step3 .fbmerge__input-wrapper{margin-bottom:0}.fbmerge--step4 .fbmerge__status--lj{border-left-color:#008CC1}.fbmerge--step5 .fbmerge__status--fb{background-color:#FFF;box-shadow:0 0 0 7px #00B1ED inset}.modal.fbmerge--step5 .fbmerge__status-img--fb path{fill:#00B1ED!important}.fbmerge__text--step5{margin:13px 0 0;font-size:16px;line-height:18px}.fbmerge--step6 .fbmerge__status--fb{display:none}.fbmerge--step6 .fbmerge__status--lj{left:465px;bottom:60px;width:224px;height:224px;box-shadow:0 0 0 8px #00B1ED inset,0 0 0 11px #fff inset,0 0 0 21px #00B1ED inset;-webkit-transition:ease .5s;transition:ease .5s;-webkit-transition-property:left,bottom,width,height;transition-property:left,bottom,width,height}.fbmerge--step6 .fbmerge__status-img--lj{width:100px;height:100px;-webkit-transition:ease .5s;transition:ease .5s;-webkit-transition-property:width,height,top,left;transition-property:width,height,top,left}.fbmerge--step7:not(.fbmerge--loading) .fbmerge__elem--step7{display:block}.fbmerge--step7 .fbmerge__title{margin-bottom:60px!important}@media (max-width:850px){.fbmerge{width:660px}.fbmerge__status--fb{left:320px}.fbmerge__status--lj{left:441px}.fbmerge__title{margin:36px 0 0!important;width:270px}.fbmerge__sharing-item{margin-right:15px}.fbmerge__sharing-item:last-child{margin-right:0}.fbmerge__sharing-item+.fbmerge__sharing-item{margin-left:0}.fbmerge--step6 .fbmerge__status--lj{left:400px}}@media (max-width:680px){.body--fbmerge-opened{overflow:hidden;max-height:100%}.fbmerge{width:90%;height:auto;min-height:0;max-height:95%;overflow:auto}.fbmerge__statuses{display:none}.fbmerge__descr{position:relative;width:100%;min-height:0;padding:0 35px 0 20px;background-color:#00b1ed}.fbmerge__title{width:auto;margin-top:30px!important;margin-bottom:30px!important;padding:15px 0;font-size:25px;line-height:28px;text-align:left}.fbmerge--need-action .fbmerge__title{margin:0!important;font-size:18px;line-height:22px}.fbmerge--need-action .fbmerge__container,.fbmerge__container{width:100%;padding:25px}.fbmerge__notice{margin-top:10px}.fbmerge__close{z-index:100;top:15px;right:10px}.fbmerge--need-action .flaticon--cross{fill:#FFF!important}.fbmerge__choice-buttons{display:block;width:100%;padding-bottom:30px}.fbmerge__choice-button{display:inline-block;width:auto}.fbmerge__inputs-item{margin-bottom:20px}.fbmerge__text-label{margin-bottom:5px;font-size:14px;line-height:1}.fbmerge__input-wrapper{margin:0}.fbmerge__flatbutton-wrapper{margin:20px 0;text-align:center}.fbmerge__flatbutton--fb,.fbmerge__option--autoimport{margin-top:20px}.fbmerge__flatbutton-wrapper:last-child{margin-bottom:0}.fbmerge__option{margin-bottom:8px}.fbmerge__sharing{display:none;position:relative;left:auto;bottom:auto;padding:0 20px}.fbmerge__sharing-text{width:auto}.fbmerge--step6 .fbmerge__sharing{display:block}.fbmerge--hide-sharing .fbmerge__sharing{display:none}.fbmerge__elem--step1{text-align:center}.fbmerge--step5{padding-bottom:30px;background:#00b1ed}.fbmerge__text--step5{margin-bottom:20px}.fbmerge--step6{padding-bottom:50px;background:#00b1ed}}\n/* <<< file end: stc/widgets/facebookmigration.css */\n\n/*# sourceMappingURL=facebookmigration.css.map */\n'); //= require_ml fbmerging.step1.description.title //= require_ml fbmerging.step1.description.agreement //= require_ml fbmerging.step1.description.refusing //= require_ml fbmerging.step2.description.title //= require_ml fbmerging.step3.description.title //= require_ml fbmerging.step3.description.title2 //= require_ml fbmerging.step4.description.title //= require_ml fbmerging.step5.description.title //= require_ml fbmerging.step5.description.text //= require_ml fbmerging.step6.description.title //= require_ml fbmerging.sharing.title //= require_ml fbmerging.step2.form.login //= require_ml fbmerging.step2.form.password //= require_ml fbmerging.step2.form.entry //= require_ml /login.bml.connect.facebook //= require_ml fbmerging.step2.form.notice //= require_ml fbmerging.step3.form.text //= require_ml fbmerging.step3.form.allow //= require_ml fbmerging.step2.form.login //= require_ml fbmerging.step3.form.mail //= require_ml fbmerging.step3.form.convert_but //= require_ml fbmerging.step3.form.user_password //= require_ml fbmerging.step4.form.title //= require_ml fbmerging.step4.form.week //= require_ml fbmerging.step4.form.mounth //= require_ml fbmerging.step4.form.halfyear //= require_ml fbmerging.step4.form.all //= require_ml fbmerging.step4.form.nothing //= require_ml fbmerging.step4.form.autoimport //= require_ml fbmerging.step4.form.save //= require_ml fbmerging.step5.sharing.title //= require_ml fbmerging.step5.sharing.text //= require_ml createaccount.tip.username //= require_ml createaccount.tip.email //= require_ml createaccount.error.username.inuse //= require_ml createaccount.error.password.digits_only //= require_ml fbmerging.step7.description.title //= require_ml fbmerging.step7.description.sendmail //= require_ml fbmerging.step7.description.options !function(e){return e}(),function(){"use strict";function e(e,o,t){function r(e,o){var t={facebook:"fbsharing",twitter:"twsharing"};return t[o]?e+"@utm_source="+t[o]+"&utm_medium=social":e}function n(o){var t=LJ.ml("fbmerging.step5.sharing.title"),n=LJ.ml("fbmerging.step5.sharing.text",{journal_url:Site.remote.journal_url}),s=Site.remote.journal_url;if("livejournal"===o)return void e.open("/update.bml?event="+l(n)+"&subject="+l(t));var u=a[o]({title:t,text:n,link:r(s,o)});i(u)}function i(o){var t=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],r=t.allowScrollbars||!1,n=r?1:0;e.open(o,"","left="+(u.width-630)/2+",top="+(u.height-440)/2+",toolbar=0,status=0,scrollbars="+n+",menubar=0,location=0,width=630,height=440")}var a,s={};moment().format("ZZ");s.share=n;var l=e.encodeURIComponent.bind(e),u=e.screen||{width:1e3,height:1e3};return a={facebook:function(e){var o=e.text,t=e.title,r=e.link;return"https://www.facebook.com/sharer.php?u="+l(r)+"&description="+l(o)+"&title="+l(t)},livejournal:function(e){var o=e.text,t=e.title,r=e.link;return"https:../https@livejournal.com/update.bml@subject="+l(t)+"&event="+l(''+t+" "+o)},twitter:function(e){var o=e.link,t=e.title;return"https://twitter.com/share?text="+l(t)+"&via=livejournalru&url="+l(o)}},s}function o(e){return""!==e&&angular.isDefined(e)}function t(){var e=LJ.Cookie.get(a);try{return angular.fromJson(e)}catch(o){return null}}function r(e){LJ.Cookie.setGlobal(a,angular.toJson(e),{expires:s})}function n(e,n,i,a,s,l){function u(o){e.$watch(function(){return c[o]},function(e,t){e!==t&&c.step3Errors[o]&&(c.step3Errors[o].unchecked=!1)})}var c=this,d=!1,m=!1,f=!1;c.hidden=!0;var g=t()||{};c.step=g.agreed||e.step>4?e.step:1,e.needEmailConfirm&&6===c.step&&(c.step=7),c.stepAfterSignIn=e.step,c.addr=e.addr,c.username=e.user,c.password,c.email=e.mail,c.gender=e.gender,c.needEmailConfirm=e.needEmailConfirm,c.loginLink=i.trustAsResourceUrl(e.loginLink),c.facebookLink=e.facebookLink,c.step2={},c.share=l.share,c.step3Errors={username:"",email:"",password:""},c.returnTo=e.returnTo,c.siteRoot=LJ.get("siteroot"),c.sendMailAction=i.trustAsResourceUrl(c.siteRoot+"/register.bml"),c.fbLoginTitle=LJ.ml("/login.bml.connect.facebook"),c.autoImport=!0,c.week=604800,c.month=2592e3,c.halfYear=15552e3,c.period=c.month,c.authAs=LJ.get("remoteUser"),u("username"),u("email"),u("password"),c.show=function(t){t&&(c.step=t,m=!0,c.autoImport=!o(e.noMigration)),angular.element("body").addClass("p-fader").addClass("body--fbmerge-opened"),c.hidden=!1},c.hide=function(){var e=t()||{};e.closed=!0,r(e),f&&a.location.reload(),c.hidden=!0,angular.element("body").removeClass("p-fader").removeClass("body--fbmerge-opened")},c.importStep=function(){c.loading=!0,n(function(){r({agreed:!0,closed:!1}),Site.remote?c.step=c.stepAfterSignIn:c.step=2,c.loading=!1},700)},c.setPeriod=function(){c.loading=!0,s.call("settings.set_fb_digest_status",{period:c.period,disable_auto_migration:!c.autoImport,silent:!0}).then(function(o){"ok"===o.status&&(m&&(f=!0),e.needEmailConfirm||d?(c.username&&(c.authAs=c.username),c.step=7):c.step++,c.loading=!1)})},c.convertIdentity=function(e){e.preventDefault(),c.loading=!0,s.call("signup.convert_identity_lite",{create:1,username:c.username,password:c.password,passwordconfirm:c.password,email:c.email,gender:"U",silent:!0}).then(function(e){"ok"===e.status&&(d=!0,c.step++,c.loading=!1),"error"===e.status&&(Object.keys(c.step3Errors).forEach(function(o){return e[o]?void(c.step3Errors[o]={text:i.trustAsHtml(e[o]),unchecked:!0}):void(c.step3Errors[o]="")}),c.loading=!1)})},c.convertationEnabled=function(){return c.username&&c.email&&c.password}}function i(e,r,i){function a(n,a,s,l){var u=o(n.showLater),c=t()||{},d=LiveJournal.parseGetArgs().fbmn,m=i[0].referrer,f=m&&m.match(/^https?:\/\/([^\/]+\.)?facebook\.com(\/|$)/i),g=d||f&&!c.closed&&!u;return g||u?(a.html(e(r.get("facebook_migration.tmpl"))(n)),u&&angular.element(".js-popup-shower").click(function(){l.show(4),n.$apply()}),void(g&&l.show())):void a.remove()}return{scope:{step:"=facebookMigrationStep",addr:"@facebookMigrationAddr",user:"@facebookMigrationUser",mail:"@facebookMigrationMail",gender:"@facebookMigrationGender",needEmailConfirm:"=facebookMigrationNeedEmailConfirm",loginLink:"@facebookMigrationLoginLink",facebookLink:"@facebookMigrationFacebookLink",returnTo:"@facebookMigrationReturnTo",showLater:"@facebookMigrationShowLater",noMigration:"@facebookMigrationDisableAutoMigration"},controllerAs:"migration",controller:n,link:a}}e.$inject=["$window","$location","Api"],i.$inject=["$compile","$templateCache","$document"],n.$inject=["$scope","$timeout","$sce","$window","Api","shareService"],angular.module("Migration.Facebook",["LJ.Api"]),angular.module("Migration.Facebook").config(["$locationProvider",function(e){e.html5Mode({enabled:!0,requireBase:!1})}]).factory("shareService",e).directive("facebookMigration",i).controller("migrationController",n);var a="facebookMigrationStatus",s=14;angular.element(document).ready(function(){var e=angular.element("[facebook-migration]");if(e.length){var o=e.eq(0).scope();o||angular.bootstrap("[facebook-migration]",["Migration.Facebook"])}})}(); /* <<< file end: js/facebookMigration/migration.js */ //# map link was there [migration.js.map] /* >>> file start: js/ljwidget.js */ LJWidget=new Class(Object,{updateContent:function(t){t||(t={}),this._show_frame=t.showFrame,t.method&&(method=t.method),t._widget_update=1,this.doAjaxRequest(t)&&this.hilightFrame()},getWidget:function(){return $(this.widgetId)},doPost:function(t){t||(t={}),this._show_frame=t.showFrame;var e={},i=this.widgetClass;i="Widget["+i.replace(/::/g,"_")+"]_";for(var a in t){var r=a;a.match(/^Widget\[/)||"lj_form_auth"==a||a.match(/^_widget/)||(r=i+a),e[r]=t[a]}e._widget_post=1,this.doAjaxRequest(e)},doPostAndUpdateContent:function(t){t||(t={}),t._widget_update=1,this.doPost(t)},postForm:function(t){if(!t)return!1;for(var e={},i=0;i>> file start: js/deprecated/dom.js */ function _textSpan(){return _textElements("span",arguments)}function _textDiv(){return _textElements("div",arguments)}function _textElements(t,e){for(var n=[],r=0;r>> file start: js/ippu.js */ function changeOpac(e,t){var i=$(e);if(i&&i.style){var s=i.style;s&&(IPPU.isSafari()&&t>=100&&(t=99.99),s.filters&&(s.filters.alpha.opacity=100*t),s.opacity=t)}}IPPU=new Class(Object,{setFixedPosition:function(e){IPPU.isIE()||(this.fixedPosition=e,this.updateContent())},clickHandler:function(e){if(this.clickToClose&&this.visible()){e=Event.prep(e);var t=e.target;DOM.getAncestorsByClassName(t,"ippu",!0).length>0||this.cancel()}},setCancelledCallback:function(e){this.cancelledCallback=e},cancel:function(){this.cancelledCallback&&this.cancelledCallback(),this.hide()},setHiddenCallback:function(e){this.hiddenCallback=e},setupClickCapture:function(){if(this.visible()&&!this.clickHandlerSetup&&(this.clickToClose||this.modal)){if(this.clickHandlerFunc=this.clickHandler.bindEventListener(this),this.modal){if(this.overlay)return;this.overlay=document.createElement("div"),this.overlay.style.left="0px",this.overlay.style.top="0px",this.overlay.style.margin="0px",this.overlay.style.padding="0px",this.overlay.style.backgroundColor="#000000",this.overlay.style.zIndex="900",IPPU.isIE()?(this.overlay.style.filter="progid:DXImageTransform.Microsoft.Alpha(opacity=50)",this.overlay.style.position="absolute",this.overlay.style.width=document.body.scrollWidth,this.overlay.style.height=document.body.scrollHeight):this.overlay.style.position="fixed",this.ele.parentNode.insertBefore(this.overlay,this.ele),this.updateOverlay(),DOM.addEventListener(this.overlay,"click",this.clickHandlerFunc)}else DOM.addEventListener(document,"click",this.clickHandlerFunc);this.clickHandlerSetup=!0}},updateOverlay:function(){if(this.overlay){var e=DOM.getClientDimensions();this.overlay.style.width=e.x-1+"px",IPPU.isIE()||(this.overlay.style.height=e.y-1+"px"),this.visibleOverlay?(this.overlay.backgroundColor="#000000",changeOpac(this.overlay,.5)):(this.overlay.backgroundColor="#FFFFFF",changeOpac(this.overlay,0))}},resizeHandler:function(e){this.updateContent()},removeClickHandlers:function(){if(this.clickHandlerSetup){DOM.removeEventListener(document,"click",this.clickHandlerFunc,!1),this.overlay&&(DOM.removeEventListener(this.overlay,"click",this.clickHandlerFunc,!0),this.overlay.parentNode.removeChild(this.overlay),this.overlay=void 0),this.clickHandlerFunc=void 0,this.clickHandlerSetup=!1}},setClickToClose:function(e){if(this.clickToClose=e,!this.clickHandlerSetup&&e&&this.visible()){var t=this.setupClickCapture.bind(this);window.setTimeout(t,100)}else!e&&this.clickHandlerSetup&&this.removeClickHandlers();this.updateContent()},setModal:function(e){var t=this.modal==e;e&&this.setClickToClose(!1),this.modal=e,t&&(this.removeClickHandlers(),this.updateContent())},setOverlayVisible:function(e){this.visibleOverlay=e,this.updateContent()},updateContent:function(){this.autoCenter(),this.updateTitlebar(),this.updateOverlay(),this.titlebar&&this.setTitlebarClass(this.titlebar.className);var e=this.setupClickCapture.bind(this);window.setTimeout(e,100),this.fixedPosition&&"fixed"!=this.ele.style.position?this.ele.style.position="fixed":this.fixedPosition||"fixed"!=this.ele.style.position||(this.ele.style.position="absolute")},getTitlebarElement:function(){return this.titlebar},setTitlebarClass:function(e){this.titlebar&&(this.titlebar.className=e)},setOverflow:function(e){this.ele&&(this.ele.style.overflow=e)},visible:function(){return this.shown},setTitlebar:function(e){if(this.showTitlebar=e,e){if(!this.titlebar){var t=document.createElement("div");if(!t)return;t.style.width="100%",this.title&&(t.innerHTML=this.title),this.ele.insertBefore(t,this.content),this.titlebar=t}}else this.titlebar&&(this.ele.removeChild(this.titlebar),this.titlebar=!1)},setTitle:function(e){this.title=e,this.updateTitlebar()},updateTitlebar:function(){this.showTitlebar&&this.titlebar&&this.title!=this.titlebar.innerHTML&&(this.titlebar.innerHTML=this.title)},addClass:function(e){DOM.addClassName(this.ele,e)},removeClass:function(e){DOM.removeClassName(this.ele,e)},setAutoCenterCallback:function(e){this.autoCenterCallback=e},autoCenter:function(){if(this.visible&&this.visible()){if(this.autoCenterCallback)return void this.autoCenterCallback(this);this.autoCenterX&&this.centerX(),this.autoCenterY&&this.centerY()}},center:function(){this.centerX(),this.centerY()},centerOnWidget:function(e,t,i){t=t||0,i=i||0,this.setAutoCenter(!1,!1),this.setAutoCenterCallback(null);var s=DOM.getAbsoluteDimensions(e),n=DOM.getAbsoluteDimensions(this.ele),l=s.absoluteRight-s.offsetWidth/2-n.offsetWidth/2+i,o=s.absoluteBottom-s.offsetHeight/2-n.offsetHeight/2+t;l=0>l?0:l,o=0>o?0:o,DOM.setLeft(this.ele,l),DOM.setTop(this.ele,o)},centerX:function(){if(this.visible&&this.visible()){var e=DOM.getClientDimensions(),t=e.x/2-this.ele.offsetWidth/2;if(!this.fixedPosition){var i=DOM.getWindowScroll();t+=i.left}DOM.setLeft(this.ele,t)}},centerY:function(){if(this.visible&&this.visible()){var e=DOM.getClientDimensions(),t=e.y/2-this.ele.offsetHeight/2;if(!this.fixedPosition){var i=DOM.getWindowScroll();t+=i.top}DOM.setTop(this.ele,t)}},setAutoCenter:function(e,t){return this.autoCenterX=e||!1,this.autoCenterY=t||!1,e||t?void this.autoCenter():void this.setAutoCenterCallback(null)},setDimensions:function(e,t){e+="",t+="",e.match(/^\d+$/)&&(e+="px"),t.match(/^\d+$/)&&(t+="px"),this.ele.style.width=e,this.ele.style.height=t},moveForward:function(e){e||(e=1),this.ele&&(this.ele.style.zIndex+=e)},moveBackward:function(e){e||(e=1),this.ele&&(this.ele.style.zIndex-=e)},setLocation:function(e,t){this.setLeft(e),this.setTop(t)},setTop:function(e){"string"!=typeof e&&(e+="px"),this.ele.style.top=e},setLeft:function(e){"string"!=typeof e&&(e+="px"),this.ele.style.left=e},getElement:function(){return this.ele},setContent:function(e){this.content.innerHTML=e},setContentElement:function(e){for(;this.content.firstChild;)this.content.removeChild(this.content.firstChild);!function(e){return e}(),this.content.appendChild(e)},setFadeIn:function(e){this.fadeIn=e},setFadeOut:function(e){this.fadeOut=e},setFadeSpeed:function(e){this.fadeSpeed=e},show:function(){if(this.shown=!0,this.fadeIn){var e=.01;changeOpac(this.ele,e)}document.body.appendChild(this.ele),this.ele.style.position="absolute",(this.autoCenterX||this.autoCenterY)&&this.center(),this.updateContent(),this.resizeHandlerFunc||(this.resizeHandlerFunc=this.resizeHandler.bindEventListener(this),DOM.addEventListener(window,"resize",this.resizeHandlerFunc,!1)),this.fadeIn&&this.fade("in"),this.hideSelects()},fade:function e(t,i){var s,n,l=10;if("in"==t)n=1/l,s=.1;else{if(this.ele.style.opacity){var o=parseFloat(this.ele.style.opacity);s=isFinite(o)?o:0}else s=.99;n=-1/l}var a=this.fadeSpeed;a||(a=1);var h=l/a*5;this.fadeMode=t;var r=this,e=function c(){return s+=n,r.fadeMode&&r.fadeMode!=t?void(i&&i.call(r,[])):.1>=s?(i&&i.call(r,[]),void(r.fadeMode=null)):s>=1?(i&&i.call(r,[]),void(r.fadeMode=null)):(changeOpac(r.ele,s),void window.setTimeout(c,h))};e()},hide:function(){this.visible()&&(this.fadeOut&&this.ele?this.fade("out",this._hide.bind(this)):this._hide())},_hide:function(){this.hiddenCallback&&this.hiddenCallback(),this.shown=!1,this.removeClickHandlers(),this.ele&&document.body.removeChild(this.ele),this.resizeHandlerFunc&&DOM.removeEventListener(window,"resize",this.resizeHandlerFunc),this.showSelects()},setAutoHideSelects:function(e){this.autoHideSelects=e,this.updateContent()},hideSelects:function(){if(this.autoHideSelects&&IPPU.isIE())for(var e,t=document.getElementsByTagName("select"),i=0;i0||"hidden"!=e.style.visibility&&(e.style.visibility="hidden",this.hiddenSelects.push(e)))},showSelects:function(){if(this.autoHideSelects)for(var e;e=this.hiddenSelects.pop();)e.style.visibility=""},init:function(e){var t=document.createElement("div");this.ele=t,this.shown=!1,this.autoCenterX=!1,this.autoCenterY=!1,this.titlebar=null,this.title="",this.showTitlebar=!1,this.clickToClose=!1,this.modal=!1,this.clickHandlerSetup=!1,this.docOverlay=!1,this.visibleOverlay=!1,this.clickHandlerFunc=!1,this.resizeHandlerFunc=!1,this.fixedPosition=!1,this.autoCenterCallback=null,this.cancelledCallback=null,this.autoHideSelects=!1,this.hiddenCallback=null,this.fadeOut=!1,this.fadeIn=!1,this.hiddenSelects=[],this.fadeMode=null,t.style.position="absolute",t.style.top=0,t.style.zIndex="1000",DOM.addClassName(t,"ippu"),this.content=document.createElement("div"),this.content.innerHTML=e,this.ele.appendChild(this.content)}}),IPPU.center=function(e){e.centerX(),e.centerY()},IPPU.centerX=function(e){e.centerX()},IPPU.centerY=function(e){e.centerY()},IPPU.isIE=function(){var e=navigator.userAgent.toLowerCase();return-1!=e.indexOf("msie")},IPPU.isSafari=function(){var e=navigator.userAgent.toLowerCase();return-1!=e.indexOf("safari")}; /* <<< file end: js/ippu.js */ //# map link was there [ippu.js.map] /* >>> file start: js/lj_ippu.js */ //= require js/deprecated/dom.js //= require js/ippu.js LJ_IPPU=new Class(IPPU,{init:function(e){e||(e=""),LJ_IPPU.superClass.init.apply(this,[]),this.uniqId=this.generateUniqId(),this.cancelThisFunc=this.cancel.bind(this),this.setTitle(e),this.setTitlebar(!0),this.setTitlebarClass("lj_ippu_titlebar"),this.addClass("lj_ippu"),this.setAutoCenterCallback(IPPU.center),this.setDimensions(514,"auto"),this.setFixedPosition(!0),this.setClickToClose(!0),this.setAutoHideSelects(!0)},setTitle:function(e){var t="
    "+e;LJ_IPPU.superClass.setTitle.apply(this,[t])},generateUniqId:function(){var e=new Date;return"lj_ippu_"+e.getHours()+e.getMinutes()+e.getMilliseconds()},show:function(){LJ_IPPU.superClass.show.apply(this);var e=this.setup_lj_ippu.bind(this);this.timerSetup=window.setTimeout(e,300)},setup_lj_ippu:function(e){var t=this.cancelThisFunc;$(this.uniqId+"_cancel").onclick=function(){t()}},hide:function(){clearInterval(this.timerSetup),LJ_IPPU.superClass.hide.apply(this)}}),LJ_IPPU.showNote=function(e,t,i,s){var n=document.createElement("div");return n.innerHTML=e,LJ_IPPU.showNoteElement(n,t,i,s)},LJ_IPPU.showErrorNote=function(e,t,i){return LJ_IPPU.showNote(e,t,i,"ErrorNote")},LJ_IPPU.showNoteElement=function(e,t,i,s){var n=new IPPU;n.init();var o=document.createElement("div");DOM.addClassName(o,"Inner"),o.appendChild(e),n.setContentElement(o),n.setTitlebar(!1),n.setFadeIn(!0),n.setFadeOut(!0),n.setFadeSpeed(4),n.setDimensions("auto","auto"),s||(s="Note"),n.addClass(s);var a;if(!t||(a=DOM.getAbsoluteDimensions(t))){var l=DOM.getClientDimensions();if(l){if(a){n.setAutoCenter(!1,!1),n.setLocation(a.absoluteLeft,a.absoluteBottom+4),n.show();var u=DOM.getAbsoluteDimensions(n.getElement());u.absoluteRight>l.x&&n.setLocation(l.x-u.offsetWidth-30,a.absoluteBottom+4)}else n.setAutoCenter(!0,!0),n.show();return n.setClickToClose(!0),n.moveForward(),void 0===i&&(i=5e3),i&&window.setTimeout(function(){n&&n.hide()},i),n}}},LJ_IPPU.textPrompt=function(e,t,i,s){s=s||{},e+="";var n=new LJ_IPPU(e),o=document.createElement("div");DOM.addClassName(o,"ljippu_textprompt"),t&&o.appendChild(_textDiv(t));var a=document.createElement("textarea");DOM.addClassName(a,"htmlfield"),a.cols=40,a.rows=5,o.appendChild(a);var l=document.createElement("div");DOM.addClassName(l,"submitbtncontainer");var u=document.createElement("input");DOM.addClassName(u,"submitbtn"),u.type="button",u.value="Insert",l.appendChild(u),o.appendChild(l),n.setContentElement(o),n.setAutoCenter(!0,!0),n.setDimensions(s.width||"60%","auto"),n.show(),a.focus(),DOM.addEventListener(u,"click",function(e){n.hide(),i&&i.apply(null,[a.value])})}; /* <<< file end: js/lj_ippu.js */ //# map link was there [lj_ippu.js.map] /* >>> file start: js/ljwidget_ippu.js */ //= require js/ljwidget.js //= require js/lj_ippu.js LJWidgetIPPU=new Class(LJWidget,{init:function(t,e){var i=t.title,n=t.widgetClass,s=t.authToken,a=t.nearElement,l=t.not_view_close;e||(e={}),this.reqParams=e;var o=new LJ_IPPU(i,a);this.ippu=o;var d=document.createElement("div");d.id="LJWidgetIPPU_"+Unique.id(),o.setContentElement(d),t.width&&t.height&&o.setDimensions(t.width,t.height),t.overlay&&(IPPU.isIE()?(this.ippu.setModal(!0),this.ippu.setOverlayVisible(!0),this.ippu.setClickToClose(!1)):(this.ippu.setModal(!0),this.ippu.setOverlayVisible(!0))),t.center&&o.center(),o.show(),l&&(o.titlebar.getElementsByTagName("img")[0].style.display="none");var h=document.createElement("div");h.style.fontSize="1.5em",h.style.fontWeight="bold",h.style.margin="5px",h.style.textAlign="center",h.innerHTML="Loading...",this.loadingText=h,d.appendChild(h);var u=[d.id,n,s];LJWidgetIPPU.superClass.init.apply(this,u);var r=this;return o.setCancelledCallback(function(){r.cancel&&r.cancel()}),n?(this.widgetClass=n,this.authToken=s,this.title=i,this.nearEle=a,window.setInterval(this.animateLoading.bind(this),20),this.loaded=!1,this.loadContent(),this):null},animateCount:0,animateLoading:function(t){var e=this.loadingText;if(this.loaded||!e)return void window.clearInterval(t);this.animateCount+=.05;var i=(Math.sin(this.animateCount)+1)/2*255,n=Math.round(i).toString(16);1==n.length&&(n="0"+n),n+=n+n,e.style.color="#"+n,this.ippu.center()},doAjaxRequest:function(t){t||(t={}),t._widget_ippu=1,document.getElementById("LJ__Setting__InvisibilityGuests_invisibleguests_self")&&(t["Widget[IPPU_SettingProd]_LJ__Setting__InvisibilityGuests_invisibleguests"]=1==document.getElementById("LJ__Setting__InvisibilityGuests_invisibleguests_self").checked?1:1==document.getElementById("LJ__Setting__InvisibilityGuests_invisibleguests_anon").checked?2:0),LJWidgetIPPU.superClass.doAjaxRequest.apply(this,[t])},close:function(){this.ippu.hide()},loadContent:function(){var t=this.reqParams;this.updateContent(t)},method:"POST",onData:function(t){this.loaded=!0},render:function(t){}}); /* <<< file end: js/ljwidget_ippu.js */ //# map link was there [ljwidget_ippu.js.map] /* >>> file start: js/jquery/jquery.center.js */ !function(t){return t}(),function(t){t.fn.center=function(){var i=t(window),h=({width:i.width(),height:i.height()},this.first()),e={width:h.outerWidth(),height:h.outerHeight()};return h.css({position:"fixed",left:"50%",top:"50%",marginTop:-(e.height/2),marginLeft:-(e.width/2)}),this}}(jQuery); /* <<< file end: js/jquery/jquery.center.js */ //# map link was there [jquery.center.js.map] /* >>> file start: js/jquery/dialogs.js */ var _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t}; //= require js/jquery/jquery.center.js LJ.UI.registerTemplate('templates-Widgets-dialogs', "
    {{if $data.title}}
    {{html $data.title}}
    {{/if}} {{if ($data.type == \'prompt\' || $data.text)}}
    {{if $data.text}} {{html $data.text}} {{/if}} {{if ($data.type == \'prompt\')}}
    {{/if}}
    {{/if}}
    {{if $data.is_mac}} {{if $data.type != \'alert\'}} {{/if}} {{else}} {{if $data.type != \'alert\'}} {{/if}} {{/if}}
    ", 'JQuery.stat'); !function(t){return t}(),function(t){"use strict";LJ.dialogs={defaults:{alert:{title:"",fade:!0,show:t.noop,hide:t.noop,defaultButton:"yes",yes:{text:LJ.ml("dialogs.yes"),action:t.noop}},confirm:{title:"",fade:!0,show:t.noop,hide:t.noop,defaultButton:"yes",yes:{text:LJ.ml("dialogs.yes"),action:t.noop},no:{text:LJ.ml("dialogs.no"),action:t.noop}},prompt:{title:"",fade:!0,show:t.noop,hide:t.noop,defaultButton:"input",value:"",yes:{text:LJ.ml("dialogs.yes"),action:t.noop},no:{text:LJ.ml("dialogs.no"),action:t.noop}}}};var o=function(t){function o(o){var n,e=y.type,i=null;m||(m=[],m.push(d.find(g.yesButton)),"prompt"===e&&m.push(d.find(g.promptInput)),"prompt"!==e&&"confirm"!==e||m.push(d.find(g.noButton)),n=d.find(g.body).find("a,select,input,button").not(g.yesButton).not(g.noButton).not(g.promptInput),n.length&&(m=m.concat(n.toArray().map(t)))),m.some(function(t,o){var n=t.is(":focus");return n&&(i=o),n}),null===i?i=0:(i+=o,i>m.length-1?i=0:0>i&&(i=m.length-1)),m[i].focus()}function n(){s=t("
    ",{"class":"b-fader"}).prependTo(document.body)}function e(o){var e="object"===_typeof(o.text),l=null,u=null;y=o,e&&(l=t('
    ').append(o.text),o.text=""),d=LJ.UI.template("templates-Widgets-dialogs",o),e&&(u=d.find(g.header),u.length?u.after(l):d.find(g.dialog).prepend(l)),d.prependTo(document.body).center(),o.fade&&(s=t(".b-fader"),s.length?s.show():n()),d.on("click",g.closeButton,i),"no"===o.defaultButton&&"alert"!==o.type?d.find(g.noButton).focus():"prompt"===o.type&&"yes"!==o.defaultButton?d.find(g.promptInput).focus():d.find(g.yesButton).focus(),o.show.call(d,o)}function i(){s&&s.hide(),m=null,y.hide.call(d,y),d.remove(),d=null}function l(t,o){if(!("string"==typeof t&&0!==t.length||"object"===("undefined"==typeof t?"undefined":_typeof(t))&&t.jquery))throw new Error("You should provide text or node as `text` param for the dialog");if(o&&"object"!==("undefined"==typeof o?"undefined":_typeof(o)))throw new Error("Dialog options should be an object");if(d)throw new Error("You are not able to create multiple dialogs at the time");o&&o.yes&&("function"==typeof o.yes?o.yes={action:o.yes}:"string"==typeof o.yes&&(o.yes={text:o.yes})),o&&o.no&&("function"==typeof o.no?o.no={action:o.no}:"string"==typeof o.no&&(o.no={text:o.no}))}function u(){d.find(g.yesButton).trigger("click")}function c(){d.find(g.noButton).trigger("click")}function a(t){return function(){try{return t.apply(this,arguments),{yes:u,no:c}}catch(o){console.error(o.message)}}}var p,r,f,d=null,s=null,y=null,m=null,g={yesButton:".b-dialog-ok",noButton:".b-dialog-cancel",closeButton:".i-popup-close",promptInput:".b-dialog-prompt",header:".b-dialog-header",dialog:".b-dialog",body:".b-dialog-body"};return LJ.Support.isMobile()||t(document).on("keydown",function(t){if(d)switch(t.which){case 27:d.find(g.closeButton).trigger("click");break;case 9:o(t.shiftKey?-1:1),t.preventDefault()}}),p=function(o,n){l(o,n),n=t.extend(!0,{},LJ.dialogs.defaults.alert,{type:"alert",text:o},n||{}),e(n),d.on("click",g.yesButton,function(){void 0===n.yes.action.call(d,i)&&i()})},r=function(o,n){l(o,n),n=t.extend(!0,{},LJ.dialogs.defaults.confirm,{type:"confirm",text:o},n||{}),e(n),d.on("click",g.yesButton,function(){void 0===n.yes.action.call(d,!0,i)&&i()}),d.on("click",g.noButton,function(){n.no.action.call(d,!1),i()})},f=function(o,n){l(o,n),n=t.extend(!0,{},LJ.dialogs.defaults.prompt,{type:"prompt",text:o},n||{}),e(n),n.value&&d.find(g.promptInput).val(n.value),d.on("click",g.yesButton,function(){void 0===n.yes.action.call(d,d.find(g.promptInput).val())&&i()}),d.find(g.noButton).on("click",function(){n.no.action.call(d),i()}),LJ.Support.isMobile()||d.find(g.promptInput).on("keyup",function(t){13===t.which&&d.find(g.yesButton).trigger("click")})},{alert:a(p),confirm:a(r),prompt:a(f)}}(t);t.extend(!0,LJ.dialogs,o)}(jQuery); /* <<< file end: js/jquery/dialogs.js */ //# map link was there [dialogs.js.map] /* >>> file start: js/scheme/schemius/controlstrip.js */ //= require js/ljwidget_ippu.js //= require js/jquery/dialogs.js !function(e){return e}(),function(){LJ.define("LJ.Schemius.controlstrip"),LJ.Schemius.controlstrip.init=function(e){var i=e.jQuery,n=i(".js--controlstrip");if(n.length){var r=n.find(".js--user_status"),s=n.find(".js--user_status_dash"),t=n.find(".js--item-friending.js--add"),o=n.find(".js--item-friending.js--modify"),a=n.find(".js--item-subscribe.js--add"),d=n.find(".js--item-subscribe.js--modify"),u=n.find(".js--item-subscribe.js--disabled"),l=LJ.get("current_journal.username"),c=LJ.Support.isMobile(),f={subscriptions:{remote:{},journal:{}},friendLists:{remote:{},journal:{}},friendingStatus:r.html(),friendingBlocker:null,subscriptionBlocker:null};f.friendingStatus&&(f.friendingStatus=f.friendingStatus.trim());var m=function(){f.friendLists.remote.journal?(t.hide(),o.show()):(t.show(),f.friendingBlocker&&!c?t.find("a").addClass("js--disabled"):t.find("a").removeClass("js--disabled"),o.hide())},g=function(){return f.friendLists.remote.journal?(a.hide(),d.hide(),void u.show()):(u.hide(),void(f.subscriptions.remote.journal?(a.hide(),d.show()):(a.show(),f.subscriptionBlocker&&!c?a.find("a").addClass("js--disabled"):a.find("a").removeClass("js--disabled"),d.hide())))},b=function(){m(),g(),r.html(f.friendingStatus),r.attr("title",f.friendingStatus),f.friendingStatus?(r.show(),s.show()):(r.hide(),s.hide())},j=function(e){if(e){var i=e.data;i&&(f.friendLists.remote.journal=i.is_friend,f.subscriptions.remote.journal=i.is_subscriber,f.friendingStatus=i.controlstrip_status,b(i))}},h=function(e,i){i&&LJ_IPPU.showNote(i,e)},p=function(e){e&&LJ.dialogs.alert(e,{yes:{text:"OK"}})},L=function(){return LJ.get("remote")?Promise.all([LJ.Api.call("relations.can_add_friends",{target:l}),LJ.Api.call("relations.can_add_subscribers",{target:l})]).then(function(e){e[0]&&e[1]&&(e[0].can_add_friends?f.friendingBlocker=null:f.friendingBlocker={message:e[0].add_friends_error},e[1].can_add_subscribers?f.subscriptionBlocker=null:f.subscriptionBlocker={message:e[1].add_subscribers_error})}):Promise.resolve()};LJ.Event.on("relations.changed",function(e){j(e),L().then(b)}),t.on("click",function(e){if(!f.friendLists.remote.journal){e.preventDefault();var i=f.friendingBlocker;return i?void(c?p(i.message):h(t[0],i.message)):void LJ.Api.call("relations.addfriend",{target:l}).then(function(e){return LJ.Event.trigger("relations.changed",{action:"addFriend",username:l,data:e})})}}),a.on("click",function(e){if(!f.subscriptions.remote.journal){e.preventDefault();var i=f.subscriptionBlocker;return i?void(c?p(i.message):h(a[0],i.message)):void LJ.Api.call("relations.addfriend",{target:l,is_subscriber:1}).then(function(e){return LJ.Event.trigger("relations.changed",{action:"addFriend",username:l,data:e})})}}),n.attr("data-remote-friends-journal")&&(f.friendLists.remote.journal=!0),n.attr("data-remote-subscribed-to-journal")&&(f.subscriptions.remote.journal=!0),L().then(b)}}}(); /* <<< file end: js/scheme/schemius/controlstrip.js */ //# map link was there [controlstrip.js.map] /* >>> file start: js/scheme/schemius.js */ //= require js/core/angular/api.js //= require js/lib/jquery.selectric.min.js //= require js/captcha.js //= require js/scheme/schemius/feedback.js //= require js/notifications/main.js //= require js/facebookMigration/migration.js //= require js/scheme/schemius/controlstrip.js !function(e){return e}(),function(e){function o(){function o(e){return!!(e.ctrlKey||e.metaKey&&LJ.Support.isMac)}function s(e){e&&(e.stopPropagation(),e.preventDefault()),x.removeClass(I),x.removeClass(v),d.removeClass(I),d.removeClass(v)}function n(o){o&&(o.preventDefault(),o.stopPropagation()),u(),LJ.Event.trigger("Messages:closeByMenus"),d.addClass(v),x.addClass(I),setTimeout(function(){e("#user").focus()},300)}function t(){d.hasClass(v)?s():n()}function a(e){e&&LJ.Api.call("lang.set",{lang:e},function(){location.reload()})}function i(o){g.toggleClass(y,o),o?e(".b-loginform-click-trap").removeClass("b-loginform-click-trap--show"):(e(".b-loginform-click-trap").addClass("b-loginform-click-trap--show"),e(".b-loginform").removeClass("openid-auth-state"))}var l,r,c,u,d,p,m,h,g,f,v,b,C,k,w,j,L,y,J=LJ.Flags.isEnabled("medius_schemius"),x=e(document.body),A=e(".s-header"),S=e(J?".js-header-search-input":".s-inline-search-input"),T=e(J?".js-header-search-button":".s-do-item-search-btn"),_="p-show-search",D=!1,I="p-loginform",M=e(J?".js-header-nav-lang":".s-nav-item-lang"),P="s-nav-item-lang-open",E=function(e){o(e)||(A.hasClass(_)&&S.val()&&T.prop("type","submit"),A.toggleClass(_),A.hasClass(_)&&(D=!0,setTimeout(function(){S.focus()},500)))},O=e(".s-header-search__form");navigator.userAgent.match(/(iPod|iPhone|iPad)/i)&&O.each(function(){e(this).removeAttr("target")}),O.on("submit",function(){var e=S.val(),o=e.split(" ").filter(function(e){return e}),s=o.every(function(e){return e.length>1&&0===e.indexOf("#")});S.attr("name",s?"tags":"q")}),LJ&&LJ.Util&&LJ.Util.Action&&(LJ.Util.Action.login=n),T.on("click",E),T.on("blur",function(){"submit"===T.prop("type")&&(T.prop("type","button"),S.val(""))}),S.on("click",function(){D=!0}),x.on("click",function(){D||(A.removeClass(_),M.removeClass(P)),D=!1}),x.on("gesturestart",function(o){(e("html").hasClass("p-nav-common-menu-open")||e("html").hasClass("p-nav-user-menu-open"))&&o.preventDefault()}),navigator.userAgent.match(/Trident/)&&navigator.userAgent.match(/rv[ :]11/)&&e("html").addClass("html-ie11"),navigator.appVersion.match(/MSIE\s10/)&&e("html").addClass("html-ie10"),d=e("html"),d.addClass(LJ.Support.isMobile()?"html-mobile":"html-desktop"),~navigator.userAgent.toLowerCase().indexOf("android")?d.addClass("html-android"):~navigator.userAgent.toLowerCase().indexOf("iphone")||~navigator.userAgent.toLowerCase().indexOf("ipad")?d.addClass("html-ios"):~navigator.userAgent.toLowerCase().indexOf("windows phone")&&d.addClass("html-wphone"),e("[data-lang]").on("click",function(){a(e(this).data("lang"))}),M.on("click",function(e){o(e)||(e.preventDefault(),M.toggleClass(P),D=M.hasClass(P))}),e(".s-lang-select").selectric({customClass:{prefix:"b-selectus",postfixes:"Input Items Open Disabled TempShow HideSelect Wrapper Hover Responsive Above Scroll",camelCase:!1,overwrite:!1}}).on("change",function(){a(e(this).val())}),e(".selectricus").selectric({customClass:{prefix:"b-selectus",postfixes:"Input Items Open Disabled TempShow HideSelect Wrapper Hover Responsive Above Scroll",camelCase:!1,overwrite:!1},expandToItemText:!0,disableOnMobile:!1}),e(".b-message-mobile-close").one("click",function(){e(".b-message-mobile").hide()}),k=e(J?".js-header-nav-drop-master":".s-drop-master"),w=J?"s-header-nav-drop--open":"s-drop-open",j=LJ.Support.isMobile(),L=!1,j||(C=e(":lj-bubble"),k.on("mouseenter",function(){var o=e(this),s=300;L&&(clearTimeout(b),s=0),b=setTimeout(function(){k.removeClass(w),o.addClass(w),L=!0,C.bubble("hide")},s)}).on("mouseleave",function(){var o=e(this);return L?void(b=setTimeout(function(){o.removeClass(w),L=!1},500)):(clearTimeout(b),void o.removeClass(w))})),j&&(k.on("click",function(o){var s=e(this),n=0!==s.find("li").length,t=e(o.target).closest("span").is(".s-header-extra-menu-item-link-icon");"input"!==o.target.tagName.toLowerCase()&&(s.hasClass(w)||!n||t||o.preventDefault(),s.hasClass(w)||t||(L=!0,k.removeClass(w),o.stopPropagation(),e(":lj-bubble").bubble("hide")),s.toggleClass(w))}),x.on("click",function(o){var s=0===e(o.target).closest(k).length,n=e(o.target).is(".b-popup");n&&(o.stopPropagation(),e(":lj-bubble").bubble("hide")),L&&s&&(L=!1,k.removeClass(w),o.preventDefault())}),LJ.Support.isMobile&&LJ.Support.browser.safari&&x.addClass("iphone"),e(".l-flatslide-menu-active, .l-flatslide-menu-expander").click(function(o){o.preventDefault(),e(this).closest(".l-flatslide-menu").toggleClass("l-flatslide-menu-expanded")}),e(".s-header-search, .s-header-item-search__form").removeAttr("target")),d=e("html"),p=e(".s-body"),m=e(J?".js-header-menu-button":".s-nav-control-common"),h=e(J?".js-header-login":".s-nav-control-user, .s-nav-control-login"),f="p-nav-common-menu-open",v="p-nav-user-menu-open",m.on("click",function(){LJ.Event.trigger("Messages:closeByMenus"),d.toggleClass(f),s()}),h.on("click",t),u=function(){d.removeClass(f),d.removeClass(v)},p.on("click",function(){u(),s()}),e(".s-header-menu-head__drop").click(function(){var o=e(this).closest(".s-header-menu-drop"),s=o.find(".s-header-menu-list-sub"),n="s-header-menu-drop--open";if(o.is("."+n))s.css("max-height","");else{var t=s.children().toArray().reduce(function(o,s){return o+e(s).height()},0);s.css("max-height",t)}o.toggleClass(n)}),e(J?".js-header-login":".s-nav-item-login").on("click",n),e(".js-loginform-close").on("click",s),e(document).on("keyup",function(e){"Escape"!==e.key&&27!==e.keyCode||s(e)}),e(".b-fader").on("click",s),g=e(".b-loginform-body > .b-loginform-field"),y="active",J?e(".lj-openid-auth-button").on("click",function(o){o.preventDefault(),i(!1),e(".b-loginform").addClass("openid-auth-state")}):e(".lj-openid-auth-button").on("click",function(o){o.preventDefault(),e(".b-loginform").toggleClass("openid-auth-state"),e(".b-loginform").hasClass("openid-auth-state")?e("#openid").focus():e("#user").focus()}),J&&(e(".js-login-close").on("click",function(e){i(!1),s(e)}),e(".b-loginform-click-trap").on("click",function(){return i(!0)}),e(".b-loginform-toggle-link").on("click",function(){return i(!1)}),LJ.Flags.isEnabled("notification_center")&&angular.bootstrap(J?".js-header-notifications":".mds-do",["Notifications"])),LJ.Event.on("userpic.changed",function(o){e(".s-userpic").css("backgroundImage","url("+o+")")}),!LJ.Flags.isEnabled("ljwelcomevideo")||j||LJ.get("remote")||LJ.Cookie.get("welcome_ljvideo")||0!==LJ.get("remote_is_sup")||e(".appwidget-login").length||LJ.injectScript("../https@www.youtube.com/player_api").then(function(){function o(e){0!==e.data&&2!==e.data||n.addClass("s-ljvideo-end"),1===e.data&&n.removeClass("s-ljvideo-end")}var s,n=e(".s-ljvideo");x.addClass("p-ljvideo"),window.onYouTubePlayerAPIReady=function(){s=new window.YT.Player("s-ljvideo-player",{width:"640",height:"360",videoId:"wq0YmQ4xIeU",playerVars:{rel:0},events:{onStateChange:o}})},e(".b-fader, .s-ljvideo-close").on("click",function(){x.hasClass("p-ljvideo")&&(x.removeClass("p-ljvideo"),s.destroy(),LJ.Cookie.setGlobal("welcome_ljvideo",1,{expires:14}))})}),c=e(".s-header .i-supus-new, .s-header-messages-count"),LJ.Event.on("message:count:change",function(e){e>0?(c.html(e),c.removeClass("s-header-messages-count-empty")):c.addClass("s-header-messages-count-empty")}),r=e(".flatquestion-nojs-friendsgroups"),l=e(".flatquestion-popup-field-showanswer"),e(".flatquestion-popup-select").on("change",function(){"custom"===e(this).val()?r.show():r.hide(),"public"===e(this).val()?l.show():l.hide()}),LJ.Schemius.controlstrip.init({jQuery:e})}e(function(){0===e(".s-header").length?e("html").on("controlstrip-initialized",o):o()})}(jQuery); /* <<< file end: js/scheme/schemius.js */ //# map link was there [schemius.js.map] /* >>> file start: js/widgets/angular/login.js */ //= require js/core/angular/api.js //= require_ml loginform.error.enterpassword //= require_ml loginform.error.purgeduser //= require_ml loginform.error.enteruser //= require_ml loginform.error.ipbanned //= require_ml loginform.error.ipbanned.sysban //= require_ml loginform.error.ipbanned.distribution //= require_ml loginform.error.openid //= require_ml loginform.error.password //= require_ml loginform.error.usercreate //= require_ml error.nocommlogin //= require_ml error.login.limit.exceeded //= require_ml error.expiredchal //= require_ml error.account_locked.text //= require_ml error.user_is_child.text !function(r){return r}(),function(){function r(r){r.html5Mode({enabled:!0,requireBase:!1})}function e(){return{controllerAs:"loginForm",controller:n,link:function(r,e){e.find("a:not([target])").attr("target","_self")}}}function o(r){var e=r.type,o=r.url,n=r.$window,t=s("instant_relation_source",o),a=function(r){switch(r){case"instantRelationTry":return"try";case"instantRelationSuccess":return"ok";default:return null}}(e),i=function(r){switch(r){case"before_post":return"username";case"after_post":return"post";case"ctx_popup":return"ctxpopup";default:return null}}(t);return a&&i&&n.yaCounter27737346?n.yaCounter27737346.reachGoal("subscribe-"+i+"__login-"+a):null}function n(r,e,n,s,t,a){var i=this,l=angular.element(".b-fader");i.hasError=!1,i.siteroot=LJ.get("siteroot"),i.isMobile=LJ.Support.isMobile()||!!~navigator.userAgent.toLowerCase().indexOf("android"),i.close=function(r){r.target===r.currentTarget&&(r&&r.preventDefault(),n(function(){l.triggerHandler("click")}))};var u=void 0;i.loginUser=function(e){u=decodeURIComponent(a.absUrl()),o({type:"instantRelationTry",url:u,$window:r}),e.preventDefault(),i.model.username&&i.model.password?t.call("user.login",{user:i.model.username,password:i.model.password,expire:i.model.expire?"never":"remeber me"},{silent:!0}).then(i.sucsessLogin)["catch"](i.onError):i.model.username?i.model.password||i.onError({message:"invalid_password"}):i.onError({message:"invalid_user"})},i.loginOpenID=function(r){i.model.openid||(r.preventDefault(),i.onError({message:"invalid_id"}))},i.sucsessLogin=function(){o({type:"instantRelationSuccess",url:u,$window:r});var e=window.location.pathname;~e.indexOf("logout")?window.location.replace("login.bml"):window.location.reload()},i.onError=function(r){switch(i.resetError(),i.hasError=!0,r.message){case"unknown_user":i.errorUsername=!0,i.errorMessage=s.trustAsHtml(LJ.ml("loginform.error.usercreate",{domain:i.siteroot,username:i.model.username}));break;case"purged_user":i.errorUsername=!0,i.errorMessage=s.trustAsHtml(LJ.ml("loginform.error.purgeduser"));break;case"community_disabled_login":i.errorUsername=!0,i.errorMessage=s.trustAsHtml(LJ.ml("error.nocommlogin"));break;case"invalid_user":i.errorUsername=!0,i.errorMessage=s.trustAsHtml(LJ.ml("loginform.error.enteruser"));break;case"bad_password":i.errorPassword=!0,i.errorMessage=s.trustAsHtml(LJ.ml("loginform.error.password"));break;case"invalid_password":i.errorPassword=!0,i.errorMessage=s.trustAsHtml(LJ.ml("loginform.error.enterpassword"));break;case"banned_ip":i.errorUsername=!0,i.errorMessage=s.trustAsHtml(LJ.ml("loginform.error.ipbanned"));break;case"banned_ip_sysban":i.errorUsername=!0,i.errorMessage=s.trustAsHtml(LJ.ml("loginform.error.ipbanned.sysban"));break;case"banned_ip_distrib":i.errorUsername=!0,i.errorMessage=s.trustAsHtml(LJ.ml("loginform.error.ipbanned.distribution"));break;case"invalid_id":i.errorId=!0,i.errorMessage=s.trustAsHtml(LJ.ml("loginform.error.openid"));break;case"ratelimit_exceeded":i.errorUsername=!0,i.errorMessage=s.trustAsHtml(LJ.ml("loginform.error.openid"));break;case"expired_challenge":i.errorUsername=!0,i.errorMessage=s.trustAsHtml(LJ.ml("error.expiredchal"));break;case"account_locked":i.errorUsername=!0,i.errorMessage=s.trustAsHtml(LJ.ml("error.account_locked.text"));break;case"is_child":i.errorUsername=!0,i.errorMessage=s.trustAsHtml(LJ.ml("error.user_is_child.text"));break;default:i.errorUsername=!0,i.errorMessage="UnknownError"}},n(function(){document.querySelectorAll("input:-webkit-autofill").length&&angular.element(".b-loginform-btn--auth").removeClass("b-loginform-btn--disabled"),function(r){return r}()},100),i.resetError=function(){i.errorError=i.errorUsername=i.errorPassword=i.errorIp=i.errorId=!1},e.$watch(function(){return i.model},function(){i.hasError&&i.resetError()},!0)}r.$inject=["$locationProvider"],n.$inject=["$window","$scope","$timeout","$sce","Api","$location"],angular.module("Login",["LJ.Api","LJ.Directives"]).config(r).controller("LoginCtrl",n).directive("ljLogin",e),function(r){return r}(),angular.element(window.document).ready(function(){if(!angular.element("body[ng-app]").length>0)try{angular.bootstrap(".b-loginform",["Login"])}catch(r){console.info(r.message,r.stack)}});var s=function(r,e){r=r.replace(/[\[\]]/g,"\\$&");var o=new RegExp("[?&]"+r+"(=([^&#]*)|&|#|$)"),n=o.exec(e);return n?n[2]?decodeURIComponent(n[2].replace(/\+/g," ")):"":null}}(); /* <<< file end: js/widgets/angular/login.js */ //# map link was there [login.js.map] /* >>> file start: js/jquery/jquery.lj.journalPromoStrip.js */ !function(o,e){"use strict";o.widget("lj.journalPromoStrip",o.lj.basicWidget,{options:{selectors:{popupInfo:".journalpromo-popup-content-info",popupDelete:".journalpromo-popup-content-delete",button:"#journalpromo-popup-btn",iconClose:".b-journalpromo-actions-close",options:".b-journalpromo-header-options",promoItem:".b-journalpromo-item",iconDelete:".b-journalpromo-actions-delete",info:".journalpromo-popup-info-action",spinner:".journalpromo-popup-spinner",error:".journalpromo-popup-info-error",errorContent:".journalpromo-popup-info-error-content",ban:"#journalpromo-user-ban"},classNames:{iconInfo:".journalpromo-info-icon",iconDelete:".b-journalpromo-actions-delete",noPromo:"b-journalpromo-item-nopromotion"},template:"
    {subject} {ljuser}
    {body}
    "},_create:function(){var e=this;o.lj.basicWidget.prototype._create.apply(this),this._el("spinner"),this._el("info"),this._el("button"),this._el("iconClose"),this._el("error"),e._el("promoItem"),this._el("iconDelete"),this._el("popupDelete"),this._el("errorContent"),this._el("iconDelete")[0]&&(this._deleteBubble=this._popupDelete.bubble({target:this._cl("iconDelete"),showOn:"click"})),this._el("popupInfo").bubble({target:this._cl("iconInfo"),showOn:"hover",closeControl:!1,showDelay:500}),this._bindControls()},_toggleSpinner:function(o){this._spinner.toggle(o),this._info.toggle(!o)},_toggleError:function(o,e){this._error.toggle(o),this._info.toggle(!o),e&&this._errorContent.text(e)},_updateBlock:function(o){o.object[0].object_url?this._promoItem.html(this.options.template.supplant({rules_link:o.object[0].object_url,subject:o.object[0].subject,body:o.object[0].body,ljuser:o.object[0].ljuser_display})):this._promoItem.html(''+o.object[0].body+"").addClass(this._cl("noPromo"))},_closeClick:function(){var o=this;return"#__debug"===location.hash?this._debug():(o._toggleSpinner(!0),void LJ.Api.call("journalpromo.admin_cancel",{object_url:o.options.url,user:Site.currentJournal,get_slot:1,ban_user:document.getElementById("journalpromo-user-ban").checked},function(e){if(o._toggleSpinner(!1),console.dir(e),e.error&&e.error.data&&e.error.data.entry)return o._updated=e.error.data.entry[0],o._toggleError(!0,e.error.message),void console.error(e.error.message);if(!e.error&&e.entry){var t=e.entry[0];if(!t||!t.object||!t.object[0])return void console.error("Wrong data",e);o._updateBlock(t),o._iconDelete.hide()}o._deleteBubble.bubble("hide")}))},_disableClick:function(){var o=this;LJ.Api.call("journalpromo.disable_promo_announce",{journal:LJ.get("currentJournal")},function(e){e.error||o.element.slideUp("fast")})},_bindControls:function(){var e=this;o.lj.basicWidget.prototype._bindControls.apply(this),this._button.on("click",this._closeClick.bind(this)),this._iconClose.on("click",this._disableClick.bind(this)),this._deleteBubble&&this._deleteBubble.bind("bubblehide",function(o){e._toggleError(!1),e._updated&&(e._updateBlock(e._updated),e._iconDelete.hide())})},_debug:function(){var o=this;o._toggleSpinner(!0),setTimeout(function(){o._toggleSpinner(!1),o._toggleError(!0,"Sample error")},1e3)}})}(jQuery,window); /* <<< file end: js/jquery/jquery.lj.journalPromoStrip.js */ //# map link was there [jquery.lj.journalPromoStrip.js.map] /* >>> file start: js/jquery/jquery.lj.inlineCalendar.js */ var _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};!function(t){function e(t,e){e=e||!1;var a=t.getDate().toString();1===a.length&&(a="0"+a),e&&(a="");var n=t.getMonth().toString();return 1===n.length&&(n="0"+n),parseInt(t.getFullYear().toString()+n+a,10)}function a(t,a){return e(a,!0)>=e(t[0],!0)&&e(a,!0)<=e(t[1],!0)}function n(a,n,i){this.initialize=function(t){this.tbody=this.catchTableStructure(t)},this.modelChanged=function(e,n,s){var o=i.longMonth?i.ml.monthNamesLong:i.ml.monthNamesShort;this.tbody.detach(),this.fillDates(e,n);for(var r in s)s.hasOwnProperty(r)&&a[r][s[r]?"removeClass":"addClass"](this.disabledStyle(r));var l=i.monthRef?t("",{href:LJ.Util.Date.format(e,i.monthRef),text:o[e.getMonth()]+(i.monthWithYear?" "+e.getFullYear():"")}):o[e.getMonth()],h=i.yearRef?t("",{href:LJ.Util.Date.format(e,i.yearRef),text:e.getFullYear()}):e.getFullYear();a.monthLabel.empty().append(l),a.yearLabel.empty().append(h),this.tbody.appendTo(a.table)},this.catchTableStructure=function(e){var n=a.tbody[0];a.daysCells=[],a.daysSpans=[];for(var i,s,o,r=n.rows.length,l=6-r,h="",d=0;7>d;++d)h+="";for(h+="";l-- >0;)t(h).hide().appendTo(a.tbody);for(r=6,a.lastRow=jQuery(n.rows[n.rows.length-1]),e=new Date(e),i=0;r>i;++i)for(s=0,o=n.rows[i].cells.length;o>s;++s){var c=jQuery(n.rows[i].cells[s]),p=c.children(),u=p.text().trim();u&&(e.setDate(u),c.data("isActive",!0),c.data("day",e)),a.daysCells.push(c),a.daysSpans.push(p)}return jQuery(n)},this.fillDates=function(t,e){function n(t){var a=t.getFullYear(),n=t.getMonth(),i=t.getDate();return e&&e[a]&&e[a][n]&&e[a][n][i]}var s=new Date(t);s.setDate(1);var o;o=i.startAtSunday?s.getDay():0===s.getDay()?6:s.getDay()-1,s.setDate(1-o);for(var r=0,l=a.daysCells.length;l>r;++r){var h=a.daysCells[r],d=a.daysSpans[r];this.formDayString(s,h,d,n(s),this.isActiveDate(s,t)),s.setDate(s.getDate()+1)}s.setDate(s.getDate()-1),s.getDate()<7?a.lastRow.css("display",""):a.lastRow.css("display","none")},this.isActiveDate=function(t,a){var n=!0;return n=a.getFullYear()===t.getFullYear()&&a.getMonth()===t.getMonth(),n&&(i.activeFrom||i.activeUntil)&&(n=i.activeFrom&&e(i.activeFrom)<=e(t)||i.activeUntil&&e(i.activeUntil)>=e(t)),n},this.formDayString=function(a,s,o,r,l){a=new Date(a);var h=e(a)===e(i.currentDate);if(s.data("day",a),s.data("isActive",l),s.data("hasEvents",r),s[h?"addClass":"removeClass"](n.current),s.removeClass(n.cellHover),l)if(r||i.allRefs){var d=!0;i.allRefs&&"object"===_typeof(i.allRefs)&&(i.allRefs.from&&ai.allRefs.to&&(d=!1)),d?(s.removeClass(n.inactive),o.html(t("",{html:a.getDate(),href:LJ.Util.Date.format(a,i.dayRef),target:"_self"}))):(s.removeClass(n.inactive),o.html(a.getDate()))}else s.removeClass(n.inactive),o.html(a.getDate());else s.addClass(n.inactive),o.html(a.getDate())},this.disabledStyle=function(t){return"prevMonth"===t||"prevYear"===t?n.prevDisabled:n.nextDisabled}}var i={dayRef:"/%Y/%M/%D",monthRef:"",yearRef:"",allRefs:!1,currentDate:new Date,activeUntil:null,activeFrom:null,startMonth:new Date(1900,0,1),endMonth:new Date(2050,0,1),startAtSunday:"0"===LJ.ml("date.format.offset")||!1,dateFormat:"%Y-%M-%D",defaultTitle:"Calendar",longMonth:!1,events:null,displayedMonth:null,dateChange:null,selectors:{table:"table",title:"h5",tbody:"tbody",month:".cal-nav-month",year:".cal-nav-year",monthSelect:".cal-nav-month-select",yearSelect:".cal-nav-year-select",prevMonth:".cal-nav-month .cal-nav-prev",nextMonth:".cal-nav-month .cal-nav-next",prevYear:".cal-nav-year .cal-nav-prev",nextYear:".cal-nav-year .cal-nav-next",monthLabel:".cal-nav-month .cal-month",yearLabel:".cal-nav-year .cal-year"},classNames:{container:"",inactive:"other",future:"other",current:"current",weekend:"weekend",nextDisabled:"cal-nav-next-dis",prevDisabled:"cal-nav-prev-dis",cellHover:"hover",longMonth:"sidebar-cal-longmonth"},mlPrefix:{monthNamesShort:["monthNames","date.month.{name}.short"],monthNamesLong:["monthNames","date.month.{name}.long"],dayNamesShort:["dayNames","date.day.{name}.short"]},ml:{monthNames:["january","february","march","april","may","june","july","august","september","october","november","december"],dayNames:["sunday","monday","tuesday","wednesday","thursday","friday","saturday"],caption:"Calendar"}},s={options:{},_create:function(){this._preInit(),this._initialize(),this._postInit()},_preInit:function(){var e=t[this.namespace][this.widgetName].getDefaults();this.options=jQuery.extend(!0,{},e,this.options),this._prepareMLVars()},_prepareMLVars:function(){var t,e=function(t,e){return LJ.ml(t.supplant({name:e}))};for(var a in this.options.mlPrefix)this.options.mlPrefix.hasOwnProperty(a)&&(t=this.options.mlPrefix[a],this.options.ml[a]=this.options.ml[t[0]].map(e.bind(null,t[1])))},_initialize:function(){this.options.displayedMonth||(this.options.displayedMonth=new Date(this.options.currentDate)),this._events=this.options.events,this._hideTimer=null,this._nodes=this._nodes||{container:this.element,root:this.element},this._invalidateTimer=null,this.element.hasClass(this.options.classNames.longMonth)&&(this.options.longMonth=!0),this._bindNodes(),this.options.startMonth.setDate(1),this._view=new(this._getView())(this._nodes,this.options.classNames,this.options),this._view.initialize(this.options.currentDate),this._nodes.table.hasClass("monday")&&this._setOption("startAtSunday",!1),this._nodes.monthSelect.val(this.options.displayedMonth.getMonth()),this._nodes.yearSelect.val(this.options.displayedMonth.getFullYear()),this._bindEvents()},_postInit:function(){},_getView:function(){return n},_bindNodes:function(){for(var t in this.options.selectors)!this.options.selectors.hasOwnProperty(t)||t in this._nodes||(this._nodes[t]=this._nodes.container.find(this.options.selectors[t]));var e=LJ.Util.Date.parse(this._nodes.table.attr("data-date"),this.options.dateFormat);e&&(this.options.displayedMonth=e)},destroy:function(){t.Widget.prototype.destroy.apply(this,arguments)},_bindEvents:function(){var e=this,a=this._getSwitcherStates(this.options.currentDate),n=function(t){return function(a){a.preventDefault(),a.stopPropagation();var n=e._getSwitcherStates(e.options.currentDate);n[t]&&e["_"+t]()}};for(var i in a)a.hasOwnProperty(i)&&this._nodes[i].click(n(i));this._nodes.monthSelect.change(function(){var t=new Date(e.options.currentDate);t.setMonth(this.value),e._setOption("currentDate",t)}),this._nodes.yearSelect.change(function(){var t=new Date(e.options.currentDate);t.setFullYear(this.value),e._setOption("currentDate",t)}),this._nodes.tbody.delegate("td","click",function(a){e._cellSelectedEvent(t(this),a)})},_switchMonth:function(t){var e=jQuery.Event("dateChange");e.moveForward=t>0,e.switchType=12===Math.abs(t)?"year":1===Math.abs(t)?"month":null,e.date=new Date(this.options.displayedMonth.getFullYear(),this.options.displayedMonth.getMonth()+t,1),this._nodes.root.trigger(e),this._setOption("displayedMonth",e.date)},_prevMonth:function(){this._switchMonth(-1)},_nextMonth:function(){this._switchMonth(1)},_prevYear:function(){this._switchMonth(-12)},_nextYear:function(){this._switchMonth(12)},_cellSelectedEvent:function(t,e){t.data("isActive")&&!this._cellSelected(t.data("day"))||(e.stopPropagation(),e.preventDefault())},_cellSelected:function(t){var e=jQuery.Event("daySelected");return this._nodes.root.trigger(e,[t,LJ.Util.Date.format(t,this.options.dateFormat)]),e.isDefaultPrevented()||this._setOption("currentDate",t),!e.isDefaultPrevented()},_fitDate:function(t){t=new Date(t);var n=[this.options.startMonth,this.options.endMonth];return a(n,t)||(t=e(t,!0)>> file start: js/jquery/jquery.lj.calendar.js */ //= require js/jquery/jquery.lj.inlineCalendar.js !function(e,t){var n,s={showOn:"click",closeControl:!0,showCellHovers:!1,hoverDelay:400,align:"center",events:null,displayedMonth:null,bubbleClass:!1,selectors:{tmpl:".appwidget-calendar .calendar"},classNames:{showCellHovers:"all-days",popup:"b-bubble-calendar"},templates:{calendar:''}},a={options:{},_initialize:function(){n||(n=this._buildDOM()),this._nodes={container:n.clone(),root:this.element},e.lj.inlineCalendar.prototype._initialize.apply(this),this._invalidateDisplay()},_bindNodes:function(){e.lj.inlineCalendar.prototype._bindNodes.apply(this);var t=this;this._nodes.container.bubble({classNames:{containerAddClass:this.options.bubbleClass?this.options.classNames.popup:""},target:this._nodes.root,align:this.options.align,closeControl:this.options.closeControl,showOn:this.options.showOn,closeOnContentClick:!1}).bind("bubbleshow",function(e){t._nodes.container.bubble("setPreventHide",!0),setTimeout(function(){t._nodes.container.bubble("setPreventHide",!1)},300),t._trigger("show")}).bind("bubblehide",function(e){t._trigger("hide")}).addClass(this.options.classNames.container),this.options.input?this._nodes.input=this.options.input:this._nodes.root.is("[type=text]")?this._nodes.input=this._nodes.root:this._nodes.input=e(),this._nodes.input.mask&&this._nodes.input.mask("?dddd-dd-dd",{placeholder:" "}),this._nodes.input.input(this._parseInputValue.bind(this));var n=LJ.Util.Date.parse(this._nodes.input.val(),this.options.dateFormat);n&&(this.options.currentDate=n),this.options.showCellHovers&&this._nodes.table.addClass(this.options.classNames.showCellHovers)},destroy:function(){this._nodes.container.bubble("destroy"),e.lj.inlineCalendar.prototype.destroy.apply(this)},_buildDOM:function(){var e=this.options.ml.dayNamesShort.map(function(e){return{day:e}}),t=0,n=6,s=function(e,t){for(var n=[];e--;)n.push(t);return n};this.options.startAtSunday||(e[7]=e[0],e.shift(),t=5);for(var a=[],i=[],l=this.options.endMonth.getFullYear(),o=this.options.startMonth.getFullYear();l>=o;)a.push({year:l--});i=this.options.ml.monthNamesLong.map(function(e){return{month:e}});var d={caption:this.options.ml.caption,days:e,months:i,years:a,cells:s(42,{}),weekend1:t,weekend2:n};return-1!==this.options.templates.calendar.indexOf(" ")?jQuery.tmpl(this.options.templates.calendar,d):LJ.UI.template(this.options.templates.calendar,d)},_parseInputValue:function(){var e=LJ.Util.Date.parse(this._nodes.input.val(),this.options.dateFormat);e&&this._cellSelected(e)},_cellSelectedEvent:function(n,s){var a=this;e.lj.inlineCalendar.prototype._cellSelectedEvent.call(this,n,s),a.options.showCellHovers&&n.data("isActive")&&a._nodes.container.bubble("hide"),"a"==s.target.tagName.toLowerCase()&&(t.location.href=s.target.href)},_invalidateDisplay:function(){this._view.modelChanged(this.options.displayedMonth,this._events,this._getSwitcherStates())},_setOption:function(t,n){switch(e.lj.inlineCalendar.prototype._setOption.call(this,t,n),t){case"currentDate":this._nodes.input.val(LJ.Util.Date.format(this.options.currentDate,this.options.dateFormat))}}};e.widget("lj.calendar",e.lj.inlineCalendar,a),jQuery.extend(e.lj.calendar,{getDefaults:function(){return jQuery.extend(!0,{},e.lj.inlineCalendar.getDefaults(),s)},setDefaults:function(e){e&&jQuery.extend(s,e)}})}(jQuery,window); /* <<< file end: js/jquery/jquery.lj.calendar.js */ //# map link was there [jquery.lj.calendar.js.map] /* >>> file start: js/jquery/jquery.mask.js */ !function(t){var e=(t.browser.msie?"paste":"input")+".mask",n=void 0!=window.orientation;t.mask={definitions:{d:"[0-9]",w:"[A-Za-z]","*":"[A-Za-z0-9а-яА-Я]"}},t.fn.extend({unmask:function(){return this.trigger("unmask")},mask:function(a,r){if(!a&&this.length>0){var i=t(this[0]),o=i.data("tests");return t.map(i.data("buffer"),function(t,e){return o[e]?t:null}).join("")}r=t.extend({placeholder:"_",completed:null},r);var u=t.mask.definitions,o=[],l=a.length,f=null,s=a.length;return t.each(a.split(""),function(t,e){"?"==e?(s--,l=t):u[e]?(o.push(new RegExp(u[e])),null==f&&(f=o.length-1)):o.push(null)}),this.each(function(){function i(t){for(;++t<=s&&!o[t];);return t}function c(t){for(;!o[t]&&--t>=0;);for(var e=t;s>e;e++)if(o[e]){g[e]=r.placeholder;var n=i(e);if(!(s>n&&o[e].test(g[n])))break;g[e]=g[n]}k(),b.caret(Math.max(f,t))}function d(t){for(var e=t,n=r.placeholder;s>e;e++)if(o[e]){var a=i(e),u=g[e];if(g[e]=n,!(s>a&&o[a].test(u)))break;n=u}}function h(e){var a=t(this).caret(),r=e.keyCode;return y=16>r||r>16&&32>r||r>32&&41>r,a.start-a.end==0||y&&8!=r&&46!=r||m(a.start,a.end),8==r||46==r||n&&127==r?(c(a.start+(46==r?0:-1)),!1):27==r?(b.val(w),b.caret(0,p()),!1):void 0}function v(e){if(y)return y=!1,8==e.keyCode?!1:null;e=e||window.event;var n=e.charCode||e.keyCode||e.which,a=t(this).caret();if(e.ctrlKey||e.altKey||e.metaKey)return!0;if(n>=32&&125>=n||n>186){var u=i(a.start-1);if(s>u){var l=String.fromCharCode(n);if(o[u].test(l)){d(u),g[u]=l,k();var a=i(u);t(this).caret(a),r.completed&&a==s&&r.completed.call(b)}}}return!1}function m(t,e){for(var n=t;e>n&&s>n;n++)o[n]&&(g[n]=r.placeholder)}function k(){return b.val(g.join("")).val()}function p(t){for(var e=b.val(),n=-1,a=0,i=0;s>a;a++)if(o[a]){for(g[a]=r.placeholder;i++e.length)break}else g[a]==e.charAt(i)&&a!=l&&(i++,n=a);return!t&&l>n+1?(b.val(""),m(0,s)):(t||n+1>=l)&&(k(),t||b.val(b.val().substring(0,n+1))),l?a:f}var b=t(this),g=t.map(a.split(""),function(t,e){return"?"!=t?u[t]?r.placeholder:t:void 0}),y=!1,w=b.val();b.data("buffer",g).data("tests",o),b.attr("readonly")||b.one("unmask",function(){b.unbind(".mask").removeData("buffer").removeData("tests")}).bind("focus.mask",function(){w=b.val();var t=p();k(),setTimeout(function(){t==a.length?b.caret(0,t):b.caret(t)},0)}).bind("blur.mask",function(){p(),b.val()!=w&&b.change()}).bind("keydown.mask",h).bind("keypress.mask",v).bind(e,function(){setTimeout(function(){b.caret(p(!0))},0)}),p()})}})}(jQuery); /* <<< file end: js/jquery/jquery.mask.js */ //# map link was there [jquery.mask.js.map] /* >>> file start: js/scheme/medius.js */ //= require js/widgets/angular/mediusSubscribe.js //= require js/core/angular/api.js !function(){"use strict";angular.element(document).ready(function(){if(0!==angular.element(".mdsfooter").length){var e=angular.element(".mdsfooter").find("[medius-subscribe]");angular.bootstrap(e,["Medius.Subscribe"])}})}(); /* <<< file end: js/scheme/medius.js */ //# map link was there [medius.js.map] /* >>> file start: js/core/angular/radioGroup.js */ !function(t){return t}(),function(){"use strict";function t(){function t(){this._models={}}function o(o){return e[o]?e[o]:(e[o]=new t,e[o])}var e={};return t.prototype.models=function(){return this._models},t.prototype.reset=function(){var t,o=this._models;for(t in o)o.hasOwnProperty(t)&&o[t]&&(this._models[t]=!1);return this},t.prototype.set=function(t,o){return o?this.reset()._models[t]=!0:this._models[t]=!1,this},t.prototype.on=function(t){return this.set(t,!0)},t.prototype.off=function(t){return"undefined"==typeof t?this.reset():this.set(t,!1),this},t.prototype.toggle=function(t){this._models[t]?this.off(t):this.on(t)},o}angular.module("LJ.RadioGroup",[]),angular.module("LJ.RadioGroup").factory("radioGroup",t)}(); /* <<< file end: js/core/angular/radioGroup.js */ //# map link was there [radioGroup.js.map] /* >>> file start: js/node_modules/angular-sanitize/angular-sanitize.js */ !function(e,t){"use strict";function n(){function n(e,t){var n,r={},i=e.split(",");for(n=0;nn;n++){var i=e[n];t[i.name]=i.value}return t}function f(e){return e.replace(/&/g,"&").replace(y,function(e){var t=e.charCodeAt(0),n=e.charCodeAt(1);return"&#"+(1024*(t-55296)+(n-56320)+65536)+";"}).replace(k,function(e){return"&#"+e.charCodeAt(0)+";"}).replace(//g,">")}function m(e,t){var n=!1,r=i(e,e.push);return{start:function(e,i){e=l(e),!n&&D[e]&&(n=e),n||$[e]!==!0||(r("<"),r(e),o(i,function(n,i){var a=l(i),o="img"===e&&"src"===a||"background"===a;M[a]!==!0||N[a]===!0&&!t(n,o)||(r(" "),r(i),r('="'),r(f(n)),r('"'))}),r(">"))},end:function(e){e=l(e),n||$[e]!==!0||x[e]===!0||(r("")),e==n&&(n=!1)},chars:function(e){n||r(f(e))}}}function g(t){if(t.nodeType===e.Node.ELEMENT_NODE)for(var n=t.attributes,r=0,i=n.length;i>r;r++){var a=n[r],o=a.name.toLowerCase();"xmlns:ns1"!==o&&0!==o.lastIndexOf("ns1:",0)||(t.removeAttributeNode(a),r--,i--)}var s=t.firstChild;s&&g(s),s=t.nextSibling,s&&g(s)}var b=!1;this.$get=["$$sanitizeUri",function(e){return b&&a($,T),function(t){var n=[];return u(t,d(n,function(t,n){return!/^unsafe:/.test(e(t,n))})),n.join("")}}],this.enableSvg=function(e){return s(e)?(b=e,this):b},i=t.bind,a=t.extend,o=t.forEach,s=t.isDefined,l=t.lowercase,c=t.noop,u=r,d=m;var v,y=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,k=/([^\#-~ |!])/g,x=n("area,br,col,hr,img,wbr"),w=n("colgroup,dd,dt,li,p,tbody,td,tfoot,th,thead,tr"),C=n("rp,rt"),E=a({},C,w),z=a({},w,n("address,article,aside,blockquote,caption,center,del,dir,div,dl,figure,figcaption,footer,h1,h2,h3,h4,h5,h6,header,hgroup,hr,ins,map,menu,nav,ol,pre,section,table,ul")),L=a({},C,n("a,abbr,acronym,b,bdi,bdo,big,br,cite,code,del,dfn,em,font,i,img,ins,kbd,label,map,mark,q,ruby,rp,rt,s,samp,small,span,strike,strong,sub,sup,time,tt,u,var")),T=n("circle,defs,desc,ellipse,font-face,font-face-name,font-face-src,g,glyph,hkern,image,linearGradient,line,marker,metadata,missing-glyph,mpath,path,polygon,polyline,radialGradient,rect,stop,svg,switch,text,title,tspan"),D=n("script,style"),$=a({},x,z,L,E),N=n("background,cite,href,longdesc,src,xlink:href"),S=n("abbr,align,alt,axis,bgcolor,border,cellpadding,cellspacing,class,clear,color,cols,colspan,compact,coords,dir,face,headers,height,hreflang,hspace,ismap,lang,language,nohref,nowrap,rel,rev,rows,rowspan,rules,scope,scrolling,shape,size,span,start,summary,tabindex,target,title,type,valign,value,vspace,width"),F=n("accent-height,accumulate,additive,alphabetic,arabic-form,ascent,baseProfile,bbox,begin,by,calcMode,cap-height,class,color,color-rendering,content,cx,cy,d,dx,dy,descent,display,dur,end,fill,fill-rule,font-family,font-size,font-stretch,font-style,font-variant,font-weight,from,fx,fy,g1,g2,glyph-name,gradientUnits,hanging,height,horiz-adv-x,horiz-origin-x,ideographic,k,keyPoints,keySplines,keyTimes,lang,marker-end,marker-mid,marker-start,markerHeight,markerUnits,markerWidth,mathematical,max,min,offset,opacity,orient,origin,overline-position,overline-thickness,panose-1,path,pathLength,points,preserveAspectRatio,r,refX,refY,repeatCount,repeatDur,requiredExtensions,requiredFeatures,restart,rotate,rx,ry,slope,stemh,stemv,stop-color,stop-opacity,strikethrough-position,strikethrough-thickness,stroke,stroke-dasharray,stroke-dashoffset,stroke-linecap,stroke-linejoin,stroke-miterlimit,stroke-opacity,stroke-width,systemLanguage,target,text-anchor,to,transform,type,u1,u2,underline-position,underline-thickness,unicode,unicode-range,units-per-em,values,version,viewBox,visibility,width,widths,x,x-height,x1,x2,xlink:actuate,xlink:arcrole,xlink:role,xlink:show,xlink:title,xlink:type,xml:base,xml:lang,xml:space,xmlns,xmlns:xlink,y,y1,y2,zoomAndPan",!0),M=a({},N,F,S);!function(e){var t;if(!e.document||!e.document.implementation)throw h("noinert","Can't create an inert html document");t=e.document.implementation.createHTMLDocument("inert");var n=t.documentElement||t.getDocumentElement(),r=n.getElementsByTagName("body");if(1===r.length)v=r[0];else{var i=t.createElement("html");v=t.createElement("body"),i.appendChild(v),t.appendChild(i)}}(e)}function r(e){var t=[],n=d(t,c);return n.chars(e),t.join("")}var i,a,o,s,l,c,u,d,h=t.$$minErr("$sanitize");t.module("ngSanitize",[]).provider("$sanitize",n),t.module("ngSanitize").filter("linky",["$sanitize",function(e){var n=/((ftp|https?):\/\/|(www\.)|(mailto:)?[A-Za-z0-9._%+-]+@)\S*[^\s.;,(){}<>"\u201d\u2019]/i,i=/^mailto:/i,a=t.$$minErr("linky"),o=t.isDefined,s=t.isFunction,l=t.isObject,c=t.isString;return function(t,u,d){function h(e){e&&y.push(r(e))}function p(e,t){var n,r=b(e);y.push("'),h(t),y.push("")}if(null==t||""===t)return t;if(!c(t))throw a("notstring","Expected string but received: {0}",t);for(var f,m,g,b=s(d)?d:l(d)?function(){return d}:function(){return{}},v=t,y=[];f=v.match(n);)m=f[0],f[2]||f[4]||(m=(f[3]?"http://":"mailto:")+m),g=f.index,h(v.substr(0,g)),p(m,f[0].replace(i,"")),v=v.substring(g+f[0].length);return h(v),e(y.join(""))}}])}(window,window.angular); /* <<< file end: js/node_modules/angular-sanitize/angular-sanitize.js */ //# map link was there [angular-sanitize.js.map] /* >>> file start: js/medius/recommended.js */ //= require js/core/angular/bubble.js //= require js/core/angular/api.js Site.page.template['angular/ljTimesRecommendedBubble.ng.tmpl'] = '\n \n
    \n
    \n
    \n \n \n \n \n \n \n \n
    '; Site.page.template['angular/mediusRecommended.ng.tmpl'] = '\n \n \n \n
    \n {{error}}\n
    \n \n
    \n \n
    \n \n
    \n
    \n
    \n \n
    \n \n
    \n
    \n\n
    \n
    \n \n \n
    \n \n
    \n \n \n
    \n \n\n\n'; //= require_ml medius.recommended.has.errors //= require_ml medius.recommended.success //= require_ml medius.recommended.label.category //= require_ml medius.recommended.label.link //= require_ml medius.recommended.label.message //= require_ml medius.recommended.button.send !function(e){return e}(),function(){"use strict";function e(e,n,t,o){function r(){l.currentState=l.states.success,a=n(function(){t.close("recommended"),i();var n=e.afterRecommendSendCb;angular.isFunction(n)&&n({success:!0})},u)}function s(e){l.currentState=l.states.error,e.data.forEach(function(e){switch(l.errors.push(e.message),e.field){case"cat_post_id":l.fieldErrors.category=!0;break;case"entry_url":l.fieldErrors.link=!0;break;case"message":l.fieldErrors.message=!0}})}function c(){l.fieldErrors={category:!1,link:!1,message:!1}}function i(){l.message="",l.link="",l.selectedCategory=l.categories[0],l.currentState=l.states.edit,l.errors=[],c()}var a,l=this,u=3e3,d={success:"ok",error:"check_error"};l.categories=(LJ.get("categories")||[]).filter(function(e){return!e.skip_send_news}),l.messageLength=200,l.states={edit:"edit",success:"success",error:"error",loading:"loading"},i(),l.canSend=function(){return""!==l.message||""!==l.link},l.send=function(){l.errors=[],c(),l.currentState=l.states.loading,o.call("medius.recommend",{cat_post_id:l.selectedCategory.id,entry_url:l.link,message:l.message},{silent:!0}).then(function(e){e.status===d.success?r():e.status===d.error&&s(e)},function(e){l.errors.push(e.message),l.currentState=l.states.error})},e.$on("bubble:close:recommended",function(){a&&(n.cancel(a),a=null),i()})}function n(e,n,t,o,r){function s(s,c,i){if(LJ.get("remote")){if(i.ljTimesMode){s.recommendBubble={shown:!1},s.afterRecommendSendCb=function(){var e=arguments.length<=0||void 0===arguments[0]?{}:arguments[0];e.success&&(s.recommendBubble.shown=!1)};var a=angular.element(t.get("ljTimesRecommendedBubble.ng.tmpl")),l=angular.element(t.get("mediusRecommended.ng.tmpl"));return a.append(l),c.before(a),n(a)(s),c.click(function(e){e.preventDefault(),e.stopPropagation(),r(function(){s.recommendBubble.shown=!s.recommendBubble.shown})}),void o.on("click",function(e){e.target.closest(".js--recommendBubble")||r(function(){s.recommendBubble.shown=!1})})}var u,d=LJ.Support.isMobile()||!!~navigator.userAgent.toLowerCase().indexOf("android"),m="recommended",f=angular.element(window),g=c.closest("ul"),b=function(){g.scrollLeft(1280)};e.register({name:m,template:"mediusRecommended.ng.tmpl",recalculateOnScroll:!d,alwaysBottom:!0,alwaysLeft:!0,disableResizeListener:d,recalculateOnOrientationChange:d}),c.click(function(n){if(n.preventDefault(),b(),e.open(m,{alwaysLeft:!0},c),f.on("orientationchange",b),d){u=f.scrollTop();var t=s.$on("bubble:close:"+m,function(){f.scrollTop(u),f.off("orientationchange",b),t()})}s.$apply()})}else c.click(function(e){LJ.Util.Action.login(e)})}return{link:s}}n.$inject=["Bubble","$compile","$templateCache","$document","$timeout"],angular.module("Medius.Recommended",["LJ.Templates","LJ.Bubble","LJ.Api"]),LJ.Flags.isEnabled("medius_schemius")&&angular.element(window.document).ready(function(){angular.bootstrap(".s-header-menu-head-title__additional--link--sendnews",["Medius.Recommended"])}),angular.module("Medius.Recommended").controller("RecommendedCtrl",e).directive("mediusRecommended",n),e.$inject=["$scope","$timeout","Bubble","Api"]}(); /* <<< file end: js/medius/recommended.js */ //# map link was there [recommended.js.map] /* >>> file start: js/widgets/discoverytimes.js */ //= require js/core/angular/radioGroup.js //= require js/node_modules/angular-sanitize/angular-sanitize.js //= require js/core/angular/api.js //= require js/core/angular/users.js //= require js/core/angular/ljUser.js //= require js/medius/recommended.js !function(){"use strict";function e(){var e=angular.element(".b-discoverytimes-wrapper[lj-discovery-times]");e.injector()||angular.bootstrap(e,["LJ.DiscoveryTimes"])}function i(){function e(e,i){i.removeAttr("lj-discovery-times")}return{scope:!0,link:e,controller:n,controllerAs:"times"}}function n(e,i,n,t,o,m){function r(){v+=1,v>=d.items.length&&(v=0),l.on(d.items[v].itemid)}function s(){0!==d.items.length&&(r(),c=i(r,a),e.$on("$destroy",i.cancel.bind(i,c)))}var c,d=this,u=LJ.Flags.isEnabled("medius_ui")?m:o,l=n("active"),a=5e3,v=-1;d.items=[],d.active=l.reset().models(),d.isRecommend=!1,d.showRecommend=!1,d.showRandom=!1,d.close=function(){},d.recommend=function(){u.setRecommend().then(function(){d.isRecommend=u.isRecommend})},u.getRecommend().then(function(){d.showRecommend=u.showRecommend,d.showRandom=!d.showRecommend,d.isRecommend=u.isRecommend}),u.getFeed().then(function(e){d.items=e.items.filter(Boolean),t.Cache.add(d.items.map(LJ.Function.get("user")))}).then(s)}function t(e){function i(){return m.limit=m.itemshow,m.is_published=!0,e.call("medius.get_public_items",m).then(n)}function n(e){return e.items=e.items.filter(function(e){return e.author}).map(function(e){var i=(e.cards||[{}])[0];return e.itemid=e.jitem_id,e.url=e.link,e.subject=i.title||e.title,e}),e}function t(){return s.showRecommend?e.call("discovery.is_recommend",r).then(function(e){"ok"===e.status&&(s.isRecommend=e.is_recommend)}):Promise.resolve()}function o(){return s.showRecommend?e.call("discovery.recommend",r).then(function(e){"ok"===e.status&&(s.isRecommend=!0)}):Promise.resolve()}var m={itemshow:10},r={entry:Boolean(LJ.get("entry")),remoteid:LJ.get("remote.id"),journalid:LJ.get("journal.id"),publicEntry:LJ.get("entry.is_public"),ditemid:LJ.get("entry.ditemid")},s={getFeed:i,isRecomend:!1,getRecommend:t,setRecommend:o,showRecommend:!1};return s}function o(e){function i(){return e.call("discovery.get_feed",o)}function n(){return r.showRecommend?e.call("discovery.is_recommend",m).then(function(e){"ok"===e.status&&(r.isRecommend=e.is_recommend)}):Promise.resolve()}function t(){return r.showRecommend?e.call("discovery.recommend",m).then(function(e){"ok"===e.status&&(r.isRecommend=!0)}):Promise.resolve()}var o={itemshow:10},m={entry:Boolean(LJ.get("entry")),remoteid:LJ.get("remote.id"),journalid:LJ.get("journal.id"),publicEntry:LJ.get("entry.is_public"),ditemid:LJ.get("entry.ditemid")},r={getFeed:i,isRecomend:!1,getRecommend:n,setRecommend:t,showRecommend:m.entry&&m.journalid&&m.remoteid&&m.publicEntry&&m.journalid!==m.remoteid};return r}t.$inject=["Api"],o.$inject=["Api"],n.$inject=["$scope","$interval","radioGroup","Users","DiscoveryTimesService","MediusTimesService"],angular.element("body").ready(e),angular.module("LJ.DiscoveryTimes",["ngSanitize","LJ.Directives","LJ.RadioGroup","LJ.Api","LJ.User","Users","Medius.Recommended"]),angular.module("LJ.DiscoveryTimes").directive("ljDiscoveryTimes",i).factory("MediusTimesService",t).factory("DiscoveryTimesService",o)}(); /* <<< file end: js/widgets/discoverytimes.js */ //# map link was there [discoverytimes.js.map]