text: rblms.define("core/event_dispatcher",["require","underscore","backbone"],function(e){var t=e("underscore"),i=e("backbone"),s={};return t.extend(s,i.Events),s}),rblms.define("core/app_engine",["require","jquery","engine"],function(e){var t=e("jquery");return function e(i){return{get:function(t,s){var n=s;return this.has(t)&&(n=i[t]),n&&"object"==typeof n?e(n):n},has:function(e){return i.hasOwnProperty(e)},val:function(){return i&&"object"==typeof i?t.extend(!0,i instanceof Array?[]:{},i):i}}}(e("engine"))}),rblms.define("core/stats/request",["require","underscore","jquery","core/app_engine"],function(e){var t,i=e("underscore"),s=e("jquery"),n=e("core/app_engine"),o={"split-testing":["batch-post-card-click","post-card-click","post-ext-share"],pages:["batch-post-card-view","post-card-click","post-cta-click","post-int-like","post-mouse-over","post-int-comment","post-int-restick","post-ext-share","post-page-click","post-page-view","post-page-view-duration","post-page-subscribe","section-page-view","section-page-view-duration","section-page-subscribe","tag-page-view","tag-page-view-duration","tag-page-subscribe","public-page-view","public-page-view-duration","public-page-subscribe"],user:["page-view"]},r={"split-testing":"/core/stats/tracking/split-testing?",pages:"/core/stats/tracking/pages-stats?",user:"/core/stats/tracking/users-stats?"};return t={asyncSave:function(e){var i=t.buildUrl(e);i&&s.ajax({type:"GET",url:i,async:!0})},buildUrl:function(e){var s,n=t.getBaseUrl(e.action,e),o=e.action;return s=i.omit(e,"domain","action"),n+[Math.ceil(Math.random()*+new Date),"event="+o,"version=1","format=json","data="+t.jsonToURI(s)].join("&")},getBaseUrl:function(e,i){var s;return i&&i.domain&&(s=i.domain),s||(s=t.getGroupNameByActionName(e,"frontpage")),t.getUrl(s)},getUrl:function(e){return t.isTestDomain()?t.getTestUrl(e):t.getProductionUrl(e)},getProductionUrl:function(e){return"https://"+e+"-stats.rbl.ms/spacer.gif?"},isTestDomain:function(){return n.get("use_instance_for_internal_tracking")},getTestUrl:function(e){return r[e]||"/static/img/icons/small-star.png?"+(e||"")},getGroupNameByActionName:function(e,t){var s=t;return i.each(i.keys(o),function(t){i.contains(o[t],e)&&(s=t)}),s},jsonToURI:function(e){return encodeURIComponent(JSON.stringify(e))}}}),rblms.define("core/stats/trackers/base",["require","underscore","core/event_dispatcher","core/stats/request"],function(e){var t=e("underscore"),i=e("core/event_dispatcher"),s=e("core/stats/request");return function(){this.events={},this.init=function(){this.initEventsListeners()},this.initEventsListeners=function(){t.each(t.keys(this.events),t.bind(function(e){i.on(e,this[this.events[e]],this)},this))},this.saveActionData=function(e,t){return!!t&&(t.action=e,this.save(t))},this.save=function(e){return s.asyncSave(e)}}}),rblms.define("core/stats/data_storage/current_post_page",["require","bootstrap","underscore"],function(e){var t=e("bootstrap"),i=e("underscore"),s=t.post||null;return{getPost:function(){return s},setPost:function(e){s=i.clone(e)}}}),rblms.define("utils/device",[],function(){var e,t,i,s,n,o,r;return r=navigator.userAgent,e=/Android|webOS|iPhone|iPod|BlackBerry/i.test(r),t=/iPad/i.test(r),o=/Android/i.test(r),n=/iPhone|iPad|iPod/i.test(r),i=/iPhone/i.test(r),s=/iPod/i.test(r),{isMobile:e,isiPad:t,isiPhone:i,isAndroid:o,isiOS:n,isiPod:s,desktop:!(e||t||i||s)}}),rblms.define("consts",[],function(){return{PAGE_TYPES:{VIDEO:"video",IMAGE:"image",POLL:"poll",PAGE:"page"},POST_STATUS:{ADMIN_PUBLISHED:0,COMMUNITY_PUBLISHED:1,COMMUNITY_PUBLISHED_FEATURED:2,REMOVED:4,DRAFT:5,AUTODRAFT:6,EMPTY_DRAFT:7,NEEDS_REVIEW:8,NEEDS_REVISION:9,READY_TO_PUBLISH:10},POST_TYPES:{PAGE:"page",IMAGE:"image",VIDEO:"video",PRODUCT:"product",EVENT:"event",PLACE:"place",RECIPE:"recipe"},FEED_PROVIDER:{TWITTER:2,GMAIL:3,INSTAGRAM:4,GOOGLEPLUS:5,RSS:6,PINTEREST:7,STOCKTWITS:8,FLICKR:10,YOUTUBE:11,LINKEDIN:12,GIPHY:13,WORDPRESS:14,CUSTOM_IMPORT:15,FACEBOOK_PROFILE:21,SELF:0,PUBLIC_API:20},EDITOR_ADD_URL:"/core/community/add_post",SHARE_POST_IN_EMBED_DIRECTLY_GET_ARG:"__rmid",REGISTERED_FROM:{REBELMOUSE:0,WIX:1},TIMEOUTS:{NOTIFICATION_FEED:3e4},SITE_SUBSCRIBE:{button:"Get Alerts",placeholder:"Enter Email",message:"Success! Look out for an email from RebelAlerts@rebelmouse.com to confirm your subscription.",enterprise_message:"Success! Look out for an email to confirm your subscription."},SHARE_PANEL_MESSAGES:{TWITTER:["Calling all Rebels! {{#users}}My @RebelMouse features {{users}}!{{/users}}{{^users}}Check out my @RebelMouse featuring the stuff I love!{{/users}} Join me at {{link}}","{{#one_user}}My Rebel of the Day is {{users}}{{/one_user}}{{^one_user}}My top {{users_count}} Rebels: {{users}}{{/one_user}}! Check out my @RebelMouse site and create yours. {{link}}","Catch some of my favorites from the web from {{users}} and share yours! {{link}}","Great stuff from some of my favorite people {{users}}. Take a look and join us! {{link}}","{{users}} are rocking my @RebelMouse! Join the party at {{link}}","My @RebelMouse features the awesome {{users}}. Join the fun! {{link}}","#RebelSpotlight: {{users}} are featured on my site. Check them out! {{link}}","Great new posts by {{users}} on my @RebelMouse site. Check it and join in {{link}}","Updates from {{users}} caught my eye. Have a look and share your favs too! {{link}}"],TWITTERTAGS:[["Interested in {{hashtags.0}}? Check out my @RebelMouse! {{link}}","Interested in {{hashtags.0}}? Check out my site! {{link}}","I'm sharing great {{hashtags.0}} posts on my site. Come take a look: {{link}}","I'm sharing great {{hashtags.0}} content on my site. Come take a look: {{link}}","Posting great {{hashtags.0}} content on my site, join in! {{link}}","Posting great {{hashtags.0}} content on my @RebelMouse, join in! {{link}}","Posting great {{hashtags.0}} content on my site, come take a look! {{link}}","Posting great {{hashtags.0}} content on my @RebelMouse, come take a look! {{link}}"],["My @RebelMouse is full of all things {{hashtags.0}} and {{hashtags.1}}, check it out! {{link}}"],["{{hashtags_str}}; that's what my site is all about. {{link}}","Interested in {{hashtags_str}}? I feature those on this site! {{link}}","Need ideas on {{hashtags_str}}? Come take inspiration from my site! {{link}} ","Interested in {{hashtags_str}}? They're featured here! {{link}}","Like all things {{hashtags_str}}? Have a look at this site! {{link}}","Enjoy all things {{hashtags_str}}? You'll love this site! {{link}}"]]},HIDE_PANEL_EXPIRED_TIME:864e5,REDACTOREJS_SETTING:{html:{air:!0,buttonSource:!0,placeHolder:"Start writing...",linkSize:2e3,airButtons:["source","html","formatting","bold","italic","underline","deleted","link","excerpt","|","unorderedlist","orderedlist","blockquote"],allowedTags:["a","abbr","acronym","address","area","b","bdo","big","blockquote","br","button","caption","center","cite","code","col","colgroup","dd","del","dfn","dir","div","dl","dt","em","fieldset","font","form","h1","h2","h3","h4","h5","h6","hr","i","iframe","img","input","ins","kbd","label","legend","li","listicle","map","menu","ol","optgroup","option","p","pre","q","s","samp","select","small","span","strike","strong","sub","sup","table","tbody","td","textarea","tfoot","th","thead","tr","tt","u","ul","var","wbr"],cleanup:!1,convertDivs:!1,convertLinks:!1,convertVideoLinks:!1,observeImages:!0,plugins:["helpers"],formattingTags:["p","h1","h2","h3","h4"],buttons:["source","html","bold","italic","underline","deleted","unorderedlist","orderedlist","link","excerpt","blockquote","removeformat","image","|","source"],syncBeforeCallback:function(e){return e.replace(/data-redactor-tag="[^"]*"/gi,"")}},body:{air:!0,addMedia:!0,addMediaPlugin:{is_mobile:!1,is_material:!1},plugins:["helpers","listicle","listicle_wizard","pageDivider","tweaksPlugin","image-library","addMediaPlugin","captionsPlugin","expandLinkPlugin","internalLinkPlugin","bufferButtonsPlugin","mediaControlsPlugin","image-pin-description","imageDropZone","wordCountPlugin"],formattingAdd:[{tag:"pre",title:"Code"},{tag:"h1",title:"Header 1"},{tag:"h2",title:"Header 2"},{tag:"h3",title:"Header 3"},{tag:"h4",title:"Header 4"},{tag:"h5",title:"Header 5"},{tag:"p",title:"Caption",class:"caption"}],listicle_wizard:{is_mobile:!1},placeHolder:"Start writing...",linkSize:2e3,airButtons:["bold","italic","underline","deleted","unorderedlist","orderedlist","leftalign","rightalign","link"]},"editor-mobile":{air:!0,toolbarExternal:".post-control__bar.style-controls",addMedia:!0,plugins:["helpers","listicle_wizard","pageDivider","tweaksPlugin","image-library","addMediaPlugin","captionsPlugin","expandLinkPlugin","bufferButtonsPlugin","mediaControlsPlugin","image-pin-description","wordCountPlugin"],addMediaPlugin:{externalPlaceholder:".media-controls",is_mobile:!0,is_material:!1},listicle_wizard:{externalStartButton:".post-control__assembler",is_mobile:!0},formattingAdd:[{tag:"pre",title:"Code"},{tag:"h1",title:"Header 1"},{tag:"h2",title:"Header 2"},{tag:"h3",title:"Header 3"},{tag:"h4",title:"Header 4"},{tag:"h5",title:"Header 5"},{tag:"p",title:"Caption",class:"caption"}],placeHolder:"Start writing...",linkSize:2e3,buttons:["bold","italic","underline","deleted","unorderedlist","orderedlist","leftalign","rightalign","link","horizontalrule"]},subheadline:{air:!0,toolbarFixed:!1,plugins:["helpers","tweaksPlugin"],placeHolder:"Add subheadline...",buttons:["formatting","bold","italic","underline","deleted","link"]},about:{air:!0,plugins:["helpers"],noLinkExpander:!0,buttons:["link"],removeDataAttr:!0,allowedTags:["a"]},photo_credit:{air:!0,toolbarFixed:!1,plugins:["helpers"],placeHolder:"Add a Photo Credit",buttons:["link"]},image_caption:{air:!0,plugins:["helpers"],placeHolder:"",airButtons:["bold","italic","underline","deleted","link","|","unorderedlist","orderedlist","blockquote"]},image_description:{air:!0,plugins:["helpers","tweaksPlugin"],placeHolder:"",airButtons:["bold","italic","underline","deleted","link","|","unorderedlist","orderedlist","blockquote"]},conclusion:{air:!0,placeHolder:"",plugins:["helpers"],linkSize:2e3,airButtons:["bold","italic","underline","deleted","link","|","unorderedlist","orderedlist","blockquote"]},listicle_wizard_media_photo_credit:{plugins:["helpers","tweaksPlugin"],buttons:["link"]},listicle_wizard_media_caption:{plugins:["helpers","tweaksPlugin"],buttons:["link"]},listicle_wizard_item_body:{plugins:["helpers","tweaksPlugin","internalLinkPlugin"]},roar_specific_data_richetext:{plugins:["helpers","tweaksPlugin"],buttons:["formatting","bold","italic","underline","deleted","link"]},talk_message:{plugins:["helpers","tweaksPlugin"],placeHolder:"Add comment...",buttons:["bold","italic","removeformat"]}},SITE_MENU:{sites:{id:"sites",url:"/",title:"",class_name:"site-name-item",order:0,visibility:!0,default:!0,active:!1,dropdown:!0,history:!0,login_required:!0,type:0,submenu:[]},add_post:{id:"addPost",url:"#",title:"Add Post",order:1,visibility:!0,login_required:!0,type:0,submenu:[]},dashboard:{id:"dashboard",url:"/core/dashboard/",title:"Dashboard",order:6,section:!0,show_divider:!1,visibility:!0,default:!1,active:!1,history:!0,login_required:!0,type:3,submenu:[]},logout:{id:"logout",url:"/core/users/logout",title:"Log Out",order:151,visibility:!0,login_required:!0,type:0},about:{id:"about",url:"/welcome/about.html",title:"About",order:153,visibility:!1,login_required:!1,type:5},customers:{id:"customers",url:"https://blog.rebelmouse.com/st/Customers",title:"Customers",order:154,visibility:!0,login_required:!1,type:0},blog:{id:"blog",url:"http://blog.rebelmouse.com",title:"Blog",order:155,visibility:!0,login_required:!1,type:0},press:{id:"press",url:"https://about.rebelmouse.com/press/",title:"Press",order:156,visibility:!1,login_required:!1,type:0},help:{id:"help",url:"http://help.rebelmouse.com/",title:"Help",order:157,visibility:!1,login_required:!1,type:0},about_rebelmouse:{id:"about-rebelmouse",url:" /welcome/about-rebelmouse.html",title:"About RebelMouse",order:161,visibility:!0,login_required:!0,type:0},contact_us:{id:"contact-us",url:"/welcome/about.html#contacts-text",title:"Contact Us",order:160,visibility:!1,login_required:!1,type:5},request_demo:{id:"request-demo",url:"http://meet.rebelmouse.com/request-a-rebel-mouse-demo",title:"Request a Demo",order:161,visibility:!0,login_required:!1,type:5},login:{id:"login",url:"/core/in",title:"Log In",order:162,visibility:!0,login_required:!1,type:5},product:{id:"product",url:"#",title:"Products",order:150,section:!0,show_divider:!1,visibility:!0,default:!1,active:!1,history:!1,login_required:!1,type:3,submenu:[{id:"rebel_x",url:"/welcome/rebel-x.html",title:"Rebel X",order:0,visibility:!1,login_required:!1,history:!1,type:0},{id:"rebel_platform",url:"/welcome/the-platform.html",title:"The Platform",order:1,visibility:!1,login_required:!1,history:!1,type:0},{id:"rebel_explore",url:"/welcome/individuals.html",title:"The Personal",order:2,visibility:!1,login_required:!1,history:!1,type:0},{id:"rebel_runner",url:"/welcome/runner.html",title:"Rebel Runner",order:3,visibility:!0,login_required:!1,history:!1,type:0},{id:"rebel_roar",url:"/welcome/roar.html",title:"Rebel Roar",order:4,visibility:!0,login_required:!1,history:!1,type:0}]}},newPosts:{timeoutInSeconds:30,maxTimeoutInSeconds:120,changeTimeoutStepInSeconds:30},POST_HISTORY:{IMMUTABLE:0,MUTABLE:3,PREVIEW:4,monitorFields:["body","headline","photo_credit","image_size","manual_image_crops","video","image","image[0-9]+.*","image980x","image_thumb","type","acted_user_name","created_ts","shortcodes","shortcodes_by_adapter","shortcodes_ids","is_real_draft","listicle"],ctas:{1:"quiz",2:"poll"}},CTA:{types:{petition:0,quiz:1,poll:2}},FBIA:{status:{SUCCESS:{id:0,name:"success",title:"Success"},IN_PROGRESS:{id:1,name:"in_progress",title:"In Progress"},FAILED:{id:2,name:"failed",title:"Failed"},UNKNOWN:{id:3,name:"unknown",title:"Unknown"}}},RUNNER:{runner_social_networks:["Facebook","Twitter","Instagram","Pinterest","YouTube"]},DISCOVERY_PROVIDERS:{EMAIL:{ID:0,NAME:"email"},TWITTER:{ID:2,NAME:"twitter"},FACEBOOK:{ID:1,NAME:"facebook"},PINTEREST:{ID:7,NAME:"pinterest"}},DISCOVERY_ROOT:"/core/discovery/",SHARE_STATUSES:{SENT:2,PAUSED:0,FAILED:3,PENDING:1},TARGETS_SENT_STATUSES:{SENT:"sent",ERROR:"error",NOT_SENT:"not_sent"},PRIVATE_TAGS_PREFIXES:["*","~"],KEY_CODES:{ENTER:13},AB_CAMPAIGN_TYPES:{POST_TEASER:"post-teaser"},SEARCH_ENGINES:{AMAZON:"Amazon",GIPHY:"Giphy",INSTAGRAM:"Instagram",YOUTUBE:"Youtube",DAM:"DAM",FB_VIDEO:"FB Video",POST:"Posts"},FILTER_STATUS:{PUBLISHED:98,POSTS_AND_DRAFT:99},COOKIE_NAMES:{DASHBOARD_OVERVIEW_PERIOD:"rm_overview_filter_period"},LOCAL_STORAGE:{LAST_POST_PUBLISHED:"rm_last_post_published"},DAM_TYPE:{IMAGE:0,DOCUMENT:1},RIVER_EVENT_TYPE:{POST_COMMUNITY_COMMENT:2,USER_FOLLOWS:3,USER_IS_FOLLOWED:4,REPLY_COMMENT:27,POST_TALK_COMMENT:28}}});var Hogan={};!function(e){e.Template=function(e,t,i){e&&(this.r=e),this.c=i,this.text=t||""},e.Template.prototype={r:function(e,t,i){return""},v:function(e){return e=String(null===e||void 0===e?"":e),r.test(e)?e.replace(t,"&amp;").replace(i,"&lt;").replace(s,"&gt;").replace(n,"&#39;").replace(o,"&quot;"):e},render:function(e,t,i){return this.ri([e],t||{},i)},ri:function(e,t,i){return this.r(e,t,i)},rp:function(e,t,i,s){var n=i[e];return n?(this.c&&"string"==typeof n&&(n=this.c.compile(n)),n.ri(t,i,s)):""},rs:function(e,t,i){var s="",n=e[e.length-1];if(!a(n))return i(e,t);for(var o=0;o<n.length;o++)e.push(n[o]),s+=i(e,t),e.pop();return s},s:function(e,t,i,s,n,o,r){var l;return(!a(e)||0!==e.length)&&("function"==typeof e&&(e=this.ls(e,t,i,s,n,o,r)),l=!!e,!s&&l&&t&&t.push("object"==typeof e?e:t[t.length-1]),l)},d:function(e,t,i,s){var n=e.split("."),o=this.f(n[0],t,i,s),r=null;if("."===e&&a(t[t.length-2]))return t[t.length-1];for(var l=1;l<n.length;l++)o&&"object"==typeof o&&n[l]in o?(r=o,o=o[n[l]]):o="";return!(s&&!o)&&(s||"function"!=typeof o||(t.push(r),o=this.lv(o,t,i),t.pop()),o)},f:function(e,t,i,s){for(var n=!1,o=null,r=!1,a=t.length-1;a>=0;a--)if((o=t[a])&&"object"==typeof o&&e in o){n=o[e],r=!0;break}return r?(s||"function"!=typeof n||(n=this.lv(n,t,i)),n):!s&&""},ho:function(e,t,i,s,n){var o=this.c,r=e.call(t,s,function(e){return o.compile(e,{delimiters:n}).render(t,i)}),a=o.compile(r.toString(),{delimiters:n}).render(t,i);return this.b=a,!1},b:"",ls:function(e,t,i,s,n,o,r){var a,l=t[t.length-1];if(!s&&this.c&&e.length>0)return this.ho(e,l,i,this.text.substring(n,o),r);if("function"==typeof(a=e.call(l))){if(s)return!0;if(this.c)return this.ho(a,l,i,this.text.substring(n,o),r)}return a},lv:function(e,t,i){var s=t[t.length-1],n=e.call(s);return"function"==typeof n&&(n=n.call(s)),n=n.toString(),this.c&&~n.indexOf("{{")?this.c.compile(n).render(s,i):n}};var t=/&/g,i=/</g,s=/>/g,n=/\'/g,o=/\"/g,r=/[&<>\"\']/;var a=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)}}("undefined"!=typeof exports?exports:Hogan),function(e){var t=/\S/,i=/\"/g,s=/\n/g,n=/\r/g,o=/\\/g,r={"#":1,"^":2,"/":3,"!":4,">":5,"<":6,"=":7,_v:8,"{":9,"&":10};function a(e){"}"===e.n.substr(e.n.length-1)&&(e.n=e.n.substring(0,e.n.length-1))}function l(e){return e.trim?e.trim():e.replace(/^\s*|\s*$/g,"")}function c(e,t,i){if(t.charAt(i)!=e.charAt(0))return!1;for(var s=1,n=e.length;s<n;s++)if(t.charAt(i+s)!=e.charAt(s))return!1;return!0}function d(e,t){for(var i=0,s=t.length;i<s;i++)if(t[i].o==e.n)return e.tag="#",!0}function u(e,t,i){for(var s=0,n=i.length;s<n;s++)if(i[s].c==e&&i[s].o==t)return!0}function h(e){return e.replace(o,"\\\\").replace(i,'\\"').replace(s,"\\n").replace(n,"\\r")}function p(e){return~e.indexOf(".")?"d":"f"}function g(e){for(var t,i,s,n,o,r,a,l="",c=0,d=e.length;c<d;c++){var u=e[c].tag;"#"==u?l+=(i=e[c].nodes,s=e[c].n,n=p(e[c].n),o=e[c].i,r=e[c].end,a=e[c].otag+" "+e[c].ctag,"if(_.s(_."+n+'("'+h(s)+'",c,p,1),c,p,0,'+o+","+r+', "'+a+'")){b += _.rs(c,p,function(c,p){ var b = "";'+g(i)+'return b;});c.pop();}else{b += _.b; _.b = ""};'):"^"==u?l+=f(e[c].nodes,e[c].n,p(e[c].n)):"<"==u||">"==u?l+='b += _.rp("'+h((t=e[c]).n)+'",c,p,"'+(t.indent||"")+'");':"{"==u||"&"==u?l+=m(e[c].n,p(e[c].n)):"\n"==u?l+=v('"\\n"'+(e.length-1==c?"":" + i")):"_v"==u?l+=_(e[c].n,p(e[c].n)):void 0===u&&(l+=v('"'+h(e[c])+'"'))}return l}function f(e,t,i){return"if (!_.s(_."+i+'("'+h(t)+'",c,p,1),c,p,1,0,0,"")){'+g(e)+"};"}function m(e,t){return"b += (_."+t+'("'+h(e)+'",c,p,0));'}function _(e,t){return"b += (_.v(_."+t+'("'+h(e)+'",c,p,0)));'}function v(e){return"b += "+e+";"}e.scan=function(e,i){var s=e.length,n=0,o=null,d=null,u="",h=[],p=!1,g=0,f=0,m="{{",_="}}";function v(){u.length>0&&(h.push(new String(u)),u="")}function w(e,i){if(v(),e&&function(){for(var e=!0,i=f;i<h.length;i++)if(!(e=h[i].tag&&r[h[i].tag]<r._v||!h[i].tag&&null===h[i].match(t)))return!1;return e}())for(var s,n=f;n<h.length;n++)h[n].tag||((s=h[n+1])&&">"==s.tag&&(s.indent=h[n].toString()),h.splice(n,1));else i||h.push({tag:"\n"});p=!1,f=h.length}function b(e,t){var i="="+_,s=e.indexOf(i,t),n=l(e.substring(e.indexOf("=",t)+1,s)).split(" ");return m=n[0],_=n[1],s+i.length-1}for(i&&(i=i.split(" "),m=i[0],_=i[1]),g=0;g<s;g++)0==n?c(m,e,g)?(--g,v(),n=1):"\n"==e.charAt(g)?w(p):u+=e.charAt(g):1==n?(g+=m.length-1,"="==(o=(d=r[e.charAt(g+1)])?e.charAt(g+1):"_v")?(g=b(e,g),n=0):(d&&g++,n=2),p=g):c(_,e,g)?(h.push({tag:o,n:l(u),otag:m,ctag:_,i:"/"==o?p-_.length:g+m.length}),u="",g+=_.length-1,n=0,"{"==o&&("}}"==_?g++:a(h[h.length-1]))):u+=e.charAt(g);return w(p,!0),h},e.generate=function(t,i,s){return s.asString?"function(c,p,i){"+t+";}":new e.Template(new Function("c","p","i",t),i,e)},e.parse=function(e,t){return function e(t,i,s,n){for(var o=[],r=null,a=null;t.length>0;)if("#"==(a=t.shift()).tag||"^"==a.tag||d(a,n))s.push(a),a.nodes=e(t,a.tag,s,n),o.push(a);else{if("/"==a.tag){if(0===s.length)throw new Error("Closing tag without opener: /"+a.n);if(r=s.pop(),a.n!=r.n&&!u(a.n,r.n,n))throw new Error("Nesting error: "+r.n+" vs. "+a.n);return r.end=a.i,o}o.push(a)}if(s.length>0)throw new Error("missing closing tag: "+s.pop().n);return o}(e,0,[],(t=t||{}).sectionTags||[])},e.cache={},e.compile=function(e,t){var i=e+"||"+!!(t=t||{}).asString,s=this.cache[i];return s||(s=this.generate('i = i || "";var b = i + "";var _ = this;'+g(this.parse(this.scan(e,t.delimiters),t))+"return b;",e,t),this.cache[i]=s)}}("undefined"!=typeof exports?exports:Hogan),"function"==typeof rblms.define&&rblms.define.amd&&rblms.define("hogan",Hogan),rblms.define("utils/whitelabel_settings",["require","settings","underscore"],function(e){var t=e("settings"),i=e("underscore"),s=(t=t||{}).whitelabel_settings,n=(t.site||{}).whitelabel_settings,o=s||n||{};return i.extend(o,{getTemplateVars:function(){return o.template_vars||{}}})}),function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof rblms.define&&rblms.define.amd?rblms.define("moment",t):e.moment=t()}(this,function(){"use strict";var e;function t(){return e.apply(null,arguments)}function i(e){return e instanceof Array||"[object Array]"===Object.prototype.toString.call(e)}function s(e){return e instanceof Date||"[object Date]"===Object.prototype.toString.call(e)}function n(e,t){var i,s=[];for(i=0;i<e.length;++i)s.push(t(e[i],i));return s}function o(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function r(e,t){for(var i in t)o(t,i)&&(e[i]=t[i]);return o(t,"toString")&&(e.toString=t.toString),o(t,"valueOf")&&(e.valueOf=t.valueOf),e}function a(e,t,i,s){return ot(e,t,i,s,!0).utc()}function l(e){return null==e._pf&&(e._pf={empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1}),e._pf}function c(e){if(null==e._isValid){var t=l(e);e._isValid=!(isNaN(e._d.getTime())||!(t.overflow<0)||t.empty||t.invalidMonth||t.invalidWeekday||t.nullInput||t.invalidFormat||t.userInvalidated),e._strict&&(e._isValid=e._isValid&&0===t.charsLeftOver&&0===t.unusedTokens.length&&void 0===t.bigHour)}return e._isValid}function d(e){var t=a(NaN);return null!=e?r(l(t),e):l(t).userInvalidated=!0,t}function u(e){return void 0===e}var h=t.momentProperties=[];function p(e,t){var i,s,n;if(u(t._isAMomentObject)||(e._isAMomentObject=t._isAMomentObject),u(t._i)||(e._i=t._i),u(t._f)||(e._f=t._f),u(t._l)||(e._l=t._l),u(t._strict)||(e._strict=t._strict),u(t._tzm)||(e._tzm=t._tzm),u(t._isUTC)||(e._isUTC=t._isUTC),u(t._offset)||(e._offset=t._offset),u(t._pf)||(e._pf=l(t)),u(t._locale)||(e._locale=t._locale),h.length>0)for(i in h)u(n=t[s=h[i]])||(e[s]=n);return e}var g=!1;function f(e){p(this,e),this._d=new Date(null!=e._d?e._d.getTime():NaN),!1===g&&(g=!0,t.updateOffset(this),g=!1)}function m(e){return e instanceof f||null!=e&&null!=e._isAMomentObject}function _(e){return e<0?Math.ceil(e):Math.floor(e)}function v(e){var t=+e,i=0;return 0!==t&&isFinite(t)&&(i=_(t)),i}function w(e,t,i){var s,n=Math.min(e.length,t.length),o=Math.abs(e.length-t.length),r=0;for(s=0;s<n;s++)(i&&e[s]!==t[s]||!i&&v(e[s])!==v(t[s]))&&r++;return r+o}function b(e){!1===t.suppressDeprecationWarnings&&"undefined"!=typeof console&&console.warn&&console.warn("Deprecation warning: "+e)}function k(e,t){var i=!0;return r(function(){return i&&(b(e+"\nArguments: "+Array.prototype.slice.call(arguments).join(", ")+"\n"+(new Error).stack),i=!1),t.apply(this,arguments)},t)}var y={};function S(e,t){y[e]||(b(t),y[e]=!0)}function T(e){return e instanceof Function||"[object Function]"===Object.prototype.toString.call(e)}function x(e){return"[object Object]"===Object.prototype.toString.call(e)}function C(e,t){var i,s=r({},e);for(i in t)o(t,i)&&(x(e[i])&&x(t[i])?(s[i]={},r(s[i],e[i]),r(s[i],t[i])):null!=t[i]?s[i]=t[i]:delete s[i]);return s}function P(e){null!=e&&this.set(e)}t.suppressDeprecationWarnings=!1;var D,M={};function F(e){return e?e.toLowerCase().replace("_","-"):e}function I(e){var t=null;if(!M[e]&&"undefined"!=typeof module&&module&&module.exports)try{t=D._abbr,require("./locale/"+e),A(t)}catch(e){}return M[e]}function A(e,t){var i;return e&&(i=u(t)?L(e):E(e,t))&&(D=i),D._abbr}function E(e,t){return null!==t?(t.abbr=e,null!=M[e]?(S("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale"),t=C(M[e]._config,t)):null!=t.parentLocale&&(null!=M[t.parentLocale]?t=C(M[t.parentLocale]._config,t):S("parentLocaleUndefined","specified parentLocale is not defined yet")),M[e]=new P(t),A(e),M[e]):(delete M[e],null)}function L(e){var t;if(e&&e._locale&&e._locale._abbr&&(e=e._locale._abbr),!e)return D;if(!i(e)){if(t=I(e))return t;e=[e]}return function(e){for(var t,i,s,n,o=0;o<e.length;){for(t=(n=F(e[o]).split("-")).length,i=(i=F(e[o+1]))?i.split("-"):null;t>0;){if(s=I(n.slice(0,t).join("-")))return s;if(i&&i.length>=t&&w(n,i,!0)>=t-1)break;t--}o++}return null}(e)}var $={};function O(e,t){var i=e.toLowerCase();$[i]=$[i+"s"]=$[t]=e}function R(e){return"string"==typeof e?$[e]||$[e.toLowerCase()]:void 0}function z(e){var t,i,s={};for(i in e)o(e,i)&&(t=R(i))&&(s[t]=e[i]);return s}function U(e,i){return function(s){return null!=s?(q(this,e,s),t.updateOffset(this,i),this):H(this,e)}}function H(e,t){return e.isValid()?e._d["get"+(e._isUTC?"UTC":"")+t]():NaN}function q(e,t,i){e.isValid()&&e._d["set"+(e._isUTC?"UTC":"")+t](i)}function V(e,t){var i;if("object"==typeof e)for(i in e)this.set(i,e[i]);else if(T(this[e=R(e)]))return this[e](t);return this}function j(e,t,i){var s=""+Math.abs(e),n=t-s.length;return(e>=0?i?"+":"":"-")+Math.pow(10,Math.max(0,n)).toString().substr(1)+s}var N=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|YYYYYY|YYYYY|YYYY|YY|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,B=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,Y={},W={};function G(e,t,i,s){var n=s;"string"==typeof s&&(n=function(){return this[s]()}),e&&(W[e]=n),t&&(W[t[0]]=function(){return j(n.apply(this,arguments),t[1],t[2])}),i&&(W[i]=function(){return this.localeData().ordinal(n.apply(this,arguments),e)})}function J(e,t){return e.isValid()?(t=X(t,e.localeData()),Y[t]=Y[t]||function(e){var t,i,s,n=e.match(N);for(t=0,i=n.length;t<i;t++)W[n[t]]?n[t]=W[n[t]]:n[t]=(s=n[t]).match(/\[[\s\S]/)?s.replace(/^\[|\]$/g,""):s.replace(/\\/g,"");return function(s){var o="";for(t=0;t<i;t++)o+=n[t]instanceof Function?n[t].call(s,e):n[t];return o}}(t),Y[t](e)):e.localeData().invalidDate()}function X(e,t){var i=5;function s(e){return t.longDateFormat(e)||e}for(B.lastIndex=0;i>=0&&B.test(e);)e=e.replace(B,s),B.lastIndex=0,i-=1;return e}var Z=/\d/,K=/\d\d/,Q=/\d{3}/,ee=/\d{4}/,te=/[+-]?\d{6}/,ie=/\d\d?/,se=/\d\d\d\d?/,ne=/\d\d\d\d\d\d?/,oe=/\d{1,3}/,re=/\d{1,4}/,ae=/[+-]?\d{1,6}/,le=/\d+/,ce=/[+-]?\d+/,de=/Z|[+-]\d\d:?\d\d/gi,ue=/Z|[+-]\d\d(?::?\d\d)?/gi,he=/[0-9]*['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+|[\u0600-\u06FF\/]+(\s*?[\u0600-\u06FF]+){1,2}/i,pe={};function ge(e,t,i){pe[e]=T(t)?t:function(e,s){return e&&i?i:t}}function fe(e,t){return o(pe,e)?pe[e](t._strict,t._locale):new RegExp(me(e.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(e,t,i,s,n){return t||i||s||n})))}function me(e){return e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}var _e={};function ve(e,t){var i,s=t;for("string"==typeof e&&(e=[e]),"number"==typeof t&&(s=function(e,i){i[t]=v(e)}),i=0;i<e.length;i++)_e[e[i]]=s}function we(e,t){ve(e,function(e,i,s,n){s._w=s._w||{},t(e,s._w,s,n)})}function be(e,t,i){null!=t&&o(_e,e)&&_e[e](t,i._a,i,e)}var ke=0,ye=1,Se=2,Te=3,xe=4,Ce=5,Pe=6,De=7,Me=8;function Fe(e,t){return new Date(Date.UTC(e,t+1,0)).getUTCDate()}G("M",["MM",2],"Mo",function(){return this.month()+1}),G("MMM",0,0,function(e){return this.localeData().monthsShort(this,e)}),G("MMMM",0,0,function(e){return this.localeData().months(this,e)}),O("month","M"),ge("M",ie),ge("MM",ie,K),ge("MMM",function(e,t){return t.monthsShortRegex(e)}),ge("MMMM",function(e,t){return t.monthsRegex(e)}),ve(["M","MM"],function(e,t){t[ye]=v(e)-1}),ve(["MMM","MMMM"],function(e,t,i,s){var n=i._locale.monthsParse(e,s,i._strict);null!=n?t[ye]=n:l(i).invalidMonth=e});var Ie=/D[oD]?(\[[^\[\]]*\]|\s+)+MMMM?/,Ae="January_February_March_April_May_June_July_August_September_October_November_December".split("_");var Ee="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_");function Le(e,t){var i;if(!e.isValid())return e;if("string"==typeof t)if(/^\d+$/.test(t))t=v(t);else if("number"!=typeof(t=e.localeData().monthsParse(t)))return e;return i=Math.min(e.date(),Fe(e.year(),t)),e._d["set"+(e._isUTC?"UTC":"")+"Month"](t,i),e}function $e(e){return null!=e?(Le(this,e),t.updateOffset(this,!0),this):H(this,"Month")}var Oe=he;var Re=he;function ze(){function e(e,t){return t.length-e.length}var t,i,s=[],n=[],o=[];for(t=0;t<12;t++)i=a([2e3,t]),s.push(this.monthsShort(i,"")),n.push(this.months(i,"")),o.push(this.months(i,"")),o.push(this.monthsShort(i,""));for(s.sort(e),n.sort(e),o.sort(e),t=0;t<12;t++)s[t]=me(s[t]),n[t]=me(n[t]),o[t]=me(o[t]);this._monthsRegex=new RegExp("^("+o.join("|")+")","i"),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=new RegExp("^("+n.join("|")+")$","i"),this._monthsShortStrictRegex=new RegExp("^("+s.join("|")+")$","i")}function Ue(e){var t,i=e._a;return i&&-2===l(e).overflow&&(t=i[ye]<0||i[ye]>11?ye:i[Se]<1||i[Se]>Fe(i[ke],i[ye])?Se:i[Te]<0||i[Te]>24||24===i[Te]&&(0!==i[xe]||0!==i[Ce]||0!==i[Pe])?Te:i[xe]<0||i[xe]>59?xe:i[Ce]<0||i[Ce]>59?Ce:i[Pe]<0||i[Pe]>999?Pe:-1,l(e)._overflowDayOfYear&&(t<ke||t>Se)&&(t=Se),l(e)._overflowWeeks&&-1===t&&(t=De),l(e)._overflowWeekday&&-1===t&&(t=Me),l(e).overflow=t),e}var He=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?/,qe=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?/,Ve=/Z|[+-]\d\d(?::?\d\d)?/,je=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/]],Ne=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],Be=/^\/?Date\((\-?\d+)/i;function Ye(e){var t,i,s,n,o,r,a=e._i,c=He.exec(a)||qe.exec(a);if(c){for(l(e).iso=!0,t=0,i=je.length;t<i;t++)if(je[t][1].exec(c[1])){n=je[t][0],s=!1!==je[t][2];break}if(null==n)return void(e._isValid=!1);if(c[3]){for(t=0,i=Ne.length;t<i;t++)if(Ne[t][1].exec(c[3])){o=(c[2]||" ")+Ne[t][0];break}if(null==o)return void(e._isValid=!1)}if(!s&&null!=o)return void(e._isValid=!1);if(c[4]){if(!Ve.exec(c[4]))return void(e._isValid=!1);r="Z"}e._f=n+(o||"")+(r||""),st(e)}else e._isValid=!1}function We(e){var t=new Date(Date.UTC.apply(null,arguments));return e<100&&e>=0&&isFinite(t.getUTCFullYear())&&t.setUTCFullYear(e),t}function Ge(e){return Je(e)?366:365}function Je(e){return e%4==0&&e%100!=0||e%400==0}t.createFromInputFallback=k("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(e){e._d=new Date(e._i+(e._useUTC?" UTC":""))}),G("Y",0,0,function(){var e=this.year();return e<=9999?""+e:"+"+e}),G(0,["YY",2],0,function(){return this.year()%100}),G(0,["YYYY",4],0,"year"),G(0,["YYYYY",5],0,"year"),G(0,["YYYYYY",6,!0],0,"year"),O("year","y"),ge("Y",ce),ge("YY",ie,K),ge("YYYY",re,ee),ge("YYYYY",ae,te),ge("YYYYYY",ae,te),ve(["YYYYY","YYYYYY"],ke),ve("YYYY",function(e,i){i[ke]=2===e.length?t.parseTwoDigitYear(e):v(e)}),ve("YY",function(e,i){i[ke]=t.parseTwoDigitYear(e)}),ve("Y",function(e,t){t[ke]=parseInt(e,10)}),t.parseTwoDigitYear=function(e){return v(e)+(v(e)>68?1900:2e3)};var Xe=U("FullYear",!1);function Ze(e,t,i){var s=7+t-i;return-((7+We(e,0,s).getUTCDay()-t)%7)+s-1}function Ke(e,t,i,s,n){var o,r,a=1+7*(t-1)+(7+i-s)%7+Ze(e,s,n);return a<=0?r=Ge(o=e-1)+a:a>Ge(e)?(o=e+1,r=a-Ge(e)):(o=e,r=a),{year:o,dayOfYear:r}}function Qe(e,t,i){var s,n,o=Ze(e.year(),t,i),r=Math.floor((e.dayOfYear()-o-1)/7)+1;return r<1?s=r+et(n=e.year()-1,t,i):r>et(e.year(),t,i)?(s=r-et(e.year(),t,i),n=e.year()+1):(n=e.year(),s=r),{week:s,year:n}}function et(e,t,i){var s=Ze(e,t,i),n=Ze(e+1,t,i);return(Ge(e)-s+n)/7}function tt(e,t,i){return null!=e?e:null!=t?t:i}function it(e){var i,s,n,o,r=[];if(!e._d){for(n=function(e){var i=new Date(t.now());return e._useUTC?[i.getUTCFullYear(),i.getUTCMonth(),i.getUTCDate()]:[i.getFullYear(),i.getMonth(),i.getDate()]}(e),e._w&&null==e._a[Se]&&null==e._a[ye]&&function(e){var t,i,s,n,o,r,a,c;null!=(t=e._w).GG||null!=t.W||null!=t.E?(o=1,r=4,i=tt(t.GG,e._a[ke],Qe(rt(),1,4).year),s=tt(t.W,1),((n=tt(t.E,1))<1||n>7)&&(c=!0)):(o=e._locale._week.dow,r=e._locale._week.doy,i=tt(t.gg,e._a[ke],Qe(rt(),o,r).year),s=tt(t.w,1),null!=t.d?((n=t.d)<0||n>6)&&(c=!0):null!=t.e?(n=t.e+o,(t.e<0||t.e>6)&&(c=!0)):n=o);s<1||s>et(i,o,r)?l(e)._overflowWeeks=!0:null!=c?l(e)._overflowWeekday=!0:(a=Ke(i,s,n,o,r),e._a[ke]=a.year,e._dayOfYear=a.dayOfYear)}(e),e._dayOfYear&&(o=tt(e._a[ke],n[ke]),e._dayOfYear>Ge(o)&&(l(e)._overflowDayOfYear=!0),s=We(o,0,e._dayOfYear),e._a[ye]=s.getUTCMonth(),e._a[Se]=s.getUTCDate()),i=0;i<3&&null==e._a[i];++i)e._a[i]=r[i]=n[i];for(;i<7;i++)e._a[i]=r[i]=null==e._a[i]?2===i?1:0:e._a[i];24===e._a[Te]&&0===e._a[xe]&&0===e._a[Ce]&&0===e._a[Pe]&&(e._nextDay=!0,e._a[Te]=0),e._d=(e._useUTC?We:function(e,t,i,s,n,o,r){var a=new Date(e,t,i,s,n,o,r);return e<100&&e>=0&&isFinite(a.getFullYear())&&a.setFullYear(e),a}).apply(null,r),null!=e._tzm&&e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),e._nextDay&&(e._a[Te]=24)}}function st(e){if(e._f!==t.ISO_8601){e._a=[],l(e).empty=!0;var i,s,n,o,r,a=""+e._i,c=a.length,d=0;for(n=X(e._f,e._locale).match(N)||[],i=0;i<n.length;i++)o=n[i],(s=(a.match(fe(o,e))||[])[0])&&((r=a.substr(0,a.indexOf(s))).length>0&&l(e).unusedInput.push(r),a=a.slice(a.indexOf(s)+s.length),d+=s.length),W[o]?(s?l(e).empty=!1:l(e).unusedTokens.push(o),be(o,s,e)):e._strict&&!s&&l(e).unusedTokens.push(o);l(e).charsLeftOver=c-d,a.length>0&&l(e).unusedInput.push(a),!0===l(e).bigHour&&e._a[Te]<=12&&e._a[Te]>0&&(l(e).bigHour=void 0),e._a[Te]=function(e,t,i){var s;if(null==i)return t;return null!=e.meridiemHour?e.meridiemHour(t,i):null!=e.isPM?((s=e.isPM(i))&&t<12&&(t+=12),s||12!==t||(t=0),t):t}(e._locale,e._a[Te],e._meridiem),it(e),Ue(e)}else Ye(e)}function nt(e){var o=e._i,a=e._f;return e._locale=e._locale||L(e._l),null===o||void 0===a&&""===o?d({nullInput:!0}):("string"==typeof o&&(e._i=o=e._locale.preparse(o)),m(o)?new f(Ue(o)):(i(a)?function(e){var t,i,s,n,o;if(0===e._f.length)return l(e).invalidFormat=!0,void(e._d=new Date(NaN));for(n=0;n<e._f.length;n++)o=0,t=p({},e),null!=e._useUTC&&(t._useUTC=e._useUTC),t._f=e._f[n],st(t),c(t)&&(o+=l(t).charsLeftOver,o+=10*l(t).unusedTokens.length,l(t).score=o,(null==s||o<s)&&(s=o,i=t));r(e,i||t)}(e):a?st(e):s(o)?e._d=o:function(e){var o=e._i;void 0===o?e._d=new Date(t.now()):s(o)?e._d=new Date(+o):"string"==typeof o?function(e){var i=Be.exec(e._i);null===i?(Ye(e),!1===e._isValid&&(delete e._isValid,t.createFromInputFallback(e))):e._d=new Date(+i[1])}(e):i(o)?(e._a=n(o.slice(0),function(e){return parseInt(e,10)}),it(e)):"object"==typeof o?function(e){if(!e._d){var t=z(e._i);e._a=n([t.year,t.month,t.day||t.date,t.hour,t.minute,t.second,t.millisecond],function(e){return e&&parseInt(e,10)}),it(e)}}(e):"number"==typeof o?e._d=new Date(o):t.createFromInputFallback(e)}(e),c(e)||(e._d=null),e))}function ot(e,t,i,s,n){var o,r={};return"boolean"==typeof i&&(s=i,i=void 0),r._isAMomentObject=!0,r._useUTC=r._isUTC=n,r._l=i,r._i=e,r._f=t,r._strict=s,(o=new f(Ue(nt(r))))._nextDay&&(o.add(1,"d"),o._nextDay=void 0),o}function rt(e,t,i,s){return ot(e,t,i,s,!1)}t.ISO_8601=function(){};var at=k("moment().min is deprecated, use moment.max instead. https://github.com/moment/moment/issues/1548",function(){var e=rt.apply(null,arguments);return this.isValid()&&e.isValid()?e<this?this:e:d()}),lt=k("moment().max is deprecated, use moment.min instead. https://github.com/moment/moment/issues/1548",function(){var e=rt.apply(null,arguments);return this.isValid()&&e.isValid()?e>this?this:e:d()});function ct(e,t){var s,n;if(1===t.length&&i(t[0])&&(t=t[0]),!t.length)return rt();for(s=t[0],n=1;n<t.length;++n)t[n].isValid()&&!t[n][e](s)||(s=t[n]);return s}function dt(e){var t=z(e),i=t.year||0,s=t.quarter||0,n=t.month||0,o=t.week||0,r=t.day||0,a=t.hour||0,l=t.minute||0,c=t.second||0,d=t.millisecond||0;this._milliseconds=+d+1e3*c+6e4*l+36e5*a,this._days=+r+7*o,this._months=+n+3*s+12*i,this._data={},this._locale=L(),this._bubble()}function ut(e){return e instanceof dt}function ht(e,t){G(e,0,0,function(){var e=this.utcOffset(),i="+";return e<0&&(e=-e,i="-"),i+j(~~(e/60),2)+t+j(~~e%60,2)})}ht("Z",":"),ht("ZZ",""),ge("Z",ue),ge("ZZ",ue),ve(["Z","ZZ"],function(e,t,i){i._useUTC=!0,i._tzm=gt(ue,e)});var pt=/([\+\-]|\d\d)/gi;function gt(e,t){var i=(t||"").match(e)||[],s=((i[i.length-1]||[])+"").match(pt)||["-",0,0],n=60*s[1]+v(s[2]);return"+"===s[0]?n:-n}function ft(e,i){var n,o;return i._isUTC?(n=i.clone(),o=(m(e)||s(e)?+e:+rt(e))-+n,n._d.setTime(+n._d+o),t.updateOffset(n,!1),n):rt(e).local()}function mt(e){return 15*-Math.round(e._d.getTimezoneOffset()/15)}function _t(){return!!this.isValid()&&(this._isUTC&&0===this._offset)}t.updateOffset=function(){};var vt=/^(\-)?(?:(\d*)[. ])?(\d+)\:(\d+)(?:\:(\d+)\.?(\d{3})?\d*)?$/,wt=/^(-)?P(?:([0-9,.]*)Y)?(?:([0-9,.]*)M)?(?:([0-9,.]*)W)?(?:([0-9,.]*)D)?(?:T(?:([0-9,.]*)H)?(?:([0-9,.]*)M)?(?:([0-9,.]*)S)?)?$/;function bt(e,t){var i,s,n,r=e,a=null;return ut(e)?r={ms:e._milliseconds,d:e._days,M:e._months}:"number"==typeof e?(r={},t?r[t]=e:r.milliseconds=e):(a=vt.exec(e))?(i="-"===a[1]?-1:1,r={y:0,d:v(a[Se])*i,h:v(a[Te])*i,m:v(a[xe])*i,s:v(a[Ce])*i,ms:v(a[Pe])*i}):(a=wt.exec(e))?(i="-"===a[1]?-1:1,r={y:kt(a[2],i),M:kt(a[3],i),w:kt(a[4],i),d:kt(a[5],i),h:kt(a[6],i),m:kt(a[7],i),s:kt(a[8],i)}):null==r?r={}:"object"==typeof r&&("from"in r||"to"in r)&&(n=function(e,t){var i;if(!e.isValid()||!t.isValid())return{milliseconds:0,months:0};t=ft(t,e),e.isBefore(t)?i=yt(e,t):((i=yt(t,e)).milliseconds=-i.milliseconds,i.months=-i.months);return i}(rt(r.from),rt(r.to)),(r={}).ms=n.milliseconds,r.M=n.months),s=new dt(r),ut(e)&&o(e,"_locale")&&(s._locale=e._locale),s}function kt(e,t){var i=e&&parseFloat(e.replace(",","."));return(isNaN(i)?0:i)*t}function yt(e,t){var i={milliseconds:0,months:0};return i.months=t.month()-e.month()+12*(t.year()-e.year()),e.clone().add(i.months,"M").isAfter(t)&&--i.months,i.milliseconds=+t-+e.clone().add(i.months,"M"),i}function St(e){return e<0?-1*Math.round(-1*e):Math.round(e)}function Tt(e,t){return function(i,s){var n;return null===s||isNaN(+s)||(S(t,"moment()."+t+"(period, number) is deprecated. Please use moment()."+t+"(number, period)."),n=i,i=s,s=n),xt(this,bt(i="string"==typeof i?+i:i,s),e),this}}function xt(e,i,s,n){var o=i._milliseconds,r=St(i._days),a=St(i._months);e.isValid()&&(n=null==n||n,o&&e._d.setTime(+e._d+o*s),r&&q(e,"Date",H(e,"Date")+r*s),a&&Le(e,H(e,"Month")+a*s),n&&t.updateOffset(e,r||a))}bt.fn=dt.prototype;var Ct=Tt(1,"add"),Pt=Tt(-1,"subtract");function Dt(e){var t;return void 0===e?this._locale._abbr:(null!=(t=L(e))&&(this._locale=t),this)}t.defaultFormat="YYYY-MM-DDTHH:mm:ssZ";var Mt=k("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(e){return void 0===e?this.localeData():this.locale(e)});function Ft(){return this._locale}function It(e,t){G(0,[e,e.length],0,t)}function At(e,t,i,s,n){var o;return null==e?Qe(this,s,n).year:(t>(o=et(e,s,n))&&(t=o),function(e,t,i,s,n){var o=Ke(e,t,i,s,n),r=We(o.year,0,o.dayOfYear);return this.year(r.getUTCFullYear()),this.month(r.getUTCMonth()),this.date(r.getUTCDate()),this}.call(this,e,t,i,s,n))}G(0,["gg",2],0,function(){return this.weekYear()%100}),G(0,["GG",2],0,function(){return this.isoWeekYear()%100}),It("gggg","weekYear"),It("ggggg","weekYear"),It("GGGG","isoWeekYear"),It("GGGGG","isoWeekYear"),O("weekYear","gg"),O("isoWeekYear","GG"),ge("G",ce),ge("g",ce),ge("GG",ie,K),ge("gg",ie,K),ge("GGGG",re,ee),ge("gggg",re,ee),ge("GGGGG",ae,te),ge("ggggg",ae,te),we(["gggg","ggggg","GGGG","GGGGG"],function(e,t,i,s){t[s.substr(0,2)]=v(e)}),we(["gg","GG"],function(e,i,s,n){i[n]=t.parseTwoDigitYear(e)}),G("Q",0,"Qo","quarter"),O("quarter","Q"),ge("Q",Z),ve("Q",function(e,t){t[ye]=3*(v(e)-1)}),G("w",["ww",2],"wo","week"),G("W",["WW",2],"Wo","isoWeek"),O("week","w"),O("isoWeek","W"),ge("w",ie),ge("ww",ie,K),ge("W",ie),ge("WW",ie,K),we(["w","ww","W","WW"],function(e,t,i,s){t[s.substr(0,1)]=v(e)});G("D",["DD",2],"Do","date"),O("date","D"),ge("D",ie),ge("DD",ie,K),ge("Do",function(e,t){return e?t._ordinalParse:t._ordinalParseLenient}),ve(["D","DD"],Se),ve("Do",function(e,t){t[Se]=v(e.match(ie)[0])});var Et=U("Date",!0);G("d",0,"do","day"),G("dd",0,0,function(e){return this.localeData().weekdaysMin(this,e)}),G("ddd",0,0,function(e){return this.localeData().weekdaysShort(this,e)}),G("dddd",0,0,function(e){return this.localeData().weekdays(this,e)}),G("e",0,0,"weekday"),G("E",0,0,"isoWeekday"),O("day","d"),O("weekday","e"),O("isoWeekday","E"),ge("d",ie),ge("e",ie),ge("E",ie),ge("dd",he),ge("ddd",he),ge("dddd",he),we(["dd","ddd","dddd"],function(e,t,i,s){var n=i._locale.weekdaysParse(e,s,i._strict);null!=n?t.d=n:l(i).invalidWeekday=e}),we(["d","e","E"],function(e,t,i,s){t[s]=v(e)});var Lt="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_");var $t="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_");var Ot="Su_Mo_Tu_We_Th_Fr_Sa".split("_");function Rt(){return this.hours()%12||12}function zt(e,t){G(e,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),t)})}function Ut(e,t){return t._meridiemParse}G("DDD",["DDDD",3],"DDDo","dayOfYear"),O("dayOfYear","DDD"),ge("DDD",oe),ge("DDDD",Q),ve(["DDD","DDDD"],function(e,t,i){i._dayOfYear=v(e)}),G("H",["HH",2],0,"hour"),G("h",["hh",2],0,Rt),G("hmm",0,0,function(){return""+Rt.apply(this)+j(this.minutes(),2)}),G("hmmss",0,0,function(){return""+Rt.apply(this)+j(this.minutes(),2)+j(this.seconds(),2)}),G("Hmm",0,0,function(){return""+this.hours()+j(this.minutes(),2)}),G("Hmmss",0,0,function(){return""+this.hours()+j(this.minutes(),2)+j(this.seconds(),2)}),zt("a",!0),zt("A",!1),O("hour","h"),ge("a",Ut),ge("A",Ut),ge("H",ie),ge("h",ie),ge("HH",ie,K),ge("hh",ie,K),ge("hmm",se),ge("hmmss",ne),ge("Hmm",se),ge("Hmmss",ne),ve(["H","HH"],Te),ve(["a","A"],function(e,t,i){i._isPm=i._locale.isPM(e),i._meridiem=e}),ve(["h","hh"],function(e,t,i){t[Te]=v(e),l(i).bigHour=!0}),ve("hmm",function(e,t,i){var s=e.length-2;t[Te]=v(e.substr(0,s)),t[xe]=v(e.substr(s)),l(i).bigHour=!0}),ve("hmmss",function(e,t,i){var s=e.length-4,n=e.length-2;t[Te]=v(e.substr(0,s)),t[xe]=v(e.substr(s,2)),t[Ce]=v(e.substr(n)),l(i).bigHour=!0}),ve("Hmm",function(e,t,i){var s=e.length-2;t[Te]=v(e.substr(0,s)),t[xe]=v(e.substr(s))}),ve("Hmmss",function(e,t,i){var s=e.length-4,n=e.length-2;t[Te]=v(e.substr(0,s)),t[xe]=v(e.substr(s,2)),t[Ce]=v(e.substr(n))});var Ht=U("Hours",!0);G("m",["mm",2],0,"minute"),O("minute","m"),ge("m",ie),ge("mm",ie,K),ve(["m","mm"],xe);var qt=U("Minutes",!1);G("s",["ss",2],0,"second"),O("second","s"),ge("s",ie),ge("ss",ie,K),ve(["s","ss"],Ce);var Vt,jt=U("Seconds",!1);for(G("S",0,0,function(){return~~(this.millisecond()/100)}),G(0,["SS",2],0,function(){return~~(this.millisecond()/10)}),G(0,["SSS",3],0,"millisecond"),G(0,["SSSS",4],0,function(){return 10*this.millisecond()}),G(0,["SSSSS",5],0,function(){return 100*this.millisecond()}),G(0,["SSSSSS",6],0,function(){return 1e3*this.millisecond()}),G(0,["SSSSSSS",7],0,function(){return 1e4*this.millisecond()}),G(0,["SSSSSSSS",8],0,function(){return 1e5*this.millisecond()}),G(0,["SSSSSSSSS",9],0,function(){return 1e6*this.millisecond()}),O("millisecond","ms"),ge("S",oe,Z),ge("SS",oe,K),ge("SSS",oe,Q),Vt="SSSS";Vt.length<=9;Vt+="S")ge(Vt,le);function Nt(e,t){t[Pe]=v(1e3*("0."+e))}for(Vt="S";Vt.length<=9;Vt+="S")ve(Vt,Nt);var Bt=U("Milliseconds",!1);G("z",0,0,"zoneAbbr"),G("zz",0,0,"zoneName");var Yt=f.prototype;Yt.add=Ct,Yt.calendar=function(e,t){var i=e||rt(),s=ft(i,this).startOf("day"),n=this.diff(s,"days",!0),o=n<-6?"sameElse":n<-1?"lastWeek":n<0?"lastDay":n<1?"sameDay":n<2?"nextDay":n<7?"nextWeek":"sameElse",r=t&&(T(t[o])?t[o]():t[o]);return this.format(r||this.localeData().calendar(o,this,rt(i)))},Yt.clone=function(){return new f(this)},Yt.diff=function(e,t,i){var s,n,o,r;return this.isValid()&&(s=ft(e,this)).isValid()?(n=6e4*(s.utcOffset()-this.utcOffset()),"year"===(t=R(t))||"month"===t||"quarter"===t?(a=this,l=s,u=12*(l.year()-a.year())+(l.month()-a.month()),h=a.clone().add(u,"months"),l-h<0?(c=a.clone().add(u-1,"months"),d=(l-h)/(h-c)):(c=a.clone().add(u+1,"months"),d=(l-h)/(c-h)),r=-(u+d),"quarter"===t?r/=3:"year"===t&&(r/=12)):(o=this-s,r="second"===t?o/1e3:"minute"===t?o/6e4:"hour"===t?o/36e5:"day"===t?(o-n)/864e5:"week"===t?(o-n)/6048e5:o),i?r:_(r)):NaN;var a,l,c,d,u,h},Yt.endOf=function(e){return void 0===(e=R(e))||"millisecond"===e?this:this.startOf(e).add(1,"isoWeek"===e?"week":e).subtract(1,"ms")},Yt.format=function(e){var i=J(this,e||t.defaultFormat);return this.localeData().postformat(i)},Yt.from=function(e,t){return this.isValid()&&(m(e)&&e.isValid()||rt(e).isValid())?bt({to:this,from:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()},Yt.fromNow=function(e){return this.from(rt(),e)},Yt.to=function(e,t){return this.isValid()&&(m(e)&&e.isValid()||rt(e).isValid())?bt({from:this,to:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()},Yt.toNow=function(e){return this.to(rt(),e)},Yt.get=V,Yt.invalidAt=function(){return l(this).overflow},Yt.isAfter=function(e,t){var i=m(e)?e:rt(e);return!(!this.isValid()||!i.isValid())&&("millisecond"===(t=R(u(t)?"millisecond":t))?+this>+i:+i<+this.clone().startOf(t))},Yt.isBefore=function(e,t){var i=m(e)?e:rt(e);return!(!this.isValid()||!i.isValid())&&("millisecond"===(t=R(u(t)?"millisecond":t))?+this<+i:+this.clone().endOf(t)<+i)},Yt.isBetween=function(e,t,i){return this.isAfter(e,i)&&this.isBefore(t,i)},Yt.isSame=function(e,t){var i,s=m(e)?e:rt(e);return!(!this.isValid()||!s.isValid())&&("millisecond"===(t=R(t||"millisecond"))?+this==+s:(i=+s,+this.clone().startOf(t)<=i&&i<=+this.clone().endOf(t)))},Yt.isSameOrAfter=function(e,t){return this.isSame(e,t)||this.isAfter(e,t)},Yt.isSameOrBefore=function(e,t){return this.isSame(e,t)||this.isBefore(e,t)},Yt.isValid=function(){return c(this)},Yt.lang=Mt,Yt.locale=Dt,Yt.localeData=Ft,Yt.max=lt,Yt.min=at,Yt.parsingFlags=function(){return r({},l(this))},Yt.set=V,Yt.startOf=function(e){switch(e=R(e)){case"year":this.month(0);case"quarter":case"month":this.date(1);case"week":case"isoWeek":case"day":this.hours(0);case"hour":this.minutes(0);case"minute":this.seconds(0);case"second":this.milliseconds(0)}return"week"===e&&this.weekday(0),"isoWeek"===e&&this.isoWeekday(1),"quarter"===e&&this.month(3*Math.floor(this.month()/3)),this},Yt.subtract=Pt,Yt.toArray=function(){var e=this;return[e.year(),e.month(),e.date(),e.hour(),e.minute(),e.second(),e.millisecond()]},Yt.toObject=function(){var e=this;return{years:e.year(),months:e.month(),date:e.date(),hours:e.hours(),minutes:e.minutes(),seconds:e.seconds(),milliseconds:e.milliseconds()}},Yt.toDate=function(){return this._offset?new Date(+this):this._d},Yt.toISOString=function(){var e=this.clone().utc();return 0<e.year()&&e.year()<=9999?T(Date.prototype.toISOString)?this.toDate().toISOString():J(e,"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]"):J(e,"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]")},Yt.toJSON=function(){return this.isValid()?this.toISOString():null},Yt.toString=function(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")},Yt.unix=function(){return Math.floor(+this/1e3)},Yt.valueOf=function(){return+this._d-6e4*(this._offset||0)},Yt.creationData=function(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}},Yt.year=Xe,Yt.isLeapYear=function(){return Je(this.year())},Yt.weekYear=function(e){return At.call(this,e,this.week(),this.weekday(),this.localeData()._week.dow,this.localeData()._week.doy)},Yt.isoWeekYear=function(e){return At.call(this,e,this.isoWeek(),this.isoWeekday(),1,4)},Yt.quarter=Yt.quarters=function(e){return null==e?Math.ceil((this.month()+1)/3):this.month(3*(e-1)+this.month()%3)},Yt.month=$e,Yt.daysInMonth=function(){return Fe(this.year(),this.month())},Yt.week=Yt.weeks=function(e){var t=this.localeData().week(this);return null==e?t:this.add(7*(e-t),"d")},Yt.isoWeek=Yt.isoWeeks=function(e){var t=Qe(this,1,4).week;return null==e?t:this.add(7*(e-t),"d")},Yt.weeksInYear=function(){var e=this.localeData()._week;return et(this.year(),e.dow,e.doy)},Yt.isoWeeksInYear=function(){return et(this.year(),1,4)},Yt.date=Et,Yt.day=Yt.days=function(e){if(!this.isValid())return null!=e?this:NaN;var t=this._isUTC?this._d.getUTCDay():this._d.getDay();return null!=e?(e=function(e,t){return"string"!=typeof e?e:isNaN(e)?"number"==typeof(e=t.weekdaysParse(e))?e:null:parseInt(e,10)}(e,this.localeData()),this.add(e-t,"d")):t},Yt.weekday=function(e){if(!this.isValid())return null!=e?this:NaN;var t=(this.day()+7-this.localeData()._week.dow)%7;return null==e?t:this.add(e-t,"d")},Yt.isoWeekday=function(e){return this.isValid()?null==e?this.day()||7:this.day(this.day()%7?e:e-7):null!=e?this:NaN},Yt.dayOfYear=function(e){var t=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return null==e?t:this.add(e-t,"d")},Yt.hour=Yt.hours=Ht,Yt.minute=Yt.minutes=qt,Yt.second=Yt.seconds=jt,Yt.millisecond=Yt.milliseconds=Bt,Yt.utcOffset=function(e,i){var s,n=this._offset||0;return this.isValid()?null!=e?("string"==typeof e?e=gt(ue,e):Math.abs(e)<16&&(e*=60),!this._isUTC&&i&&(s=mt(this)),this._offset=e,this._isUTC=!0,null!=s&&this.add(s,"m"),n!==e&&(!i||this._changeInProgress?xt(this,bt(e-n,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,t.updateOffset(this,!0),this._changeInProgress=null)),this):this._isUTC?n:mt(this):null!=e?this:NaN},Yt.utc=function(e){return this.utcOffset(0,e)},Yt.local=function(e){return this._isUTC&&(this.utcOffset(0,e),this._isUTC=!1,e&&this.subtract(mt(this),"m")),this},Yt.parseZone=function(){return this._tzm?this.utcOffset(this._tzm):"string"==typeof this._i&&this.utcOffset(gt(de,this._i)),this},Yt.hasAlignedHourOffset=function(e){return!!this.isValid()&&(e=e?rt(e).utcOffset():0,(this.utcOffset()-e)%60==0)},Yt.isDST=function(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()},Yt.isDSTShifted=function(){if(!u(this._isDSTShifted))return this._isDSTShifted;var e={};if(p(e,this),(e=nt(e))._a){var t=e._isUTC?a(e._a):rt(e._a);this._isDSTShifted=this.isValid()&&w(e._a,t.toArray())>0}else this._isDSTShifted=!1;return this._isDSTShifted},Yt.isLocal=function(){return!!this.isValid()&&!this._isUTC},Yt.isUtcOffset=function(){return!!this.isValid()&&this._isUTC},Yt.isUtc=_t,Yt.isUTC=_t,Yt.zoneAbbr=function(){return this._isUTC?"UTC":""},Yt.zoneName=function(){return this._isUTC?"Coordinated Universal Time":""},Yt.dates=k("dates accessor is deprecated. Use date instead.",Et),Yt.months=k("months accessor is deprecated. Use month instead",$e),Yt.years=k("years accessor is deprecated. Use year instead",Xe),Yt.zone=k("moment().zone is deprecated, use moment().utcOffset instead. https://github.com/moment/moment/issues/1779",function(e,t){return null!=e?("string"!=typeof e&&(e=-e),this.utcOffset(e,t),this):-this.utcOffset()});var Wt=Yt;function Gt(e){return e}var Jt=P.prototype;function Xt(e,t,i,s){var n=L(),o=a().set(s,t);return n[i](o,e)}function Zt(e,t,i,s,n){if("number"==typeof e&&(t=e,e=void 0),e=e||"",null!=t)return Xt(e,t,i,n);var o,r=[];for(o=0;o<s;o++)r[o]=Xt(e,o,i,n);return r}Jt._calendar={sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},Jt.calendar=function(e,t,i){var s=this._calendar[e];return T(s)?s.call(t,i):s},Jt._longDateFormat={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"},Jt.longDateFormat=function(e){var t=this._longDateFormat[e],i=this._longDateFormat[e.toUpperCase()];return t||!i?t:(this._longDateFormat[e]=i.replace(/MMMM|MM|DD|dddd/g,function(e){return e.slice(1)}),this._longDateFormat[e])},Jt._invalidDate="Invalid date",Jt.invalidDate=function(){return this._invalidDate},Jt._ordinal="%d",Jt.ordinal=function(e){return this._ordinal.replace("%d",e)},Jt._ordinalParse=/\d{1,2}/,Jt.preparse=Gt,Jt.postformat=Gt,Jt._relativeTime={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"},Jt.relativeTime=function(e,t,i,s){var n=this._relativeTime[i];return T(n)?n(e,t,i,s):n.replace(/%d/i,e)},Jt.pastFuture=function(e,t){var i=this._relativeTime[e>0?"future":"past"];return T(i)?i(t):i.replace(/%s/i,t)},Jt.set=function(e){var t,i;for(i in e)T(t=e[i])?this[i]=t:this["_"+i]=t;this._config=e,this._ordinalParseLenient=new RegExp(this._ordinalParse.source+"|"+/\d{1,2}/.source)},Jt.months=function(e,t){return i(this._months)?this._months[e.month()]:this._months[Ie.test(t)?"format":"standalone"][e.month()]},Jt._months=Ae,Jt.monthsShort=function(e,t){return i(this._monthsShort)?this._monthsShort[e.month()]:this._monthsShort[Ie.test(t)?"format":"standalone"][e.month()]},Jt._monthsShort=Ee,Jt.monthsParse=function(e,t,i){var s,n,o;for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),s=0;s<12;s++){if(n=a([2e3,s]),i&&!this._longMonthsParse[s]&&(this._longMonthsParse[s]=new RegExp("^"+this.months(n,"").replace(".","")+"$","i"),this._shortMonthsParse[s]=new RegExp("^"+this.monthsShort(n,"").replace(".","")+"$","i")),i||this._monthsParse[s]||(o="^"+this.months(n,"")+"|^"+this.monthsShort(n,""),this._monthsParse[s]=new RegExp(o.replace(".",""),"i")),i&&"MMMM"===t&&this._longMonthsParse[s].test(e))return s;if(i&&"MMM"===t&&this._shortMonthsParse[s].test(e))return s;if(!i&&this._monthsParse[s].test(e))return s}},Jt._monthsRegex=Re,Jt.monthsRegex=function(e){return this._monthsParseExact?(o(this,"_monthsRegex")||ze.call(this),e?this._monthsStrictRegex:this._monthsRegex):this._monthsStrictRegex&&e?this._monthsStrictRegex:this._monthsRegex},Jt._monthsShortRegex=Oe,Jt.monthsShortRegex=function(e){return this._monthsParseExact?(o(this,"_monthsRegex")||ze.call(this),e?this._monthsShortStrictRegex:this._monthsShortRegex):this._monthsShortStrictRegex&&e?this._monthsShortStrictRegex:this._monthsShortRegex},Jt.week=function(e){return Qe(e,this._week.dow,this._week.doy).week},Jt._week={dow:0,doy:6},Jt.firstDayOfYear=function(){return this._week.doy},Jt.firstDayOfWeek=function(){return this._week.dow},Jt.weekdays=function(e,t){return i(this._weekdays)?this._weekdays[e.day()]:this._weekdays[this._weekdays.isFormat.test(t)?"format":"standalone"][e.day()]},Jt._weekdays=Lt,Jt.weekdaysMin=function(e){return this._weekdaysMin[e.day()]},Jt._weekdaysMin=Ot,Jt.weekdaysShort=function(e){return this._weekdaysShort[e.day()]},Jt._weekdaysShort=$t,Jt.weekdaysParse=function(e,t,i){var s,n,o;for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),s=0;s<7;s++){if(n=rt([2e3,1]).day(s),i&&!this._fullWeekdaysParse[s]&&(this._fullWeekdaysParse[s]=new RegExp("^"+this.weekdays(n,"").replace(".",".?")+"$","i"),this._shortWeekdaysParse[s]=new RegExp("^"+this.weekdaysShort(n,"").replace(".",".?")+"$","i"),this._minWeekdaysParse[s]=new RegExp("^"+this.weekdaysMin(n,"").replace(".",".?")+"$","i")),this._weekdaysParse[s]||(o="^"+this.weekdays(n,"")+"|^"+this.weekdaysShort(n,"")+"|^"+this.weekdaysMin(n,""),this._weekdaysParse[s]=new RegExp(o.replace(".",""),"i")),i&&"dddd"===t&&this._fullWeekdaysParse[s].test(e))return s;if(i&&"ddd"===t&&this._shortWeekdaysParse[s].test(e))return s;if(i&&"dd"===t&&this._minWeekdaysParse[s].test(e))return s;if(!i&&this._weekdaysParse[s].test(e))return s}},Jt.isPM=function(e){return"p"===(e+"").toLowerCase().charAt(0)},Jt._meridiemParse=/[ap]\.?m?\.?/i,Jt.meridiem=function(e,t,i){return e>11?i?"pm":"PM":i?"am":"AM"},A("en",{ordinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(e){var t=e%10;return e+(1===v(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th")}}),t.lang=k("moment.lang is deprecated. Use moment.locale instead.",A),t.langData=k("moment.langData is deprecated. Use moment.localeData instead.",L);var Kt=Math.abs;function Qt(e,t,i,s){var n=bt(t,i);return e._milliseconds+=s*n._milliseconds,e._days+=s*n._days,e._months+=s*n._months,e._bubble()}function ei(e){return e<0?Math.floor(e):Math.ceil(e)}function ti(e){return 4800*e/146097}function ii(e){return 146097*e/4800}function si(e){return function(){return this.as(e)}}var ni=si("ms"),oi=si("s"),ri=si("m"),ai=si("h"),li=si("d"),ci=si("w"),di=si("M"),ui=si("y");function hi(e){return function(){return this._data[e]}}var pi=hi("milliseconds"),gi=hi("seconds"),fi=hi("minutes"),mi=hi("hours"),_i=hi("days"),vi=hi("months"),wi=hi("years");var bi=Math.round,ki={s:45,m:45,h:22,d:26,M:11};var yi=Math.abs;function Si(){var e,t,i=yi(this._milliseconds)/1e3,s=yi(this._days),n=yi(this._months);t=_((e=_(i/60))/60),i%=60,e%=60;var o=_(n/12),r=n%=12,a=s,l=t,c=e,d=i,u=this.asSeconds();return u?(u<0?"-":"")+"P"+(o?o+"Y":"")+(r?r+"M":"")+(a?a+"D":"")+(l||c||d?"T":"")+(l?l+"H":"")+(c?c+"M":"")+(d?d+"S":""):"P0D"}var Ti=dt.prototype;return Ti.abs=function(){var e=this._data;return this._milliseconds=Kt(this._milliseconds),this._days=Kt(this._days),this._months=Kt(this._months),e.milliseconds=Kt(e.milliseconds),e.seconds=Kt(e.seconds),e.minutes=Kt(e.minutes),e.hours=Kt(e.hours),e.months=Kt(e.months),e.years=Kt(e.years),this},Ti.add=function(e,t){return Qt(this,e,t,1)},Ti.subtract=function(e,t){return Qt(this,e,t,-1)},Ti.as=function(e){var t,i,s=this._milliseconds;if("month"===(e=R(e))||"year"===e)return t=this._days+s/864e5,i=this._months+ti(t),"month"===e?i:i/12;switch(t=this._days+Math.round(ii(this._months)),e){case"week":return t/7+s/6048e5;case"day":return t+s/864e5;case"hour":return 24*t+s/36e5;case"minute":return 1440*t+s/6e4;case"second":return 86400*t+s/1e3;case"millisecond":return Math.floor(864e5*t)+s;default:throw new Error("Unknown unit "+e)}},Ti.asMilliseconds=ni,Ti.asSeconds=oi,Ti.asMinutes=ri,Ti.asHours=ai,Ti.asDays=li,Ti.asWeeks=ci,Ti.asMonths=di,Ti.asYears=ui,Ti.valueOf=function(){return this._milliseconds+864e5*this._days+this._months%12*2592e6+31536e6*v(this._months/12)},Ti._bubble=function(){var e,t,i,s,n,o=this._milliseconds,r=this._days,a=this._months,l=this._data;return o>=0&&r>=0&&a>=0||o<=0&&r<=0&&a<=0||(o+=864e5*ei(ii(a)+r),r=0,a=0),l.milliseconds=o%1e3,e=_(o/1e3),l.seconds=e%60,t=_(e/60),l.minutes=t%60,i=_(t/60),l.hours=i%24,a+=n=_(ti(r+=_(i/24))),r-=ei(ii(n)),s=_(a/12),a%=12,l.days=r,l.months=a,l.years=s,this},Ti.get=function(e){return this[(e=R(e))+"s"]()},Ti.milliseconds=pi,Ti.seconds=gi,Ti.minutes=fi,Ti.hours=mi,Ti.days=_i,Ti.weeks=function(){return _(this.days()/7)},Ti.months=vi,Ti.years=wi,Ti.humanize=function(e){var t=this.localeData(),i=function(e,t,i){var s=bt(e).abs(),n=bi(s.as("s")),o=bi(s.as("m")),r=bi(s.as("h")),a=bi(s.as("d")),l=bi(s.as("M")),c=bi(s.as("y")),d=n<ki.s&&["s",n]||o<=1&&["m"]||o<ki.m&&["mm",o]||r<=1&&["h"]||r<ki.h&&["hh",r]||a<=1&&["d"]||a<ki.d&&["dd",a]||l<=1&&["M"]||l<ki.M&&["MM",l]||c<=1&&["y"]||["yy",c];return d[2]=t,d[3]=+e>0,d[4]=i,function(e,t,i,s,n){return n.relativeTime(t||1,!!i,e,s)}.apply(null,d)}(this,!e,t);return e&&(i=t.pastFuture(+this,i)),t.postformat(i)},Ti.toISOString=Si,Ti.toString=Si,Ti.toJSON=Si,Ti.locale=Dt,Ti.localeData=Ft,Ti.toIsoString=k("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",Si),Ti.lang=Mt,G("X",0,0,"unix"),G("x",0,0,"valueOf"),ge("x",ce),ge("X",/[+-]?\d+(\.\d{1,3})?/),ve("X",function(e,t,i){i._d=new Date(1e3*parseFloat(e,10))}),ve("x",function(e,t,i){i._d=new Date(v(e))}),t.version="2.12.0",e=rt,t.fn=Wt,t.min=function(){return ct("isBefore",[].slice.call(arguments,0))},t.max=function(){return ct("isAfter",[].slice.call(arguments,0))},t.now=function(){return Date.now?Date.now():+new Date},t.utc=a,t.unix=function(e){return rt(1e3*e)},t.months=function(e,t){return Zt(e,t,"months",12,"month")},t.isDate=s,t.locale=A,t.invalid=d,t.duration=bt,t.isMoment=m,t.weekdays=function(e,t){return Zt(e,t,"weekdays",7,"day")},t.parseZone=function(){return rt.apply(null,arguments).parseZone()},t.localeData=L,t.isDuration=ut,t.monthsShort=function(e,t){return Zt(e,t,"monthsShort",12,"month")},t.weekdaysMin=function(e,t){return Zt(e,t,"weekdaysMin",7,"day")},t.defineLocale=E,t.updateLocale=function(e,t){var i;return null!=t?(null!=M[e]&&(t=C(M[e]._config,t)),(i=new P(t)).parentLocale=M[e],M[e]=i,A(e)):null!=M[e]&&(null!=M[e].parentLocale?M[e]=M[e].parentLocale:null!=M[e]&&delete M[e]),M[e]},t.locales=function(){return Object.keys(M)},t.weekdaysShort=function(e,t){return Zt(e,t,"weekdaysShort",7,"day")},t.normalizeUnits=R,t.relativeTimeThreshold=function(e,t){return void 0!==ki[e]&&(void 0===t?ki[e]:(ki[e]=t,!0))},t.prototype=Wt,t}),rblms.define("utils",["require","backbone","underscore","jquery","settings","consts","hogan","utils/whitelabel_settings","core/app_engine","moment"],function(e){var t=e("backbone"),i=e("underscore"),s=e("jquery"),n=e("settings"),o=e("consts"),r=e("hogan"),a=e("utils/whitelabel_settings"),l=e("core/app_engine");var c={toInt:function(e){return parseInt(e,10)},loadScript:function(e,t){if(document.querySelectorAll('script[src="'+e+'"]').length)t&&t();else{var i=document.createElement("script");i.onload=t,i.src=e,document.head.appendChild(i)}},isNum:function(e){return/\d/gi.test(e)},capitalizeFirstLetter:function(e){return e.charAt(0).toUpperCase()+e.slice(1)},escapeRegex:function(e){return e.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")},escapeRegexSpecials:function(e){return e.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\\\$&")},loadPinmarklet:function(){this.loadScript("//assets.pinterest.com/js/pinmarklet.js?")},browser:function(){var e=function(e){e=e.toLowerCase();var t=/(chrome)[ \/]([\w.]+)/.exec(e)||/(webkit)[ \/]([\w.]+)/.exec(e)||/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(e)||/(msie) ([\w.]+)/.exec(e)||e.indexOf("compatible")<0&&/(mozilla)(?:.*? rv:([\w.]+)|)/.exec(e)||[];return{browser:t[1]||"",version:t[2]||"0"}}((window||{}).navigator.userAgent),t={};return e.browser&&(t[e.browser]=!0,t.version=e.version),t.mozilla&&window.navigator.appVersion.match("Trident/7.")&&(t.msie=!0),t.chrome?t.webkit=!0:t.webkit&&(t.safari=!0),t},getSocialNetworkProviderByLink:function(e){return/facebook.com/.test(e)?"Facebook":/pinterest.com/.test(e)?"Pinterest":/reddit.com/.test(e)?"Reddit":/t.umblr.com/.test(e)||/tumblr.com/.test(e)?"Tumblr":/linkedin.com/.test(e)?"Linkedin":/\/t.co\//.test(e)||/twitter.com/.test(e)?"Twitter":null},isImgLink:function(e){return/\.(gif|jpg|jpeg|png)$/i.test(e)},timeSince:function(e){var t=new Date,i=(t.getTime()-e.getTime())/1e3;return i<60?parseInt(i,10)+"s":i<3600?parseInt(i/60,10)+"m":i<=86400?parseInt(i/3600,10)+"h":i>86400?e.getDate()+" "+e.toDateString().match(/ [a-zA-Z]*/)[0].replace(" ","")+(e.getFullYear()===t.getFullYear()?"":" "+e.getFullYear()):void 0},msToTime:function(e){var t=(e/1e3).toFixed(0),i=Math.floor(t/60),s="";return i>59&&(i=(i-=60*(s=(s=Math.floor(i/60))>=10?s:"0"+s))>=10?i:"0"+i),t=(t=Math.floor(t%60))>=10?t:"0"+t,""!==s?s+":"+i+":"+t:i+":"+t},uid:function(e){e=e||8;var t=Math.ceil(e/4);return i.times(t,function(){return("0000"+(Math.random()*Math.pow(36,4)<<0).toString(36)).slice(-4)}).join("").substr(0,e)},setIframeHeight:function(e,t){var i,n,o,r=500,a=e.$(t||"iframe");a.on("load",function l(){if(!(a=e.$(t||"iframe")).length||!a[0].contentWindow)return!1;o=s(a[0].contentWindow.document.body),(i=o.outerHeight(!0))!==n&&a.outerHeight(n=i),setTimeout(l,r)})},checkTransitionsSupport:function(){for(var e=document.createElement("div"),t=!1,i=["perspectiveProperty","WebkitPerspective"],s=i.length-1;s>=0;s--)t=t||void 0!==e.style[i[s]];if(t){var n=document.createElement("style");n.textContent="@media (-webkit-transform-3d){#test3d{height:3px}}",document.getElementsByTagName("head")[0].appendChild(n),e.id="test3d",document.body.appendChild(e),t=3===e.offsetHeight,n.parentNode.removeChild(n),e.parentNode.removeChild(e)}return t},capitalize:function(e){return e[0].toUpperCase()+e.slice(1,e.length)},lightSanitize:function(e){return e&&function(){var e=[].slice.call(arguments,0);return i.reduce(e,function(e,t){return e.replace(t,"")})}(e,/<\/?iframe.*?>/gi,/<img.*?>/gi,/<\/?script.*?>/gi)},truncateString:function(e,t){return e.length<=t?e:e.substring(0,t)+"…"},extractLinks:function(e){return e.match(/(([a-z]+:\/\/)?(([a-z0-9\-]+\.)+([a-z]{2}|aero|arpa|biz|com|coop|edu|gov|info|int|jobs|mil|museum|name|nato|net|org|pro|travel|local|internal))(:[0-9]{1,5})?(\/[a-z0-9_\-\.~]+)*(\/([a-z0-9_\-\.]*)(\?[a-z0-9+_\-\.%=&amp;]*)?)?(#[a-zA-Z0-9!$&'()*+.=-_~:@/?]*)?)(\s+|$)/gi)},setBeforeunload:function(e){window.onbeforeunload=function(t){return(t=t||window.event)&&(t.returnValue=e),e}},encodeHTMLTags:function(e){return e&&e.replace(/&/g,"&amp;").replace(/"/g,"&quot;").replace(/'/g,"&#39;").replace(/</g,"&lt;").replace(/>/g,"&gt;")||""},decodeHTMLTags:function(e){return e&&e.replace(/&amp\;/g,"&").replace(/&quot\;/g,'"').replace(/&\#39\;/g,"'").replace(/&lt\;/g,"<").replace(/&gt\;/g,">")||""},safeTags:function(e){return e.replace(/</g,"&lt;").replace(/>/g,"&gt;")},htmlize:function(e){return e=(e=(e=(e=e||"").replace(/\n/g,"<br>")).replace(/(\b(https?|ftp|file):\/\/([-A-Z0-9+&@#\/%?=~_|!:,.;]*[-A-Z0-9+&@#\/%=~_|]))/gi,'<a href="$1" target="_blank">$3</a>')).replace(/((\s|^|<br>)(@\w{1,16}))/gi,function(e,t,i,s){return s.length<=16?i+'<a class="tw-intent" href="https://twitter.com/intent/user?screen_name='+s+'">'+s+"</a>":t})},decodeText:function(e){return i.map(s.parseHTML(e),function(e){return s(e).text()}).join("")},format:function(e,t){return e.replace(/\{([\w]+)\}/g,function(e,i){return encodeURIComponent(t[i])})},removeTags:function(e,t){return(t=t||{}).replaceBreakLineBySpace&&(e=this.replaceBreakLineBySpace(e)),(e+""||"").replace(/(<([^>]+)>)/gi,"")},replaceBreakLineBySpace:function(e){return(e||"").replace(/<br?>/gi," ")},buildPostUrl:function(e){var t=e.basename?e.basename+"-":"",i="slideshow"===e.type?"-s"+(e.slideshow.active_slide||0):"";return t+e.id+i+".html"},buildEmbeddedPostUrl:function(e){var t=c.buildPostUrl(e.toJSON?e.toJSON():e),i=(n.referrer||"").replace(new RegExp("[?&]"+o.SHARE_POST_IN_EMBED_DIRECTLY_GET_ARG+"=[^&]+"),"");return i+(/\?/.test(i)?"&":"?")+o.SHARE_POST_IN_EMBED_DIRECTLY_GET_ARG+"="+t},removeBeforeunload:function(){window.onbeforeunload=null},getReferrerURL:function(){return n.inEmbed?document.referrer:window.location.href||document.referrer},getSiteUrl:function(e){var t=n.parent_site||{};return n.is_whitelabel_site?t.id===e.id?"/":a.path_to_sites+e.name:"/"+(n.is_custom_domain?"":e.name)},getRootPath:function(){var e="";return((e=n.is_custom_domain?n.is_community_site?"community/"+window.location.pathname.split("/")[2]:n.site.parent_id?n.site.name.toLowerCase():"":window.location.pathname.split("/")[1])?"/":"")+e+"/"},getUrlParametersObject:function(){var e=window.location.search.substr(1);return e.length?i.reduce(e.split("&"),function(e,t){var i=t.split("=");return e[i[0]]=i[1],e},{}):{}},getHeadline:function(e){return e instanceof t.Model&&(e=e.toJSON()),e.headline?e.headline:2===e.provider_id&&e.twitter_headline?c.decodeText(e.twitter_headline):""},hasHeadline:function(e){return e instanceof t.Model&&(e=e.toJSON()),!!e.headline||!(2!==e.provider_id||!e.twitter_headline)},postLink:function(){var e=n.site.embed_settings&&n.site.embed_settings.share_origin,t=n.site.embed_settings&&n.site.embed_settings.embed_as_origin,s=n.inEmbed&&n.is_paid_domain&&n.referrer,o=void 0===this.original_url||0===this.provider_id&&""===this.original_url,r=i.isUndefined(this.is_direct_link)?this.original_url:this.is_direct_link?this.original_url:this.post_url;return s&&(r=c.buildEmbeddedPostUrl(this)),e&&(r=i.isString(e)?e:this.original_url||this.post_url),s&&t&&o&&(r=c.buildEmbeddedPostUrl(this)),r||""},forceRequire:function(t,i){i=i||function(){},e.undef(t),e([t],i)},localeNumber:function(e){var t=String(e).split(".");return t[0]=t[0].replace(/\B(?=(\d{3})+(?!\d))/g," "),t.join(".")},tweetText:function(e){if(e.length>114){for(var t,i,s=e.length,n=e.split(" ");s>114;)s-=(t=n.pop()).length+1,"{{link}}"===t&&(i=!0);e=n.join(" ")+"…",i&&(e+=" {{link}}")}return e},hasScroll:function(e){var t=s(e);return e.prop("scrollHeight")>t.height()},abbreviateNumber:function(e){return e<Math.pow(10,3)?e:e<Math.pow(10,4)?(e/1e3).toPrecision(2)+"k":e<Math.pow(10,6)?(e/1e3).toFixed()+"k":e<Math.pow(10,8)?(e/1e6).toPrecision(2)+"M":e<Math.pow(10,9)?(e/1e6).toFixed()+"M":(e/1e9).toPrecision(3)+"B"},getProviderDomainByName:function(e){switch(e.toLowerCase()){case"facebook":return"facebook.com";case"twitter":return"twitter.com";case"gplus":return"plus.google.com";case"instagram":return"instagram.com";case"pinterest":return"pinterest.com";case"tumblr":return"tumblr.com";case"reddit":return"reddit.com";default:return!1}},hasExtension:function(e,t){return new RegExp("("+t.join("|").replace(/\./g,"\\.")+")$","i").test(e)},filters:{localeNumber:function(){return function(e,t){return e=t(e),c.localeNumber(e)}},abbreviateNumber:function(){return function(e,t){return e=parseInt(t(e),10),c.abbreviateNumber(e)}},ratioToPercentage:function(){return function(e,t){return e=t(e),Math.round(100*e)+"%"}},numberOrZero:function(){return function(e,t){return e=t(e),Number(e)||0}},providerDomain:function(){return function(e,t){return e=t(e),c.getProviderDomainByName(e)||e}},formatUnixTsAsDate:function(){return function(e,t){e=t(e);var i=new Date(+(e+"000"));return i.getDate()+"/"+(i.getMonth()+1)+"/"+i.getFullYear()}},today_ago_or_date:function(){return function(e,t){e=+t(e);var i,s,n=new Date,o=new Date(e);return e>+new Date(n.getFullYear(),n.getMonth(),n.getDate())?c.pretty_date(e/1e3):(i=o.getMonth()+1,(s=o.getDate())<10&&(s="0"+s),i<10&&(i="0"+i),i+"/"+s)}},today_ago_or_date_local_timezone:function(){var t=e("moment");return function(e,i){e=+i(e);var s=new Date;return e>+new Date(s.getFullYear(),s.getMonth(),s.getDate())?t.utc(e).local().format("hh:mm A"):t.utc(e).local().format("MM/DD")}},msToTime:function(){return function(e,t){return c.msToTime(t(e))}},splash_filtered_video_url:function(){return this.splash_video&&this.splash_video.replace(/\/cp\~instance\=rebelmouse/gi,"").replace(/https?\:\/\//i,"//")},favicon_url:function(){return this.favicon||"https://www.google.com/s2/u/0/favicons?domain="+this.original_domain},original_domain:function(){var e=this.original_url&&this.original_url.match(/:\/\/(.[^\/]+)/)||"";return e&&e[1]||!1},screen_name:function(){return 2===this.provider_id&&"@"+this.author_screen_name||""},canBeRemoved:function(){return!(!this.splash&&!this.giant_splash||this.removable_media)},thumb_height_math:function(){var e=this.use_300x_image?300:210,t=this.use_300x_image?this.thumb_height_300x:this.thumb_height_210x;return l.get("use_roar_posts_api")&&this.image_size?this.calculate_height(this.real_widget_width):Math.floor(t*(this.real_widget_width/e))},thumb_video_image_height:function(){var e=this.video_image_height||[157,223];return this.use_300x_image?e[1]:e[0]},image_height:function(){return this.width>783?Math.floor(this.height*(783/this.width)):this.height},calculate_height:function(e){var t=i.map(this.image_size.split("x"),parseFloat),s=t.shift(),n=t.shift();return Math.floor(n/s*e)},splash_height_math:function(){var e,t=this.size,i=this.heights,s=this.activeColSize;return l.get("use_roar_posts_api")&&this.image_size?this.calculate_height(this.real_splash_width):!i||this.giant_splash?Math.abs(this.splash_height||this.height):s?i[(e=this.activeColSize,Math.min.apply(Math,[e,t]))]||this.height:Math.abs(i[1]||this.height)},is_headline:function(){return this.headline?this.headline:this.preview||!1},is_author:function(){return!(!this.author_avatar&&!this.user_avatar)},is_body:function(){return this.body?this.body:this.preview||!1},has_more:function(){return/<hr>/.test(this.body)},vine_video:function(){return"video"===this.type&&/vine\.co/.test(this.video)},slideshowCount:function(){return this.slideshow&&!!this.slideshow.slides.length||!1},is_slideshow_slider:function(){return 0===this.slideshow_type},is_slideshow_list:function(){return 1===this.slideshow_type},is_slide_image:function(){return 0===this.type},is_slide_video:function(){return 1===this.type},is_slide_tweet:function(){return 2===this.type},get_share_text:function(){if(this.alternate_headline_in_use)return this.share_headline;if(this.og_title)return this.og_title;var e="";return i.isEmpty(this.headline)?i.isEmpty(this.body)?i.isEmpty(this.twitter_headline)||(e=c.removeTags(this.twitter_headline)):e=this.body:e=this.headline,e},postLink:function(){return c.postLink.apply(this,arguments)},share_url:function(){var e=c.postLink.apply(this,arguments);return!!e&&encodeURIComponent(e)},email_body:function(){var e=decodeURIComponent(this.share_url()||""),t=(a.getTemplateVars().email_intro||"Hey, found this on RebelMouse and thought you would like it:")+" ",i=(/\?/.test(e)?"&":"?")+"xrs=RebelMouse_email",s=t+" \r\n"+decodeURIComponent(this.share_url()||"")+i+"\r\n"+(this.body&&this.body.replace(/(<([^>]+)>)/gi,"").replace(/[^\w\s]/gi,"")||"");return encodeURIComponent(s.length>350?s.substr(0,350)+"...":s)},hashtags:function(){if(!this.headline&&!this.twitter_headline||n.site.twitter_share_template)return!1;var e=c.decodeText(this.twitter_headline)||this.headline,t=s.trim(e).split(" "),i=[],o=0;if(!t.length)return!1;for(;o<t.length;o++)t[o].match(/^#(\w+)$/)&&i.push(RegExp.$1);return i.join(",")||!1},tw_share_headline:function(){var e=c.decodeText(this.get_share_text()),t=new RegExp("#([^\\s]*)","g");return this.is_frozen&&(e="Highlight: "+e),e=n.site.twitter_share_template?r.compile(n.site.twitter_share_template).render(this):e.replace("'","'").replace(t,"").replace(/\s+(?= )/g,""),encodeURIComponent(e)},tweetText:function(){return function(e,t){return c.tweetText(t(e))}},via:function(){if(n.site.twitter_share_template||!n.site.providers)return!1;var e=n.site.owner_id===n.user.id,t=n.providers.twitter.user_name,i=n.site.owner_data&&n.site.owner_data.twitter_name||"";if(!e&&i&&!/RebelMouse/.test(i)&&this.is_custom_post)return encodeURIComponent(i+"'s rebelmouse");if(!e&&this.is_tw_post){if(t&&t===this.author_screen_name)return encodeURIComponent(t+"'s rebelmouse");if(this.author_screen_name)return encodeURIComponent(this.author_screen_name)}if(e&&t&&"rebelmouse"!==t.toLowerCase()){if(!this.is_tw_post)return"RebelMouse";if(t===this.author_screen_name)return"RebelMouse";if(this.author_screen_name)return encodeURIComponent(this.author_screen_name)}return"RebelMouse"},via_share:function(){var e=n.site.owner_id===n.user.id,t=n.site.owner_data;if(!e&&t&&this.is_custom_post)return t.twitter_name+"'s rebelmouse";if(!e&&this.is_tw_post){if(t&&t.twitter_name===this.author_screen_name)return t.twitter_name+"'s rebelmouse";if(this.author_screen_name)return this.author_screen_name}if(e&&t&&t.twitter_name&&"rebelmouse"!==t.twitter_name.toLowerCase()){if(!this.is_tw_post)return"RebelMouse";if(t.twitter_name===this.author_screen_name)return"RebelMouse";if(this.author_screen_name)return this.author_screen_name}return"RebelMouse"},share_headline_helper:function(){var e=this.get_share_text();return encodeURIComponent(e).replace(/'/g,"%27")},share_image:function(){return"slideshow"===this.type&&this.slideshowCount()?this.slideshow.slides&&encodeURIComponent(this.slideshow.slides[0].image210x)||"":encodeURIComponent(this.image600x||this.image300x||this.image210x||"")},image_thumb:function(){return this.splash||this.giant_splash?this.image980x||this.image||!1:(c.is_mobile||this.use_300x_image?this.image300x:this.image210x)||this.image980x||this.image||!1},resized_height:function(){var e=0;return this.width>720?(e=this.width/720,parseInt(this.height/e,10)):this.height},slide_thumbnail:function(){return this.image35x35||this.image210x||this.image980x||!1},slide_image:function(){var e=this.slideshow.slides,t=this.slideshow.active_slide||0;return e[t].image980x||e[t].image||!1},slide_thumb:function(){var e=this.slide_210x||"/static/img/bg/transparent.gif";return this.use_300x_image&&this.slide_300x||e},slide_caption:function(){var e=this.slideshow.slides;return e[e[this.active_slide]&&this.active_slide||0].caption||!1},slide_video:function(){return this.video||!1},published_by:function(){return!!this._is_river&&!(this.author_screen_name&&this.author_screen_name.toLowerCase()===this._site_name.toLowerCase()||this.author_name&&this.author_name.toLowerCase()===this._site_name.toLowerCase())},can_show_hover_card:function(){return c.hasHeadline(this)||this.show_image},can_show_hover_card_headline:function(){return c.getHeadline(this)||!1},post_headline:function(){return c.getHeadline(this)},frozen_until:function(){var e=this.unfreeze_at&&this.unfreeze_at[this.subpageId?this.subpageId:0];return i.isUndefined(e)?"until you unfreeze it":"for next "+c.format_date_until(e)},formated_created_ts:function(){return c.pretty_date(this.created_ts)},formated_full_created_ts:function(){return c.format_full_date(this.created_ts)},twitter_formated_date:function(){return this.twitter_info&&c.pretty_date(this.twitter_info.date_ts)||c.pretty_date(this.created_ts)},post_timestamp:function(){var e=new Date(1e3*this.created_ts),t=(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours()),i=e.getMinutes();e.getSeconds();function s(e){return e<10?"0"+e:e}return s(t)+":"+s(i)},post_datestamp:function(){var e=new Date(1e3*this.created_ts),t=e.getFullYear(),i=e.getMonth()+1,s=e.getDate();e.getHours(),e.getMinutes(),e.getSeconds();function n(e){return e<10?"0"+e:e}return t+"/"+n(i)+"/"+n(s)}},parse_url:function(e){var t=document.createElement("a");return t.href=e,this.browser().msie&&9==+this.browser().version&&(t.href=t.href),{source:e,site:[t.protocol,"//",t.hostname].join(""),protocol:t.protocol.replace(":",""),host:t.hostname,port:t.port,origin:t.protocol+"//"+t.hostname+"/"+t.pathname.replace(/^\//,""),query:t.search,params:function(){for(var e,i={},s=t.search.replace(/^\?/,"").split("&"),n=s.length,o=0;o<n;o++)s[o]&&(i[(e=s[o].split("="))[0]]=e[1]);return i}(),file:(t.pathname.match(/\/([^\/?#]+)$/i)||["",""])[1],hash:t.hash.replace("#",""),path:t.pathname.replace(/^([^\/])/,"/$1"),relative:(t.href.match(/tps?:\/\/[^\/]+(.+)/)||["",""])[1],segments:t.pathname.replace(/^\//,"").split("/")}},setEndOfContenteditable:function(e){var t,i;document.createRange?((t=document.createRange()).selectNodeContents(e),t.collapse(!1),(i=window.getSelection()).removeAllRanges(),i.addRange(t)):document.selection&&((t=document.body.createTextRange()).moveToElementText(e),t.collapse(!1),t.select())},pretty_date:function(e){var t=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],i=new Date,s=Math.round(i.getTime()/1e3),n=new Date(1e3*e),o=Math.round(s-e);return 0!==Math.floor(o/86400)?i.getFullYear()===n.getFullYear()?n.getDate()+" "+t[n.getMonth()]:n.getDate()+" "+t[n.getMonth()]+" "+n.getFullYear():o<10?"just now":o<60?o+" seconds ago":o<120?"a minute ago":o<3600?Math.floor(o/60)+" minutes ago":o<7200?"an hour ago":o<86400?Math.floor(o/3600)+" hours ago":void 0},pretty_date_new:function(e,t){var i=t?new Date(t):new Date,s=Math.round(i.getTime()/1e3),n=new Date(1e3*e),o=Math.round(s-e);return 0!==Math.floor(o/86400)?i.getFullYear()===n.getFullYear()?this.zeroPrefix(n.getMonth()+1)+"/"+this.zeroPrefix(n.getDate()):this.zeroPrefix(n.getMonth()+1)+"/"+this.zeroPrefix(n.getDate())+"/"+n.getFullYear():o<10?"just now":o<60?o+" seconds ago":o<120?"a minute ago":o<3600?Math.floor(o/60)+" minutes ago":o<7200?"an hour ago":o<86400?Math.floor(o/3600)+" hours ago":void 0},getDayDifference:function(e){var t=+new Date,i=1e3*e;return Math.floor((t-i)/864e5)},format_date_until:function(e){var t,i,s=Math.round(e-+new Date/1e3);function n(e){return 1===parseInt(e,10)?"":"s"}return s<60?s+" second"+n(s):s<3600?(t=Math.floor(s/60))+" minute"+n(t):s<86400?(i=Math.floor(s/60/60))+" hour"+n(i):s},format_date:function(e){var t,i,s=Math.round((new Date).getTime()/1e3)-e,n=new Date(1e3*e),o=new Array("January","February","March","April","May","June","July","August","September","October","November","December");function r(e){return 1===parseInt(e,10)?"":"s"}return s<60?s+" second"+r(s)+" ago":s<3600?(t=Math.floor(s/60))+" minute"+r(t)+" ago":s<86400?(i=Math.floor(s/60/60))+" hour"+r(i)+" ago":s>86400?n.getFullYear()!==(new Date).getFullYear()?n.getDate()+" "+o[n.getMonth()].substr(0,3)+" "+n.getFullYear():n.getDate()+" "+o[n.getMonth()].substr(0,3):s},format_full_date:function(e){Math.round((new Date).getTime()/1e3);var t=new Date(1e3*e),i=["January","February","March","April","May","June","July","August","September","October","November","December"];function s(e){return e<10?"0"+e:e}return n.is_whitelabel_site?i[t.getMonth()]+" "+s(t.getDate())+", "+t.getFullYear():s(t.getDate())+" "+i[t.getMonth()]+" "+t.getFullYear()},zeroPrefix:function(e){return e<10?"0"+e:e},medianToFull:function(e){if(/am|pm/gi.test(e)){var t=i.map(e.split(":"),function(e){return parseInt(e,10)}),s=/am/gi.test(e)?12===t[0]?0:t[0]:12===t[0]?t[0]:t[0]+12;return"%s:%s:00".format(this.zeroPrefix(s),this.zeroPrefix(t[1]))}return e},fullToMedian:function(e){var t=i.map(e.split(":"),function(e){return parseInt(e,10)}),s=t[0]<12,n=t[0]%12;return"%s:%s %s".format(this.zeroPrefix(n||12),this.zeroPrefix(t[1]),s?"AM":"PM")},scheduledToDate:function(e){var t;if(i.isString(e)){var s=i.map(e.split(/[\:\-\s]/g),function(e){return+e});t=new Date(s[0],s[1]-1,s[2],s[3],s[4])}else t=i.isNumber(e)?new Date(1e3*e):new Date;return{year:t.getFullYear(),month:this.zeroPrefix(t.getMonth()+1),day:this.zeroPrefix(t.getDate()),hours:this.zeroPrefix(t.getHours()),minutes:this.zeroPrefix(t.getMinutes())}},is_valid_email:function(e){return/^((([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))$/i.test(e)},is_valid_url:function(e){return new RegExp("^(?:(?:https?|ftp)://)(?:\\S+(?::\\S*)?@)?(?:(?!(?:10|127)(?:\\.\\d{1,3}){3})(?!(?:169\\.254|192\\.168)(?:\\.\\d{1,3}){2})(?!172\\.(?:1[6-9]|2\\d|3[0-1])(?:\\.\\d{1,3}){2})(?:[1-9]\\d?|1\\d\\d|2[01]\\d|22[0-3])(?:\\.(?:1?\\d{1,2}|2[0-4]\\d|25[0-5])){2}(?:\\.(?:[1-9]\\d?|1\\d\\d|2[0-4]\\d|25[0-4]))|(?:(?:[a-z\\u00a1-\\uffff0-9]-*)*[a-z\\u00a1-\\uffff0-9]+)(?:\\.(?:[a-z\\u00a1-\\uffff0-9]-*)*[a-z\\u00a1-\\uffff0-9]+)*(?:\\.(?:[a-z\\u00a1-\\uffff]{2,})))(?::\\d{2,5})?(?:/\\S*)?$","i").test(e)},url_pattern:/^https?:\/\/(((([a-zA-Z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-zA-Z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-zA-Z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-zA-Z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-zA-Z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-zA-Z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-zA-Z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-zA-Z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-zA-Z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-zA-Z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-zA-Z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-zA-Z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(\#((([a-zA-Z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i,template_pattern:function(e){var t=e.toString();return t.substr(1,t.length-3)},localeString:function(e,t,i){var s,n,o=(""+e).split("."),r="";for(t||(t=","),i||0===i||(i=3),s=o[0].length;s>i;)n=s-i,r=t+o[0].slice(n,s)+r,s=n;return r=o[0].slice(0,s)+r,o[0]=r,o.join(".")},makeHttpsUrl:function(e){return e.replace(/^https?:\/\//i,"https://")},getXhrErrorMessage:function(e,t){var i=t||"Error has occured",s=!1;if(e&&0===e.readyState&&(i=t||"Connection error"),!e||!e.status)return i;try{s=JSON.parse(e.responseText)}catch(e){s=!1}return e.statusText&&(i=e.statusText),s&&(s.error||s.message)&&(i=s.error&&s.error.message||s.error||s.message),i},isSiteEnterprise:function(){return!(!n.site||!n.site.paid_features)&&n.site.paid_features.enterprise},hasFlash:function(){var e=!1;try{new window.ActiveXObject("ShockwaveFlash.ShockwaveFlash")&&(e=!0)}catch(t){void 0!==navigator.mimeTypes["application/x-shockwave-flash"]&&(e=!0)}return e},isDraftPreview:function(){return/\preview=true/.test(window.location.search)},isNewAPI:function(){return l.get("use_roar_posts_api")},isIframe:function(){try{return window.self!==window.top}catch(e){return!0}}};return c}),rblms.define("widgets/models/subpage",["require","underscore","backbone","utils"],function(e){var t=e("underscore"),i=e("backbone"),s=e("utils");return i.Model.extend({defaults:{site_id:0,title:"",parent_id:0,about_html:"",tags:[],url:"",runner_template:"Default",full_url:null,domain:null,status:0,type:0,order:0,page_settings:{},is_supersection:0,uniqId:function(){return+new Date}},url:function(){return(t.isFunction(this.collection.url)?this.collection.url():this.collection.url)+"/"+this.get("site_id")+(this.id?"/"+this.id:"")},urlRoot:function(){return"/core/feeds/site/subpages/"+this.get("site_id")},makeUrlFromTitle:function(e){return(void 0===e?this.get("title"):e).replace(/\s/g,"-").replace(/[^\w\-]/g,"")},filterTitle:function(e){return e.replace(/[\@\#]/g,"")},makeModelFromTag:function(e,t){for(var i,s=this.filterTitle(e),n=0;n<100;n++)if(i=n?s+n:s,!t.find(function(e){return e.get("title").toLowerCase()===i.toLowerCase()})){s=i;break}return{tags:[e],title:s,url:this.makeUrlFromTitle(s)}},validate:function(e,t){var i=this.get("is_supersection");if(t&&t.changes){if(2===e.type&&e.url.length&&!s.is_valid_url(e.url))return{message:"Invalid URL for direct link",errorClass:"error-url",focusTo:".link-out-url-input"};if(e.title.length<2)return{message:"Page name should be at least 2 chars long"};var n=this.get("url");return n&&(e.url=n),i||null!==e.url?!i&&e.url.length<1?1===this.get("type")?{message:"Page URL should be at least 1 char long",errorClass:"error-url",focusTo:".autocomplete-input"}:{message:"Page URL should be at least 1 chars long",errorClass:"error-url"}:e.url_header_image&&!s.is_valid_url(e.url_header_image)?{message:"invalid image URL for custom header",errorClass:"error-header-url",focusTo:".header-image"}:!i&&this.collection.find(function(t){return t.cid!==this.cid&&t.get("url")&&t.get("url").toLowerCase()===e.url.toLowerCase()&&(t.get("parent_id")||0)===(e.parent_id||0)},this)?{message:"A page with this URL already exists"}:void 0:{message:"Site not found",errorClass:"error-url",focusTo:".autocomplete-input"}}},getTitle:function(){return this.get("title")},getStatusId:function(){return this.get("status")},setStatusId:function(e){return this.set({status:+e})}})}),rblms.define("widgets/collections/subpages_tree",["require","backbone","underscore","settings","widgets/models/subpage"],function(e){var t=e("backbone"),i=e("underscore"),s=e("settings"),n=s.user&&s.user.is_autorized,o=e("widgets/models/subpage");return t.Collection.extend({model:o,url:function(){return n?"/core/feeds/sections/tree/":"/core/feeds/sections/public/tree/"},getSuperSectionsList:function(){return i.filter(this.toJSON(),function(e){return e.is_supersection})},hasSuperSections:function(){return!!this.getSuperSectionsList().length},getSectionsList:function(){var e;return e=e=i.filter(this.toJSON(),function(e){return 0===e.parent_id&&!e.is_supersection}),this._getSectionsTree(e)},_getSectionsTree:function(e,t){var s=[],n=this;return i.each(e,function(e){s.push(e),e.subpages&&e.subpages.length&&(s=s.concat(n._getSectionsTree(e.subpages,t)))}),s},getSectionsListByParentIds:function(e){var t;return i.isArray(e)||(e=[e]),t=i.filter(this.toJSON(),function(t){return-1!==i.indexOf(e,t.id)&&t.subpages.length}),i.flatten(i.pluck(t,"subpages")).concat(t)}})}),rblms.define("core/stats/data_storage/sections_request",["require","widgets/collections/subpages_tree","settings"],function(e){var t,i,s=e("widgets/collections/subpages_tree"),n=e("settings"),o={init:function(){t=new s,o.initRequest()},onReady:function(e){!1!==i?i.done(function(t){e(o.getData())}):e(o.getData())},initRequest:function(){i=!!o.getSuperSectionId()&&o.getRequest()},getRequest:function(e){return void 0!==i?i:t.fetch(e)},getSuperSectionId:function(){return n.current_supersection_id},getData:function(){return t.toJSON()},getIdsByParents:function(e){return(t.getSectionsListByParentIds(e)||[]).map(function(e){return e.id})}};return o.init(),o}),rblms.define("core/stats/data_adapters/data",["require","settings","utils/device","core/stats/data_storage/sections_request"],function(e){var t,i=e("settings"),s=e("utils/device"),n=i.current_supersection_id;n&&(t=e("core/stats/data_storage/sections_request"));return function(){this.site=i.site,this.ignoreSuperSections=!n,this.sectionsRequest=t,this.getData=function(){return this.getBaseData()},this.getBaseData=function(){return{site_id:this.getSiteId(),roar_id:this.getRoarId(),client:this.getClient()}},this.getSiteId=function(){return this.site.id},this.getRoarId=function(){return this.isRoarSite()?this.site.id:this.isRoarSubSite()?this.site.parent_id:this.getWhitelabelSettingsSiteId()},this.isRoarSite=function(){return this.site.is_roar},this.isRoarSubSite=function(){return this.site.is_roar_subsite},this.getWhitelabelSettingsSiteId=function(){return this.site.whitelabel_settings&&this.site.whitelabel_settings.site_id},this.getClient=function(){return s.desktop?"desktop":s.isMobile?"mobile":"other"},this.getSuperSectionId=function(){return i.current_supersection_id},this.getActivePageId=function(){return this.site.activePage&&this.site.activePage.id||0},this.getReferrer=function(){return document.referrer||""}}}),rblms.define("core/stats/data_adapters/page",["require","underscore","settings","core/stats/data_storage/current_post_page","core/stats/data_adapters/data"],function(e){var t=e("underscore"),i=e("settings"),s=e("core/stats/data_storage/current_post_page"),n=e("core/stats/data_adapters/data"),o=null,r=function(){this.shortType=i.page_type,this.shortTypeMap={dp:"post",pp:"post",article:"post",fp:"section",sp:"section",website:"section",tp:"tag"},this.setPostObject=function(e){o=t.clone(e)},this.getPostObject=function(){var e=s.getPost();return o&&o.id===e.id||this.setPostObject(e),o},this.getFullPageTypeName=function(){return this.shortTypeMap[this.shortType]||"public"},this.typeName=this.getFullPageTypeName(),this.isValidPageType=function(){return!!this.typeName},this.isPostPage=function(){return"pp"===this.shortType||"dp"===this.shortType},this.getPageSpecificData=function(){switch(this.shortType){case"pp":case"dp":return this.getPostObjData();case"tp":return this.getTagPageViewData()}return{section_id:this.getSubpageId(),sections:this.getNotPostPageSectionIds()}},this.getSubpageId=function(){return i.current_supersection_id?-i.current_supersection_id:this.getActivePageId()},this.getPostObjData=function(e){var i=t.clone(e)||this.getPostObject();return{post_id:i.id,provider_id:i.provider_id,sections:this.getPostPageSectionsId(i)}},this.getTagPageViewData=function(){return{tag:this.getTagFromResourceId(),sections:this.getNotPostPageSectionIds()}},this.getTagFromResourceId=function(){return i.resource_id.split("_").slice(1).join("_")},this.getPostPageSectionsId=function(e){var i,s,n=this.getSuperSectionId(),o=e||this.getPostObject();if(o&&o.id)return i=o.subpages.slice(0),s=o.supersection_ids,n&&i.push(-n),this.ignoreSuperSections?t.uniq(i):(s&&s.length&&(i=t.intersection(this.sectionsRequest.getIdsByParents(s),i)).push(-n),t.uniq(i))},this.getNotPostPageSectionIds=function(){var e=[],i=this.getSuperSectionId(),s=this.getActivePageId();return i&&e.push(-i),i&&0===this.getActivePageId()?e.push(i):e.push(s),t.uniq(e)},this.getPostPageClickData=function(e){var i=t.clone(e)||this.getPostObject();return!(!i||!i.id)&&t.extend(this.getBaseData(),{post_id:i.id,provider_id:i.provider_id,sections:this.getPostPageSectionsId(i)})},this.getViewDurationData=function(){return t.extend(this.getBaseData(),this.getPageSpecificData())},this.getData=function(){return t.extend(this.getBaseData(),this.getPageSpecificData(),{referrer:this.getReferrer()})},this.getPostPageViewData=function(e){return t.extend(this.getBaseData(),this.getPostObjData(e),{buckets:this.getBuckets(e),referrer:this.getReferrer()})},this.getReferrer=function(e){return e||(i.widget_settings&&i.widget_settings.referrer?decodeURIComponent(i.widget_settings.referrer):window.location!==window.parent.location?decodeURIComponent(document.referrer):i.widget_settings?document.location.href:document.referrer)},this.getBuckets=function(e){return(e||this.getPostObject()).buckets}};return(r.prototype=new n).constructor=r,r}),rblms.define("core/stats/trackers/page_view",["require","core/stats/trackers/base","core/stats/data_adapters/page"],function(e){var t=e("core/stats/trackers/base"),i=e("core/stats/data_adapters/page"),s=function(){this.events={"page:shown":"trackPageView","post_page:shown":"trackPostPageView"},this.trackPageView=function(){var e=new i;if(!e.isValidPageType())return!1;this.saveActionData(e.getFullPageTypeName()+"-page-view",e.getData())},this.trackPostPageView=function(e){var t=new i;t.setPostObject(e),this.saveActionData("post-page-view",t.getPostPageViewData(e))},this.init()};return(s.prototype=new t).constructor=s,s}),rblms.define("core/stats/trackers/email_subscribe",["require","core/stats/trackers/base","core/stats/data_adapters/page"],function(e){var t=e("core/stats/trackers/base"),i=e("core/stats/data_adapters/page"),s=function(){this.events={"email:subscribed":"trackEmailSubscribed"},this.trackEmailSubscribed=function(){var e=new i;if(!e.isValidPageType())return!1;this.saveActionData(e.getFullPageTypeName()+"-page-subscribe",e.getData())},this.init()};return(s.prototype=new t).constructor=s,s}),rblms.define("core/stats/data_adapters/post",["require","underscore","core/stats/data_adapters/data"],function(e){var t=e("underscore"),i=e("core/stats/data_adapters/data"),s=function(e){this.post=e,this.getPostId=function(){return this.post.id},this.getProviderId=function(){return this.post.provider_id},this.getSectionsIds=function(){var e,i,s=this.getSuperSectionId();return s?(e=(e=[-s]).concat(this.post.subpages),this.ignoreSuperSections?t.uniq(e):((i=this.post.supersection_ids)&&i.length&&(e=t.intersection(this.sectionsRequest.getIdsByParents(i),e)).push(-s),t.uniq(e))):this.post.subpages},this.setCtaType=function(e){this.ctaType=e},this.getCtaType=function(){return this.ctaType},this.getCtaData=function(){return t.extend(this.getData(),{cta_type:this.getCtaType()})},this.getMouseOverData=function(){return t.extend(this.getData(),{duration:this.getDuration()})},this.getDuration=function(){return this.convertDuration(this.post.duration)},this.convertDuration=function(e){return e||(e=1),(e=parseInt(e))>3e4&&(e=3e4),e},this.getPostPageData=function(){return t.extend(this.getData(),{buckets:this.getBuckets(),referrer:this.getReferrer()})},this.getData=function(){return t.extend(this.getBaseData(),{post_id:this.getPostId(),provider_id:this.getProviderId(),sections:this.getSectionsIds()})},this.getBuckets=function(){return this.post.buckets}};return(s.prototype=new i).constructor=s,s}),rblms.define("core/stats/data_adapters/user_page_view",["require","underscore","core/stats/data_adapters/post","core/stats/data_adapters/data"],function(e){var t=e("underscore"),i=e("core/stats/data_adapters/post"),s=e("core/stats/data_adapters/data"),n=function(e,s){this.user=e,this.postData,s&&(this.postData=new i(s)),this.getUserTrackingId=function(){return this.user.user_tracking_id},this.getPostData=function(){return this.postData?{post_id:this.postData.getPostId(),sections:this.postData.getSectionsIds()}:{}},this.getData=function(){return t.extend(this.getBaseData(),this.getPostData(),{user_tracking_id:this.getUserTrackingId()})}};return(n.prototype=new s).constructor=n,n}),rblms.define("core/stats/trackers/user_tracking_activity",["require","core/stats/trackers/base","core/stats/data_adapters/user_page_view"],function(e){var t=e("core/stats/trackers/base"),i=e("core/stats/data_adapters/user_page_view"),s=function(){this.events={"user:page:visited":"trackUserVisitedPage"},this.trackUserVisitedPage=function(e,t){var s=new i(e,t);this.saveActionData("page-view",s.getData())},this.init()};return(s.prototype=new t).constructor=s,s}),rblms.define("core/stats/data_adapters/share_post",["require","underscore","core/stats/data_adapters/post","core/stats/data_adapters/data"],function(e){var t=e("underscore"),i=e("core/stats/data_adapters/post"),s=e("core/stats/data_adapters/data"),n=function(e,s){this.target=s,this.subject=e,this.postDataAdapter=new i(e),this.getTarget=function(){return this.target},this.setIsCta=function(e){this.is_cta=e},this.getIsCta=function(){return!!this.is_cta},this.getData=function(){return t.extend({target:this.getTarget(),is_cta:+this.getIsCta()},this.postDataAdapter.getData())}};return(n.prototype=new s).constructor=n,n}),rblms.define("core/stats/data_adapters/post_list",["require","bootstrap","underscore","core/stats/data_adapters/data"],function(e){var t=e("bootstrap"),i=e("underscore"),s=e("core/stats/data_adapters/data"),n=function(e){this.posts=e,this.getSections=function(){var e,s=[],n=t.post,o=this.getSuperSectionId(),r=this.getActivePageId();return o&&(s=[-o]),n&&(s=s.concat(n.subpages)),o&&n&&(e=n.supersection_ids)&&e.length&&(s=i.intersection(this.sectionsRequest.getIdsByParents(e),s)).push(-o),o&&0===r?s.push(o):s.push(r),i.uniq(s)},this.getPostsData=function(){return i.map(this.posts,function(e){return{post_id:e.id,provider_id:e.provider_id}})},this.getData=function(){return i.extend(this.getBaseData(),{posts:this.getPostsData(),sections:this.getSections()})}};return(n.prototype=new s).constructor=n,n}),rblms.define("core/stats/trackers/posts",["require","underscore","core/stats/trackers/base","core/app_engine","core/stats/data_adapters/share_post","core/stats/data_adapters/page","core/stats/data_adapters/post","core/stats/data_adapters/post_list"],function(e){var t=e("underscore"),i=e("core/stats/trackers/base"),s=e("core/app_engine"),n=e("core/stats/data_adapters/share_post"),o=e("core/stats/data_adapters/page"),r=e("core/stats/data_adapters/post"),a=e("core/stats/data_adapters/post_list"),l=function(){this.events={"cta_post:clicked":"trackCtaPostClick","post_card:clicked":"trackPostCardClick","post:liked":"trackInternalLike","post:commented":"trackInternalComment","post:share":"trackPostExtShare","post:mouse_leave":"trackPostMouseLeave","post:resticked":"trackInternalRestick","posts:shown":"trackPostListShow"},this.trackPostCardClick=function(e){var t;if("axios"===s.get("iden"))return this.trackPostPageClick(e);t=new r(e),this.saveActionData("post-card-click",t.getData())},this.trackPostPageClick=function(e){var t=new o(e);this.saveActionData("post-page-click",t.getPostPageClickData(e))},this.trackInternalLike=function(e){var t=new r(e);this.saveActionData("post-int-like",t.getData())},this.trackInternalComment=function(e){var t=new r(e);this.saveActionData("post-int-comment",t.getData())},this.trackCtaPostClick=function(e,t){var i=new r(t);i.setCtaType(e),this.saveActionData("post-cta-click",i.getCtaData())},this.trackPostMouseLeave=function(e,i){var s=new r(t.extend(e,{duration:i}));this.saveActionData("post-mouse-over",s.getMouseOverData())},this.trackPostListShow=function(e){if(e.length){var t=new a(e);this.saveActionData("batch-post-card-view",t.getData())}},this.trackPostExtShare=function(e,t,i){var s=new n(e,t);i&&"cta"===i&&s.setIsCta(!0),this.saveActionData("post-ext-share",s.getData())},this.trackInternalRestick=function(e){var t=new r(e);this.saveActionData("post-int-restick",t.getData())},this.init()};return(l.prototype=new i).constructor=l,l}),rblms.define("core/split_testing/campaign_types",[],function(){return{POST_SOCIAL:"post-social",POST_TEASER:"post-teaser"}}),rblms.define("core/split_testing/models/campaign",["require","backbone","underscore","core/split_testing/campaign_types","moment"],function(e){var t=e("backbone"),i=e("underscore"),s=e("core/split_testing/campaign_types"),n=e("moment"),o=["entity_id","type"];return t.Model.extend({defaults:{entity_id:null,hypotheses:null,info:null,started_at:null,status:null,stopped_at:null,type:null},initialize:function(){this.hasRequiredAttributes()||this.unset("status",{silent:!0})},addHypothesis:function(e){var t=this.getHypotheses();t.push(e),this.setHypotheses(t)},getHypotheses:function(){return this.get("hypotheses")||[]},setHypotheses:function(e){this.set({hypotheses:e})},removeHypothesis:function(e){return!this.hasHypothesis(e)||!this.isStarted()&&!this.isStopped()&&(this.setHypotheses(i.without(this.getHypotheses(),e)),!0)},hasHypothesis:function(e){return this.getHypotheses().indexOf(e)>-1},setPostTeaserType:function(){this.set("type",s.POST_TEASER,{silent:!0})},setPostSocialType:function(){this.set("type",s.POST_SOCIAL,{silent:!0})},start:function(){this.hasRequiredAttributes()?this.set({status:"started",started_at:this.getUtcUnixNowTime(),stopped_at:null}):console.error("Not enough required attributes to start")},hasRequiredAttributes:function(){return!!this.id&&(!!this.getEntityId()&&!!this.hasEnoughHypothesesToStart())},getEntityId:function(){return this.get("entity_id")},hasEnoughHypothesesToStart:function(){return this.getHypotheses().length>1},stop:function(){this.isStarted()?this.set({status:"stopped",stopped_at:this.getUtcUnixNowTime()}):console.error("Campaign was not started")},getUtcUnixNowTime:function(){return n.utc().unix()},isStarted:function(){return"started"===this.get("status")},isStopped:function(){return"stopped"===this.get("status")},getStatusWithDates:function(){return{started:this.isStarted(),stopped:this.isStopped(),start_date:this.getStartDate(),start_time:this.getStartTime(),stop_time:this.getStopTime(),is_one_day_campaign:this.isOneDayCampaign()}},isOneDayCampaign:function(){return this.isStopped()&&this.getStartDate()===this.getStopDate()},getStartDate:function(){return this.getDateByKey("started_at")},getStopDate:function(){return this.getDateByKey("stopped_at")},getDateByKey:function(e){var t=this.get(e)&&this.get(e);return!!t&&this.formatDate(t)},getStartTime:function(){var e=this.get("started_at");return!!e&&this.formatTime(e)},getStopTime:function(){var e=this.get("stopped_at");return!!e&&this.formatTime(e)},formatDate:function(e){return this.isUnixTimestampFormat(e)&&(e*=1e3),n(e).format("M/D/YY")},formatTime:function(e){return this.isUnixTimestampFormat(e)&&(e*=1e3),n(e).format("h:mm a")},isUnixTimestampFormat:function(e){return 10===String(e).length},resetCampaign:function(e){var t;if(!e.id)throw new Error("No id specified");t=this.toJSON(),this.clear({silent:!0}).set(i.extend({id:e.id},i.pick(t,o)))},getType:function(){return this.get("type")}})}),rblms.define("core/split_testing/collections/campaigns",["require","backbone","core/split_testing/models/campaign"],function(e){var t=e("backbone"),i=e("core/split_testing/models/campaign");return t.Collection.extend({model:i,comparator:"order"})}),rblms.define("widgets/models/shorten_url",["require","backbone","settings"],function(e){var t=e("backbone"),i=e("settings");return t.Model.extend({defaults:{longUrl:null,url:null},urlRoot:function(){var e=encodeURIComponent(decodeURIComponent(this.get("longUrl")));return"/core/community/shorten_url/"+(i.site.parent_id||i.site.id)+"/?longUrl="+e}})}),rblms.define("core/split_testing/models/hypothesis",["require","backbone","widgets/models/shorten_url"],function(e){var t=e("backbone"),i=e("widgets/models/shorten_url");return t.Model.extend({defaults:{id:null,headline:null,order:null},initialize:function(){this.on("add",this.onAdd,this)},onAdd:function(e,t,i){(i=i||{})&&i.hasPermalink&&i.postUrl&&this.generatePermalinkAsync(i.postUrl)},generatePermalinkAsync:function(e){new i({longUrl:e+"?utm_campaign=post-social&utm_content="+this.id}).fetch({success:function(e){var t=e.get("url");this.setPermalink(t)}.bind(this)})},setPermalink:function(e){this.set("permalink",e)},getPermalink:function(){return this.get("permalink")}})}),rblms.define("core/split_testing/collections/hypotheses",["require","backbone","underscore","utils","core/split_testing/models/hypothesis"],function(e){var t=e("backbone"),i=e("underscore"),s=e("utils"),n=e("core/split_testing/models/hypothesis");return t.Collection.extend({model:n,defaultHypothesisText:"",comparator:"order",postUrl:null,initialize:function(e,t){(t=i.extend({},t)).defaultHypothesisText&&(this.defaultHypothesisText=t.defaultHypothesisText)},setPostUrl:function(e){this.postUrl=e},getPostUrl:function(){return this.postUrl||""},addTextHypothesis:function(e,t){return t=t||{},this.add({id:this.generateId(),order:+new Date,headline:s.decodeText(s.encodeHTMLTags(e))},i.extend({},t,{hasPermalink:!!t.postUrl,postUrl:t.postUrl}))},generateId:function(){return s.uid(8)},findHypothesisByHeadline:function(e){return this.findWhere({headline:e})}})}),rblms.define("core/split_testing/models/split_testing",["require","backbone","underscore","core/split_testing/campaign_types","core/split_testing/collections/campaigns","core/split_testing/models/campaign","core/split_testing/collections/hypotheses"],function(e){var t=e("backbone"),i=e("underscore"),s=e("core/split_testing/campaign_types"),n=e("core/split_testing/collections/campaigns"),o=e("core/split_testing/models/campaign"),r=e("core/split_testing/collections/hypotheses");return t.Model.extend({defaults:{campaigns:null,hypotheses:null},entity_id:null,initialize:function(e,t){var s;e=i.extend({},e),t=i.extend({},t),this.setEntityId(t.entity_id),this.setPostUrl(t.post_url),this.set({campaigns:new n,hypotheses:new r,last_campaign_id:0}),s=this.parsePostObjectFormat(e),this.setHypotheses(s.hypotheses),this.setCampaigns(s.campaigns),this.setLastCampaignId(s.lastCampaignId)},getPostTeaserCampaign:function(){return this.getCampaigns().findWhere({type:s.POST_TEASER})},getPostSocialCampaign:function(){return this.getCampaigns().findWhere({type:s.POST_SOCIAL})},getCurrentCampaign:function(){return this.getCampaignById(this.getCurrentCampaignId())},makePostTeaserCampaign:function(e){return this.makeCampaign(s.POST_TEASER,e)},makePostSocialCampaign:function(){return this.makeCampaign(s.POST_SOCIAL)},makeCampaign:function(e,t){t=t||{};var i,s=new o({id:this.generateCampaignId(),entity_id:this.getEntityId(),type:e});return t.headline&&(i=this.getHypotheses().addTextHypothesis(t.headline),s.addHypothesis(i.id)),this.addCampaign(s),s},getPostTeaserHypothesesMap:function(){return this.getCampaignHypothesesMap(s.POST_TEASER)},getPostSocialHypothesesMap:function(){return this.getCampaignHypothesesMap(s.POST_SOCIAL)},getCampaignHypothesesMap:function(e){var t=this.getCampaigns().findWhere({type:e}).getHypotheses();return this.getHypotheses().where(function(e){if(t.indexOf(e.id)>-1)return e})},parsePostObjectFormat:function(e){return{hypotheses:this.parseHypothesesFromPostObjectFormat(e.hypotheses),campaigns:this.parseCampaignsFromPostObjectFormat(e.campaigns),lastCampaignId:this.parseLastCampaignId(e)}},parseHypothesesFromPostObjectFormat:function(e){return i.map(e,function(e,t){return i.extend({id:t},e)})},parseCampaignsFromPostObjectFormat:function(e){return i.map(e,function(e,t){return e.entity_id||(e.entity_id=this.getEntityId()),this.campaignPostFormatToModelObject(e,t)}.bind(this))},parseLastCampaignId:function(e){var t=i.map(e.campaigns||{});return t.length?i.max(i.pluck(t,"id")):0},campaignPostFormatToModelObject:function(e,t){return i.extend({type:t,entity_id:this.getEntityId()},e)},setHypotheses:function(e){var i=this.getHypotheses();e instanceof t.Collection?i.set(e.models):i.reset(e)},removeHypothesisByHeadline:function(e){var t=this.findHypothesisByHeadline(e);t&&this.removeHypothesis(t.id)},findHypothesisByHeadline:function(e){return this.getHypotheses().findHypothesisByHeadline(e)},removeHypothesis:function(e){var t=this.getHypotheses(),i=!1;return this.getCampaigns().each(function(t){var s;s=t.removeHypothesis(e),i=i||!1===s}),!i&&(t.remove(e),!0)},setCampaigns:function(e){var t=this.getCampaigns();e instanceof n?t.set(e):t.reset(e)},importMixedCampaignObject:function(e){var t,s;(t=i.extend({},i.omit(e,"hypotheses"))).hypotheses=i.keys(e.hypotheses),s=this.parseHypothesesFromPostObjectFormat(e.hypotheses),this.addHypotheses(s),this.addCampaign(t)},addHypotheses:function(e){var i,s=this.getHypotheses();e instanceof t.Collection?s.add(e.models):(i=new t.Collection(e),s.add(i.models))},addCampaign:function(e){var t=this.getCampaigns(),i=t.findWhere({type:e.type});i&&t.remove(i),e instanceof o?t.add(e):t.add(this.campaignPostFormatToModelObject(e))},exportPostObjectFormat:function(){var e={hypotheses:{}};return i.each(this.getHypotheses().toJSON(),function(t){e.hypotheses[t.id]=i.omit(t,"id")}),e.campaigns={},i.each(this.getCampaigns().toJSON(),function(t){e.campaigns[t.type]=i.omit(t,"type")}),e},getCampaigns:function(){return this.get("campaigns")},getHypotheses:function(){return this.get("hypotheses")},generateCampaignId:function(){var e=this.getLastCampaignId()+1;return this.setLastCampaignId(e),e},getLastCampaignId:function(){var e=this.get("last_campaign_id");return e<0&&(e=0),e},setLastCampaignId:function(e){this.set("last_campaign_id",e)},generatePermalinksByCampaignType:function(e){var t=this.getCampaignHypothesesMap(e),s=this.getPostUrl();i.each(t,function(e){e.getPermalink()||e.generatePermalinkAsync(s)})},setPostUrl:function(e){this.post_url=e},getPostUrl:function(){return this.post_url},setEntityId:function(e){this.entity_id=e},getEntityId:function(){return this.entity_id},getCampaignById:function(e){return this.getCampaigns().get(e)},getCurrentCampaignId:function(){var e=this.get("current");return e&&e.campaign_id},getCurrentHypothesisId:function(){var e=this.get("current");return e&&e.hypothesis_id}})}),rblms.define("core/stats/data_adapters/post_split_testing",["require","underscore","core/stats/data_adapters/data","core/split_testing/models/split_testing"],function(e){var t=e("underscore"),i=e("core/stats/data_adapters/data"),s=e("core/split_testing/models/split_testing"),n=function(e){this.post=e,this.hasCampaignData=function(){var e=this.post.split_testing;return!!e&&(!!e.current&&!!e.current.campaign_id)},this.getHypotheses=function(){return(this.post.split_testing||{}).hypotheses},this.getData=function(){return this.getBasePostCampaignData()},this.getPostPageViewData=function(){var e=this.getBasePostCampaignData();return!!e&&t.extend(e,{referrer:this.getReferrer()})},this.getBasePostCampaignData=function(){var e,t=this.getCurrentCampaign();return!!t&&(e=this.getCurrentHypothesisId(),{domain:"split-testing",post_id:t.getEntityId(),campaign_id:t.id,hypothesis_id:e})},this.getCurrentCampaign=function(){return this.getAbnTest().getCurrentCampaign()},this.getCurrentHypothesisId=function(){return this.getAbnTest().getCurrentHypothesisId()},this.getAbnTest=function(){return this.abnTest||(this.abnTest=new s(this.getSplitTestingData(),{entity_id:this.post&&this.getPostId()})),this.abnTest},this.getSplitTestingData=function(){return this.post.split_testing},this.getPostId=function(){return this.post.id}};return(n.prototype=new i).constructor=n,n}),rblms.define("core/stats/data_adapters/post_split_testing_list",["require","underscore","core/stats/data_adapters/post_split_testing","core/stats/data_adapters/post_split_testing"],function(e){var t=e("underscore"),i=e("core/stats/data_adapters/post_split_testing"),s=e("core/stats/data_adapters/post_split_testing"),n=function(e){this.posts=e,this.getData=function(){var e=this.getPostsData();return!!e.length&&t.extend(this.getBaseData(),{domain:"split-testing",posts:e})},this.getPostsData=function(){var e=t.map(this.posts,function(e){var i=new s(e).getData();return!!i&&t.omit(i,"domain")},this);return t.compact(e)}};return(n.prototype=new i).constructor=n,n}),rblms.define("core/stats/data_adapters/post_split_testing_ext_share",["require","underscore","core/stats/data_adapters/post_split_testing"],function(e){var t=e("underscore"),i=e("core/stats/data_adapters/post_split_testing"),s=function(e,i){this.post=e,this.shareToTarget=i.toLowerCase(),this.getData=function(){var e=this.getCurrentCampaign(),i=this.getCurrentHypothesisId();return!(!e||!i)&&t.extend(this.getBasePostCampaignData(),{target:this.shareToTarget})}};return(s.prototype=new i).constructor=s,s}),rblms.define("core/stats/trackers/split_testing",["require","underscore","bootstrap","core/stats/trackers/base","core/stats/data_adapters/post_split_testing","core/stats/data_adapters/post_split_testing_list","core/stats/data_adapters/post_split_testing_ext_share"],function(e){var t=e("underscore"),i=e("bootstrap"),s=e("core/stats/trackers/base"),n=e("core/stats/data_adapters/post_split_testing"),o=e("core/stats/data_adapters/post_split_testing_list"),r=e("core/stats/data_adapters/post_split_testing_ext_share"),a=function(){this.events={"post_page:shown":"trackPostPageViewed","post_card:clicked":"trackPostCardClick","post:share":"trackPostExtShare","posts:shown":"trackPostListShow"},this.trackPostPageViewed=function(){var e;i.post&&(e=new n(i.post)).hasCampaignData()&&this.saveActionData("post-page-view",e.getPostPageViewData())},this.trackPostCardClick=function(e){var t;e.split_testing&&(t=new n(e),this.saveActionData("post-card-click",t.getData()))},this.trackPostListShow=function(e){var i,s;(i=t.filter(e,function(e){return e.split_testing})).length&&(s=new o(i),this.saveActionData("batch-post-card-view",s.getData()))},this.trackPostExtShare=function(e,t){var i;e.split_testing&&(i=new r(e,t),this.saveActionData("post-ext-share",i.getData()))},this.init()};return(a.prototype=new s).constructor=a,a}),rblms.define("core/stats/trackers/page_click",["require","jquery","core/stats/trackers/base","core/stats/data_adapters/page"],function(e){e("jquery");var t=e("core/stats/trackers/base"),i=e("core/stats/data_adapters/page"),s=function(){var e=new i;this.events={"post_page:clicked":"trackPostPageClick"},this.trackPostPageClick=function(t){e.setPostObject(t),this.saveActionData("post-page-click",e.getPostPageClickData())},this.init()};return(s.prototype=new t).constructor=s,s}),rblms.define("core/stats/trackers/time_on_page",["require","core/app_engine","core/stats/trackers/base","core/event_dispatcher","core/stats/data_adapters/page"],function(e){var t=e("core/app_engine"),i=e("core/stats/trackers/base"),s=e("core/event_dispatcher"),n=e("core/stats/data_adapters/page"),o=function(){this.MAX_TOTAL_DURATION=18e5,this.dataAdapter=new n,this.lastDuration=0,this.init=function(){s.on("time_on_page:spent",this.trackSpentTime,this)},this.trackSpentTime=function(e){if(!(e<=0||e>this.MAX_TOTAL_DURATION)){var i=this.dataAdapter.getViewDurationData(),s=this.dataAdapter.getFullPageTypeName();"axios"===t.get("iden")&&"post"===s||(i.duration=e-this.lastDuration,this.lastDuration=e,this.saveActionData(s+"-page-view-duration",i))}},this.init()};return(o.prototype=new i).constructor=o,o}),rblms.define("core/stats/trackers/time_on_post",["require","core/stats/trackers/base","core/event_dispatcher","core/stats/data_adapters/page"],function(e){var t=e("core/stats/trackers/base"),i=e("core/event_dispatcher"),s=e("core/stats/data_adapters/page"),n=function(){this.MAX_TOTAL_DURATION=18e5,this.dataAdapter=new s,this.lastDuration={},this.init=function(){i.on("time_on_post:spent",this.trackSpentTime,this)},this.trackSpentTime=function(e){if(e&&e.post&&e.duration&&!(e.duration<=0||e.duration>this.MAX_TOTAL_DURATION)){var t=this.dataAdapter.getPostPageViewData(e.post),i=this.lastDuration[e.post.id]||0;t.duration=e.duration-i,this.lastDuration[e.post.id]=i,this.saveActionData("post-page-view-duration",t)}},this.init()};return(n.prototype=new t).constructor=n,n}),rblms.define("core/stats/listeners/post_page_scroll",["require","core/event_dispatcher","core/stats/data_storage/current_post_page"],function(e){var t=e("core/event_dispatcher"),i=e("core/stats/data_storage/current_post_page");return function(){this.setCurrentPostPage=function(e){i.setPost(e)},t.on("post_page:scrolled",this.setCurrentPostPage,this)}}),rblms.define("core/stats/listeners/page_view",["require","core/event_dispatcher","core/app_engine","settings"],function(e){var t=e("core/event_dispatcher"),i="axios"!==e("core/app_engine").get("iden"),s=e("settings");return function(){this.pageType=s.page_type,this.isPostPage=function(){return"pp"===this.pageType||"dp"===this.pageType||"article"===this.pageType},this.init=function(){i&&(this.isPostPage()?t.trigger("post_page:shown"):t.trigger("page:shown"))},t.on("document:ready",this.init,this)}}),rblms.define("core/page_visibility",["require","underscore"],function(e){var t=e("underscore"),i=function(){var e=!1,i=function(e){};this.getIsHidden=function(){return e},this.setOnChangeListener=function(e){i=e};var s=function(s,n){return t.bind(function(){return i(e=n),s.apply(this,arguments)},this)};window.onblur=s(window.onblur,!1),window.onfocus=s(window.onfocus,!0)},s=function(e,t){var i=function(e){};this.getIsHidden=function(){return document[e]},this.setOnChangeListener=function(e){i=e},window.addEventListener(t,function(){i(document[e])})},n=function(){return void 0===window.addEventListener?new function(){var e=function(){};this.setOnCloseListener=function(t){e=t};var i=function(i){return t.bind(function(){return e(),i.apply(this,arguments)},this)};void 0===window.onbeforeunload?window.onbeforeunload=i(window.onbeforeunload):void 0===window.onunload&&(window.onunload=i(window.onunload))}:new function(){var e=function(){};this.setOnCloseListener=function(t){e=t},window.addEventListener("beforeunload",function(){e()})}};return function(){var e=void 0===window.addEventListener?new i:void 0!==document.hidden?new s("hidden","visibilitychange"):void 0!==document.mozHidden?new s("mozHidden","mozvisibilitychange"):void 0!==document.msHidden?new s("msHidden","msvisibilitychange"):void 0!==document.webkitHidden?new s("webkitHidden","webkitvisibilitychange"):new i,o=n(),r=[],a=[],l=[];this.getIsHidden=function(){return e.getIsHidden()},this.addOnHideListener=function(e){r.push(e)},this.addOnShowListener=function(e){a.push(e)},this.addOnCloseListener=function(e){l.push(e)};var c=function(e){t.each(e,function(e){e()})};e.setOnChangeListener(function(e){c(e?r:a)}),o.setOnCloseListener(function(){c(l)})}}),rblms.define("core/window_state_api",["require","jquery"],function(e){var t,i=e("jquery");return(t=function(){this.onBlurListener=null,this.onFocusListener=null}).prototype.hasFocus=function(){return document.hasFocus()},t.prototype.setOnBlurListener=function(e){var t=!!this.onBlurListener;this.onBlurListener=e,t||this.initBlurListener()},t.prototype.setOnFocusListener=function(e){var t=!!this.onFocusListener;this.onFocusListener=e,t||this.initFocusListener()},t.prototype.initBlurListener=function(){i(window).blur(function(){this.onBlurListener()}.bind(this))},t.prototype.initFocusListener=function(){i(window).focus(function(){this.onFocusListener&&this.onFocusListener()}.bind(this))},t}),rblms.define("core/precise_timer",[],function(){return function(e,t){var i,s,n;this.start=function(){n=0,s=a(),i=!1,window.setTimeout(o,t)},this.stop=function(){i=!0};var o=function(){n+=t,!i&&window.setTimeout(o,t-r()),e(n)},r=function(){return a()-s-n},a=function(){return(new Date).getTime()}}}),rblms.define("core/stats/listeners/time_on_page",["require","underscore","core/event_dispatcher","core/page_visibility","core/window_state_api","core/precise_timer"],function(e){var t=e("underscore"),i=e("core/event_dispatcher"),s=e("core/page_visibility"),n=e("core/window_state_api"),o=e("core/precise_timer");return function(){this.reversedReportTimeList=[1,3,8,18,38].reverse(),this.currentReportTimeIndex=null,this.isPageActive=null,this.elapsedDuration=0,this.currentDuration=0,this.timer=null,this.init=function(){var e,i,r=new s,a=new n;this.timer=new o(t.bind(this.tick,this),100),r.addOnShowListener(t.bind(this.onShowPage,this)),r.addOnHideListener(t.bind(this.onHidePage,this)),r.addOnCloseListener(t.bind(this.triggerSpentTime,this)),a.setOnBlurListener(t.bind(this.onBlurWindow,this)),a.setOnFocusListener(t.bind(this.onFocusWindow,this)),e=!r.getIsHidden(),i=a.hasFocus(),this.isPageActive=i&&e,this.isPageActive&&this.startTimer()},this.onShowPage=function(){this.isPageActive=!0,this.startTimer()},this.onHidePage=function(){this.isPageActive=!1,this.stopTimer()},this.onBlurWindow=function(){this.stopTimer()},this.onFocusWindow=function(){this.isPageActive&&this.startTimer()},this.startTimer=function(){this.resetReportTime(),this.timer.start()},this.stopTimer=function(){this.timer.stop(),this.triggerSpentTime(),this.collectCurrentDuration()},this.collectCurrentDuration=function(){this.elapsedDuration+=this.currentDuration,this.currentDuration=0},this.tick=function(e){this.currentDuration=e,this.isPageActive&&this.isTimeToReport()&&this.triggerSpentTime()},this.isTimeToReport=function(){var e=this.currentDuration/1e3;return this.isFinalReportTimePassed()?0==(e-this.getFinalReportTime())%30:e>=this.getCurrentReportTime()&&(this.increaseReportTime(),!0)},this.isFinalReportTimePassed=function(){return this.currentReportTimeIndex<0},this.getFinalReportTime=function(){return this.reversedReportTimeList[0]},this.getCurrentReportTime=function(){return this.reversedReportTimeList[this.currentReportTimeIndex]},this.resetReportTime=function(){this.currentReportTimeIndex=this.reversedReportTimeList.length-1},this.increaseReportTime=function(){this.currentReportTimeIndex-=1},this.triggerSpentTime=function(){i.trigger("time_on_page:spent",this.getTotalDuration())},this.getTotalDuration=function(){return this.elapsedDuration+this.currentDuration},this.init()}}),rblms.define("core/stats/listeners/page_click",["require","core/event_dispatcher"],function(e){var t=e("core/event_dispatcher");return function(){this.init=function(){document.querySelector("body").addEventListener("click",function(){t.trigger("post_page:clicked")})},t.on("document:ready",this.init,this)}}),rblms.define("core/stats/listeners/document_ready",["require","core/event_dispatcher"],function(e){var t=e("core/event_dispatcher");return function(){this.onDocumentReady=function(e){"loading"!==document.readyState?e():document.addEventListener("DOMContentLoaded",e)},this.onDocumentReady(function(){t.trigger("document:ready")})}}),rblms.define("core/stats/listeners/time_on_post",["require","underscore","core/event_dispatcher","core/page_visibility","core/precise_timer"],function(e){var t=e("underscore"),i=e("core/event_dispatcher"),s=e("core/page_visibility"),n=e("core/precise_timer"),o={},r=function(e){if(!e||!e.post)return null;this.post=e.post,this.reversedReportTimeList=[4,8,18,38].reverse(),this.currentReportTimeIndex=null,this.isPageActive=null,this.elapsedDuration=0,this.currentDuration=0,this.minDuration=e.minDuration||3,this.timer=null,this.init=function(){this.timer=new n(t.bind(this.tick,this),100);var e=new s;e.addOnShowListener(t.bind(this.onShowPage,this)),e.addOnHideListener(t.bind(this.onHidePage,this)),e.addOnCloseListener(t.bind(this.triggerSpentTime,this)),this.isPageActive=!e.getIsHidden(),this.isPageActive&&this.startTimer()},this.onShowPage=function(){this.isPageActive=!0,this.startTimer()},this.onHidePage=function(){this.isPageActive=!1,this.stopTimer()},this.startTimer=function(){this.resetReportTime(),this.timer.start()},this.stopTimer=function(){this.isStopped=!0,this.timer.stop(),this.elapsedDuration>this.minDuration&&this.triggerSpentTime(),this.collectCurrentDuration()},this.collectCurrentDuration=function(){this.elapsedDuration+=this.currentDuration,this.currentDuration=0},this.tick=function(e){this.currentDuration=e,o[this.post.id]&&this.isPageActive&&this.isTimeToReport()&&this.triggerSpentTime()},this.isTimeToReport=function(){var e=this.currentDuration/1e3;return!(e<this.minDuration)&&(this.isFinalReportTimePassed()?0==(e-this.getFinalReportTime())%30:e>=this.getCurrentReportTime()&&(this.increaseReportTime(),!0))},this.isFinalReportTimePassed=function(){return this.currentReportTimeIndex<0},this.getFinalReportTime=function(){return this.reversedReportTimeList[0]},this.getCurrentReportTime=function(){return this.reversedReportTimeList[this.currentReportTimeIndex]},this.resetReportTime=function(){this.currentReportTimeIndex=this.reversedReportTimeList.length-1},this.increaseReportTime=function(){this.currentReportTimeIndex-=1},this.triggerSpentTime=function(){this.isStopped||i.trigger("time_on_post:spent",{post:this.post,duration:this.getTotalDuration()})},this.getTotalDuration=function(){return this.elapsedDuration+this.currentDuration},this.init()};return function(){this.init=function(){i.on("post:inView",this.postInView),i.on("post:outOfView",this.postOutOfView)},this.postInView=function(e){var t;o[e.id]||(t=o[e.id]=new r({post:e}))&&(t.init(),t.startTimer())},this.postOutOfView=function(e){var t=o[e.id];t&&(t.stopTimer(),delete o[e.id])},this.init()}}),rblms.define("core/stats/tracker",["require","settings","core/stats/trackers/page_view","core/stats/trackers/email_subscribe","core/stats/trackers/user_tracking_activity","core/stats/trackers/posts","core/stats/trackers/split_testing","core/stats/trackers/page_click","core/stats/trackers/time_on_page","core/stats/trackers/time_on_post","core/stats/listeners/post_page_scroll","core/stats/listeners/page_view","core/stats/listeners/time_on_page","core/stats/listeners/page_click","core/stats/listeners/document_ready","core/stats/listeners/time_on_post","core/app_engine","core/stats/data_storage/sections_request"],function(e){var t,i,s=e("settings").current_supersection_id,n=e("core/stats/trackers/page_view"),o=e("core/stats/trackers/email_subscribe"),r=e("core/stats/trackers/user_tracking_activity"),a=e("core/stats/trackers/posts"),l=e("core/stats/trackers/split_testing"),c=e("core/stats/trackers/page_click"),d=e("core/stats/trackers/time_on_page"),u=e("core/stats/trackers/time_on_post"),h=e("core/stats/listeners/post_page_scroll"),p=e("core/stats/listeners/page_view"),g=e("core/stats/listeners/time_on_page"),f=e("core/stats/listeners/page_click"),m=e("core/stats/listeners/document_ready"),_=e("core/stats/listeners/time_on_post"),v=e("core/app_engine");return s&&(i=e("core/stats/data_storage/sections_request")),t={trackers:[],listeners:[],init:function(){var e="axios"!==v.get("iden");t.startTracker(d),t.startTracker(u),t.startListener(g),t.startTracker(n),t.startTracker(r),t.startTracker(a),t.startTracker(l),t.startTracker(c),t.startTracker(o),t.startListener(h),t.startListener(p),e&&t.startListener(f),t.startListener(m),t.startListener(_)},startTracker:function(e){t.trackers.push(new e)},startListener:function(e){t.listeners.push(new e)}},s?i.onReady(function(){t.init()}):t.init(),t}),rblms.define("social-ux/utils/htmlencoder",["require"],function(e){return{encodeHTMLTags:function(e){return e&&e.replace(/&/g,"&amp;").replace(/"/g,"&quot;").replace(/'/g,"&#39;").replace(/</g,"&lt;").replace(/>/g,"&gt;")||""},decodeHTMLTags:function(e){return e&&e.replace(/&amp\;/g,"&").replace(/&quot\;/g,'"').replace(/&\#39\;/g,"'").replace(/&lt\;/g,"<").replace(/&gt\;/g,">")||""},removeTags:function(e,t){return(t=t||{}).replaceBreakLineBySpace&&(e=this.replaceBreakLineBySpace(e)),(e+""||"").replace(/(<([^>]+)>)/gi,"")},replaceBreakLineBySpace:function(e){return(e||"").replace(/<br?>/gi," ")}}}),rblms.define("social-ux/view/informer",["require","jquery","underscore","backbone","hogan","social-ux/utils/htmlencoder","hogan"],function(e){var t=e("jquery"),i=e("underscore"),s=e("backbone"),n=e("hogan"),o=e("social-ux/utils/htmlencoder"),r=e("hogan").compile('<div class="infrms{{#hasCheckboxes}} has-checkboxes{{/hasCheckboxes}}{{#hasOptions}} has-options{{/hasOptions}}{{#hasClasses}} {{classes}}{{/hasClasses}}"><div class="hdr">{{headline}}</div><div class="wrp">{{#hasMessage}}<div class="data">{{message}}</div>{{/hasMessage}}{{#hasDetails}}<div class="message-details">{{details}}</div>{{/hasDetails}}{{#hasOptions}}<div class="informer-options">{{#options}}<div class="informer-options-option">{{#title}}<div class="informer-options-option-title">{{title}}</div>{{/title}}{{#values}}<label class="{{type}}"><input type="{{type}}" name="{{name}}" {{#selected}}checked="checked"{{/selected}} value="{{value}}">{{caption}}</label>{{/values}}</div>{{/options}}</div>{{/hasOptions}}{{#hasCheckboxes}}<div class="informer-checkboxes-title">{{checkboxesTitle}}</div><div class="informer-checkboxes">{{#checkboxes}}<div class="informer-checkbox"><input type="checkbox" name="{{name}}" id="ifrmr-chck-{{name}}" {{#selected}}checked="checked"{{/selected}}><label class="checkbox" for="ifrmr-chck-{{name}}">{{caption}}</label></div>{{/checkboxes}}<a href="#" class="informer-check-all">Select all</a></li></div>{{/hasCheckboxes}}<div class="controls">{{#controls}}<a href="{{href}}" class="btn {{classes}}"><i class="material-icons">{{icon}}</i>{{name}}</a>{{/controls}}</div></div></div>'),a={controls:[{name:"OK",href:"#",callback:t.noop},{name:"Cancel",href:"#",callback:t.noop}],safeHTML:!1,headline:"",message:"",details:"",type:""};return s.View.extend({className:"informers",events:{"click .controls .btn":"controlEvent","click .informer-check-all":"checkAll","click .informer-check-none":"checkNone"},initialize:function(e){i.bindAll(this,"controlEvent","checkAll","checkNone"),this._content=i.defaults(e,a)},hasCheckboxes:function(){return this.options.checkboxes&&this.options.checkboxes.length},hasOptions:function(){return this.options.options&&this.options.options.length},hasMessage:function(){return!!this.options.message},hasDetails:function(){return!!this.options.details},hasClasses:function(){return!!this.options.classes},checkAll:function(e){this.checkboxes.prop("checked",!0),e.preventDefault()},checkNone:function(e){this.checkboxes.prop("checked",!1),e.preventDefault()},getCheckboxesValues:function(){var e={};return i.each(this.checkboxes,function(t){e[t.name]=t.checked}),e},getOptionsValues:function(){var e={};return i.each(this.choices.filter(":checked"),function(t){e[t.name]=t.value}),e},controlEvent:function(e){var s=t(e.currentTarget).index(),n={};i.isFunction(this._content.controls[s].callback)&&(this.hasCheckboxes()&&(n.checkboxes=this.getCheckboxesValues()),this.hasOptions()&&(n.options=this.getOptionsValues()),this._content.controls[s].callback.call(this.options.context,n),e.preventDefault()),this._content.controls[s].dont_close||this.remove()},render:function(){return this._content.hasCheckboxes=i.bind(this.hasCheckboxes,this),this._content.hasOptions=i.bind(this.hasOptions,this),this._content.hasMessage=i.bind(this.hasMessage,this),this._content.hasDetails=i.bind(this.hasDetails,this),this._content.hasClasses=i.bind(this.hasClasses,this),this.options.messageVars&&(this._content.message=n.compile(this.options.message).render(this.options.messageVars)),this.options.safeHTML&&!this.options.messageVars&&(this._content.message=o.encodeHTMLTags(this.options.message)),this.options.detailsVars&&(this._content.details=n.compile(this.options.details).render(this.options.detailsVars)),this.options.safeHTML&&!this.options.detailsVars&&(this._content.details=o.encodeHTMLTags(this.options.details)),this.$el.html(r.render(this._content)).addClass(this.options.type).appendTo("body"),this.checkboxes=this.$(".informer-checkbox input[type=checkbox]"),this.choices=this.$(".informer-options input[type=radio], .informer-options input[type=checkbox]"),this.$el.focus(),this}})}),rblms.define("utils/embeds",["require","jquery","underscore","utils"],function(e){var t=e("jquery"),i=e("underscore");return Utils=e("utils"),{init:function(){this.initImgur(),this.initEmbedly(),this.initFacebook(),this.initInstagram(),this.initBrightcoveEmbedCode(),this.initPlayBuzz(),this.initPlayBuzzV2()},initImgur:function(){t("blockquote.imgur-embed-pub").each(function(){Utils.loadScript("//s.imgur.com/min/embed.js")})},initEmbedly:function(){t("a.embedly-card").each(function(){Utils.loadScript("//cdn.embedly.com/widgets/platform.js?r=")})},initFacebook:function(){var e=t(".rm-shortcode .fb-post, .rm-shortcode .fb-video");if(0===e.length)return!1;"FB"in window&&i.isFunction(window.FB.XFBML.parse)&&window.FB.XFBML.parse(null,function(){e.find("span").attr("data-verified","redactor")})},initInstagram:function(){if(0===t("blockquote.instagram-media").length)return!1;"instgrm"in window&&i.isFunction(window.instgrm.Embeds.process)?window.instgrm.Embeds.process():Utils.loadScript("https://platform.instagram.com/en_US/embeds.js")},initBrightcoveEmbedCode:function(){if(0===t("object.BrightcoveExperience").length)return!1;"brightcove"in window&&i.isFunction(window.brightcove.createExperiences)?window.brightcove.createExperiences():Utils.loadScript("https://sadmin.brightcove.com/js/BrightcoveExperiences.js",function(){brightcove.createExperiences()})},initPlayBuzz:function(){var e=t(".pb_feed"),i=e.hasClass("pb_feed_anim");0===e.length||i||(window.PlayBuzz?this.renderPlayBuzz():Utils.loadScript("//cdn.playbuzz.com/widget/feed.js",this.renderPlayBuzz))},renderPlayBuzz:function(){window.PlayBuzz&&window.PlayBuzz.core&&i.isFunction(window.PlayBuzz.core.render)&&window.PlayBuzz.core.render()},initPlayBuzzV2:function(){0!==t(".playbuzz").length&&Utils.loadScript("//embed.playbuzz.com/sdk.js",this.renderPlayBuzzV2)},renderPlayBuzzV2:function(){window.Playbuzz&&i.isFunction(window.Playbuzz.render)&&window.Playbuzz.render()}}}),rblms.define("core/posts/models/action",["require","backbone"],function(e){return e("backbone").Model.extend({urlRoot:"/core/roar/post_actions"})}),rblms.define("core/stats/ga_events",["require","underscore"],function(e){var t=e("underscore"),i={sidebar_river_post_publish:"sidebar_river_post_publish",sidebar_river_post_community_comment:"sidebar_river_post_community_comment",sidebar_river_user_follows:"sidebar_river_user_follows",sidebar_river_user_followed:"sidebar_river_user_followed",sidebar_river_post_featured:"sidebar_river_post_featured",sidebar_river_post_edit:"sidebar_river_post_edit",sidebar_river_post_liked:"sidebar_river_post_liked",sidebar_river_fb_friend_joined:"sidebar_river_fb_friend_joined",sidebar_river_tw_friend_joined:"sidebar_river_tw_friend_joined",sidebar_river_post_private_comment:"sidebar_river_post_private_comment",sidebar_river_section_followed:"sidebar_river_section_followed",sidebar_river_workflow_stage_updated:"sidebar_river_workflow_stage_updated"},s={river_post_publish:"river_post_publish",river_post_community_comment:"river_post_community_comment",river_draft_private_comment:"river_draft_private_comment",river_your_post_community_comment:"river_your_post_community_comment",river_post_trending:"river_post_trending",river_user_follows:"river_user_follows",river_user_followed:"river_user_followed",river_user_applied_to_community:"river_user_applied_to_community",river_user_approved_on_community:"river_user_approved_on_community",river_post_featured:"river_post_featured",river_post_edit:"river_post_edit",river_post_liked:"river_post_liked",river_fb_friend_joined:"river_fb_friend_joined",river_tw_friend_joined:"river_tw_friend_joined",river_post_private_comment:"river_post_private_comment",river_section_followed:"river_section_followed",river_workflow_stage_updated:"river_workflow_stage_updated",river_user_mentioned:"river_user_mentioned",river_post_featured_on_section:"river_post_featured_on_section",river_post_needs_review:"river_post_needs_review",river_post_needs_revision:"river_post_needs_revision"},n={},o={addEventsByCategory:function(e,i){n[e]||(n[e]={}),t.extend(n[e],i)},getAllEvents:function(){var e={},i=t.compact(t.keys(o).concat(t.keys(n)));return t.each(i,function(i){"function"!=typeof o[i]&&(e[i]=t.extend({},o[i],n[i]))}),e},getCustomEvents:function(){return t.extend({},n)},visit:{welcome:"Welcome",congratulations:"Congratulations",bounce_time:"Measuring Time on Bounce Page"},links:{click_out:"Click Out",click_in:"Click In",click_join_on_embed:"Join RM on Embeds",click_share_on_embed:"Share RM on Embeds",click_share_on_powered_embed:"Share RM on Powered Embeds",log_in_facebook:"Log In Facebook",log_in_twitter:"Log In Twitter",log_in_google:"Log In Google",download_android_app:"Download Android App",download_ios_app:"Download iOs App",click_frontpage:"Click Frontpage"},share_buttons:{click_top_header:"Click Top Header",click_left_menu:"Click Left Menu",facebook_desktop:"Click Facebook share on desktop",facebook_mobile:"Click Facebook share on mobile",email_desktop:"Click Email share on desktop",email_mobile:"Click Email share on mobile",pinterest_desktop:"Click Pinterest share on desktop",pinterest_mobile:"Click Pinterest share on mobile",twitter_desktop:"Click Twitter share on desktop",twitter_mobile:"Click Twitter share on mobile"},tags:{page_tags:"Tags on page"},topbar_buttons:{click_topbar:"Click"},signup:{completed:"Completed"},signup_buttons:{click:"Click"},signup_sticky_buttons:{click:"Click"},free_embeds_promo:{click_follow_site:"Click Follow Site",click_social_provider:"Click Social Providers"},signin_buttons:{click:"Click"},share:{click_congratulation:"Shared in Congratulation",click_post:"Shared from Permalink",click_post_frontpage:"Shared on Frontpage",click_post_petition:"Shared on Petition",click_post_hover_image:"Shared on hover",click_post_draft:"Shared on Draft",pin_overlay:"Shared on image Overlay",mobile_article_static:"facebook",video_post:"mobile sharing",video_inline:"social sharing",click_last_post_topbar:"Shared last post from topbar"},sharebar:{click_post_upper:"Shared from article upper sharebar",click_post_lower:"Shared from article lower sharebar",click_post_float:"Shared from article floating sharebar"},share_site:{click_top_mobile_share:"Clicked on Share button in header",click_bottom_mobile_share:"Clicked on Share button in fixed footer"},social_scheduling:{connect:"Click connected an account",disconnect:"Click disconnected an account",publish_draft:"Shared to draft",publish_schedule:"Shared scheduled",click_share_particle:"Share particles",click_reshare_particle:"Reshare particles",click_reshare:"Click reshare",click_cancel:"Click cancel",edit_particle_interval:"Edit time particles interval",edit_schedule_post:"Schedule post edited",edit_text:"add text",edit_headline:"Edit headline",click_choose_image:"Click choose image",remove_image:"Click remove image",edit_post_image:"Edit image",edit_description:"Edit description",add_photo:"Click add photo",edit_date:"Edit date",edit_time:"Edit time",click_edit_particle:"Click edit particle",edit_particle_image:"Edit image",edit_particle_description:"Edit description",edit_particle_date:"Edit date",edit_particle_time:"Edit time",click_save_particle:"Save particle",mention_suggested_target:"Add mention to suggested target",mention_in_text:"Add the mention direct in the text",target_add_tag:"Add a tag to a target",target_remove_tag:"remove a tag to a target",target_add_contact:"Add a contact to a target",target_select_contact:"Select an email in a target",target_unselect_contact:"Unselect an email in a target"},power_site:{screen1:"Open Lightbox",done:"Completed Powering Site",confirmation:"Reached Confirmation"},post:{click_add:"Saved on Add post",click_edit:"Saved on Edit post",click_restick:"Saved on Repost",click_save_draft:"Saved on Draft",click_bookmarklet:"Saved on Bookmarklet"},app_banner:{click_android:"Clicked on view on Google Play",click_ios:"Clicked on view on Apple Store"},wix:{component_deleted:"Component deleted"},slideshow:{next:"Next slide in slideshow",prev:"Previous slide in slideshow",goto:"Skip to specific slide in slideshow"},hamburger_menu:{open:"Hamburger menu opened",close:"Hamburger menu closed",hamburger_open:"Clicked open on mobile menu",hamburger_close:"Clicked close on mobile menu"},selection_sharer:{twitter:"Twitter clicked in selection sharer",email:"Email clicked in selection sharer"},follow_social_network:{click_facebook_top_article:"Clicked FB like button above article",click_facebook_bottom_article:"Clicked FB like button below article",click_facebook_like_navigation:"Clicked FB like button in navigation",click_facebook_like_corner:"Clicked FB like button in bottom right popup",click_facebook_like_follow_box:"Clicked FB like button in sidebar follow box",click_twitter_follow_box:"Clicked Twitter follow in sidebar follow box",click_pinterest_follow_box:"Clicked Pinterest follow in sidebar follow box",click_facebook_home_page_desktop:"Clicked home page facebook like on desktop",click_facebook_home_page_mobile:"Clicked home page facebook like on mobile",click_facebook_top_desktop:"Clicked top facebook like",click_facebook_top_mobile:"Clicked top facebook like on mobile",click_facebook_bottom_desktop:"Clicked bottom facebook like",click_facebook_bottom_mobile:"Clicked bottom facebook like on mobile",nav:"Clicked social sharing icon",footer:"Clicked footer"},growing_sites:{click_facebook_link:"Click Growing Sites Facebook page link"},article_module:{click_video_module:"Clicked video in article module",click_video_module_right_rail:"Clicked video in article module in the right rail",click_most_read_right_rail:"Clicked most read right rail in article module",click_most_read_footer:"Clicked most read right footer in article module",click_post_contest_upper:"Clicked the post-contest slot on the upper portion of the right rail",click_post_contest_lower:"Clicked the post-contest slot on the footer Most Read module",click_zergnet_2x2:"ZergNet articles 2x2",click_zergnet_1x4:"ZergNet articles 1x4",click_ab_mobile:"Mobile AB module articles",click_ab_desktop:"Desktop AB module articles",pub_exchange:"Clicked Pub Exchange articles",search:"Performed Search",nav_section_video:"Clicked Video section in navigation bars",nav_section_pets:"Clicked Pets section in navigation bars",nav_section_inspiring:"Clicked Inspiring section in navigation bars",nav_section_cute:"Clicked Cute section in navigation bars",nav_section_seaworld:"Clicked Seaworld section in navigation bars",nav_section_animalsneed:"Clicked Animals In Need section in navigation bars",nav_section_h2h:"Clicked How To Help section in navigation bars",related_links_module:"READ MORE internal link clicked",video:"recommended",article:"read next"},signup_module:{click_fb:"Clicked Facebook button in Get More module",click_tw:"Clicked Twitter button in Get More module",click_mail:"Clicked E-mail button in Get More module",click:"Clicked text in Get More module"},listicle:{switch_page_listicle:"Triggered when listicle switches pages",switch_page_slideshow:"Triggered when listicle slideshow style switches pages",vote:"Triggered when user clicks on Vote listicle item"},post_comments:{show:'Triggered when we show "comments" on a post',hide:'Triggered when we hide "comments" on a post'},newsletter_signup:{signup_follow_box:"Submitted signup form in Follow us box",signup_footer:"Submitted signup form in footer",signup_mobile_footer:"Submitted signup form in footer from mobile",signup_mobile_top:"Submitted signup form on mobile, above and below article",top_article_signup:"Submitted signup form above article",top_mobile_article_signup:"Submitted signup form above article from mobile",bottom_article_signup:"Submitted signup form below article",bottom_mobile_article_signup:"Submitted signup form below article from mobile",bottom_video_signup:"Submitted signup form below video"},nav:{section_click:"Clicked a section in navigation bars",search:"Presses search enter",home_logo:"Clicked home logo",menu_pages:"Clicked corp/menu pages",footer_pages:"Clicked corp pages in the footer",snap_banner:"Clicked snapchat banner"},form:{abandonment:"Form field abandonment tracking the exit points that users leave your specific form field"},home:{home_video:"Clicked video on home page",load_more_videos:"Clicked load-more for videos",load_more_articles:"Clicked load-more for articles",home_article:"Clicked on article on home page",learn_more:"Clicked learn-more"},video_module:{video:"video_4x",article:"read next",error:"failed to init FB",backup_link:"Clicked backup link"},signup_subscribe:{signup_popup:"Track newsletter signup module in popup",signup_topright:"Track newsletter signup module in navbar top right",signup_topleft:"Track signup clicks in navbar top left beside sandwich",signup_sideright:"Track newsletter signup module in right sidebar",signup_footer:"Track newsletter signup module in footer"},click_tag_post:{click_tag:"Tag clicked on post page"},postpage:{around_the_web_shown:"Fire an event when scroll to the end of the article"},read_one_more:{load_from_section:"Fire an event when read one more feature loads a post from a section",no_more_from_section:"Fire an event when read one more feature cannot load more posts from a section"},keep_reading:{view_more:"Fire an event when keep reading is opened",view_less:"Fire an event when keep reading is closed"},outgoing_links:{click:"Click outgoing"},clicks_topstories:{clicks_topstories_save:"clicks on save button in top stories",clicks_topstories_readmore:"clicks on keep reading button in top stories",clicks_topstories_socialshare_fb:"clicks on facebook share button in top stories",clicks_topstories_socialshare_tw:"clicks on twitter share button in top stories",clicks_topstories_socialshare_li:"clicks on linkedin share button in top stories",clicks_topstories_socialshare_cl:"clicks on copy link button in top stories",clicks_topstories_links:"clicks on internal links in posts in top stories"},clicks_others:{clicks_others_save:"clicks on save button in top stories",clicks_others_readmore:"clicks on keep reading button in top stories",clicks_others_socialshare_fb:"clicks on facebook share button in other articles",clicks_others_socialshare_tw:"clicks on twitter share button in other articles",clicks_others_socialshare_li:"clicks on linkedin share button in other articles",clicks_others_socialshare_cl:"clicks on copy link button in other articles",clicks_others_links:"clicks on internal links in posts in other articles"},like:t.extend({permalink_post:"permalink_post",frontpage:"frontpage"},s,i),click_post:t.extend({click_postcomments_mobile:'Click "comments" button below article on mobile',click_relatedtopics_mobile:'Click "related topics" button below article on mobile'},s,i),click_site:t.extend({},s,i),add_comment:t.extend({permalink_post:"permalink_post"},s,i),follow:t.extend({site:"site",community:"Community",permalink_post:"permalink_post"},s,i),unfollow:t.extend({site:"site",community:"Community",permalink_post:"permalink_post"},s,i),section_follow:t.extend({},s,i),section_unfollow:t.extend({},s,i),follow_back:t.extend({},s,i),unlike:t.extend({permalink_post:"permalink_post",frontpage:"frontpage"},s,i),public_comments:{add_comment:"Add a comment",add_comment_reply:"Add a reply",reply:"clicked reply",share:"clicked share",sort_by:"Sort comments by",edit_comment:"Edit a comment",ban_user:"Banner a user",reaction_like:"Liked a comment",reaction_dislike:"Disliked a comment",unreact:"Remove reaction"},voting:{up:"Voting up",down:"Voting down"}};return o}),rblms.define("core/stats/ga_tracker",["require","underscore","core/stats/ga_events","settings","core/app_engine"],function(e){var t,i=e("underscore"),s=e("core/stats/ga_events"),n=e("settings"),o=e("core/app_engine"),r=n.site&&n.site.user_google_analytics_id?1:0,a=(o.get("ga_custom_dimensions")||{val:function(){}}).val(),l=!i.isEmpty(a);return t={getEvents:function(){return s.getAllEvents()},trackAction:function(e,s,n){var o,a,l,c=e.split("."),d=c[0],u=c[1],h=s,p=1+r+1,g=this.getEvents(),f="function"==typeof window.ga;if(window._kmq=window._kmq||[],n=n||function(){},!g[d]||!g[d][u])return console.error(u,"This tracking action does not exist - check that it is defined."),!1;if(i.isObject(s)){if(!s.label)return console.error('"Label" field is required - check that it is defined.'),!1;h=s.label}if(!window.ga||!p)return n();"share"===d&&f&&(o=s.share_url||window.location.href,l=s.social_action||"share",t.trackSocialAction(h,l,o)),n=i.after(p,n),a=t.getTrackersListWithUniqueId(),i.each(a,function(e){var i=e.get("name"),s=t.getGATrackingData(d,u,h,n);window.ga(i+".send","event",s)}),i.delay(n,250),window._kmq.push(t.getKMTrackingData(d,u,s))},getGATrackingData:function(e,t,i,s){var n={eventCategory:e,eventAction:t,nonInteraction:1};return i&&(n.eventLabel=i),s&&(n.hitCallback=s),n},trackSocialAction:function(e,s,n){var o;"function"==typeof window.ga&&(o=t.getTrackersListWithUniqueId(),i.each(o,function(t){var i=t.get("name");window.ga(i+".send","social",e,s,n)}))},trackIdentify:function(e,s){e=e||t.getUserId(),s=s||t.getUserDetails(),e&&("function"==typeof window.ga&&window.ga("set","&uid",e),window._kmq=window._kmq||[],window._kmq.push(["identify",e]),!i.isEmpty(s)&&window._kmq.push(["set",s]),window._kmq.push(["record","Logged in"]))},getUserId:function(){return n.user.id},getUserDetails:function(){return{email:n.user.email,name:n.user.display_name,created_at:n.user.created_at}},trackPageview:function(e,s){var o,r={},a=(n.site&&n.site.user_google_analytics_id?1:0)+1;e&&(r.page=e),s&&"function"==typeof s&&(s=i.after(a,s),r.hitCallback=s),"function"==typeof window.ga&&(o=t.getTrackersListWithUniqueId(),i.each(o,function(e){var t=e.get("name");window.ga(t+".send","pageview",r)}))},trackPostModelPageView:function(e){var s,o,r,a=t.setupPageviewData(e);l&&(s=t.setupCustomDimensions(e),o=i.extend({},a,s)),r=t.getTrackersListWithUniqueId(),i.each(r,function(t){var i=t.get("name");window.ga(i+".set","location",e.formatted_url),window.ga(i+".set","title",e.headline+(n.site&&17423790===n.site.id?" - FilterCopy":"")),l&&"b"===i?window.ga(i+".send",o):window.ga(i+".send",a)})},setupPageviewData:function(e){return{hitType:"pageview",title:e.headline+(n.site&&17423790===n.site.id?" - FilterCopy":"")}},setupCustomDimensions:function(e){var t={},s=i.filter(e.subpages,function(e){return e>0});return a.authorName&&!i.isEmpty(e.roar_authors)&&(i.isArray(e.roar_authors)?t["dimension"+a.authorName]=i.pluck(e.roar_authors,"title").join(", "):t["dimension"+a.authorName]=e.roar_authors),a.postTags&&!i.isEmpty(e.tags)&&(t["dimension"+a.postTags]=e.tags.join(", ")),a.sections&&!i.isEmpty(n.site.activePage)&&n.site.activePage.title&&(t["dimension"+a.sections]=n.site.activePage.title),a.postID&&e.id&&(t["dimension"+a.postID]=e.id),a.postSections&&s.length>0&&(t["dimension"+a.postSections]=i.map(s,function(e){return i.find(n.site.pages,function(t){return t.id===e}).title}).join(", ")),i.map(t,function(e,t){window.ga("b.set",t,e)}),t},trackPostPageView:function(e,s,n){var o,r={hitType:"pageview",location:s,title:e};i.isObject(n)&&(r=i.extend({},n,r)),"function"==typeof window.ga&&(o=t.getTrackersListWithUniqueId(),i.each(o,function(e){var t=e.get("name");window.ga(t+".send",r)}))},uderscoreToCamelCase:function(e){return e.charAt(0).toUpperCase()+e.slice(1).replace(/_([a-z])/g,function(e){return" "+e[1].toUpperCase()})},getKMTrackingData:function(e,s,n){var o=this.getEvents();return i.isObject(n)?i.extend(n,{action:o[e][s]}):n={action:o[e][s],label:n},["record",t.uderscoreToCamelCase(e)+(n.action?" - "+n.action:""),n]},getTrackersListWithUniqueId:function(){var e={};return i.each(this.getAllTrackers(),function(t){var i=t.get("trackingId");e[i]||(e[i]=t)}),i.values(e)},getAllTrackers:function(){return window.ga.getAll()}}}),rblms.define("social-ux/utils/urlutils",["require"],function(e){return{parse_url:function(e){var t=document.createElement("a");return t.href=e,{source:e,site:[t.protocol,"//",t.hostname].join(""),protocol:t.protocol.replace(":",""),host:t.hostname,port:t.port,origin:t.protocol+"//"+t.hostname+"/"+t.pathname.replace(/^\//,""),query:t.search,params:function(){for(var e,i={},s=t.search.replace(/^\?/,"").split("&"),n=s.length,o=0;o<n;o++)s[o]&&(i[(e=s[o].split("="))[0]]=e[1]);return i}(),file:(t.pathname.match(/\/([^\/?#]+)$/i)||["",""])[1],hash:t.hash.replace("#",""),path:t.pathname.replace(/^([^\/])/,"/$1"),relative:(t.href.match(/tps?:\/\/[^\/]+(.+)/)||["",""])[1],segments:t.pathname.replace(/^\//,"").split("/")}}}}),function(e){"use strict";"function"==typeof rblms.define&&rblms.define.amd?rblms.define("jquery.slick",["jquery"],e):"undefined"!=typeof exports?module.exports=e(require("jquery")):e(jQuery)}(function(e){"use strict";var t=window.Slick||{};(t=function(){var t=0;return function(i,s){var n,o=this;o.defaults={accessibility:!0,adaptiveHeight:!1,appendArrows:e(i),appendDots:e(i),arrows:!0,asNavFor:null,prevArrow:'<button type="button" data-role="none" class="slick-prev" aria-label="Previous" tabindex="0" role="button">Previous</button>',nextArrow:'<button type="button" data-role="none" class="slick-next" aria-label="Next" tabindex="0" role="button">Next</button>',autoplay:!1,autoplaySpeed:3e3,centerMode:!1,centerPadding:"50px",cssEase:"ease",customPaging:function(e,t){return'<button type="button" data-role="none" role="button" aria-required="false" tabindex="0">'+(t+1)+"</button>"},dots:!1,dotsClass:"slick-dots",draggable:!0,easing:"linear",edgeFriction:.35,fade:!1,focusOnSelect:!1,infinite:!0,initialSlide:0,lazyLoad:"ondemand",mobileFirst:!1,pauseOnHover:!0,pauseOnDotsHover:!1,respondTo:"window",responsive:null,rows:1,rtl:!1,slide:"",slidesPerRow:1,slidesToShow:1,slidesToScroll:1,speed:500,swipe:!0,swipeToSlide:!1,touchMove:!0,touchThreshold:5,useCSS:!0,variableWidth:!1,vertical:!1,verticalSwiping:!1,waitForAnimate:!0,zIndex:1e3},o.initials={animating:!1,dragging:!1,autoPlayTimer:null,currentDirection:0,currentLeft:null,currentSlide:0,direction:1,$dots:null,listWidth:null,listHeight:null,loadIndex:0,$nextArrow:null,$prevArrow:null,slideCount:null,slideWidth:null,$slideTrack:null,$slides:null,sliding:!1,slideOffset:0,swipeLeft:null,$list:null,touchObject:{},transformsEnabled:!1,unslicked:!1},e.extend(o,o.initials),o.activeBreakpoint=null,o.animType=null,o.animProp=null,o.breakpoints=[],o.breakpointSettings=[],o.cssTransitions=!1,o.hidden="hidden",o.paused=!1,o.positionProp=null,o.respondTo=null,o.rowCount=1,o.shouldClick=!0,o.$slider=e(i),o.$slidesCache=null,o.transformType=null,o.transitionType=null,o.visibilityChange="visibilitychange",o.windowWidth=0,o.windowTimer=null,n=e(i).data("slick")||{},o.options=e.extend({},o.defaults,n,s),o.currentSlide=o.options.initialSlide,o.originalSettings=o.options,void 0!==document.mozHidden?(o.hidden="mozHidden",o.visibilityChange="mozvisibilitychange"):void 0!==document.webkitHidden&&(o.hidden="webkitHidden",o.visibilityChange="webkitvisibilitychange"),o.autoPlay=e.proxy(o.autoPlay,o),o.autoPlayClear=e.proxy(o.autoPlayClear,o),o.changeSlide=e.proxy(o.changeSlide,o),o.clickHandler=e.proxy(o.clickHandler,o),o.selectHandler=e.proxy(o.selectHandler,o),o.setPosition=e.proxy(o.setPosition,o),o.swipeHandler=e.proxy(o.swipeHandler,o),o.dragHandler=e.proxy(o.dragHandler,o),o.keyHandler=e.proxy(o.keyHandler,o),o.autoPlayIterator=e.proxy(o.autoPlayIterator,o),o.instanceUid=t++,o.htmlExpr=/^(?:\s*(<[\w\W]+>)[^>]*)$/,o.registerBreakpoints(),o.init(!0),o.checkResponsive(!0)}}()).prototype.addSlide=t.prototype.slickAdd=function(t,i,s){var n=this;if("boolean"==typeof i)s=i,i=null;else if(0>i||i>=n.slideCount)return!1;n.unload(),"number"==typeof i?0===i&&0===n.$slides.length?e(t).appendTo(n.$slideTrack):s?e(t).insertBefore(n.$slides.eq(i)):e(t).insertAfter(n.$slides.eq(i)):!0===s?e(t).prependTo(n.$slideTrack):e(t).appendTo(n.$slideTrack),n.$slides=n.$slideTrack.children(this.options.slide),n.$slideTrack.children(this.options.slide).detach(),n.$slideTrack.append(n.$slides),n.$slides.each(function(t,i){e(i).attr("data-slick-index",t)}),n.$slidesCache=n.$slides,n.reinit()},t.prototype.animateHeight=function(){var e=this;if(1===e.options.slidesToShow&&!0===e.options.adaptiveHeight&&!1===e.options.vertical){var t=e.$slides.eq(e.currentSlide).outerHeight(!0);e.$list.animate({height:t},e.options.speed)}},t.prototype.animateSlide=function(t,i){var s={},n=this;n.animateHeight(),!0===n.options.rtl&&!1===n.options.vertical&&(t=-t),!1===n.transformsEnabled?!1===n.options.vertical?n.$slideTrack.animate({left:t},n.options.speed,n.options.easing,i):n.$slideTrack.animate({top:t},n.options.speed,n.options.easing,i):!1===n.cssTransitions?(!0===n.options.rtl&&(n.currentLeft=-n.currentLeft),e({animStart:n.currentLeft}).animate({animStart:t},{duration:n.options.speed,easing:n.options.easing,step:function(e){e=Math.ceil(e),!1===n.options.vertical?(s[n.animType]="translate("+e+"px, 0px)",n.$slideTrack.css(s)):(s[n.animType]="translate(0px,"+e+"px)",n.$slideTrack.css(s))},complete:function(){i&&i.call()}})):(n.applyTransition(),t=Math.ceil(t),s[n.animType]=!1===n.options.vertical?"translate3d("+t+"px, 0px, 0px)":"translate3d(0px,"+t+"px, 0px)",n.$slideTrack.css(s),i&&setTimeout(function(){n.disableTransition(),i.call()},n.options.speed))},t.prototype.asNavFor=function(t){var i=this.options.asNavFor;i&&null!==i&&(i=e(i).not(this.$slider)),null!==i&&"object"==typeof i&&i.each(function(){var i=e(this).slick("getSlick");i.unslicked||i.slideHandler(t,!0)})},t.prototype.applyTransition=function(e){var t=this,i={};i[t.transitionType]=!1===t.options.fade?t.transformType+" "+t.options.speed+"ms "+t.options.cssEase:"opacity "+t.options.speed+"ms "+t.options.cssEase,!1===t.options.fade?t.$slideTrack.css(i):t.$slides.eq(e).css(i)},t.prototype.autoPlay=function(){var e=this;e.autoPlayTimer&&clearInterval(e.autoPlayTimer),e.slideCount>e.options.slidesToShow&&!0!==e.paused&&(e.autoPlayTimer=setInterval(e.autoPlayIterator,e.options.autoplaySpeed))},t.prototype.autoPlayClear=function(){this.autoPlayTimer&&clearInterval(this.autoPlayTimer)},t.prototype.autoPlayIterator=function(){var e=this;!1===e.options.infinite?1===e.direction?(e.currentSlide+1===e.slideCount-1&&(e.direction=0),e.slideHandler(e.currentSlide+e.options.slidesToScroll)):(0==e.currentSlide-1&&(e.direction=1),e.slideHandler(e.currentSlide-e.options.slidesToScroll)):e.slideHandler(e.currentSlide+e.options.slidesToScroll)},t.prototype.buildArrows=function(){var t=this;!0===t.options.arrows&&(t.$prevArrow=e(t.options.prevArrow).addClass("slick-arrow"),t.$nextArrow=e(t.options.nextArrow).addClass("slick-arrow"),t.slideCount>t.options.slidesToShow?(t.$prevArrow.removeClass("slick-hidden").removeAttr("aria-hidden tabindex"),t.$nextArrow.removeClass("slick-hidden").removeAttr("aria-hidden tabindex"),t.htmlExpr.test(t.options.prevArrow)&&t.$prevArrow.prependTo(t.options.appendArrows),t.htmlExpr.test(t.options.nextArrow)&&t.$nextArrow.appendTo(t.options.appendArrows),!0!==t.options.infinite&&t.$prevArrow.addClass("slick-disabled").attr("aria-disabled","true")):t.$prevArrow.add(t.$nextArrow).addClass("slick-hidden").attr({"aria-disabled":"true",tabindex:"-1"}))},t.prototype.buildDots=function(){var t,i,s=this;if(!0===s.options.dots&&s.slideCount>s.options.slidesToShow){for(i='<ul class="'+s.options.dotsClass+'">',t=0;t<=s.getDotCount();t+=1)i+="<li>"+s.options.customPaging.call(this,s,t)+"</li>";i+="</ul>",s.$dots=e(i).appendTo(s.options.appendDots),s.$dots.find("li").first().addClass("slick-active").attr("aria-hidden","false")}},t.prototype.buildOut=function(){var t=this;t.$slides=t.$slider.children(t.options.slide+":not(.slick-cloned)").addClass("slick-slide"),t.slideCount=t.$slides.length,t.$slides.each(function(t,i){e(i).attr("data-slick-index",t).data("originalStyling",e(i).attr("style")||"")}),t.$slidesCache=t.$slides,t.$slider.addClass("slick-slider"),t.$slideTrack=0===t.slideCount?e('<div class="slick-track"/>').appendTo(t.$slider):t.$slides.wrapAll('<div class="slick-track"/>').parent(),t.$list=t.$slideTrack.wrap('<div aria-live="polite" class="slick-list"/>').parent(),t.$slideTrack.css("opacity",0),(!0===t.options.centerMode||!0===t.options.swipeToSlide)&&(t.options.slidesToScroll=1),e("img[data-lazy]",t.$slider).not("[src]").addClass("slick-loading"),t.setupInfinite(),t.buildArrows(),t.buildDots(),t.updateDots(),t.setSlideClasses("number"==typeof t.currentSlide?t.currentSlide:0),!0===t.options.draggable&&t.$list.addClass("draggable")},t.prototype.buildRows=function(){var e,t,i,s,n,o,r,a=this;if(s=document.createDocumentFragment(),o=a.$slider.children(),a.options.rows>1){for(r=a.options.slidesPerRow*a.options.rows,n=Math.ceil(o.length/r),e=0;n>e;e++){var l=document.createElement("div");for(t=0;t<a.options.rows;t++){var c=document.createElement("div");for(i=0;i<a.options.slidesPerRow;i++){var d=e*r+(t*a.options.slidesPerRow+i);o.get(d)&&c.appendChild(o.get(d))}l.appendChild(c)}s.appendChild(l)}a.$slider.html(s),a.$slider.children().children().children().css({width:100/a.options.slidesPerRow+"%",display:"inline-block"})}},t.prototype.checkResponsive=function(t,i){var s,n,o,r=this,a=!1,l=r.$slider.width(),c=window.innerWidth||e(window).width();if("window"===r.respondTo?o=c:"slider"===r.respondTo?o=l:"min"===r.respondTo&&(o=Math.min(c,l)),r.options.responsive&&r.options.responsive.length&&null!==r.options.responsive){for(s in n=null,r.breakpoints)r.breakpoints.hasOwnProperty(s)&&(!1===r.originalSettings.mobileFirst?o<r.breakpoints[s]&&(n=r.breakpoints[s]):o>r.breakpoints[s]&&(n=r.breakpoints[s]));null!==n?null!==r.activeBreakpoint?(n!==r.activeBreakpoint||i)&&(r.activeBreakpoint=n,"unslick"===r.breakpointSettings[n]?r.unslick(n):(r.options=e.extend({},r.originalSettings,r.breakpointSettings[n]),!0===t&&(r.currentSlide=r.options.initialSlide),r.refresh(t)),a=n):(r.activeBreakpoint=n,"unslick"===r.breakpointSettings[n]?r.unslick(n):(r.options=e.extend({},r.originalSettings,r.breakpointSettings[n]),!0===t&&(r.currentSlide=r.options.initialSlide),r.refresh(t)),a=n):null!==r.activeBreakpoint&&(r.activeBreakpoint=null,r.options=r.originalSettings,!0===t&&(r.currentSlide=r.options.initialSlide),r.refresh(t),a=n),t||!1===a||r.$slider.trigger("breakpoint",[r,a])}},t.prototype.changeSlide=function(t,i){var s,n,o=this,r=e(t.target);switch(r.is("a")&&t.preventDefault(),r.is("li")||(r=r.closest("li")),s=0!=o.slideCount%o.options.slidesToScroll?0:(o.slideCount-o.currentSlide)%o.options.slidesToScroll,t.data.message){case"previous":n=0===s?o.options.slidesToScroll:o.options.slidesToShow-s,o.slideCount>o.options.slidesToShow&&o.slideHandler(o.currentSlide-n,!1,i);break;case"next":n=0===s?o.options.slidesToScroll:s,o.slideCount>o.options.slidesToShow&&o.slideHandler(o.currentSlide+n,!1,i);break;case"index":var a=0===t.data.index?0:t.data.index||r.index()*o.options.slidesToScroll;o.slideHandler(o.checkNavigable(a),!1,i),r.children().trigger("focus");break;default:return}},t.prototype.checkNavigable=function(e){var t,i;if(i=0,e>(t=this.getNavigableIndexes())[t.length-1])e=t[t.length-1];else for(var s in t){if(e<t[s]){e=i;break}i=t[s]}return e},t.prototype.cleanUpEvents=function(){var t=this;t.options.dots&&null!==t.$dots&&(e("li",t.$dots).off("click.slick",t.changeSlide),!0===t.options.pauseOnDotsHover&&!0===t.options.autoplay&&e("li",t.$dots).off("mouseenter.slick",e.proxy(t.setPaused,t,!0)).off("mouseleave.slick",e.proxy(t.setPaused,t,!1))),!0===t.options.arrows&&t.slideCount>t.options.slidesToShow&&(t.$prevArrow&&t.$prevArrow.off("click.slick",t.changeSlide),t.$nextArrow&&t.$nextArrow.off("click.slick",t.changeSlide)),t.$list.off("touchstart.slick mousedown.slick",t.swipeHandler),t.$list.off("touchmove.slick mousemove.slick",t.swipeHandler),t.$list.off("touchend.slick mouseup.slick",t.swipeHandler),t.$list.off("touchcancel.slick mouseleave.slick",t.swipeHandler),t.$list.off("click.slick",t.clickHandler),e(document).off(t.visibilityChange,t.visibility),t.$list.off("mouseenter.slick",e.proxy(t.setPaused,t,!0)),t.$list.off("mouseleave.slick",e.proxy(t.setPaused,t,!1)),!0===t.options.accessibility&&t.$list.off("keydown.slick",t.keyHandler),!0===t.options.focusOnSelect&&e(t.$slideTrack).children().off("click.slick",t.selectHandler),e(window).off("orientationchange.slick.slick-"+t.instanceUid,t.orientationChange),e(window).off("resize.slick.slick-"+t.instanceUid,t.resize),e("[draggable!=true]",t.$slideTrack).off("dragstart",t.preventDefault),e(window).off("load.slick.slick-"+t.instanceUid,t.setPosition),e(document).off("ready.slick.slick-"+t.instanceUid,t.setPosition)},t.prototype.cleanUpRows=function(){var e,t=this;t.options.rows>1&&((e=t.$slides.children().children()).removeAttr("style"),t.$slider.html(e))},t.prototype.clickHandler=function(e){!1===this.shouldClick&&(e.stopImmediatePropagation(),e.stopPropagation(),e.preventDefault())},t.prototype.destroy=function(t){var i=this;i.autoPlayClear(),i.touchObject={},i.cleanUpEvents(),e(".slick-cloned",i.$slider).detach(),i.$dots&&i.$dots.remove(),i.$prevArrow&&i.$prevArrow.length&&(i.$prevArrow.removeClass("slick-disabled slick-arrow slick-hidden").removeAttr("aria-hidden aria-disabled tabindex").css("display",""),i.htmlExpr.test(i.options.prevArrow)&&i.$prevArrow.remove()),i.$nextArrow&&i.$nextArrow.length&&(i.$nextArrow.removeClass("slick-disabled slick-arrow slick-hidden").removeAttr("aria-hidden aria-disabled tabindex").css("display",""),i.htmlExpr.test(i.options.nextArrow)&&i.$nextArrow.remove()),i.$slides&&(i.$slides.removeClass("slick-slide slick-active slick-center slick-visible slick-current").removeAttr("aria-hidden").removeAttr("data-slick-index").each(function(){e(this).attr("style",e(this).data("originalStyling"))}),i.$slideTrack.children(this.options.slide).detach(),i.$slideTrack.detach(),i.$list.detach(),i.$slider.append(i.$slides)),i.cleanUpRows(),i.$slider.removeClass("slick-slider"),i.$slider.removeClass("slick-initialized"),i.unslicked=!0,t||i.$slider.trigger("destroy",[i])},t.prototype.disableTransition=function(e){var t=this,i={};i[t.transitionType]="",!1===t.options.fade?t.$slideTrack.css(i):t.$slides.eq(e).css(i)},t.prototype.fadeSlide=function(e,t){var i=this;!1===i.cssTransitions?(i.$slides.eq(e).css({zIndex:i.options.zIndex}),i.$slides.eq(e).animate({opacity:1},i.options.speed,i.options.easing,t)):(i.applyTransition(e),i.$slides.eq(e).css({opacity:1,zIndex:i.options.zIndex}),t&&setTimeout(function(){i.disableTransition(e),t.call()},i.options.speed))},t.prototype.fadeSlideOut=function(e){var t=this;!1===t.cssTransitions?t.$slides.eq(e).animate({opacity:0,zIndex:t.options.zIndex-2},t.options.speed,t.options.easing):(t.applyTransition(e),t.$slides.eq(e).css({opacity:0,zIndex:t.options.zIndex-2}))},t.prototype.filterSlides=t.prototype.slickFilter=function(e){var t=this;null!==e&&(t.unload(),t.$slideTrack.children(this.options.slide).detach(),t.$slidesCache.filter(e).appendTo(t.$slideTrack),t.reinit())},t.prototype.getCurrent=t.prototype.slickCurrentSlide=function(){return this.currentSlide},t.prototype.getDotCount=function(){var e=this,t=0,i=0,s=0;if(!0===e.options.infinite)for(;t<e.slideCount;)++s,t=i+e.options.slidesToShow,i+=e.options.slidesToScroll<=e.options.slidesToShow?e.options.slidesToScroll:e.options.slidesToShow;else if(!0===e.options.centerMode)s=e.slideCount;else for(;t<e.slideCount;)++s,t=i+e.options.slidesToShow,i+=e.options.slidesToScroll<=e.options.slidesToShow?e.options.slidesToScroll:e.options.slidesToShow;return s-1},t.prototype.getLeft=function(e){var t,i,s,n=this,o=0;return n.slideOffset=0,i=n.$slides.first().outerHeight(!0),!0===n.options.infinite?(n.slideCount>n.options.slidesToShow&&(n.slideOffset=-1*n.slideWidth*n.options.slidesToShow,o=-1*i*n.options.slidesToShow),0!=n.slideCount%n.options.slidesToScroll&&e+n.options.slidesToScroll>n.slideCount&&n.slideCount>n.options.slidesToShow&&(e>n.slideCount?(n.slideOffset=-1*(n.options.slidesToShow-(e-n.slideCount))*n.slideWidth,o=-1*(n.options.slidesToShow-(e-n.slideCount))*i):(n.slideOffset=-1*n.slideCount%n.options.slidesToScroll*n.slideWidth,o=-1*n.slideCount%n.options.slidesToScroll*i))):e+n.options.slidesToShow>n.slideCount&&(n.slideOffset=(e+n.options.slidesToShow-n.slideCount)*n.slideWidth,o=(e+n.options.slidesToShow-n.slideCount)*i),n.slideCount<=n.options.slidesToShow&&(n.slideOffset=0,o=0),!0===n.options.centerMode&&!0===n.options.infinite?n.slideOffset+=n.slideWidth*Math.floor(n.options.slidesToShow/2)-n.slideWidth:!0===n.options.centerMode&&(n.slideOffset=0,n.slideOffset+=n.slideWidth*Math.floor(n.options.slidesToShow/2)),t=!1===n.options.vertical?-1*e*n.slideWidth+n.slideOffset:-1*e*i+o,!0===n.options.variableWidth&&(t=(s=n.slideCount<=n.options.slidesToShow||!1===n.options.infinite?n.$slideTrack.children(".slick-slide").eq(e):n.$slideTrack.children(".slick-slide").eq(e+n.options.slidesToShow))[0]?-1*s[0].offsetLeft:0,!0===n.options.centerMode&&(t=(s=!1===n.options.infinite?n.$slideTrack.children(".slick-slide").eq(e):n.$slideTrack.children(".slick-slide").eq(e+n.options.slidesToShow+1))[0]?-1*s[0].offsetLeft:0,t+=(n.$list.width()-s.outerWidth())/2)),t},t.prototype.getOption=t.prototype.slickGetOption=function(e){return this.options[e]},t.prototype.getNavigableIndexes=function(){var e,t=this,i=0,s=0,n=[];for(!1===t.options.infinite?e=t.slideCount:(i=-1*t.options.slidesToScroll,s=-1*t.options.slidesToScroll,e=2*t.slideCount);e>i;)n.push(i),i=s+t.options.slidesToScroll,s+=t.options.slidesToScroll<=t.options.slidesToShow?t.options.slidesToScroll:t.options.slidesToShow;return n},t.prototype.getSlick=function(){return this},t.prototype.getSlideCount=function(){var t,i,s=this;return i=!0===s.options.centerMode?s.slideWidth*Math.floor(s.options.slidesToShow/2):0,!0===s.options.swipeToSlide?(s.$slideTrack.find(".slick-slide").each(function(n,o){return o.offsetLeft-i+e(o).outerWidth()/2>-1*s.swipeLeft?(t=o,!1):void 0}),Math.abs(e(t).attr("data-slick-index")-s.currentSlide)||1):s.options.slidesToScroll},t.prototype.goTo=t.prototype.slickGoTo=function(e,t){this.changeSlide({data:{message:"index",index:parseInt(e)}},t)},t.prototype.init=function(t){var i=this;e(i.$slider).hasClass("slick-initialized")||(e(i.$slider).addClass("slick-initialized"),i.buildRows(),i.buildOut(),i.setProps(),i.startLoad(),i.loadSlider(),i.initializeEvents(),i.updateArrows(),i.updateDots()),t&&i.$slider.trigger("init",[i]),!0===i.options.accessibility&&i.initADA()},t.prototype.initArrowEvents=function(){var e=this;!0===e.options.arrows&&e.slideCount>e.options.slidesToShow&&(e.$prevArrow.on("click.slick",{message:"previous"},e.changeSlide),e.$nextArrow.on("click.slick",{message:"next"},e.changeSlide))},t.prototype.initDotEvents=function(){var t=this;!0===t.options.dots&&t.slideCount>t.options.slidesToShow&&e("li",t.$dots).on("click.slick",{message:"index"},t.changeSlide),!0===t.options.dots&&!0===t.options.pauseOnDotsHover&&!0===t.options.autoplay&&e("li",t.$dots).on("mouseenter.slick",e.proxy(t.setPaused,t,!0)).on("mouseleave.slick",e.proxy(t.setPaused,t,!1))},t.prototype.initializeEvents=function(){var t=this;t.initArrowEvents(),t.initDotEvents(),t.$list.on("touchstart.slick mousedown.slick",{action:"start"},t.swipeHandler),t.$list.on("touchmove.slick mousemove.slick",{action:"move"},t.swipeHandler),t.$list.on("touchend.slick mouseup.slick",{action:"end"},t.swipeHandler),t.$list.on("touchcancel.slick mouseleave.slick",{action:"end"},t.swipeHandler),t.$list.on("click.slick",t.clickHandler),e(document).on(t.visibilityChange,e.proxy(t.visibility,t)),t.$list.on("mouseenter.slick",e.proxy(t.setPaused,t,!0)),t.$list.on("mouseleave.slick",e.proxy(t.setPaused,t,!1)),!0===t.options.accessibility&&t.$list.on("keydown.slick",t.keyHandler),!0===t.options.focusOnSelect&&e(t.$slideTrack).children().on("click.slick",t.selectHandler),e(window).on("orientationchange.slick.slick-"+t.instanceUid,e.proxy(t.orientationChange,t)),e(window).on("resize.slick.slick-"+t.instanceUid,e.proxy(t.resize,t)),e("[draggable!=true]",t.$slideTrack).on("dragstart",t.preventDefault),e(window).on("load.slick.slick-"+t.instanceUid,t.setPosition),e(document).on("ready.slick.slick-"+t.instanceUid,t.setPosition)},t.prototype.initUI=function(){var e=this;!0===e.options.arrows&&e.slideCount>e.options.slidesToShow&&(e.$prevArrow.show(),e.$nextArrow.show()),!0===e.options.dots&&e.slideCount>e.options.slidesToShow&&e.$dots.show(),!0===e.options.autoplay&&e.autoPlay()},t.prototype.keyHandler=function(e){var t=this;e.target.tagName.match("TEXTAREA|INPUT|SELECT")||(37===e.keyCode&&!0===t.options.accessibility?t.changeSlide({data:{message:"previous"}}):39===e.keyCode&&!0===t.options.accessibility&&t.changeSlide({data:{message:"next"}}))},t.prototype.lazyLoad=function(){function t(t){e("img[data-lazy]",t).each(function(){var t=e(this),i=e(this).attr("data-lazy"),s=document.createElement("img");s.onload=function(){t.animate({opacity:0},100,function(){t.attr("src",i).animate({opacity:1},200,function(){t.removeAttr("data-lazy").removeClass("slick-loading")})})},s.src=i})}var i,s,n=this;!0===n.options.centerMode?!0===n.options.infinite?s=(i=n.currentSlide+(n.options.slidesToShow/2+1))+n.options.slidesToShow+2:(i=Math.max(0,n.currentSlide-(n.options.slidesToShow/2+1)),s=n.options.slidesToShow/2+1+2+n.currentSlide):(s=(i=n.options.infinite?n.options.slidesToShow+n.currentSlide:n.currentSlide)+n.options.slidesToShow,!0===n.options.fade&&(i>0&&i--,s<=n.slideCount&&s++)),t(n.$slider.find(".slick-slide").slice(i,s)),n.slideCount<=n.options.slidesToShow?t(n.$slider.find(".slick-slide")):n.currentSlide>=n.slideCount-n.options.slidesToShow?t(n.$slider.find(".slick-cloned").slice(0,n.options.slidesToShow)):0===n.currentSlide&&t(n.$slider.find(".slick-cloned").slice(-1*n.options.slidesToShow))},t.prototype.loadSlider=function(){var e=this;e.setPosition(),e.$slideTrack.css({opacity:1}),e.$slider.removeClass("slick-loading"),e.initUI(),"progressive"===e.options.lazyLoad&&e.progressiveLazyLoad()},t.prototype.next=t.prototype.slickNext=function(){this.changeSlide({data:{message:"next"}})},t.prototype.orientationChange=function(){this.checkResponsive(),this.setPosition()},t.prototype.pause=t.prototype.slickPause=function(){this.autoPlayClear(),this.paused=!0},t.prototype.play=t.prototype.slickPlay=function(){this.paused=!1,this.autoPlay()},t.prototype.postSlide=function(e){var t=this;t.$slider.trigger("afterChange",[t,e]),t.animating=!1,t.setPosition(),t.swipeLeft=null,!0===t.options.autoplay&&!1===t.paused&&t.autoPlay(),!0===t.options.accessibility&&t.initADA()},t.prototype.prev=t.prototype.slickPrev=function(){this.changeSlide({data:{message:"previous"}})},t.prototype.preventDefault=function(e){e.preventDefault()},t.prototype.progressiveLazyLoad=function(){var t,i=this;e("img[data-lazy]",i.$slider).length>0&&(t=e("img[data-lazy]",i.$slider).first()).attr("src",t.attr("data-lazy")).removeClass("slick-loading").load(function(){t.removeAttr("data-lazy"),i.progressiveLazyLoad(),!0===i.options.adaptiveHeight&&i.setPosition()}).error(function(){t.removeAttr("data-lazy"),i.progressiveLazyLoad()})},t.prototype.refresh=function(t){var i=this,s=i.currentSlide;i.destroy(!0),e.extend(i,i.initials,{currentSlide:s}),i.init(),t||i.changeSlide({data:{message:"index",index:s}},!1)},t.prototype.registerBreakpoints=function(){var t,i,s,n=this,o=n.options.responsive||null;if("array"===e.type(o)&&o.length){for(t in n.respondTo=n.options.respondTo||"window",o)if(s=n.breakpoints.length-1,i=o[t].breakpoint,o.hasOwnProperty(t)){for(;s>=0;)n.breakpoints[s]&&n.breakpoints[s]===i&&n.breakpoints.splice(s,1),s--;n.breakpoints.push(i),n.breakpointSettings[i]=o[t].settings}n.breakpoints.sort(function(e,t){return n.options.mobileFirst?e-t:t-e})}},t.prototype.reinit=function(){var t=this;t.$slides=t.$slideTrack.children(t.options.slide).addClass("slick-slide"),t.slideCount=t.$slides.length,t.currentSlide>=t.slideCount&&0!==t.currentSlide&&(t.currentSlide=t.currentSlide-t.options.slidesToScroll),t.slideCount<=t.options.slidesToShow&&(t.currentSlide=0),t.registerBreakpoints(),t.setProps(),t.setupInfinite(),t.buildArrows(),t.updateArrows(),t.initArrowEvents(),t.buildDots(),t.updateDots(),t.initDotEvents(),t.checkResponsive(!1,!0),!0===t.options.focusOnSelect&&e(t.$slideTrack).children().on("click.slick",t.selectHandler),t.setSlideClasses(0),t.setPosition(),t.$slider.trigger("reInit",[t]),!0===t.options.autoplay&&t.focusHandler()},t.prototype.resize=function(){var t=this;e(window).width()!==t.windowWidth&&(clearTimeout(t.windowDelay),t.windowDelay=window.setTimeout(function(){t.windowWidth=e(window).width(),t.checkResponsive(),t.unslicked||t.setPosition()},50))},t.prototype.removeSlide=t.prototype.slickRemove=function(e,t,i){var s=this;return"boolean"==typeof e?e=!0===(t=e)?0:s.slideCount-1:e=!0===t?--e:e,!(s.slideCount<1||0>e||e>s.slideCount-1)&&(s.unload(),!0===i?s.$slideTrack.children().remove():s.$slideTrack.children(this.options.slide).eq(e).remove(),s.$slides=s.$slideTrack.children(this.options.slide),s.$slideTrack.children(this.options.slide).detach(),s.$slideTrack.append(s.$slides),s.$slidesCache=s.$slides,void s.reinit())},t.prototype.setCSS=function(e){var t,i,s=this,n={};!0===s.options.rtl&&(e=-e),t="left"==s.positionProp?Math.ceil(e)+"px":"0px",i="top"==s.positionProp?Math.ceil(e)+"px":"0px",n[s.positionProp]=e,!1===s.transformsEnabled?s.$slideTrack.css(n):(n={},!1===s.cssTransitions?(n[s.animType]="translate("+t+", "+i+")",s.$slideTrack.css(n)):(n[s.animType]="translate3d("+t+", "+i+", 0px)",s.$slideTrack.css(n)))},t.prototype.setDimensions=function(){var e=this;!1===e.options.vertical?!0===e.options.centerMode&&e.$list.css({padding:"0px "+e.options.centerPadding}):(e.$list.height(e.$slides.first().outerHeight(!0)*e.options.slidesToShow),!0===e.options.centerMode&&e.$list.css({padding:e.options.centerPadding+" 0px"})),e.listWidth=e.$list.width(),e.listHeight=e.$list.height(),!1===e.options.vertical&&!1===e.options.variableWidth?(e.slideWidth=Math.ceil(e.listWidth/e.options.slidesToShow),e.$slideTrack.width(Math.ceil(e.slideWidth*e.$slideTrack.children(".slick-slide").length))):!0===e.options.variableWidth?e.$slideTrack.width(5e3*e.slideCount):(e.slideWidth=Math.ceil(e.listWidth),e.$slideTrack.height(Math.ceil(e.$slides.first().outerHeight(!0)*e.$slideTrack.children(".slick-slide").length)));var t=e.$slides.first().outerWidth(!0)-e.$slides.first().width();!1===e.options.variableWidth&&e.$slideTrack.children(".slick-slide").width(e.slideWidth-t)},t.prototype.setFade=function(){var t,i=this;i.$slides.each(function(s,n){t=-1*i.slideWidth*s,!0===i.options.rtl?e(n).css({position:"relative",right:t,top:0,zIndex:i.options.zIndex-2,opacity:0}):e(n).css({position:"relative",left:t,top:0,zIndex:i.options.zIndex-2,opacity:0})}),i.$slides.eq(i.currentSlide).css({zIndex:i.options.zIndex-1,opacity:1})},t.prototype.setHeight=function(){var e=this;if(1===e.options.slidesToShow&&!0===e.options.adaptiveHeight&&!1===e.options.vertical){var t=e.$slides.eq(e.currentSlide).outerHeight(!0);e.$list.css("height",t)}},t.prototype.setOption=t.prototype.slickSetOption=function(t,i,s){var n,o,r=this;if("responsive"===t&&"array"===e.type(i))for(o in i)if("array"!==e.type(r.options.responsive))r.options.responsive=[i[o]];else{for(n=r.options.responsive.length-1;n>=0;)r.options.responsive[n].breakpoint===i[o].breakpoint&&r.options.responsive.splice(n,1),n--;r.options.responsive.push(i[o])}else r.options[t]=i;!0===s&&(r.unload(),r.reinit())},t.prototype.setPosition=function(){var e=this;e.setDimensions(),e.setHeight(),!1===e.options.fade?e.setCSS(e.getLeft(e.currentSlide)):e.setFade(),e.$slider.trigger("setPosition",[e])},t.prototype.setProps=function(){var e=this,t=document.body.style;e.positionProp=!0===e.options.vertical?"top":"left","top"===e.positionProp?e.$slider.addClass("slick-vertical"):e.$slider.removeClass("slick-vertical"),(void 0!==t.WebkitTransition||void 0!==t.MozTransition||void 0!==t.msTransition)&&!0===e.options.useCSS&&(e.cssTransitions=!0),e.options.fade&&("number"==typeof e.options.zIndex?e.options.zIndex<3&&(e.options.zIndex=3):e.options.zIndex=e.defaults.zIndex),void 0!==t.OTransform&&(e.animType="OTransform",e.transformType="-o-transform",e.transitionType="OTransition",void 0===t.perspectiveProperty&&void 0===t.webkitPerspective&&(e.animType=!1)),void 0!==t.MozTransform&&(e.animType="MozTransform",e.transformType="-moz-transform",e.transitionType="MozTransition",void 0===t.perspectiveProperty&&void 0===t.MozPerspective&&(e.animType=!1)),void 0!==t.webkitTransform&&(e.animType="webkitTransform",e.transformType="-webkit-transform",e.transitionType="webkitTransition",void 0===t.perspectiveProperty&&void 0===t.webkitPerspective&&(e.animType=!1)),void 0!==t.msTransform&&(e.animType="msTransform",e.transformType="-ms-transform",e.transitionType="msTransition",void 0===t.msTransform&&(e.animType=!1)),void 0!==t.transform&&!1!==e.animType&&(e.animType="transform",e.transformType="transform",e.transitionType="transition"),e.transformsEnabled=null!==e.animType&&!1!==e.animType},t.prototype.setSlideClasses=function(e){var t,i,s,n,o=this;i=o.$slider.find(".slick-slide").removeClass("slick-active slick-center slick-current").attr("aria-hidden","true"),o.$slides.eq(e).addClass("slick-current"),!0===o.options.centerMode?(t=Math.floor(o.options.slidesToShow/2),!0===o.options.infinite&&(e>=t&&e<=o.slideCount-1-t?o.$slides.slice(e-t,e+t+1).addClass("slick-active").attr("aria-hidden","false"):(s=o.options.slidesToShow+e,i.slice(s-t+1,s+t+2).addClass("slick-active").attr("aria-hidden","false")),0===e?i.eq(i.length-1-o.options.slidesToShow).addClass("slick-center"):e===o.slideCount-1&&i.eq(o.options.slidesToShow).addClass("slick-center")),o.$slides.eq(e).addClass("slick-center")):e>=0&&e<=o.slideCount-o.options.slidesToShow?o.$slides.slice(e,e+o.options.slidesToShow).addClass("slick-active").attr("aria-hidden","false"):i.length<=o.options.slidesToShow?i.addClass("slick-active").attr("aria-hidden","false"):(n=o.slideCount%o.options.slidesToShow,s=!0===o.options.infinite?o.options.slidesToShow+e:e,o.options.slidesToShow==o.options.slidesToScroll&&o.slideCount-e<o.options.slidesToShow?i.slice(s-(o.options.slidesToShow-n),s+n).addClass("slick-active").attr("aria-hidden","false"):i.slice(s,s+o.options.slidesToShow).addClass("slick-active").attr("aria-hidden","false")),"ondemand"===o.options.lazyLoad&&o.lazyLoad()},t.prototype.setupInfinite=function(){var t,i,s,n=this;if(!0===n.options.fade&&(n.options.centerMode=!1),!0===n.options.infinite&&!1===n.options.fade&&(i=null,n.slideCount>n.options.slidesToShow)){for(s=!0===n.options.centerMode?n.options.slidesToShow+1:n.options.slidesToShow,t=n.slideCount;t>n.slideCount-s;t-=1)i=t-1,e(n.$slides[i]).clone(!0).attr("id","").attr("data-slick-index",i-n.slideCount).prependTo(n.$slideTrack).addClass("slick-cloned");for(t=0;s>t;t+=1)i=t,e(n.$slides[i]).clone(!0).attr("id","").attr("data-slick-index",i+n.slideCount).appendTo(n.$slideTrack).addClass("slick-cloned");n.$slideTrack.find(".slick-cloned").find("[id]").each(function(){e(this).attr("id","")})}},t.prototype.setPaused=function(e){var t=this;!0===t.options.autoplay&&!0===t.options.pauseOnHover&&(t.paused=e,e?t.autoPlayClear():t.autoPlay())},t.prototype.selectHandler=function(t){var i=this,s=e(t.target).is(".slick-slide")?e(t.target):e(t.target).parents(".slick-slide"),n=parseInt(s.attr("data-slick-index"));return n||(n=0),i.slideCount<=i.options.slidesToShow?(i.setSlideClasses(n),void i.asNavFor(n)):void i.slideHandler(n)},t.prototype.slideHandler=function(e,t,i){var s,n,o,r,a=null,l=this;return t=t||!1,!0===l.animating&&!0===l.options.waitForAnimate||!0===l.options.fade&&l.currentSlide===e||l.slideCount<=l.options.slidesToShow?void 0:(!1===t&&l.asNavFor(e),s=e,a=l.getLeft(s),r=l.getLeft(l.currentSlide),l.currentLeft=null===l.swipeLeft?r:l.swipeLeft,!1===l.options.infinite&&!1===l.options.centerMode&&(0>e||e>l.getDotCount()*l.options.slidesToScroll)?void(!1===l.options.fade&&(s=l.currentSlide,!0!==i?l.animateSlide(r,function(){l.postSlide(s)}):l.postSlide(s))):!1===l.options.infinite&&!0===l.options.centerMode&&(0>e||e>l.slideCount-l.options.slidesToScroll)?void(!1===l.options.fade&&(s=l.currentSlide,!0!==i?l.animateSlide(r,function(){l.postSlide(s)}):l.postSlide(s))):(!0===l.options.autoplay&&clearInterval(l.autoPlayTimer),n=0>s?0!=l.slideCount%l.options.slidesToScroll?l.slideCount-l.slideCount%l.options.slidesToScroll:l.slideCount+s:s>=l.slideCount?0!=l.slideCount%l.options.slidesToScroll?0:s-l.slideCount:s,l.animating=!0,l.$slider.trigger("beforeChange",[l,l.currentSlide,n]),o=l.currentSlide,l.currentSlide=n,l.setSlideClasses(l.currentSlide),l.updateDots(),l.updateArrows(),!0===l.options.fade?(!0!==i?(l.fadeSlideOut(o),l.fadeSlide(n,function(){l.postSlide(n)})):l.postSlide(n),void l.animateHeight()):void(!0!==i?l.animateSlide(a,function(){l.postSlide(n)}):l.postSlide(n))))},t.prototype.startLoad=function(){var e=this;!0===e.options.arrows&&e.slideCount>e.options.slidesToShow&&(e.$prevArrow.hide(),e.$nextArrow.hide()),!0===e.options.dots&&e.slideCount>e.options.slidesToShow&&e.$dots.hide(),e.$slider.addClass("slick-loading")},t.prototype.swipeDirection=function(){var e,t,i,s,n=this;return e=n.touchObject.startX-n.touchObject.curX,t=n.touchObject.startY-n.touchObject.curY,i=Math.atan2(t,e),0>(s=Math.round(180*i/Math.PI))&&(s=360-Math.abs(s)),45>=s&&s>=0?!1===n.options.rtl?"left":"right":360>=s&&s>=315?!1===n.options.rtl?"left":"right":s>=135&&225>=s?!1===n.options.rtl?"right":"left":!0===n.options.verticalSwiping?s>=35&&135>=s?"left":"right":"vertical"},t.prototype.swipeEnd=function(){var e,t=this;if(t.dragging=!1,t.shouldClick=!(t.touchObject.swipeLength>10),void 0===t.touchObject.curX)return!1;if(!0===t.touchObject.edgeHit&&t.$slider.trigger("edge",[t,t.swipeDirection()]),t.touchObject.swipeLength>=t.touchObject.minSwipe)switch(t.swipeDirection()){case"left":e=t.options.swipeToSlide?t.checkNavigable(t.currentSlide+t.getSlideCount()):t.currentSlide+t.getSlideCount(),t.slideHandler(e),t.currentDirection=0,t.touchObject={},t.$slider.trigger("swipe",[t,"left"]);break;case"right":e=t.options.swipeToSlide?t.checkNavigable(t.currentSlide-t.getSlideCount()):t.currentSlide-t.getSlideCount(),t.slideHandler(e),t.currentDirection=1,t.touchObject={},t.$slider.trigger("swipe",[t,"right"])}else t.touchObject.startX!==t.touchObject.curX&&(t.slideHandler(t.currentSlide),t.touchObject={})},t.prototype.swipeHandler=function(e){var t=this;if(!(!1===t.options.swipe||"ontouchend"in document&&!1===t.options.swipe||!1===t.options.draggable&&-1!==e.type.indexOf("mouse")))switch(t.touchObject.fingerCount=e.originalEvent&&void 0!==e.originalEvent.touches?e.originalEvent.touches.length:1,t.touchObject.minSwipe=t.listWidth/t.options.touchThreshold,!0===t.options.verticalSwiping&&(t.touchObject.minSwipe=t.listHeight/t.options.touchThreshold),e.data.action){case"start":t.swipeStart(e);break;case"move":t.swipeMove(e);break;case"end":t.swipeEnd(e)}},t.prototype.swipeMove=function(e){var t,i,s,n,o,r=this;return o=void 0!==e.originalEvent?e.originalEvent.touches:null,!(!r.dragging||o&&1!==o.length)&&(t=r.getLeft(r.currentSlide),r.touchObject.curX=void 0!==o?o[0].pageX:e.clientX,r.touchObject.curY=void 0!==o?o[0].pageY:e.clientY,r.touchObject.swipeLength=Math.round(Math.sqrt(Math.pow(r.touchObject.curX-r.touchObject.startX,2))),!0===r.options.verticalSwiping&&(r.touchObject.swipeLength=Math.round(Math.sqrt(Math.pow(r.touchObject.curY-r.touchObject.startY,2)))),"vertical"!==(i=r.swipeDirection())?(void 0!==e.originalEvent&&r.touchObject.swipeLength>4&&e.preventDefault(),n=(!1===r.options.rtl?1:-1)*(r.touchObject.curX>r.touchObject.startX?1:-1),!0===r.options.verticalSwiping&&(n=r.touchObject.curY>r.touchObject.startY?1:-1),s=r.touchObject.swipeLength,r.touchObject.edgeHit=!1,!1===r.options.infinite&&(0===r.currentSlide&&"right"===i||r.currentSlide>=r.getDotCount()&&"left"===i)&&(s=r.touchObject.swipeLength*r.options.edgeFriction,r.touchObject.edgeHit=!0),r.swipeLeft=!1===r.options.vertical?t+s*n:t+s*(r.$list.height()/r.listWidth)*n,!0===r.options.verticalSwiping&&(r.swipeLeft=t+s*n),!0!==r.options.fade&&!1!==r.options.touchMove&&(!0===r.animating?(r.swipeLeft=null,!1):void r.setCSS(r.swipeLeft))):void 0)},t.prototype.swipeStart=function(e){var t,i=this;return 1!==i.touchObject.fingerCount||i.slideCount<=i.options.slidesToShow?(i.touchObject={},!1):(void 0!==e.originalEvent&&void 0!==e.originalEvent.touches&&(t=e.originalEvent.touches[0]),i.touchObject.startX=i.touchObject.curX=void 0!==t?t.pageX:e.clientX,i.touchObject.startY=i.touchObject.curY=void 0!==t?t.pageY:e.clientY,void(i.dragging=!0))},t.prototype.unfilterSlides=t.prototype.slickUnfilter=function(){var e=this;null!==e.$slidesCache&&(e.unload(),e.$slideTrack.children(this.options.slide).detach(),e.$slidesCache.appendTo(e.$slideTrack),e.reinit())},t.prototype.unload=function(){var t=this;e(".slick-cloned",t.$slider).remove(),t.$dots&&t.$dots.remove(),t.$prevArrow&&t.htmlExpr.test(t.options.prevArrow)&&t.$prevArrow.remove(),t.$nextArrow&&t.htmlExpr.test(t.options.nextArrow)&&t.$nextArrow.remove(),t.$slides.removeClass("slick-slide slick-active slick-visible slick-current").attr("aria-hidden","true").css("width","")},t.prototype.unslick=function(e){var t=this;t.$slider.trigger("unslick",[t,e]),t.destroy()},t.prototype.updateArrows=function(){var e=this;Math.floor(e.options.slidesToShow/2),!0===e.options.arrows&&e.slideCount>e.options.slidesToShow&&!e.options.infinite&&(e.$prevArrow.removeClass("slick-disabled").attr("aria-disabled","false"),e.$nextArrow.removeClass("slick-disabled").attr("aria-disabled","false"),0===e.currentSlide?(e.$prevArrow.addClass("slick-disabled").attr("aria-disabled","true"),e.$nextArrow.removeClass("slick-disabled").attr("aria-disabled","false")):e.currentSlide>=e.slideCount-e.options.slidesToShow&&!1===e.options.centerMode?(e.$nextArrow.addClass("slick-disabled").attr("aria-disabled","true"),e.$prevArrow.removeClass("slick-disabled").attr("aria-disabled","false")):e.currentSlide>=e.slideCount-1&&!0===e.options.centerMode&&(e.$nextArrow.addClass("slick-disabled").attr("aria-disabled","true"),e.$prevArrow.removeClass("slick-disabled").attr("aria-disabled","false")))},t.prototype.updateDots=function(){var e=this;null!==e.$dots&&(e.$dots.find("li").removeClass("slick-active").attr("aria-hidden","true"),e.$dots.find("li").eq(Math.floor(e.currentSlide/e.options.slidesToScroll)).addClass("slick-active").attr("aria-hidden","false"))},t.prototype.visibility=function(){var e=this;document[e.hidden]?(e.paused=!0,e.autoPlayClear()):!0===e.options.autoplay&&(e.paused=!1,e.autoPlay())},t.prototype.initADA=function(){var t=this;t.$slides.add(t.$slideTrack.find(".slick-cloned")).attr({"aria-hidden":"true",tabindex:"-1"}).find("a, input, button, select").attr({tabindex:"-1"}),t.$slideTrack.attr("role","listbox"),t.$slides.not(t.$slideTrack.find(".slick-cloned")).each(function(i){e(this).attr({role:"option","aria-describedby":"slick-slide"+t.instanceUid+i})}),null!==t.$dots&&t.$dots.attr("role","tablist").find("li").each(function(i){e(this).attr({role:"presentation","aria-selected":"false","aria-controls":"navigation"+t.instanceUid+i,id:"slick-slide"+t.instanceUid+i})}).first().attr("aria-selected","true").end().find("button").attr("role","button").end().closest("div").attr("role","toolbar"),t.activateADA()},t.prototype.activateADA=function(){var e=this,t=e.$slider.find("*").is(":focus");e.$slideTrack.find(".slick-active").attr({"aria-hidden":"false",tabindex:"0"}).find("a, input, button, select").attr({tabindex:"0"}),t&&e.$slideTrack.find(".slick-active").focus()},t.prototype.focusHandler=function(){var t=this;t.$slider.on("focus.slick blur.slick","*",function(i){i.stopImmediatePropagation();var s=e(this);setTimeout(function(){t.isPlay&&(s.is(":focus")?(t.autoPlayClear(),t.paused=!0):(t.paused=!1,t.autoPlay()))},0)})},e.fn.slick=function(){for(var e,i=this,s=arguments[0],n=Array.prototype.slice.call(arguments,1),o=i.length,r=0;o>r;r++)if("object"==typeof s||void 0===s?i[r].slick=new t(i[r],s):e=i[r].slick[s].apply(i[r].slick,n),void 0!==e)return e;return i}}),rblms.define("social-ux/view/slideshow",["require","jquery","backbone","social-ux/utils/urlutils","jquery.slick","engine","utils/device","underscore","hogan","core/stats/ga_tracker","core/event_dispatcher"],function(e){var t=e("jquery"),i=e("backbone"),s=e("social-ux/utils/urlutils"),n=(e("jquery.slick"),e("engine"),e("utils/device")),o=e("underscore"),r=e("hogan"),a=e("core/stats/ga_tracker"),l=e("core/event_dispatcher");return i.View.extend({events:{"click .carousel-indicators li a":"onSlideThumbClick"},defaults:{duration:600},_current:0,setActive:function(e){e&&(this.thumbs.removeClass("active").removeClass("prev next left right"),e.thumb.addClass("active"),this.$el.append(t(e.item[0]).data("tracking-code")),this.reRenderAdCode(),this.handleVideos(e))},getByNum:function(e){return o.findWhere(this.slideshow,{index:e})},goDirection:function(e,t){var i,s=t>e?"prev":"next";0===t&&e===this.items.length-1&&(s="prev"),t===this.items.length&&0===e&&(s="next"),i=this.getByNum(e),this.changeSlideUrl(i.id),this.trackSlide(s,i),this.setActive(i)},gotoSlideFromUrl:function(){var e=s.parse_url(window.location.href).params.slide;e&&this.getById(e)&&this.gotoSlide(e)},onSlideThumbClick:function(e){var i=t(e.currentTarget);e.preventDefault(),this.gotoSlide(i.data("id"))},gotoSlide:function(e){var t=this.getById(e);return this.changeSlideUrl(e),this.trackGotoSlide(),this.$(".slideshow-inner").slick("slickGoTo",t.index),this.setActive(t)},getById:function(e){return o.findWhere(this.slideshow,{id:e})},changeSlideUrl:function(e){window.history.pushState(null,null,"%s?slide=%s".format(s.parse_url(this.model.get("post_url")).path,e))},trackGotoSlide:function(){a.trackAction("slideshow.goto",this.model.get("post_url"))},trackSlide:function(e,t){var i=this.getSlideUrl(t),s="slideshow.%s".format(e),n=this.model.toJSON(),o=parseInt(this.model.get("roar_specific_data").pixel_track_id||0,10),r=n.headline_code?["headline_id="+n.headline_code]:[];a.trackAction(s,this.model.get("post_url")),a.trackPageview(i),this.statsImpression(this.model.stats_id_provider_id(),null,1,this.model.get("is_seed")||null,r),l.trigger("page:shown"),window.ADTECH&&o&&window.ADTECH.loadAd(o)},getSlideUrl:function(e){return"%s?slide%s".format(s.parse_url(this.model.get("post_url")).path,e.index)},reRenderAdCode:function(e){var i,s=this.$(".slideshow-end"),n=s.data("code");if("None"===n||!n)return null;if(n=r.compile(n).render(this.model.toJSON()),i=t('<iframe src="about:blank" style="width:0;height:0;margin:0;border:0;"></iframe>'),this.widthSize){if(e&&"resize"===e.type){if(this.widthSize===window.innerWidth)return;this.widthSize=window.innerWidth}}else this.widthSize=window.innerWidth,s.append(i),this.adCodeIFrame=i[0],t(window).on("resize",o.bind(o.debounce(this.reRenderAdCode,150),this));var a=this.adCodeIFrame.contentDocument||this.adCodeIFrame.contentWindow.document;t(this.adCodeIFrame).css("width",0).css("height",0),a.body.innerHTML="",a.write('<html style="width:0;height:0;"><body style="margin:0px;width:0;height:0;">'+n+"</body></html>"),setTimeout(o.bind(this.resizeIFrame,this),1e3)},resizeIFrame:function(){var e=this.adCodeIFrame.contentWindow.document,i=e.body,s=t(i),n=e.documentElement;t(e.documentElement).css("height","auto").css("width","auto"),s.css("height","auto").css("width","auto");var o=Math.max(i.scrollHeight,i.offsetHeight,n.clientHeight,n.scrollHeight,n.offsetHeight),r=Math.max(i.scrollWidth,i.offsetWidth,n.clientWidth,n.scrollWidth,n.offsetWidth);this.adCodeIFrame.style.width=r+"px",this.adCodeIFrame.style.height=o+"px"},groupSlides:function(){this.items=this.$(".item"),this.thumbs=this.$(".carousel-indicators li"),this.slideshow=o.map(this.items,function(e,i){var s=t(e);return{index:i,id:s.data("id"),item:s,thumb:t(this.thumbs[i])}},this),this.total=this.items.length},handleVideos:function(e){this.allVideosAction(this.$el,"pause"),this.allVideosAction(e.item,"play")},allVideosAction:function(e,t){var i=[],s=[];e.find('iframe[src*="vimeo.com"]').each(function(e,t){i.push(t)}),e.find('iframe[src*="youtube.com"]').each(function(e,t){s.push(t)}),o.each(s,function(e){null!==e.contentWindow&&e.contentWindow.postMessage(window.JSON.stringify({event:"command",func:t+"Video"}),"https://www.youtube.com")}),o.each(i,function(e){null!==e.contentWindow&&e.contentWindow.postMessage(window.JSON.stringify({method:t}),"https://player.vimeo.com")})},render:function(e){var i=this,s=[];return this.$el.data("slideshow-init",!0),this.groupSlides(),this.setActive(this.getByNum(this._current)),this.$(".slideshow-inner").slick({slidesToShow:1,slidesToScroll:1,fade:!n.isMobile,prevArrow:this.$(".left.carousel-control"),nextArrow:this.$(".right.carousel-control"),speed:this.duration,adaptiveHeight:!0}),this.$(".slideshow-inner").on("beforeChange",function(e,t,s,n){i.goDirection(n,s)}),this.$(".slick-slide .title").each(function(e,i){s.push(t(i).height())}),this.$(".slick-slide .title").height(Math.max.apply(Math,s)),l.trigger("page:heightChangeed"),this.gotoSlideFromUrl(),this}})}),rblms.define("utils/navigate",[],function(){var e=window;return{open:function(t,i,s,n){var o=e.open(t,i,s,n);return o?o.opener=null:e.location.href=t,o}}}),rblms.define("social-ux/view/sharer",["require","underscore","hogan","utils/navigate","settings"],function(e){var t=e("underscore"),i=e("hogan"),s=e("utils/navigate"),n=e("settings"),o="{{#mediacode}}{{mediacode}}{{/mediacode}}",r="{{#share_media}}{{share_media}}{{/share_media}}{{^share_media}}{{#share_image}}{{share_image}}{{/share_image}}{{/share_media}}",a={email:"mailto:?subject={{#sharing_texts}}{{{email_title}}}{{/sharing_texts}}&body={{#sharing_texts}}{{{email_text_template}}}{{/sharing_texts}}",facebook:"http://www.facebook.com/sharer.php?u={{share_url}}%3Fxrs=RebelMouse_fb%23"+o,reddit:"http://www.reddit.com/submit?url={{share_url}}%23"+o,twitter:"https://twitter.com/intent/tweet?{{#share_url}}url={{share_url}}%3Fxrs=RebelMouse_tw%23"+o+"{{/share_url}}&text={{^alternate_headline_in_use}}{{#sharing_texts}}{{{twitter_text}}}{{/sharing_texts}}{{/alternate_headline_in_use}}{{#alternate_headline_in_use}}{{{share_headline}}}{{/alternate_headline_in_use}}{{#via}}&via={{via}}{{/via}}",pinterest:"http://pinterest.com/pin/create/button/?url={{share_url}}%23"+o+"&media="+r+"&description={{#media_description}}{{media_description}}{{/media_description}}{{^media_description}}{{share_headline_helper}}{{/media_description}}",tumblr:"http://www.tumblr.com/share?s=&t={{share_headline_helper}}&u={{share_url}}%23"+o+"&v=3",linkedin:"http://www.linkedin.com/shareArticle?mini=false&url={{share_url}}"+o,whatsapp:"whatsapp://send?text={{share_url}}%23"+o,link:window.location.href},l=t.extend(a,{facebook:"http://www.facebook.com/{{^fb_sharing}}sharer/sharer.php?u{{/fb_sharing}}{{#fb_sharing}}dialog/feed?app_id={{fb_sharing.app_id}}&display=popup&link{{/fb_sharing}}={{share_url}}%3Fxrs=RebelMouse_fb%23"+o+"&picture="+r+"{{#fb_sharing}}&redirect_uri={{fb_sharing.domain}}/static/fb_exit.html?fb={{share_url}}%3F{{/fb_sharing}}"}),c={postLink:function(){var e=n.site.embed_settings&&n.site.embed_settings.share_origin,i=n.site.embed_settings&&n.site.embed_settings.embed_as_origin,s=n.inEmbed&&n.is_paid_domain&&n.referrer,o=void 0===this.original_url||0===this.provider_id&&""===this.original_url,r=t.isUndefined(this.is_direct_link)?this.original_url:this.is_direct_link?this.original_url:this.post_url;return s&&(r=c.buildEmbeddedPostUrl(this)),e&&(r=t.isString(e)?e:this.original_url||this.post_url),s&&i&&o&&(r=c.buildEmbeddedPostUrl(this)),r||""},buildPostUrl:function(e){var t=e.basename?e.basename+"-":"",i="slideshow"===e.type?"-s"+(e.slideshow.active_slide||0):"";return t+e.id+i+".html"},buildEmbeddedPostUrl:function(e){var t=c.buildPostUrl(e.toJSON?e.toJSON():e),i=(n.referrer||"").replace(new RegExp("[?&]__rmid=[^&]+"),"");return i+(/\?/.test(i)?"&":"?")+"__rmid="+t}},d={postLink:function(){return c.postLink.apply(this,arguments)},share_url:function(){var e=c.postLink.apply(this,arguments);return!!e&&encodeURIComponent(e)},share_image:function(){return"slideshow"===this.type&&this.slideshowCount()?this.slideshow.slides&&encodeURIComponent(this.slideshow.slides[0].image210x)||"":encodeURIComponent(this.image600x||this.image300x||this.image210x||"")},via:function(){if(n.site.twitter_share_template||!n.site.providers)return!1;var e=n.site.owner_id===n.user.id,t=n.providers.twitter.user_name,i=n.site.owner_data&&n.site.owner_data.twitter_name||"";if(!e&&i&&!/RebelMouse/.test(i)&&this.is_custom_post)return encodeURIComponent(i+"'s rebelmouse");if(!e&&this.is_tw_post){if(t&&t===this.author_screen_name)return encodeURIComponent(t+"'s rebelmouse");if(this.author_screen_name)return encodeURIComponent(this.author_screen_name)}if(e&&t&&"rebelmouse"!==t.toLowerCase()){if(!this.is_tw_post)return"RebelMouse";if(t===this.author_screen_name)return"RebelMouse";if(this.author_screen_name)return encodeURIComponent(this.author_screen_name)}return"RebelMouse"}};function u(e,i){var s=/\%3F/g,n=/\?/g.test(e.get("post_url")),o={};return t.each(i?l:a,function(e,t){o[t]=n?e.replace(s,"%26"):e},this),o}function h(e,s,n){var r=n||u(e),a=e.toJSON(),l=s.mediaUrl;return a.mediacode=s.mediaCode,a.share_media=encodeURIComponent(l),a.share_media_decoded=l,a.media_description=s.mediaDescription,t.each(t.keys(r),function(e){r[e]="email"!==e?i.compile(r[e]).render(a,d):function(e,t,s){var n=t.sharing_texts||t.sharing_post_texts;return t.Post_Link=n.variables.Post_Link+"#"+i.compile(o).render(t,s),t.Signed_in_User=n.variables.Signed_in_User,t.Site_Title=n.variables.Site_Title,(e=i.compile(e).render(t,s)).replace(/(body=)([^]*)/,function(e,t,i){return t+encodeURIComponent(i)})}(n[e],a,d)}),r}return{openPopupWindow:function(e,t){if(e.indexOf("mailto:")>-1)return window.location.href=e,!1;t=t||{};var i=function(){var e=0,t=0;return"number"==typeof window.innerWidth?(e=window.innerWidth,t=window.innerHeight):document.documentElement&&(document.documentElement.clientWidth||document.documentElement.clientHeight)?(e=document.documentElement.clientWidth,t=document.documentElement.clientHeight):document.body&&(document.body.clientWidth||document.body.clientHeight)&&(e=document.body.clientWidth,t=document.body.clientHeight),{width:e,height:t}}(),n=window.self!==window.top,o=t.width||660,r=t.height||280,a=(i.width-o)/2,l=(i.height-r)/2;return n?a=l=0:(a=a<0?0:a,l=l<0?0:l),s.open(e,"_blank","width="+o+",height="+r+",left="+a+",top="+l+",resizable=yes,scrollbars=yes",!1)},updateUrlArgs:u,getRenderedShareTemplates:function(e,t){return h(e,t,null)},getRenderedShareTemplatesForMedia:function(e,t){return h(e,t,u(e,!0))},getTweetURL:function(e){return"https://twitter.com/share?"+t.map(e,function(e,t){return[t,encodeURIComponent(e)].join("=")}).join("&")},getFbURL:function(e){return"http://www.facebook.com/sharer.php?u="+encodeURIComponent(e)},getAllowedShareOptions:function(e,i){var s=[];return t.each(i,function(i){if(t.has(e,i)){var n=i,o=i;"facebook"===i?(n="fb",o="fb"):"twitter"===i?(n="tw",o="tw"):"pinterest"===i?(n="pinterest",o="pt"):"tumblr"===i?(n="tumblr",o="tl"):"email"===i?(n="email",o="em"):"link"===i&&(n="link",o="ln"),s.push({socialNetwork:i,anchorClassName:n,iconClassName:o,dataTrackShare:i.charAt(0).toUpperCase()+i.slice(1),href:e[i]})}}),s}}}),rblms.define("social-ux/view/share",["require","jquery","underscore","backbone","settings","social-ux/view/sharer","core/event_dispatcher","core/stats/ga_tracker"],function(e){var t=e("jquery"),i=(e("underscore"),e("backbone")),s=(e("settings"),e("social-ux/view/sharer")),n=e("core/event_dispatcher"),o=e("core/stats/ga_tracker");return i.View.extend({events:{"click a.share":"share"},share:function(e){var i={},r=t(e.currentTarget),a=r.attr("href")||window.location.href,l=r.data("track-share"),c=r.hasClass("share-fb"),d=r.is(".share-tw"),u=r.is(".share-reddit"),h=r.is(".share-sms"),p=r.is(".share-email"),g=r.is(".share-pinterest"),f=(r.data("share-params"),null);l&&o.trackAction("share.click_post",{label:l,share_url:this.model.get("share_url")}),l&&n.trigger("post:share",this.model.toJSON(),l.toLowerCase()),i={width:550,height:425},d?i={width:450,height:240}:g?i={width:750,height:546}:u&&(i={width:850,height:546}),p||h||(f=s.openPopupWindow("",i))&&e.preventDefault(),e.stopPropagation(),r.data("ga-tracking")&&o.trackAction("share_site.%s".format(r.data("ga-tracking")),this.model.get("share_url")),c?f.location.href=a+"&name="+encodeURIComponent(this.model.get("headline")):f&&(f.location.href=a)},extractPlainText:function(e){return this.isExternalPost()?this.stripTags(decodeURIComponent(e)):e},isExternalPost:function(){return 0!==this.model.get("provider_id")},stripTags:function(e){return e.replace(/(<([^>]+)>)/gi,"")}})}),rblms.define("core/editor/models/listicle_wizard_settings",["require","backbone","underscore","core/app_engine"],function(e){var t,i=e("backbone"),s=e("underscore"),n=e("core/app_engine"),o={ASC:1,DESC:-1,fromStr:function(e){var t=e.toUpperCase();return t in o?o[t]:o.ASC}},r={LISTICLE:1,SLIDESHOW:2,FULLSCREEN:3,VOTING:4,fromStr:function(e){var t=e.toUpperCase();return t in r?r[t]:r.ASC}};function a(e){return e.match(/\d+/g)||[]}return t=i.Model.extend({defaults:{use_pagination:!!n.get("rebel_lt_pagination_order",""),pagination_order:a(n.get("rebel_lt_pagination_order","")),use_ads:!!n.get("rebel_lt_ads_order",""),ads_order:a(n.get("rebel_lt_ads_order","")),use_numeration:!!n.get("rebel_lt_use_numeration",!1),numeration_sort:~~n.get("rebel_lt_numeration_sort",o.ASC),body_text_above:n.get("rebel_lt_body_text_above",!1)},toSettings:function(){var e=this.toJSON();return 0===e.pagination_order.length&&(e.pagination_order=e.pagination_times?[e.pagination_times]:[]),0===e.ads_order.length&&(e.ads_order=e.ads_times?[e.ads_times]:[]),delete e.pagination_times,delete e.ads_times,e}},{CONSTS:{sort:o,layoutType:r},Utils:{strToArray:a},createFromSettings:function(e){var i=s.defaults(e,t.prototype.defaults),n=i.pagination_order.length>1,o=i.ads_order.length>1,r=s.extend({},i,{pagination_order:n?i.pagination_order:[],pagination_times:n?0:s.last(i.pagination_order),ads_order:o?i.ads_order:[],ads_times:o?0:s.last(i.ads_order)});return new t(r)}})}),rblms.define("utils/storage_factory",["require","underscore"],function(e){var t=e("underscore"),i={};function s(e){var i,s,n=[e,"Storage"].join(""),o=function(e){try{return e in window&&null!==window[e]}catch(e){return!1}}(n),r={};return o?(i=window[n],t.each(["key","removeItem","clear"],function(e){r[e]=t.isFunction(i[e])?t.bind(i[e],i):i[e]})):(s={},r=t.extend(r,{key:function(e){return t.keys(s)[e]},removeItem:function(e){return delete s[e]},clear:function(){return s={}}})),r=t.extend(r,{getItem:function(e){var t=o?i.getItem(e):s.hasOwnProperty(e)?s[e]:void 0;try{return t?JSON.parse(t):void 0}catch(e){return t}},setItem:function(e,t){var n=JSON.stringify(t);return o?i.setItem(e,n):s[e]=n}})}return{getInstance:function(e){return e in i?i[e]:(i[e]=new s(e),i[e])}}}),rblms.define("utils/local_storage",["require","utils/storage_factory"],function(e){return e("utils/storage_factory").getInstance("local")}),rblms.define("social-ux/model/polls",["require","backbone","underscore","settings","utils/local_storage"],function(e){var t=e("backbone"),i=e("underscore"),s=e("settings"),n=e("utils/local_storage");return t.Model.extend({urlRoot:function(){var e="";if(!s.is_autorized){var t=n.getItem("RM-poll");e=i.isEmpty(t)?"":"?voter_id="+t.voter_id}return"/core/v1/sites/<site_id>/posts/<post_id>/poll<voter_id>".replace("<site_id>",this.get("site_id")).replace("<post_id>",this.get("post_id")).replace("<voter_id>",e)},parse:function(e,t){return s.is_autorized||n.setItem("RM-poll",{voter_id:e.vote.voter_id}),e}})}),rblms.define("social-ux/model/poll_votes",["backbone","underscore","utils"],function(e){return e.Model.extend({urlRoot:function(){return"/core/v1/sites/<site_id>/posts/<post_id>/poll/votes?voter_id=<voter_id>".replace("<site_id>",this.get("site_id")).replace("<post_id>",this.get("post_id")).replace("<voter_id>",this.get("voter_id"))}})}),rblms.define("hogan_with_filters",["hogan","underscore","utils"],function(e,t,i){e.filters=i.filters;var s=e.Template.prototype.render;return e.Template.prototype.render=function(e,n,o,r){return s.call(this,t.extend({},i.filters,e||{},n||{}),o,r)},e}),rblms.define("text",["module"],function(e){"use strict";var t,i,s,n,o,r=["Msxml2.XMLHTTP","Microsoft.XMLHTTP","Msxml2.XMLHTTP.4.0"],a=/^\s*<\?xml(\s)+version=[\'\"](\d)*.(\d)*[\'\"](\s)*\?>/im,l=/<body[^>]*>\s*([\s\S]+)\s*<\/body>/im,c="undefined"!=typeof location&&location.href,d=c&&location.protocol&&location.protocol.replace(/\:/,""),u=c&&location.hostname,h=c&&(location.port||void 0),p={},g=e.config&&e.config()||{};return t={version:"2.0.14",strip:function(e){if(e){var t=(e=e.replace(a,"")).match(l);t&&(e=t[1])}else e="";return e},jsEscape:function(e){return e.replace(/(['\\])/g,"\\$1").replace(/[\f]/g,"\\f").replace(/[\b]/g,"\\b").replace(/[\n]/g,"\\n").replace(/[\t]/g,"\\t").replace(/[\r]/g,"\\r").replace(/[\u2028]/g,"\\u2028").replace(/[\u2029]/g,"\\u2029")},createXhr:g.createXhr||function(){var e,t,i;if("undefined"!=typeof XMLHttpRequest)return new XMLHttpRequest;if("undefined"!=typeof ActiveXObject)for(t=0;t<3;t+=1){i=r[t];try{e=new ActiveXObject(i)}catch(e){}if(e){r=[i];break}}return e},parseName:function(e){var t,i,s,n=!1,o=e.lastIndexOf("."),r=0===e.indexOf("./")||0===e.indexOf("../");return-1!==o&&(!r||o>1)?(t=e.substring(0,o),i=e.substring(o+1)):t=e,-1!==(o=(s=i||t).indexOf("!"))&&(n="strip"===s.substring(o+1),s=s.substring(0,o),i?i=s:t=s),{moduleName:t,ext:i,strip:n}},xdRegExp:/^((\w+)\:)?\/\/([^\/\\]+)/,useXhr:function(e,i,s,n){var o,r,a,l=t.xdRegExp.exec(e);return!l||(o=l[2],a=(r=(r=l[3]).split(":"))[1],r=r[0],!(o&&o!==i||r&&r.toLowerCase()!==s.toLowerCase()||(a||r)&&a!==n))},finishLoad:function(e,i,s,n){s=i?t.strip(s):s,g.isBuild&&(p[e]=s),n(s)},load:function(e,i,s,n){if(n&&n.isBuild&&!n.inlineText)s();else{g.isBuild=n&&n.isBuild;var o=t.parseName(e),r=o.moduleName+(o.ext?"."+o.ext:""),a=i.toUrl(r),l=g.useXhr||t.useXhr;0!==a.indexOf("empty:")?!c||l(a,d,u,h)?t.get(a,function(i){t.finishLoad(e,o.strip,i,s)},function(e){s.error&&s.error(e)}):i([r],function(e){t.finishLoad(o.moduleName+"."+o.ext,o.strip,e,s)}):s()}},write:function(e,i,s,n){if(p.hasOwnProperty(i)){var o=t.jsEscape(p[i]);s.asModule(e+"!"+i,"define(function () { return '"+o+"';});\n")}},writeFile:function(e,i,s,n,o){var r=t.parseName(i),a=r.ext?"."+r.ext:"",l=r.moduleName+a,c=s.toUrl(r.moduleName+a)+".js";t.load(l,s,function(i){var s=function(e){return n(c,e)};s.asModule=function(e,t){return n.asModule(e,c,t)},t.write(e,l,s,o)},o)}},"node"===g.env||!g.env&&"undefined"!=typeof process&&process.versions&&process.versions.node&&!process.versions["node-webkit"]&&!process.versions["atom-shell"]?(i=require.nodeRequire("fs"),t.get=function(e,t,s){try{var n=i.readFileSync(e,"utf8");"\ufeff"===n[0]&&(n=n.substring(1)),t(n)}catch(e){s&&s(e)}}):"xhr"===g.env||!g.env&&t.createXhr()?t.get=function(e,i,s,n){var o,r=t.createXhr();if(r.open("GET",e,!0),r instanceof XMLHttpRequest&&(r.withCredentials=!0),n)for(o in n)n.hasOwnProperty(o)&&r.setRequestHeader(o.toLowerCase(),n[o]);g.onXhr&&g.onXhr(r,e),r.onreadystatechange=function(t){var n,o;4===r.readyState&&((n=r.status||0)>399&&n<600?((o=new Error(e+" HTTP status: "+n)).xhr=r,s&&s(o)):i(r.responseText),g.onXhrComplete&&g.onXhrComplete(r,e))},r.send(null)}:"rhino"===g.env||!g.env&&"undefined"!=typeof Packages&&"undefined"!=typeof java?t.get=function(e,t){var i,s,n=new java.io.File(e),o=java.lang.System.getProperty("line.separator"),r=new java.io.BufferedReader(new java.io.InputStreamReader(new java.io.FileInputStream(n),"utf-8")),a="";try{for(i=new java.lang.StringBuffer,(s=r.readLine())&&s.length()&&65279===s.charAt(0)&&(s=s.substring(1)),null!==s&&i.append(s);null!==(s=r.readLine());)i.append(o),i.append(s);a=String(i.toString())}finally{r.close()}t(a)}:("xpconnect"===g.env||!g.env&&"undefined"!=typeof Components&&Components.classes&&Components.interfaces)&&(s=Components.classes,n=Components.interfaces,Components.utils.import("resource://gre/modules/FileUtils.jsm"),o="@mozilla.org/windows-registry-key;1"in s,t.get=function(e,t){var i,r,a,l={};o&&(e=e.replace(/\//g,"\\")),a=new FileUtils.File(e);try{(i=s["@mozilla.org/network/file-input-stream;1"].createInstance(n.nsIFileInputStream)).init(a,1,0,!1),(r=s["@mozilla.org/intl/converter-input-stream;1"].createInstance(n.nsIConverterInputStream)).init(i,"utf-8",i.available(),n.nsIConverterInputStream.DEFAULT_REPLACEMENT_CHARACTER),r.readString(i.available(),l),r.close(),i.close(),t(l.value)}catch(e){throw new Error((a&&a.path||"")+": "+e)}}),t}),rblms.define("hgn",["hogan_with_filters","text"],function(e,t){var i,s=".mustache",n={},o={},r='define("{{pluginName}}!{{moduleName}}", ["hogan_with_filters"], function(hogan){  var tmpl = new hogan.Template({{{fn}}}, "", hogan);  function render(){ return tmpl.render.apply(tmpl, arguments); } tmpl.text = {{{text}}}; render.template = tmpl; return render;});\n';return{load:function(i,r,a,l){var c=l.hgn||{},d=i,u=c&&null!=c.templateExtension?c.templateExtension:s;d.indexOf(u)<0&&(d+=u),t.get(r.toUrl(d),function(t){var s=c.compilationOptions?function(e,t){var i;for(i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}({},c.compilationOptions):{};l.isBuild&&(s.asString=!0,n[i]=e.compile(t,s),o[i]=JSON.stringify(t));var r,d,u=e.compile(t,s),h=(r=u.render,d=u,function(){return r.apply(d,arguments)});h.text=u.text,h.template=u,a(h)})},write:function(t,s,a){if(s in n){i||(i=e.compile(r));var l=n[s];a(i.render({pluginName:t,moduleName:s,fn:l,text:o[s]}))}}}}),rblms.define("hgn!social-ux/template/listicle_voting_up_down",["hogan_with_filters"],function(e){var t=new e.Template(function(e,t,i){var s=(i=i||"")+"",n=this;return s+='    <div class="vote--up_down">',s+="\n"+i,s+='        <button class="vote-down ',n.s(n.d("vote.negative",e,t,1),e,t,0,83,88,"{{ }}")?(s+=n.rs(e,t,function(e,t){var i="";return i+="voted"}),e.pop()):(s+=n.b,n.b=""),s+=" ",n.s(n.f("enabled",e,t,1),e,t,1,0,0,"")||(s+="disabled"),s+='"',s+="\n"+i,s+="            ",n.s(n.f("enabled",e,t,1),e,t,1,0,0,"")||(s+="disabled"),s+=">",s+="\n"+i,s+='            <div class="vote-container">',s+="\n"+i,s+='                <svg class="icon-arrow_drop_down" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">',s+="\n"+i,s+='                    <path d="M7 10l5 5 5-5z"/><path d="M0 0h24v24H0z" fill="none"/>',s+="\n"+i,s+="                </svg>",s+="\n"+i,s+='                <div class="number-container">',s+="\n"+i,s+='                    <div class="number">',s+=n.v(n.d("poll.negative",e,t,0)),s+="</div>",s+="\n"+i,s+='                    <div class="votes">Votes</div>',s+="\n"+i,s+="                </div>",s+="\n"+i,s+="            </div>",s+="\n"+i,s+="        </button>",s+="\n"+i,s+='        <button class="vote-up ',n.s(n.d("vote.positive",e,t,1),e,t,0,735,740,"{{ }}")?(s+=n.rs(e,t,function(e,t){var i="";return i+="voted"}),e.pop()):(s+=n.b,n.b=""),s+=" ",n.s(n.f("enabled",e,t,1),e,t,1,0,0,"")||(s+="disabled"),s+='"',s+="\n"+i,s+="            ",n.s(n.f("enabled",e,t,1),e,t,1,0,0,"")||(s+="disabled"),s+=">",s+="\n"+i,s+='            <div class="vote-container">',s+="\n"+i,s+='                <svg class="icon-arrow_drop_up" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">',s+="\n"+i,s+='                    <path d="M7 14l5-5 5 5z"/><path d="M0 0h24v24H0z" fill="none"/>',s+="\n"+i,s+="                </svg>",s+="\n"+i,s+='                <div class="number-container">',s+="\n"+i,s+='                    <div class="number">',s+=n.v(n.d("poll.positive",e,t,0)),s+="</div>",s+="\n"+i,s+='                    <div class="votes">Votes</div>',s+="\n"+i,s+="                </div>",s+="\n"+i,s+="            </div>",s+="\n"+i,s+="        </button>",s+="\n"+i,s+="    </div>",s+="\n"},"",e);function i(){return t.render.apply(t,arguments)}return t.text='    <div class="vote--up_down">\n        <button class="vote-down {{#vote.negative}}voted{{/vote.negative}} {{^enabled}}disabled{{/enabled}}"\n            {{^enabled}}disabled{{/enabled}}>\n            <div class="vote-container">\n                <svg class="icon-arrow_drop_down" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">\n                    <path d="M7 10l5 5 5-5z"/><path d="M0 0h24v24H0z" fill="none"/>\n                </svg>\n                <div class="number-container">\n                    <div class="number">{{poll.negative}}</div>\n                    <div class="votes">Votes</div>\n                </div>\n            </div>\n        </button>\n        <button class="vote-up {{#vote.positive}}voted{{/vote.positive}} {{^enabled}}disabled{{/enabled}}"\n            {{^enabled}}disabled{{/enabled}}>\n            <div class="vote-container">\n                <svg class="icon-arrow_drop_up" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">\n                    <path d="M7 14l5-5 5 5z"/><path d="M0 0h24v24H0z" fill="none"/>\n                </svg>\n                <div class="number-container">\n                    <div class="number">{{poll.positive}}</div>\n                    <div class="votes">Votes</div>\n                </div>\n            </div>\n        </button>\n    </div>\n',i.template=t,i}),rblms.define("social-ux/view/listicle_voting_up_down_item",["require","underscore","backbone","core/stats/ga_tracker","hgn!social-ux/template/listicle_voting_up_down"],function(e){var t=e("underscore"),i=e("backbone"),s=e("core/stats/ga_tracker"),n=e("hgn!social-ux/template/listicle_voting_up_down");return i.View.extend({events:{"click .vote-up":"up","click .vote-down":"down"},initialize:function(e){this.postModel=e.postModel,this.pollModel=e.pollModel,this.listicleId=""+e.listicleId,this.listicle=this._getListicleItemById(e.listicleId),this.pollModel&&this.listenTo(this.pollModel,"change:poll",this.render.bind(this))},up:function(){this._vote({positive:1,negative:0}),s.trackAction("voting.up",this._buildListicleUrl())},down:function(){this._vote({positive:0,negative:1}),s.trackAction("voting.down",this._buildListicleUrl())},_vote:function(e){var i={},s=t.clone(this.pollModel.get("vote"));i[this.listicleId]=e,s.reactions=t.extend({},s.reactions,i),this.pollModel.set({vote:s})},render:function(){var e,i,s={positive:0,negative:0};return i=this.pollModel?{vote:e=t.defaults(this.pollModel.get("vote").reactions[this.listicleId]||{},s),poll:t.defaults(this.pollModel.get("poll").reactions[this.listicleId]||{},s),enabled:0===e.positive&&0===e.negative}:{vote:s,poll:s,enabled:!1},this.$el.html(n(i)),this},_buildListicleUrl:function(){return"<post_url>?rebelltitem=<listicle_id>&title=<listicle_title>#rebelltitem<listicle_id>".replace(/<post_url>/g,decodeURIComponent(this.postModel.get("share_url"))).replace(/<listicle_title>/g,encodeURIComponent(this.listicle.headline)).replace(/<listicle_id>/g,this.listicleId)},_getListicleItemById:function(e){var i=this.postModel.get("listicle").items;return i[t.findIndex(i,{id:e})]}})}),rblms.define("social-ux/view/listicle_voting_up_down",["require","jquery","underscore","backbone","settings","social-ux/model/polls","social-ux/model/poll_votes","social-ux/view/listicle_voting_up_down_item","hgn!social-ux/template/listicle_voting_up_down"],function(e){var t=e("jquery"),i=e("underscore"),s=e("backbone"),n=e("settings"),o=e("social-ux/model/polls"),r=e("social-ux/model/poll_votes"),a=e("social-ux/view/listicle_voting_up_down_item");e("hgn!social-ux/template/listicle_voting_up_down");return s.View.extend({initialize:function(e){this.postModel=e.postModel,this.listicle=this.postModel.get("listicle"),this.pollModel=new o({site_id:n.site.id,post_id:this.postModel.get("id")}),this.listenTo(this.pollModel,"change:vote",this.voting_up_down.bind(this)),this.initData()},initData:function(){this.pollModel.fetch({success:i.bind(function(e){this.pollVotes=new r({site_id:n.site.id,post_id:this.postModel.get("id"),voter_id:this.pollModel.get("vote").voter_id}),i.map(this.$(".rebellt-item"),function(i){var s=t(i).data("id");this.makeInstance(a,{postModel:this.postModel,pollModel:e,listicleId:s,el:t(i).find(".up_down_voting--wrp")}).render()}.bind(this))},this),error:i.bind(function(e,s){i.map(this.$(".rebellt-item"),function(e){var i=t(e).data("id");this.makeInstance(a,{postModel:this.postModel,pollModel:null,listicleId:i,el:t(e).find(".up_down_voting--wrp")}).render()}.bind(this))},this),silent:!0})},voting_up_down:function(){var e=this.pollModel.get("vote");this.pollVotes.save(e,{success:i.bind(function(e){this.pollModel.set({poll:e.get("poll")})},this)})}})}),rblms.define("hgn!widgets/templates/product_details",["hogan_with_filters"],function(e){var t=new e.Template(function(e,t,i){var s=(i=i||"")+"",n=this;return s+='<button class="view-products">TAP TO VIEW PRODUCTS</button>',s+="\n"+i,s+='<button class="hide-products hidden">TAP TO HIDE PRODUCTS</button>',s+="\n"+i,s+='<div class="products-container hidden">',s+="\n"+i,n.s(n.f("items",e,t,1),e,t,0,181,1e3,"{{ }}")?(s+=n.rs(e,t,function(e,t){var s="";return s+='    <div class="dots-container" style="',s+=n.v(n.f("style",e,t,0)),s+='">',s+="\n"+i,s+='        <div class="product-dot-cont">',s+="\n"+i,s+='            <div class="product-dot">',s+="\n"+i,s+='                <div class="details-container hidden">',s+="\n"+i,s+='                    <div class="description-container">',s+="\n"+i,s+='                        <p class="dots-container__title">',s+=n.v(n.f("title",e,t,0)),s+="</p>",s+="\n"+i,n.s(n.f("thumbnail",e,t,1),e,t,0,530,642,"{{ }}")?(s+=n.rs(e,t,function(e,t){var i="";return i+='                             <img src="',i+=n.v(n.f("thumbnail",e,t,0)),i+='" class="dots-container__image" />',i+="\n"}),e.pop()):(s+=n.b,n.b=""),s+='                        <p class="dots-container__price">',s+=n.v(n.f("price",e,t,0)),s+="</p>",s+="\n"+i,s+="                    </div>",s+="\n"+i,s+='                    <div class="info-container">',s+="\n"+i,s+='                        <a class="dots-container__link"  href="',s+=n.v(n.f("href",e,t,0)),s+='" target="_blank">Buy</a>',s+="\n"+i,s+="                    </div>",s+="\n"+i,s+="                </div>",s+="\n"+i,s+="            </div>",s+="\n"+i,s+="        </div>",s+="\n"+i,s+="    </div>",s+="\n"}),e.pop()):(s+=n.b,n.b=""),s+="</div>",s+="\n"},"",e);function i(){return t.render.apply(t,arguments)}return t.text='<button class="view-products">TAP TO VIEW PRODUCTS</button>\n<button class="hide-products hidden">TAP TO HIDE PRODUCTS</button>\n<div class="products-container hidden">\n    {{#items}}\n    <div class="dots-container" style="{{style}}">\n        <div class="product-dot-cont">\n            <div class="product-dot">\n                <div class="details-container hidden">\n                    <div class="description-container">\n                        <p class="dots-container__title">{{title}}</p>\n                        {{#thumbnail}}\n                             <img src="{{thumbnail}}" class="dots-container__image" />\n                        {{/thumbnail}}\n                        <p class="dots-container__price">{{price}}</p>\n                    </div>\n                    <div class="info-container">\n                        <a class="dots-container__link"  href="{{href}}" target="_blank">Buy</a>\n                    </div>\n                </div>\n            </div>\n        </div>\n    </div>\n    {{/items}}\n</div>\n',i.template=t,i}),rblms.define("social-ux/view/listicle_product_support",["require","jquery","underscore","backbone","hgn!widgets/templates/product_details"],function(e){var t=e("jquery"),i=e("underscore"),s=e("backbone"),n=e("hgn!widgets/templates/product_details");return s.View.extend({className:"product-image-container",events:{"click .product-dot-cont":"showProductDetails","click .view-products":"showProducts","click .hide-products":"hideProducts","click .dots-container__link":"openUrl"},initialize:function(e){this.options=i.extend({maxCropWidth:980},e)},showProducts:function(e){e&&e.preventDefault(),this.$(".details-container").toggleClass("hidden",!0),this.$(".products-container").toggleClass("hidden",!1),this.$(".hide-products").toggleClass("hidden",!1),this.$(".view-products").toggleClass("hidden",!0),this.$(".share-media-panel").toggleClass("hidden",!0)},hideProducts:function(e){e&&e.preventDefault(),this.$(".details-container").toggleClass("hidden",!0),this.$(".products-container").toggleClass("hidden",!0),this.$(".hide-products").toggleClass("hidden",!0),this.$(".view-products").toggleClass("hidden",!1),this.$(".share-media-panel").toggleClass("hidden",!1)},openUrl:function(e){e&&e.preventDefault(),window.open(t(e.currentTarget).attr("href"))},showProductDetails:function(e){e&&e.preventDefault();var i=t(e.currentTarget),s=t(".details-container",i),n=s.parents(".product-image-container"),o=t(".details-container",i).hasClass("hidden");if(this.$(".details-container").toggleClass("hidden",!0),s.toggleClass("hidden",!o),o){var r=s.offset(),a=n.offset(),l=r.left+s.width(),c=a.left+n.width(),d=r.top+s.height(),u=a.top+n.height();if(r.left-a.left<s.width()/2&&s.addClass("left"),c-l<s.width()/2&&s.addClass("right"),u-d<-30){var h=-1*(s.height()+36);s.addClass("bottom").css("top",h+"px")}}},render:function(){var e={items:i.map(t("area",this.options.$imageMap),function(e){var i=t(e),s=(i.prop("coords")||"").split(","),n=s[0]+"%;",o=s[1]+"%;";if(s.length>1)return{style:"top: "+o+" left: "+n,title:i.prop("title"),href:i.prop("href"),price:i.data("price"),thumbnail:i.data("image-src")}},this)};return this.options.$img.closest(".product-image-container").length>0?(this.$el.empty(),this.$el.html(n(e))):(this.$el.insertAfter(this.options.$img).html(n(e)),this.options.$img.prependTo(this.$el)),this.setElement(this.$el),this}})}),rblms.define("social-ux/utils/editor",["require","underscore","jquery","settings","social-ux/utils/urlutils"],function(e){var t=e("underscore"),i=e("jquery"),s=e("settings"),n=e("social-ux/utils/urlutils"),o=s.base_ssl_domain||"";return{openAddPost:function(){window.location=this.getAddPostUrl()},getAddPostUrl:function(){return o+"/core/community/add_post"},openEditPost:function(e){location.href=this.getEditPostUrl(e)},getEditPostUrl:function(e){var t=e.tabId?"#%s".format(e.tabId):"";return"%s/core/dashboard/editor/%s%s".format(o,e.postId,t)},openDraftPreview:function(e){var s=e.post_url,o=n.parse_url(s),r=t.extend({},o.params,{draft:1});window.open([o.origin,i.param(r)].join("?"),"_blank")},openScheduledPosts:function(e){window.location="/core/dashboard/scheduled_posts?site="+e},close:function(){var e=document.referrer.split("?add-post")[0];window.location.replace(e)}}}),rblms.define("social-ux/view/post_base",["require","backbone","jquery","underscore","core/stats/ga_tracker","core/event_dispatcher","social-ux/view/slideshow","social-ux/view/share","core/editor/models/listicle_wizard_settings","social-ux/view/listicle_voting_up_down","social-ux/view/listicle_product_support","settings","social-ux/utils/editor","utils/embeds","utils/device","social-ux/utils/urlutils","hogan","core/app_engine"],function(e){var t=e("backbone"),i=e("jquery"),s=e("underscore"),n=e("core/stats/ga_tracker"),o=e("core/event_dispatcher"),r=e("social-ux/view/slideshow"),a=e("social-ux/view/share"),l=e("core/editor/models/listicle_wizard_settings").CONSTS,c=e("social-ux/view/listicle_voting_up_down"),d=e("social-ux/view/listicle_product_support"),u=e("settings"),h=e("social-ux/utils/editor"),p=e("utils/embeds"),g=e("utils/device"),f=e("social-ux/utils/urlutils"),m=e("hogan"),_=e("core/app_engine"),v=m.compile('<div class="hover-menu-options">{{#canEdit}}<span class="hover-menu edit" title="Edit"><i class="material-icons">edit</i></span>{{/canEdit}}{{#canStick}}<span class="hover-menu freeze {{#isFrozen}} active {{/isFrozen}}" title="Freeze Post: keep this story in this spot on the page"><i class="material-icons">ac_unit</i></span>{{/canStick}}{{#canReorder}}<span class="hover-menu move" title="Reorder"><i class="material-icons">open_with</i></span>{{/canReorder}}{{#canOpenDiscovery}}<span class="hover-menu editor-tab" data-tab-id="social_scheduling" title="Social Scheduling"><i class="material-icons">share</i></span><span class="hover-menu editor-tab" data-tab-id="social" title="Social Copy"><i class="icons--social"></i></span>{{/canOpenDiscovery}}{{#canViewStatistics}}<span class="hover-menu editor-tab" data-tab-id="stats" title="Stats"><i class="material-icons">trending_up</i></span>{{/canViewStatistics}}{{#canToggleVisibility}}<span class="hover-menu visibility" title="Hide"><i class="material-icons">visibility</i></span>{{/canToggleVisibility}}{{#canDelete}}<span class="hover-menu remove delete" title="Remove"><i class="material-icons">delete</i></span>{{/canDelete}}</div>');return t.View.extend({events:function(){return s.extend({},{"activate .js-page-view-and-reload-embeds":"handlePageViewAndEmbedReload",mouseenter:"mouse_enter",mouseleave:"mouse_leave","click .tags a":"clickTags","click .js-track-comments":"trackComments","click .share-copy-link":"shareCopyLink","click .share-facebook-messenger":"shareFacebookMessenger","click .bookmarklet":"showBookmarklet","click .edit ,.editor-tab":"editPostInNewTab","click .discovery":"showDiscovery","click .annotation--label":"showAnnotation","click .annotation--close":"hideAnnotation"},this.isAsyncListiclePager()?{"click .js-listicle-switch-page":"listicleSwitchPage"}:{})},initialize:function(){u.use_river&&(this.initRiverFollowButton(),this.initRiverComments(),this.initRiverLikes()),this.initCollectButton(),this.initListicleSlideshows(),this.initListicleProductSupport(),this.initLeadMediaProductSupport(),(s.contains([11059957,18284455,17283729],u.site.id)||/[\?&]particle-url[=&]/.test(window.location)||_.get("use_ee_lw_update_url_on_scroll")||i(".js--playlist--list").length)&&(this.listenTo(this.router,"window:scrolling",this.listicleUpdateUrl.bind(this)),this.renderPlaylist(!0))},initRiverLikes:function(){this.lazyLoad(this.$(".like-button").length,{View:"social-ux/view/likes"},function(){var e=t.Collection.extend({url:"/core/feeds/post/likes/"}),i=u.user_site||s.findWhere(u.sites,{current:!0});if(s.isUndefined(this.model.sharedGet("likesCollection"))){var n=this.model.sharedGet("likes")&&s.values(this.model.sharedGet("likes").sites);this.model.sharedSet("likesCollection",new e(n))}this.makeInstance(this._extraDeps.View,{model:this.model,el:this.$(".like-button"),likesCollection:this.model.sharedGet("likesCollection"),userSite:i}).render()})()},initRiverComments:function(){this.lazyLoad(this.$(".community-comments-wrp").length,{View:"social-ux/view/community_comments"},function(){this.makeInstance(this._extraDeps.View,{router:this.options.router,postModel:this.model,post_id:this.model.get("id"),counter:!0,limit:10,el:this.$(".community-comments-wrp")}).render()})()},initCollectButton:function(){this.lazyLoad(this.$(".collection-button").length,{View:"social-ux/view/collection-button"},function(){this.makeInstance(this._extraDeps.View,{postModel:this.model,el:this.$(".collection-button"),router:this.router})})()},initRiverFollowButton:function(){if(u.is("authorized")||u.is_autorized){var e=this.model.get("roar_author_ids")||[],t=s.contains(e,u.user_site.id);this.lazyLoad(!t,{View:"social-ux/view/follow_button"},function(){this.makeInstance(this._extraDeps.View,{el:this.$(".follow-button"),router:this.router,entity:"sites",targetId:e[0]}).render(),this.$(".follow-button").toggleClass("loaded")})()}else this.$(".follow-button").toggleClass("loaded")},isAsyncListiclePager:function(){return _.get("use_async_listicle_page")||/[?&]async_listicle[&=]?/.test(window.location)},mouse_leave:function(e){this.lastFocusedTS&&(this.model.id&&o.trigger("post:mouse_leave",this.model.toJSON(),Date.now()-this.lastFocusedTS),this.lastFocusedTS=null)},mouse_enter:function(e){this.lastFocusedTS=Date.now()},trackComments:function(e){var t="post_comments."+(i(e.currentTarget).hasClass("js--active")?"hide":"show");n.trackAction(t)},shareCopyLink:function(e){e&&e.preventDefault();var t=i(e.currentTarget).data("clipboardText"),s=document.createElement("textarea");if(s.value=t,s.setAttribute("style","position:fixed; top:0; width:0"),s.contentEditable=!0,s.readOnly=!0,document.body.appendChild(s),g.isiOS){var n=document.createRange();n.selectNodeContents(s);var o=window.getSelection();o.removeAllRanges(),o.addRange(n),s.setSelectionRange(0,99999)}else s.focus(),s.select();document.execCommand("copy"),document.body.removeChild(s),this.notify("Link copied to yours clipboard")},shareFacebookMessenger:function(e){var t=i(e.currentTarget)[0].getAttribute("post_link");window.open("fb-messenger://share?link="+encodeURIComponent(t))},showBookmarklet:function(e){i(".rebelmouse-discovery-bookmarklet-iframe").remove();var t,s,n,o=i(e.currentTarget).data("tabId");if("stats"===o&&g.isMobile)return this.openPostStats(e);t=u.base_ssl_domain||"",s=i('<link rel="stylesheet" type="text/css" href="https://static.rbl.ms/static/css-build/discovery/bookmarklet/iframe.css?v2" />'),n=i('<iframe                           seamless="seamless" frameBorder="0"                           class="rebelmouse-discovery-bookmarklet-iframe"                           src="'+t+"/core/discovery/bookmarklet/roar/popup.html?referrer="+encodeURIComponent(this.model.get("post_url"))+"&__rmsp=-1#"+o+'" height="100%"                           width="100%" scrolling="no" allowTransparency="true"                          ></iframe>'),i("body").append(s).append(n),window.addEventListener("message",this.onMessage,!1)},showAnnotation:function(e){},hideAnnotation:function(e){e&&e.preventDefault(),this.$(e.currentTarget).parent().hide()},onMessage:s.bind(function(e){var t=(e.data||"").split(":"),s=t[0],n=t[1];if("bookmarklet"!==s)return!1;"close"===n&&(window.removeEventListener("message",this.onMessage),i(".rebelmouse-discovery-bookmarklet-iframe").remove())},this),listicleSwitchPage:function(e){var t=e.currentTarget,i=this.$(t);if(!i.hasClass("loading")){i.toggleClass("loading"),e.preventDefault(),this.options.router.navigate(window.location.pathname+t.search,{trigger:!0});var o=t.pathname,r=this.$(".js-listicle-pager"),a="?"+s.compact(s.union(t.search.replace(/^\?/,"").split("&"),["current_path="+encodeURIComponent(o)],(r.data("async_load_parameters")||"").split("&"))).join("&");o+=a,this.listicleLoadPage(o,a);var l=r.data("listicle-style")||"listicle",c="listicle.switch_page_"+l;n.trackAction(c,{label:l})}},openPostStats:function(e){var t;e.preventDefault(),(t=i("#"+this.getPostStatsCardSelector())).length&&!this.postStatsView||(t.length||(t=i('<div id="'+this.getPostStatsCardSelector()+'" class="stats-post-card"><div>'),i("body").append(t)),this.postStatsView?this.postStatsView.toggle():this.lazyLoadPostStats(t))},lazyLoadPostStats:function(e){this.lazyLoad(!0,{PostStatsFactory:"core/post_stats/factory"},function(){var t=new this._extraDeps.PostStatsFactory;this.postStatsView=t.createPostStatsCardView({model:this.model,hasToolbar:!0}).render(),this.listenTo(this.postStatsView,"visibility:hidden",this.scrollToThis),e.remove(),this.postStatsView.toggleBodyNoScroll(),i("body").append(this.postStatsView.el)})()},scrollToThis:function(){s.delay(function(){this.el.scrollIntoView(!0)}.bind(this),100)},getPostStatsCardSelector:function(){return"stats-post-card-"+this.model.id},isDraftPreview:function(){return/\preview=true/.test(window.location.search)},canOpenDiscovery:function(){return u.user.can("edit_post",!0,"parent_site")},canViewStatistics:function(){var e=u.user.can("edit_site",!0,"parent_site"),t=!u.user.can("view_stats",!0,"parent_site");return e||!t},canEdit:function(){var e=u.user,t=u.user_site||{},i=this.model;return!this.isDraftPreview()&&(!(!s.contains(i.get("roar_author_ids"),t.id)&&!e.can("edit_post",!0,"parent_site"))||(!(!i.get("is_real_draft")||!e.can("create_real_draft"))||!(!i.get("user_id")||e.id!==i.get("user_id"))))},addControls:function(e){var t=v.render(e);return this.$(".user-prefs").length?this.$(".user-prefs").html(t):this.$el.append('<div class="user-prefs">'+t+"</div>"),this},shouldDrawControls:function(){if(u.user_site&&u.user.is_autorized&&s.contains(this.model.get("roar_author_ids"),u.user_site.id)||u.user.is_autorized&&_.get("enable_community_sections"))return!0;var e=this.model.get("site_id")===u.site.id?"site":"parent_site";return u.user.can("edit_site",!0,e)},listicleUpdateUrl:function(){var e,t,r,a,l=i(window).height(),c=.5*l,d=.1*l,h=.4*l,p=null,g=null,m=this.$(".rebellt-item"),v=function(){return s.reduce(arguments,function(e,t){return e.replace(/%s/,t)})},w=i(s.first(m)),b=!1,k=!1;if(e=s.map(m,function(e){var t=i(e),s=.2*t.height(),n=(h-d)/2,o=t.offset().top-i(window).scrollTop()+s;return t.data("reloadAds")&&(w=t),{item:t,height:t.height(),logicalCenter:s,logicalOffset:o,distance:Math.abs(o-n),groupId:w.attr("id"),id:t.attr("id")}}),this.isModelInViewport()&&m.length)if(t=f.parse_url(this.model.get("post_url")).path,p=s.min(e,"distance"),b=s.first(m)===p.item[0],k=s.last(m)===p.item[0],p&&((b||k)&&p.distance<p.height||!b&&!k)){if(r=v("%s?rebelltitem=%s#%s",t,p.item.data("id"),p.item.attr("id")),a=v("?rebelltitem=%s#%s",p.item.data("id"),p.item.attr("id")),g=s.result(s.findWhere(e,{id:p.item.attr("id")}),"groupId"),this.prevAdsGroup=s.result(this,"prevAdsGroup",g),this.prevPushPath!==r){if(this.prevAdsGroup!==g&&(o.trigger("post_assembler:reload_ads"),this.prevAdsGroup=g),this.backButtonOptionChecking(r),p.height>c||s.contains([17257138,11059957],u.site.id)){var y={},S=_.get("ga_custom_dimensions",{}).get("particleImage"),T=p.item.data("isImage");S&&T&&(y["dimension"+S]=T),n.trackPostPageView(this.model.get("headline"),this.model.get("post_url")+a,y),o.trigger("post_page:shown",this.model.toJSON())}o.trigger("post_assembler:show"),o.trigger("listicle:page_view",this.model),o.trigger("listicle:item_view",p.item),this.activatePlaylistItem(p.item),this.prevPushPath=r}}else this.prevPushPath!==t&&(this.backButtonOptionChecking(t),o.trigger("post_assembler:show"),o.trigger("listicle:page_view",this.model),o.trigger("listicle:item_view",p.item),this.activatePlaylistItem(p.item),this.prevPushPath=t);this.isModelInViewportUpdated()&&this.renderPlaylist()},backButtonOptionChecking:function(e){!0===_.get("back_button_go_to_page")?window.history.replaceState(null,null,e):window.history.pushState(null,null,e)},activatePlaylistItem:function(e){i(".js--playlist--list a").removeClass("active"),i(".js--playlist--list a[href$="+e.attr("id")+"]").addClass("active")},isModelInViewport:function(){return window.location.href.split(/[?#]/)[0]===this.model.get("post_url")},isModelInViewportUpdated:function(){return i(".js--playlist--list").data("postId")!==this.model.id},renderPlaylist:function(e){var t,n=i(".js--playlist--list"),o=this.model.get("listicle");if(!this.isModelInViewport()||!n.length||e)return!1;n.data("postId",this.model.id),n.html(""),s.each(o.groups,function(e){if("slideshow"!==e.settings.layout||!e.settings.show_fullscreen)for(var s=0;s<e.slides.length&&(t=o.items[e.slides[s]],n.append(i('<li id="'+t.basename+'" class="playlist--item"><a href="#rebelltitem'+t.id+'" class="playlist--link">'+(o.settings.use_numeration?t.index+". ":"")+t.headline+"</a></li>")),"slideshow"!==e.settings.layout);s++);})},listicleLoadPage:function(e,r){var a=this.model,l=this.model.id,c=t.Model.extend({url:"/res/roar/posts/"+l+"/listicle"+r}),d=this.listicleLoadPage.cache=this.listicleLoadPage.cache||{},u=d[e]||new c,h=this.$(".js-listicle-body:first");0===h.length&&(console.warn("Can't find element by selector .js-listicle-body. Reloading page as fallback"),window.location=e);var p=s.bind(function(e){h.html(e.get("html"));var t=this.$(".rebellt-item:first");if(t.hasClass("rebellt-item-fade-in"))t.hide(),t.fadeIn("slow");else{var s=t.length?t:h,r=Math.max(0,s.offset().top-150);i("html, body").scrollTop(r)}this.initExternalMedia(),n.trackPostPageView(a.get("headline"),a.get("post_url")),o.trigger("post_page:shown",a.toJSON()),o.trigger("listicle:page_view",a)},this);return s.has(d,e)?(p(u),!0):u.fetch({success:s.bind(function(t){d[e]=t,p(t)},this),error:function(){window.location=e}})},clickTags:function(e){n.trackAction("click_tag_post.click_tag",window.location.href)},handlePageViewAndEmbedReload:function(e){n.trackPostPageView(this.model.get("headline"),this.model.get("post_url")),o.trigger("post_page:shown",this.model.toJSON()),this.initExternalMedia()},initShareHandler:function(){this.makeInstance(a,{el:this.$el,model:this.model})},loadPostSlideshows:function(){s.each(this.$(".slideshow"),function(e){i(e).data("slideshow-init")||this.makeInstance(r,{model:this.model}).setElement(e).render()},this)},loadPostListicleFullScreenSlideshows:function(){var e=this,t=this.$(".js--fullscreen-preview").length&&!this.$(".js--fullscreen-preview").data("loaded"),i=f.parse_url(window.location.href);this.lazyLoad(t&&g.desktop,{View:"social-ux/view/listicle_fullscreen_slideshow"},function(){e.makeInstance(this._extraDeps.View,{el:this.$(".js--fullscreen-preview"),groupSlides:this.$(".js--fullscreen-preview").data("groupSlides"),currentSlide:i.params.slide,router:this.router,listicle:this.model.get("listicle"),postUrl:this.model.get("post_url")})})()},loadPostListicleSlideshows:function(){var e=this,t=this.$(".listicle-slideshow__init").length&&!this.$(".listicle-slideshow__init").data("loaded"),n=f.parse_url(window.location.href);this.lazyLoad(t,{View:"social-ux/view/listicle_slideshow"},function(){s.map(this.$(".listicle-slideshow__init"),function(t){i(t).data("loaded")||e.makeInstance(this._extraDeps.View,{el:t,router:this.router,currentSlide:n.params.rebelltpage,listicle:this.model.get("listicle"),groupId:i(t).data("groupId"),currentId:i(t).data("currentId"),showThumbs:i(t).data("showThumbs"),postModel:this.model})},this)})()},initConversations:function(){var e=function(){var e=new Event("refreshConversations");document.dispatchEvent(e)};if(document.getElementById("conversationsBundle"))e();else{var t=document.createElement("script");t.setAttribute("id","conversationsBundle"),t.setAttribute("src",window.__rebelmouseJsBaseUrl+"../bundles/conversation.js?t="+(new Date).getTime()),document.body.appendChild(t),t.onload=e}},initExternalMedia:function(){"true"===f.parse_url(window.location.href).params.conversations&&this.initConversations(),this.loadPostSlideshows(),this.initListicleSlideshows(),this.initListicleProductSupport(),this.initListicleVoting(),p.init()},initListicleSlideshows:function(){this.loadPostListicleSlideshows(),this.loadPostListicleFullScreenSlideshows()},initListicleVoting:function(){var e=this.model.get("listicle");e&&e.settings.up_down_voting&&e.settings.layout_type===l.layoutType.VOTING&&this.makeInstance(c,{el:this.$el,postModel:this.model})},initLeadMediaProductSupport:function(){if(this.model.get("media_html").match(/<map/g)){var e=i("<div/>").html(this.model.get("media_html"));this.makeInstance(d,{leadMedia:!0,$img:this.$(".widget__image"),$originalImg:i("img",e).get(0),$imageMap:i("map",e).get(0),postModel:this.model}).render()}},initListicleProductSupport:function(){var e=s.map(this.$('img[usemap |="#image-map"]'),function(e){var t=this.$(e);return this.makeInstance(d,{$img:t,$imageMap:this.$('map[name="'+t.attr("usemap").replace(/^#/,"")+'"]'),postModel:this.model})},this);s.invoke(e,"render")},editPostInNewTab:function(e){var t={entity:this.model.get("is_real_draft")?"draft":"post",postId:this.model.get("id"),siteId:this.model.get("site_id"),tabId:i(e.currentTarget).data("tabId")},s=h.getEditPostUrl(t);window.open(s,"_blank")}})}),rblms.define("social-ux/view/post",["require","jquery","underscore","backbone","social-ux/view/informer","settings","utils/embeds","core/event_dispatcher","core/posts/models/action","social-ux/view/post_base"],function(e){var t=e("jquery"),i=e("underscore"),s=e("backbone"),n=e("social-ux/view/informer"),o=e("settings"),r=e("utils/embeds"),a=e("core/event_dispatcher"),l=e("core/posts/models/action"),c=e("social-ux/view/post_base");return c.extend({defaults:{is_sortable:!0,is_being_dragged:!1},events:function(){return i.extend({},c.prototype.events(),{"click .delete":"deletePost","click .freeze":"toggleFreeze","click .move":"reorder","click .visibility":"toggleVisibility",click:"openStats",drop:"postDropped","click .sharebar-button-comments ":"toggleComments"})},initialize:function(){c.prototype.initialize.call(this,arguments),this.options=i.extend({},this.defaults,this.options),this.postActionModel=new l,this.visibilityModel=new(s.Model.extend({urlRoot:"/core/v1/sites/"+this.model.get("site_id")+"/streams/"+this.options.stream_id+"/hidden"})),this.listenTo(this.model,"destroy",this.removeArticle),this.$el.toggleClass("frozen",this.isFrozen()),this.initRendered()},initRendered:function(){return this.shouldDrawControls()&&this.addControls(),this.loadPostSlideshows(),this.initShareHandler(),r.init(),this.rendered=!0,this},openStats:function(e){if(this.options.is_being_dragged)return e&&e.preventDefault()&&e.stopPropagation(),!1;a.trigger("post_card:clicked",this.model.toJSON())},toggleFreeze:function(e){this.postActionModel.save(this.postActionSaveData(),this.postActionSaveOptions())},postActionSaveData:function(){var e,t=this.isFrozen(),i=this.getOrder();return e={action:"freeze_post",post_id:this.model.id,section_id:this.currentSectionId(),position:i},t&&(e.action="unfreeze_post",e.previous_post_id=this.previousPostId()),e},postActionSaveOptions:function(){return{success:i.bind(this.onToggleFreeze,this)}},onToggleFreeze:function(){this.toogleFrozenOnCurrentSection(),this.toggleFrozenClass()},toggleFrozenClass:function(){this.$(".freeze.hover-menu").toggleClass("active"),this.$el.toggleClass("frozen")},toogleFrozenOnCurrentSection:function(){var e=Number(this.currentSectionId()),t=this.isFrozen(),s=this.model.get("frozen_in_sections")||[];t?s=i.without(s,e):s.push(e),this.model.set("frozen_in_sections",s)},addControls:function(){var e={baseSslDomain:o.base_ssl_domain||"",canEdit:this.canEdit(),canViewStatistics:this.canViewStatistics(),postId:this.model.id,siteId:this.model.get("site_id"),canStick:this.canStick(),canReorder:this.canReorder(),isFrozen:this.isFrozen(),canOpenDiscovery:this.canOpenDiscovery(),canToggleVisibility:this.canToggleVisibility(),canDelete:this.canDelete()};return c.prototype.addControls.call(this,e)},canDelete:function(){return!i.contains([17317527,17325884],o.site.parent_id||o.site.id)&&this.canEdit()},canToggleVisibility:function(){return this.canEdit()&&this.options.is_hiding_enabled},canStick:function(){return this.options.using_stickers&&this._canMovePostsAround()},canReorder:function(){return this.options.is_sortable&&this._canMovePostsAround()},_canMovePostsAround:function(){return!o.is_mobile&&o.user.can("reorder_frontpage")&&(this.options.stream_id||!o.is_community_site)},isFrozen:function(){var e=Number(this.currentSectionId()),t=this.model.get("frozen_in_sections")||[];return i.indexOf(t,e)>-1},deletePost:function(e){return e&&e.preventDefault()&&e.preventPropagation(),o.is_community_site?this.trashPost():this.removePost()},removePost:function(){new n({type:"info",message:"Are you sure you want to delete this post?",headline:"Information",context:this,controls:[{name:"Remove",callback:this.onRemoveFromCurrentSection},{name:"Cancel",callback:t.noop}]}).render()},onRemoveFromCurrentSection:function(){var e=this;this.$el.toggleClass("removing-article",!0),this.notify("Removing article from section..."),t.when(this.removeFromCurrentSection()).then(function(){e.notify("Done")}).done(function(){e.$el.toggleClass("removing-article",!1)})},removeFromCurrentSection:function(){var e=this.currentSectionId(),t=i.without(this.model.get("subpages"),~~e);return this.postActionModel.save({action:"move_post_to_sections",post_id:this.model.id,sections:t},{success:i.bind(function(){this.model.unset("id"),this.model.destroy({wait:!0})},this)},this)},trashPost:function(){var e=!!this.model.get("lock"),i="Are you sure you want to delete this post?";new n({type:"info",message:e?["This post was featured.",i].join(" "):i,headline:"Are you sure?",context:this,controls:[{name:"Delete",callback:this.onDeleteFromCommunityPage},{name:"Cancel",callback:t.noop}]}).render()},onDeleteFromCommunityPage:function(){var e=this;this.$el.toggleClass("removing-article",!0),this.notify("Deleting article from community page..."),t.when(this.deleteFromCommunityPage()).then(function(){e.notify("Done")}).done(function(){e.$el.toggleClass("removing-article",!1)})},deleteFromCommunityPage:function(){return this.model.destroy()},toggleVisibility:function(e){this.visibilityModel.isNew()?this.visibilityModel.save({post_id:this.model.get("id")},{success:i.bind(function(e){this.visibilityModel.set("id",e.get("post_id")),this.$(".visibility .material-icons").text("visibility_off")},this)}):this.visibilityModel.destroy({wait:!0,success:i.bind(function(){this.visibilityModel.unset("id"),this.$(".visibility .material-icons").text("visibility")},this)})},toggleComments:function(e){this.talkView?this.talkView.$el.toggleClass("hidden"):this.lazyLoad(this.$(".community-native-js-wrp").length,{View:"social-ux/view/comments_native"},function(){this.talkView=this.makeInstance(this._extraDeps.View,{router:this.options.router,postModel:this.model,post_id:this.model.get("id"),counter:!0,limit:10,el:this.$(".community-native-js-wrp")}),this.talkView.render()})()},reorder:function(e){a.trigger("reorder:start",{source:this.options.source,stream_id:this.options.stream_id,subpage_id:this.options.subpage_id,section_id:this.currentSectionId()})},currentSectionId:function(){return this.$el.closest("[data-section-id]").attr("data-section-id")||this.options.subpage_id},getCollectionBySource:function(e){return i.filter(this.options.collection,function(t){return t.options.source===e})},getOrder:function(){return this.getCollectionBySource(this.options.source).indexOf(this)},previousPostId:function(){var e=this.getOrder()-1;return e<0?0:this.getCollectionBySource(this.options.source)[e].model.id||0},getFormat:function(){return this.options.format},setFormat:function(e){this.setDraggable()},setDraggable:function(){if(!this.isFrozen()){var e=this.$el.width(),i=this.$el.height();this.options.is_being_dragged||(this.options.is_being_dragged=!0,this.$(".user-prefs").remove(),this.$el.closest(".section-holder").parent().css("z-index",2)),this.$el.droppable({hoverClass:"drop-hover",tolerance:"pointer"}).draggable({start:function(s,n){t(n.helper).height(i).width(e)},revert:"invalid",appendTo:this.$el.parent(),helper:"clone"}).show()}},postDropped:function(e,t){var i=parseInt(t.draggable.attr("elid"),10);a.trigger("reorder:move",{to:this.model.get("id"),from:i})},removeArticle:function(){this.remove()}})}),rblms.define("social-ux/model/post_base",["require","backbone","underscore"],function(e){var t=e("backbone"),i=e("underscore"),s=6,n={};return t.Model.extend({initialize:function(){this.setupSharedDataModel()},setupSharedDataModel:function(){var e=this.get("id");i.isUndefined(e)||n[e]||(n[e]=new t.Model(this.toJSON())),this.set("sharedDataModel",n[e])},buildPostUrl:function(){var e=this.toJSON(),t=e.basename?e.basename+"-":"",i="slideshow"===e.type?"-s"+(e.slideshow.active_slide||0):"";return t+e.id+i+".html"},sharedSet:function(){return this.set.apply(this.getSharedModel(),arguments)},sharedGet:function(){return this.get.apply(this.getSharedModel(),arguments)},getSharedModel:function(){return this.get("sharedDataModel")},stats_id_provider_id:function(){return[this.get("id"),this.get("provider_id")].join("_")},stats_id:function(){return this.get("id")},isAutoDraft:function(){return this.get("status")===s},isDraft:function(){return"draft"===this.get("entity_type")}})}),rblms.define("social-ux/model/post",["require","social-ux/model/post_base"],function(e){return e("social-ux/model/post_base").extend({urlRoot:function(){return this.isAutoDraft()?"/core/roar/autodrafts":"post"===this.get("entity_type")?"/core/roar/posts":"/core/roar/drafts"}})}),rblms.define("social-ux/utils/parse_sharing_texts",["require","jquery","underscore","hogan","social-ux/utils/htmlencoder","settings","settings"],function(e){var t=e("jquery"),i=e("underscore"),s=e("hogan"),n=e("social-ux/utils/htmlencoder"),o=function(){};return o.parse_post=function(o){var r,a=e("settings"),l={},c=t.extend(!0,{},a.site.sharing_post_texts),d="twitter_text_template";if(i.isEmpty(c))return{};r=c.variables,l={email_title_template:"email_title",email_text_template:"email_text"},o.get("prepared_custom_post_tweet_text")||(l[d]="twitter_text"),a.site.is_roar_subsite&&(d="community_twitter_text_template");var u,h=o.get("twitter_info");return r=i.extend(r,{Post_Link:o.get("post_url"),Post_Title:(u=o,!u.get("headline")&&u.get("twitter_info")?n.decodeHTMLTags(u.get("twitter_info").text):u.get("headline")),Post_Twitter_Username:h&&o.get("author_screen_name")||""}),o.get("original_user_subsite")&&o.get("original_user_subsite").user_twitter_name&&(r.Site_Twitter_Username="@"+o.get("original_user_subsite").user_twitter_name),c[d]=function(s,n){var o=e("settings"),r=t.extend(!0,{},o.site.sharing_post_texts),a=r[s],l=r.defaults_wo_variables,c=!!o.site.paid_features&&o.site.paid_features;i.each(["Post_Twitter_Username","Site_Twitter_Username","Post_Title"],function(e){-1===a.toLowerCase().indexOf(e.toLowerCase())||n[e]||(a=l[e])});return c&&c.is_paid&&-1!==a.toLowerCase().indexOf("Whitelabel_Site_Twitter_Username".toLowerCase())&&!n.Whitelabel_Site_Twitter_Username&&(a=l.ForPaid),a}(d,r),c=function(e,t,n){return i.each(e,function(e,i){var o=t[i];if(o.replace){var r=s.compile(o.replace(/\{\{/g,"{{{").replace(/\}\}/g,"}}}"));try{t[e]=encodeURIComponent(r.render(n))}catch(i){t[e]=""}}}),t}(l,c,r),o.get("custom_post_tweet_text")&&(c.twitter_text=encodeURIComponent(o.get("custom_post_tweet_text"))),c},o}),rblms.define("social-ux/model/main-post",["require","jquery","underscore","social-ux/model/post_base","settings","core/app_engine","social-ux/utils/parse_sharing_texts"],function(e){e("jquery");var t=e("underscore"),i=e("social-ux/model/post_base"),s=(e("settings"),e("core/app_engine"),e("social-ux/utils/parse_sharing_texts"));return i.extend({initialize:function(){this.set({sharing_texts:s.parse_post(this)}),i.prototype.initialize.call(this,arguments)},twitterCustomTimelineSync:!1,isSponsored:function(){return!!t.find(this.toJSON(),function(e,t){return/sponsored_content$/.test(t)&&e})},url:function(){var e="/core/feeds/site/posts/%(siteId)s%(postId)s%(pageId)s%(sponsored)s%(synced)s".format({siteId:this.get("site_id"),postId:this.isNew()?"":"/"+this.id,pageId:this.has("page_id")?"/"+this.get("page_id"):"",sponsored:this.isSponsored()?"?sponsored=1&":"",synced:this.twitterCustomTimelineSync?"?synced="+this.twitterCustomTimelineSync+"&":""});return(e=e.replace("&?","&")).replace(/&$/,"")}})}),rblms.define("social-ux/view/cta",["require","backbone","core/event_dispatcher","underscore"],function(e){var t=e("backbone"),i=e("core/event_dispatcher"),s=e("underscore"),n={1:"quiz",2:"poll",3:"petition"};return t.View.extend({ctaTypes:{0:{element:".rebelmouse-petition",view:"social-ux/view/petition",available:!0},1:{element:".quiz-block",view:"widgets/views/quiz",available:!0},2:{element:".cta-poll",view:"widgets/views/cta/poll",available:!0}},initialize:function(e){this.viewsLoaders=[],s.each(e.ctas,this.loadCtaElement,this)},loadCtaElement:function(e){if(!s.isObject(e))return!1;var t=this.ctaTypes[e.type],o={};t&&(o["ctaElement"+e.type]=t.view,this.viewsLoaders.push(function(s){var r=this,a=r.$(t.element).length;this.lazyLoad(a,o,function(){var o,a=s||{};a.el=r.$(t.element),a.cta=e,(o=r.makeInstance(r._extraDeps["ctaElement"+e.type],a).render()).ctaMagicType=n[+e.type],o.$el.one("click",function(){i.trigger("cta_post:clicked",o.ctaMagicType,r.options.model.toJSON())})})()}))}})}),rblms.define("core/ads/views/google_dfp",["require","backbone","underscore","core/event_dispatcher"],function(e){var t=e("backbone"),i=e("underscore"),s=e("core/event_dispatcher");return t.View.extend({defaults:{slots:window.googletag_refresh_slots||[]},initialize:function(e){this.options=i.extend({},this.defaults,this.options),window.googletag&&!i.isEmpty(this.options.slots)&&s.on("post:ads:refresh",this.refresh,this)},refresh:function(){window.googletag.pubads().refresh(this.options.slots)}})}),rblms.define("core/ads/views/adtech",["require","backbone","underscore","core/event_dispatcher"],function(e){var t=e("backbone"),i=e("underscore"),s=e("core/event_dispatcher");return t.View.extend({defaults:{slots:window.adtech_refresh_slots||[]},initialize:function(e){this.options=i.extend({},this.defaults,this.options),window.adtech_refresh_slots&&!i.isEmpty(this.options.slots)&&s.on("post:ads:refresh",this.refresh,this)},refresh:function(){i.each(this.options.slots,this.refreshSlot)},refreshSlot:function(e){console.log("refreshing slot",e),window.ADTECH.loadAd(e)}})}),rblms.define("core/ads/views/ads",["require","backbone","core/ads/views/google_dfp","core/ads/views/adtech"],function(e){var t=e("backbone"),i=e("core/ads/views/google_dfp"),s=e("core/ads/views/adtech");return t.View.extend({initialize:function(e){this.makeInstance(i,{}),this.makeInstance(s,{})}})}),rblms.define("social-ux/view/main-post",["require","jquery","underscore","backbone","core/app_engine","settings","utils/embeds","utils/navigate","core/event_dispatcher","social-ux/view/cta","core/stats/ga_tracker","core/ads/views/ads","social-ux/view/post_base"],function(e){var t=e("jquery"),i=e("underscore"),s=(e("backbone"),e("core/app_engine")),n=e("settings"),o=(e("utils/embeds"),e("utils/navigate"),e("core/event_dispatcher"),e("social-ux/view/cta")),r=(e("core/stats/ga_tracker"),e("core/ads/views/ads")),a=e("social-ux/view/post_base");return a.extend({events:function(){return i.extend({},a.prototype.events(),{"click .share-plus":"showSharePanel","click .show-share-mobile, .close-share-mobile":"showSharePanelMobile"})},initialize:function(e){if(a.prototype.initialize.call(this,arguments),this.isAsyncListiclePager())this.makeInstance(r,{});/\?edit/.test(location.search)&&i.defer(i.bind(function(){return this.editPost()},this)),this.initRenderedData()},initExternalMedia:function(){a.prototype.initExternalMedia.call(this),this.renderShareMediaPanel()},addControls:function(){var e={canEdit:this.canEdit(),canOpenDiscovery:this.canOpenDiscovery(),baseSslDomain:n.base_ssl_domain||"",canViewStatistics:this.canViewStatistics(),postId:this.model.id,siteId:this.model.get("site_id")};return a.prototype.addControls.call(this,e)},initRenderedData:function(){var e=this.model.headline_code?["headline_id="+this.model.headline_code]:[];this.model.get("skip_item_impression")||(this.statsImpression(this.model.stats_id_provider_id(),null,1,null,e),this.model.set("skip_item_impression",!0)),this.initShareHandler(),s.get("use_selection_sharer")&&this.initSelectionSharer(),this.shouldDrawControls()&&this.addControls(),this.initExternalMedia(),this.initCTAs()},initSelectionSharer:function(){var e=this;this.lazyLoad(!0,{SelectionSharer:"widgets/views/selection_sharer"},function(){var t=e.makeInstance(this._extraDeps.SelectionSharer,{model:e.model}).render();e.$el.append(t.el)})()},initCTAs:function(){var e=new o({router:this.options.router,model:this.model,ctas:this.model.get("ctas")});i.each(e.viewsLoaders,function(e){e.call(this,{postModel:this.model,router:this.options.router})},this)},showSharePanelMobile:function(e){e.preventDefault(),t(e.currentTarget).parent().parent().toggleClass("show-mobile-share-bar")},showSharePanel:function(e){e.preventDefault(),this.$(".share-buttons").toggleClass("enable-panel")},renderShareMediaPanel:function(){var e=this,o=/pinterest.com/.test(document.referrer),r=n.site.whitelabel_settings&&!0===n.site.whitelabel_settings.use_pin_it_button_on_post_images&&o,a={model:this.model,showPinIt:r,pinterestFollowButtonUrl:s.get("pinterest_follow_button_url"),router:this.options.router,showSharePanel:!r||!(n.is_mobile||t(window).width()<=568)};return this.lazyLoad(!0,{ShareMediaPanelView:"widgets/views/share_media_panel"},function(){e.$(":not(.share-buttons) img.rm-shortcode").each(function(){var s=t(this),n="share-tab-img share-buttons"+(!!s.parent('a[href!=""]').length?"":" share-trigger"),o=s.wrap('<div class="'+n+'" />').parent();a=i.extend({},a,{mediaUrlHash:this.id,mediaUrl:this.src,mediaDescription:t(this).data("pin-description")}),o.append(e.makeInstance(e._extraDeps.ShareMediaPanelView,a).render().el)})})(),this}})}),rblms.define("social-ux/model/excludePostList",["require","underscore"],function(e){var t=e("underscore");return new function(){this.excludeList=[],this.addToExclude=function(e){this.excludeList=t.union(this.excludeList,[e]),this.excludeList=t.filter(this.excludeList,function(e){return!!e&&t.isFinite(e)&&e>0})}}}),rblms.define("social-ux/utils/viewRegistry",["require","underscore","jquery"],function(e){var t=e("underscore"),i=e("jquery"),s=[],n=0;return{register:function(e,t){return e&&t?(s[n++]={selector:e,cb:t},n):(console.error("View registry is missing a param"),-1)},remove:function(e){name>=0&&(s[e]=void 0)},initEntries:function(e,n){t.each(s,function(t){t&&i(e).find(t.selector).each(function(e,s){i(s).data("rmViewLoaded")||(i(s).data("rmViewLoaded",!0),t.cb(s,n))})})}}}),rblms.define("social-ux/view/content-manager",["require","underscore","jquery","backbone","bootstrap","engine","social-ux/view/post","social-ux/model/post","social-ux/model/main-post","social-ux/view/main-post","core/event_dispatcher","utils/device","social-ux/model/excludePostList","social-ux/utils/viewRegistry","settings"],function(e){var t=e("underscore"),i=e("jquery"),s=e("backbone"),n=e("bootstrap"),o=(e("engine"),e("social-ux/view/post")),r=e("social-ux/model/post"),a=e("social-ux/model/main-post"),l=e("social-ux/view/main-post"),c=e("core/event_dispatcher"),d=(e("utils/device"),e("social-ux/model/excludePostList")),u=e("social-ux/utils/viewRegistry"),h=e("settings");return s.View.extend({defaults:{sortable:["frontpage"]},events:{"click .tabs__tab":"loadTabs"},initialize:function(){this.options=t.extend({},this.defaults,this.options),this.postViewsCollection=[],c.on("reorder:start",this.reorderStart,this),this.registerViews(),this.registerProfilePageViews(),this.preloadTab()},preloadTab:function(){var e=window.location.hash;e&&this.$('[data-tab-id="'+e.slice(1)+'"]').length&&this.$('[data-tab-id="'+e.slice(1)+'"]').click()},loadTabs:function(e){var t=i(e.currentTarget).data("tab-id");this.loadTabContent(t)},loadTabContent:function(e){window.location.hash=e,this.RiverPostsView&&this.RiverPostsView.turnOffEvents(),"river"===e?(this.RiverPostsView&&this.RiverPostsView.turnOnEvents(),this.$("#"+e).children().length||this.lazyLoad(!0,{RiverPostsView:"widgets/views/river/posts.md",PostsCollection:"widgets/collections/river"},function(){this.RiverPostsView=this.makeInstance(this._extraDeps.RiverPostsView,{router:this.options.router,collection:new this._extraDeps.PostsCollection,el:this.$("#"+e)[0]}).render()})()):"following"===e?this.$("#"+e).children().length||this.lazyLoad(!0,{FollowingView:"widgets/views/dashboard/river/following.md"},function(){this.makeInstance(this._extraDeps.FollowingView,{router:this.options.router,el:this.$("#"+e)[0]}).render()})():"explore"===e?this.$("#"+e).children().length||this.lazyLoad(!0,{ExploreView:"widgets/views/dashboard/who_is_river/base.md"},function(){this.makeInstance(this._extraDeps.ExploreView,{router:this.options.router,el:this.$("#"+e)[0]}).render()})():"collections"===e&&(this.$("#"+e+" .edit-subpages").children().length||this.lazyLoad(!0,{SectionsView:"widgets/views/dashboard_sections.md"},function(){this.makeInstance(this._extraDeps.SectionsView,{refreshPageAfterSafe:!0,router:this.options.router,el:this.$("#"+e)[0]}).render()})())},registerProfilePageViews:function(){if(h.is_community_site&&h.user.can("edit_site",!0)){var e=new(s.Model.extend({urlRoot:"/core/feeds/site/"}))(h.site),i=this.options.router;u.register(".site-avatar-edit",t.bind(function(t,s){this.lazyLoad(!0,{LogoView:"roar/widgets/views/community/site_logo"},function(){this.makeInstance(this._extraDeps.LogoView,{router:i,el:t,model:e}).render()})()},this)),u.register(".site-title-edit",t.bind(function(t,s){this.lazyLoad(!0,{TitleView:"roar/widgets/views/community/site_title"},function(){this.makeInstance(this._extraDeps.TitleView,{router:i,el:t,model:e}).render()})()},this)),u.register(".site-about-edit",t.bind(function(t,s){this.lazyLoad(!0,{AboutView:"roar/widgets/views/community/about_site",AboutSiteModel:"widgets/models/about_site"},function(){this.makeInstance(this._extraDeps.AboutView,{router:i,el:t,model:e}).render()})()},this)),u.register(".social-profiles-status",t.bind(function(e,t){this.lazyLoad(!0,{SocialBarView:"widgets/views/social_bar"},function(){this.makeInstance(this._extraDeps.SocialBarView,{el:e}).render()})()},this)),u.register(".social-panel:not(.no-render)",t.bind(function(e,t){this.lazyLoad(!0,{ShareButtons:"widgets/views/frontpage/share_buttons"},function(){this.makeInstance(this._extraDeps.ShareButtons,{forHeader:!0,el:e,router:i}).render()})()},this))}},registerViews:function(){var e,s=h.is("authorized")||h.is_autorized;n.post&&u.register(".post-partial",t.bind((e=new a(n.post),function(t,i){i&&this.makeInstance(l,{el:t,router:this.router,model:e})}),this)),u.register(".widget[elid]",t.bind(this.initPostView,this)),u.register(".follow-section .follow-button",t.bind(function(e,n){if(s){var o=t.isEqual(h.site.pages,h.user_site.pages);this.lazyLoad(!o,{View:"social-ux/view/follow_button"},function(){this.makeInstance(this._extraDeps.View,{el:e,router:this.router,entity:"sections",targetId:h.site.activePage.id||void 0}).render(),i(e).toggleClass("loaded")})()}else i(e).toggleClass("loaded")},this)),u.register(".community-follow-cont",t.bind(function(e,t){this.lazyLoad(s,{View:"social-ux/view/follow_button_community"},function(){this.makeInstance(this._extraDeps.View,{el:e,router:this.router,entity:"sites",targetId:h.site.id||void 0}).render()})()},this)),u.register(".follow-tags .follow-button",t.bind(function(e,n){s?this.lazyLoad(!t.isEmpty(h.site.activeTagPage),{View:"social-ux/view/follow_button"},function(){this.makeInstance(this._extraDeps.View,{el:e,router:this.router,entity:"tags",targetId:h.site.activeTagPage.name||void 0}).render(),i(e).toggleClass("loaded")})():i(e).toggleClass("loaded")},this)),u.register(".user-profile .follow-button",t.bind(function(e,n){if(s){var o=t.contains([h.site.id],h.user_site.id);this.lazyLoad(!o,{View:"social-ux/view/follow_button"},function(){this.makeInstance(this._extraDeps.View,{el:e,router:this.router,entity:"sites",targetId:h.site.id}).render(),i(e).toggleClass("loaded")})()}else i(e).toggleClass("loaded")},this)),u.register(".talk-comments-wrp",t.bind(function(e,t){this.lazyLoad(this.$(".talk-comments-wrp").length,{TalkView:"social-ux/view/comments_native"},function(){var t={el:e,router:this.router,counter:!0,limit:10};if(n.post)t.postModel=new r(n.post);else{var s=i(e).data("talk_id").split(":")[1];t.post_id=s}this.makeInstance(this._extraDeps.TalkView,t).render(),i(e).toggleClass("loaded")})()},this))},reorderStart:function(e){var t=this;this.lazyLoad(!0,{ReorderView:"widgets/views/posts/reorder_mode/reorder"},function(){var i=t.makeInstance(this._extraDeps.ReorderView,{collection:t.postViewsCollection,source:e.source,stream_id:e.stream_id,subpage_id:e.subpage_id,section_id:e.section_id});t.$el.append(i.render().el)})()},initPostView:function(e,s){if(!s||!s.bootstrap||!e)return!1;var n,a,l,u,h,p,g,f=s.bootstrap,m=i.extend(!0,{},f.posts_by_source),_=i(e).closest(".section-holder"),v=parseInt(i(e).attr("elid"),10),w=!1;if(!isNaN(v)){if(!_)return console.error("section is not found"),!1;if(l=_.data("format"),n=_.data("source"),!l||!n||!m[n])return l||console.error("attr data-format not found"),n||console.error("attr data-source not found"),m[n]||console.error("posts[source] is undefined: "+n),!1;(u=t.findWhere(m[n],{id:v}))&&(a=f.sources[n].subpage_id,p=t.findWhere(f.sections,{source:n}),this.options.sortable.indexOf(n)>=0?(w=!0,g=!0):(w=_.data("is-reordable"),g=_.data("using-stickers")),d.addToExclude(v),h=this.makeInstance(o,{source:n,format:l,model:new r(u),el:e,collection:this.postViewsCollection,is_sortable:w,using_stickers:g,is_hiding_enabled:p.is_hiding_enabled,stream_id:p.stream_id,subpage_id:a,router:this.options.router}),this.postViewsCollection.push(h),c.trigger("reorder:added"),c.trigger("load-more:sync",f),c.trigger("posts:shown",[h.model.toJSON()]))}}})}),rblms.define("social-ux/router/base_frontpage",["require","jquery","underscore","backbone","settings","social-ux/utils/editor","core/app_engine"],function(e){var t=e("jquery"),i=e("underscore"),s=e("backbone"),n=e("settings"),o=e("social-ux/utils/editor");e("core/app_engine");return s.Router.extend({defaults:{cssAnimationDelay:1200},initialize:function(){this.route(/^\??[^#]*#?$/,"openFrontPage"),this.route(/^([\w\-]+)\/\??[^#]*#?$/,"loadPage"),this.facebookHashClean()},checkTopBlocks:function(){var e=location.href.match(/.*?\?.*?shoutout_to=([^&]+).*$/);e&&this.triggerShoutoutSignupEvent(e[1]),(e=location.href.match(/(\d+)\.html\?(approve|approved)$/))&&this.triggerPermissionEvent(e[2],e[1])},getRootPath:function(){var e="";return((e=n.is_custom_domain?n.is_community_site?"community/"+window.location.pathname.split("/")[2]:n.site.parent_id?n.site.name.toLowerCase():"":window.location.pathname.split("/")[1])?"/":"")+e+"/"},capitalize:function(e){return e[0].toUpperCase()+e.slice(1,e.length)},triggerPermissionEvent:function(e,t){this.trigger.call(this,"route:open"+this.capitalize(e)+"Block",t),"approved"===e&&this.openApprovedBlock&&this.openApprovedBlock(t)},toggleIframes:function(e){t("#post-list .widget iframe").toggleClass("invisible",e)},toggleBodyScroll:function(e){t("body").css("overflow",e?"visible":"hidden")},facebookHashClean:function(){"#_=_"===window.location.hash&&(s.history._hasPushState||history.pushState)&&history.replaceState({},"title",window.location.pathname+window.location.search),"_=_"===s.history.fragment&&this.cleanPath()},triggerShoutoutSignupEvent:function(e){this.navigate("/",{silent:!0,trigger:!1}),this.trigger.call(this,"route:openShoutoutSignupBlock",e)},cleanPath:function(){this.navigate("",{trigger:!1,replace:!0})},_addPost:function(){/\?add-post/.test(location.search)&&o.openAddPost()},goHome:function(){this._silentChangedPage&&(this._silentChangedPage=!1,this.trigger.call(this,"route:loadFrontPage","",0)),this.navigate("",!0)},loadPage:function(e){var t=i.find(n.site.pages,function(t){return t.url.toLowerCase()===decodeURIComponent(e).toLowerCase()})||{};n.site.activePage=t,this.trigger.call(this,"route:loadSubPage",t.url||"",t.id||0)},getSubpageURL:function(e){var t=e instanceof s.Model?e:new s.Model(e),i=location.protocol+"//"+location.host,o=n.is("custom_domain",!0),r=(t.get("page_settings"),o?i:n.domain);return(/https?/i.test(r)?"":"http://")+r+this.getRootPath()+t.get("url")+location.search},_setActiveEntity:function(e){e||(e={}),i.each(e,function(e,t){n.site["active"+this.capitalize(t)]=i.find(n.site.pages,function(e){return function(t){return(null===t.url?"":t.url.toLowerCase())===decodeURIComponent(e).toLowerCase()}}(t))||{id:0,url:"",isPublic:!0}},this)}})}),rblms.define("libs/backbone/plugins/history_tracking",["backbone"],function(e){return t=function(t,i){var s=/[0-9].html/.test(t)&&/[0-9].html/.test(e.history.fragment);i||(i={}),i.replace||(this._historyTrackList[t]=s?this._historyTrackList[e.history.fragment]:e.history.fragment),e.history.navigate(t,i)},i=function(){return this._historyTrackList[e.history.fragment]||""},function(){this._historyTrackList={},this.navigate=t,this.prevFragment=i};var t,i}),rblms.define("social-ux/router/frontpage",["require","underscore","social-ux/router/base_frontpage","libs/backbone/plugins/history_tracking","settings","utils/navigate","core/app_engine","jquery"],function(e){var t=e("underscore"),i=e("social-ux/router/base_frontpage"),s=e("libs/backbone/plugins/history_tracking"),n=e("settings"),o=e("utils/navigate"),r=e("core/app_engine"),a=(e("jquery"),i.extend({cleanPath:function(){this.navigate("/"+window.location.pathname,{trigger:!1,replace:!0})},initialize:function(){i.prototype.initialize.apply(this,arguments),this.route(/^\/?([-\w]+)\/?/,"openFrontSubpage"),this.route(/^\/?community\/([-\w]+)\/?.*$/,"openFrontPage"),this.route(/([-\w]+)\.html?.*$/,"loadPostPage"),this.route(/^\/?community\/([-\w]+)\/([-\w]+)\/?$/,"openCommunitySubpage"),this.route(/^\/?tag\/([-\w]+)\/?.*$/,"openTagPage")},isAsyncListiclePager:function(){return r.get("use_async_listicle_page")||/[?&]async_listicle[&=]?/.test(window.location)},checkTopBlocks:function(){var e=location.href.match(/(\d+)\.html\?(approved|approve)/);e&&this.triggerPermissionEvent(e[2],e[1])},triggerPermissionEvent:function(e,t){this.trigger.call(this,"route:open"+this.capitalize(e)+"Block",t)},openApprovedBlock:function(){this.navigate(location.pathname.replace("/"+n.site.name+"/",""),{silent:!0,trigger:!1})},addPost:function(){this.cleanPath(),this.trigger("route:addPost")},goToEditMode:function(e){this.toggleIframes(!0),n.site.whitelabel_settings&&n.site.whitelabel_settings.editor_permalink?n.site.whitelabel_settings.use_roar_posts_api?location.href="/core/dashboard/editor/"+e.get("id"):"realDraft"===e.entity?location.href="/core/dashboard/editor/draft/"+e.get("site_id")+"/"+e.get("id"):this.trigger.call(this,"route:editPost",e):this.trigger.call(this,"route:editPost",e)},goToEditModeSection:function(e,t){this.toggleIframes(!0),n.site.whitelabel_settings.use_roar_posts_api?window.open("/core/dashboard/stats/post/"+e.get("id")):this.trigger.call(this,"route:editPost",e,t)},loadPostPage:function(){this.checkTopBlocks(),this.isAsyncListiclePager()&&this.route(/([-\w]+)\.html?.*$/,"loadListiclePage")},closeEditMode:function(){this.toggleIframes(!1)},openFrontPage:function(e,t){this._addPost&&this._addPost(),this._setActiveEntity({tag:"",page:""}),this.trigger.call(this,"route:loadFrontPage",e||"",t||0)},openFrontSubpage:function(e){this._addPost&&this._addPost();var i=t.find(n.site.pages,function(t){return t.url&&t.url.toLowerCase()===decodeURIComponent(e).toLowerCase()});n.site.activePage=i||{},this.trigger.call(this,"route:loadSubPage",n.site.activePage.url||"",n.site.activePage.id||0)},openCommunitySubpage:function(e,i){var s=t.find(n.site.pages,function(e){return e.url&&e.url.toLowerCase()===decodeURIComponent(i).toLowerCase()});n.site.activePage=s||{},this.trigger.call(this,"route:loadSubPage",n.site.activePage.url||"",n.site.activePage.id||0)},openTagPage:function(e){n.site.activeTagPage={name:e}},loadSubpage:function(e){var t=e.get("type"),i=location.protocol+"//"+location.host,s=e.get("page_settings")||{},r=(n.is_custom_domain?n.domain:i)+"/"+e.get("url")+location.search,a=e.get("url");if(1===t)s.open_in_new_tab?o.open(r):location.href=r;else if(2===t)n.inEmbed&&window.parent.postMessage?s.open_in_new_tab?o.open(a):window.parent.postMessage("refresh-window-href:"+encodeURIComponent(a),"*"):s.open_in_new_tab?o.open(a):location.href=a;else{var l=encodeURIComponent(a)+"/"+location.search.replace(/token=[^&]+/,"");s.open_in_new_tab?o.open(i+"/"+(n.is_custom_domain?"":n.site.name+"/")+l):window.location.href=this.getRootPath()+l}}}));return s.call(a.prototype),new a}),rblms.define("widgets/models/menu_item",["require","backbone","underscore"],function(e){var t=e("backbone"),i=e("underscore");return t.Model.extend({initialize:function(){this.on("change:submenu",this._makeSubmenu,this),this._makeSubmenu()},_makeSubmenu:function(){var e;this.has("submenu")&&i.isArray(this.get("submenu"))&&(e=new(0,this.collection.constructor)(this.get("submenu"),{submenu:!0,parent:this}),this.set({submenu:e}))}})}),rblms.define("widgets/collections/menu",["require","backbone","underscore","widgets/models/menu_item","settings"],function(e){var t=e("backbone"),i=e("underscore"),s=e("widgets/models/menu_item"),n=e("settings");return t.Collection.extend({constructor:function(e,s){var o,r=[];e&&e.length&&(e=i.map(i.filter(e,i.isObject),function(e){for("river"===e.id&&(e.visibility=n.use_river),o=e.order,i.isUndefined(o)&&(o=r.length?i.max(r)+1:0);o&&i.contains(r,o);)o++;return r.push(o),e.order=o,e})),t.Collection.apply(this,arguments)},model:s,initialize:function(e,t){this._isSubmenu=t&&t.submenu,this._parentModel=t&&t.parent,this.on("change:active",this.changeActive,this)},changeActive:function(e,t){t&&(e.get("history")&&this._historyList.push(e),this.each(function(t){t.get("active")&&t.get("id")!==e.get("id")&&t.set({active:!1})},this))},comparator:function(e,t){return e.get("order")>t.get("order")?1:-1},isSubmenu:function(){return this._isSubmenu},getParents:function(e){for(var t=[],i=e.collection._parentModel;i;){if(!i)return t;t.unshift(i),i=i.collection._parentModel}return t},setPreviousActive:function(e){var t,i=this.get(e);i&&i.get("active")&&(t=this._historyList.pop(),i.set({active:!1}),t&&t.set({active:!0}))},_setParents:function(e,t){i.each(this.getParents(e),function(e){e.set("active",t)})},getList:function(){var e={login:function(){return!!i.isUndefined(this.get("login_required"))||(i.isUndefined(n.user.is_autorized)&&i.isUndefined(n.is_autorized)?!this.get("login_required"):i.isBoolean(n.is_autorized)&&i.isUndefined(n.user.is_autorized)?n.is_autorized===this.get("login_required"):n.user.is_autorized===this.get("login_required"))},scheduled_permission:function(){return"scheduled_posts"!==this.get("id")||n.site.is_roar&&n.site.paid_features.enterprise&&n.user.can("edit_post")},provider:function(){if(this.has("provider")){var e=n.providers[this.get("provider")];return!e||!e.status}return!0},visibility:function(){return this.get("visibility")},paid_features:function(){var e=this.get("paid_features");return!e||!n.site.paid_features||(e=e.permission_required,/^\!/i.test(e)?(e=e.substr(1),!n.site.paid_features[e]):n.site.paid_features[e])},permission:function(){var e,t,s,o=this.get("permission_required");if(i.isEmpty(o))return!0;for(o=i.isArray(o)?o:[o],e=0;e<o.length;e++)if(t=o[e],(s=n[t.on])&&n.user.can(t.permission,!0,s))return!0;return!1}};return this.filter(function(t){return i.all(e,function(e){return e.call(this)},t)})},_historyList:[]})}),rblms.define("social-ux/view/menu_item",["require","jquery","backbone","underscore","settings","hogan"],function(e){var t=e("jquery"),i=e("backbone"),s=e("underscore"),n=e("settings"),o=e("hogan"),r={none:{show:function(){return this.show()},hide:function(){return this.hide()}},slide:{show:function(){return this.slideDown()},hide:function(){return this.sideUp()}}},a=o.compile('        {{#section}}            <span class="menu-parent-item">        {{/section}}        {{^section}}            <div {{#classes}}class="{{classes}}"{{/classes}}>            <a class="link" href="{{url}}" title="{{title}}">        {{/section}}            {{#ico}}<i class="ico {{ico}}"></i> {{/ico}}{{#thumb}}<img height="24" src="{{thumb}}" class="user-fav">  {{/thumb}}            {{#logo}}<img src="{{logo}}" class="item-link--logo" height="25">{{/logo}}            <span class="item-link">{{title}}</span>            {{#hasCounter}}<span class="counter hidden"></span>{{/hasCounter}}        {{^section}}            </a>        {{/section}}            {{#dropdown}}<i class="icon-angle-down"></i>{{/dropdown}}        {{#section}}            </span>        {{/section}}        {{^section}}            </div>        {{/section}}        {{#hasSubmenu}}            <ul class="mdc-list mainmenu-sub"{{^isSubmenuExpanded}} style="display:none;"{{/isSubmenuExpanded}}></ul>            {{#hasTogglable}}            <div class="toggle-visiblity">                <a class="hidden show-more" href="#">More <i class="icon-caret-down"></i></a>                <a class="hidden show-less" href="#">Less <i class="icon-caret-up"></i></a>            </div>            {{/hasTogglable}}        {{/hasSubmenu}}    ');return i.View.extend({defaults:{counterTimeout:3e4},events:{"click .link":"activateItem","click .icon-angle-down":"toggleDropdown"},initialize:function(){if(this.watchEvent(this.model,"change:active","render",this),this.watchEvent(this.model,"destroy remove","remove",this),this.model.get("activate_events")&&s.each(this.model.get("activate_events"),function(e){this.watchEvent(this.options.router,"route:"+e,"_activateItem",this)},this),this.model.get("counterURL")){var e=i.Model.extend({urlRoot:this.model.get("counterURL")});this.counterModel=new e,this.watchEvent(this.counterModel,"change:count","setTicker",this),this.checkCount()}},getParentModel:function(){return this.options.parentView&&this.options.parentView.model},getParents:function(){for(var e=[],t=this.options.parentView;t;){if(!t.model)return e;e.unshift(t.model.get("id")),t=t.options.parentView}return e},setTicker:function(e,t){this.$(".counter").text(t).toggleClass("hidden",!t)},checkCount:function(){var e=this;this.counterModel.fetch({success:function(t){setTimeout(function(){e.checkCount()},e.defaults.counterTimeout)}})},render:function(e,t){var i,l,c,d=this.model.has("section"),u=this.model.get("active"),h=this.model.has("dropdown")&&this.model.get("dropdown"),p=this.model.has("submenu"),g=this.model.get("class_name"),f=p&&this.model.get("expand");return s.isBoolean(t)||(i=o.compile(this.model.get("url")).render({site_name:n.user_site?n.user_site.name:"",parent_id:n.parent_site?n.parent_site.id:0,id:n.user_site?n.user_site.id:n.parent_site?n.parent_site.id:n.site.id,right_site:((n.user.can("edit_post",this,"parent_site")||n.user.can("create_draft",this,"parent_site")?n.parent_site:n.user_site)||{}).id}),l=o.compile(this.model.get("title")).render({user_site_title:n.user_site?n.user_site.title:""}),c=o.compile(this.model.get("logo")||"").render({user_site_avatar:n.user_site?n.user_site.display_logo:""}),this.$el.html(a.render(s.extend({},this.model.toJSON(),{url:i,title:l,logo:c,hasSubmenu:d||h||p,hasTogglable:this.options.hasTogglable,hasCounter:!!this.model.get("counterURL"),isSubmenuExpanded:u||f}))),(u||d)&&this.$("ul").show()),this.$el.toggleClass("divider",!!this.model.get("show_divider")).toggleClass("active",!!u).toggleClass("main-menu-dropdown",h).toggleClass("section",d),!d&&s.isBoolean(t)&&!1===t?(this.$("ul").slideUp(),this):(g&&this.$el.addClass(g),!d&&s.isBoolean(t)&&r[n.site.whitelabel_settings&&n.site.whitelabel_settings.menu_animation||"none"][t?"show":"hide"].call(this.$("ul")),this)},toggleDropdown:function(e){e&&e.preventDefault(),this.$(".mainmenu-sub").toggle(),this.$el.toggleClass("active")},activateItem:function(e){var i=this.model.get("type"),n=this.model.get("active");return!this.model.get("section")&&(n&&this.options.isCollapsable?this.model.set("active",!1):0===i?(e&&s.isFunction(e.preventDefault)&&e.preventDefault(),this.options.router.trigger("close:menu").trigger("route:"+this.model.get("id"),this.model.get("id")),window.location=t(e.currentTarget).closest("a").attr("href"),e):void this.model.set({active:!0}))},_deactivateItem:function(){var e;this.model.get("active")&&(e=this.getParentModel(),this.model.unset("active"),e.set("active",!0))},_activateItem:function(e){var t=!e||e===this.model.get("id");this.model.set({active:t})}})}),rblms.define("social-ux/view/main_menu",["require","backbone","underscore","social-ux/view/menu_item"],function(e){var t=e("backbone"),i=e("underscore"),s=e("social-ux/view/menu_item");return t.View.extend({defaults:{submenuLimit:7,slideSpeed:120},events:{"click .toggle-visiblity a":"toggleVisible"},initialize:function(){this.defaults=i.extend({},this.defaults,this.options),this.watchEvent(this.collection,"reset add","drawMenu",this),this.watchEvent(this.collection,"change:submenu","createSubmenu",this)},drawMenu:function(){this.removeAllProduced();var e=this.collection.getList(),t=this.options.parentView;if(t&&t.model.get("section")&&!e.length)return t.$el.addClass("hidden");i.each(e,function(e,t){this.$el.append(this.makeItemView(e,t).render().el),this.createSubmenu(e,e.get("submenu"))},this)},makeItemView:function(e,t){var i=e.get("submenu"),n=t>this.defaults.submenuLimit&&this.options.parentView,o=e.get("dropdown"),r="main-menu-item main-menu-item--"+(e.get("id")||""),a=this.options.parentView;return this.makeInstance(s,{router:this.router,isCollapsable:this.options.isCollapsable,model:e,parentView:a,hasTogglable:!o&&i&&i.length>this.defaults.submenuLimit,tagName:"li",className:r+(a&&!a._isDropdown&&n?" togglable":"")})},createSubmenu:function(e,s){if(!(s instanceof t.Collection))return this;var n=this.getViewByModel(e),o=e.get("submenu");if(!o||!n)return this;n._isDropdown=e.get("dropdown"),this.makeInstance(this.constructor,{collection:o,parentView:n,router:this.router,el:n.$("ul")[0]}).render(),i.defer(i.bind(this.initToggleMenu,this))},initToggleMenu:function(){var e=this.$("ul > .active");e.length&&e.hasClass("togglable")?(this.$(".togglable").show(),this.$(".show-less").removeClass("hidden")):(this.$(".togglable").hide(),this.$(".show-more").removeClass("hidden"))},toggleVisible:function(e){e.preventDefault(),this.$(".togglable").slideToggle(this.defaults.slideSpeed),this.$(".show-more").toggleClass("hidden"),this.$(".show-less").toggleClass("hidden")},render:function(){return this.drawMenu(),this}})}),rblms.define("social-ux/view/menu",["require","backbone","jquery","underscore","settings","widgets/collections/menu","social-ux/view/main_menu"],function(e){var t=e("backbone"),i=(e("jquery"),e("underscore")),s=e("settings"),n=e("widgets/collections/menu"),o=e("social-ux/view/main_menu");return t.View.extend({initialize:function(e){this.options=e||{},i.contains([17300592,17296500,17296494,17296497],s.site.id)&&[].push.apply(this.options.menuData,[{id:"main",url:"https://blackrock.rebelmouselabs.com",title:"Main",show_divider:!0,order:323,visibility:!0,login_required:!0,type:0},{id:"blackrockus",url:"http://blackrockus.rebelmouse.com",title:"US",order:324,visibility:!0,login_required:!0,type:0},{id:"blackrockuk",url:"http://blackrockuk.rebelmouse.com",title:"UK",order:325,visibility:!0,login_required:!0,type:0},{id:"blackrockcan",url:"http://blackrockcanada.rebelmouse.com",title:"CAN",order:326,visibility:!0,login_required:!0,type:0},{id:"blackrockemea",url:"http://blackrockemea.rebelmouse.com",title:"EMEA",order:327,visibility:!0,login_required:!0,type:0}]),i.contains([17317527,17325884],s.site.parent_id||s.site.id)&&this.options.menuData.unshift({id:"user_data",url:"/community/{{site_name}}",title:"{{user_site_title}}",logo:"{{user_site_avatar}}",visibility:!0,order:0,login_required:!0,type:0}),this.collection=new n(this.options.menuData)},render:function(){return this.makeInstance(o,i.extend({},this.options,{router:this.router,collection:this.collection,el:this.$("#main-menu")[0]})).render(),this}})}),rblms.define("jquery.cookie",["jquery"],function(e){e.cookie=function(t,i,s){if(arguments.length>1&&"[object Object]"!==String(i)){if(s=e.extend({},s),null!==i&&void 0!==i||(s.expires=-1),"number"==typeof s.expires){var n=s.expires,o=s.expires=new Date;o.setDate(o.getDate()+n)}return i=String(i),document.cookie=[encodeURIComponent(t),"=",s.raw?i:encodeURIComponent(i),s.expires?"; expires="+s.expires.toUTCString():"",s.path?"; path="+s.path:"",s.domain?"; domain="+s.domain:"",s.secure?"; secure":""].join("")}var r,a=(s=i||{}).raw?function(e){return e}:decodeURIComponent;return(r=new RegExp("(?:^|; )"+encodeURIComponent(t)+"=([^;]*)").exec(document.cookie))?a(r[1]):null}}),rblms.define("widgets/models/visitor",["require","jquery","jquery.cookie","backbone","underscore","settings","engine"],function(e){var t=e("jquery"),i=(e("jquery.cookie"),e("backbone")),s=e("underscore"),n=e("settings"),o=e("engine");return i.Model.extend({cookieName:"user_tracking_id",cacheCookieName:"visitor_cache",oldCookieName:"visitorid",cookieConfig:{path:"/",expires:3650},urlRoot:function(){return this.baseHref||""===this.baseHref||console.error("Resources base href is not defined"),this.baseHref+"/"+(this.id?"res":"core")+"/users/tracking/"},idAttribute:"user_tracking_id",defaults:{user_tracking_id:null,last_page_view_timestamp:null,user_type:"casual"},initialize:function(e,t){this.autoSync=!!t&&t.autoSync,this.baseHref=o.resources_base_href,this.autoSync&&(this.on("change:user_tracking_id",this.initFromServer),this.on("error",this.triggerSynced)),this.initLocal(),this.autoSync&&!this.id&&this.save(null,{success:s.bind(function(){this.triggerSynced()},this)})},initLocal:function(){var e,i=n.user?n.user.id:null,s=t.cookie(this.oldCookieName),o=t.cookie(this.cacheCookieName),r={};i&&(r.user_tracking_id=String(i)),s?(t.cookie(this.cookieName,null,{path:this.cookieConfig.path}),t.cookie(this.oldCookieName,null,this.cookieConfig)):s=t.cookie(this.cookieName),s&&!i&&(r.user_tracking_id=s),o&&(e=JSON.parse(o),i&&i!==e.user_tracking_id||(r=e)),r&&this.set(r)},initFromServer:function(){this.id&&this.fetch({success:s.bind(function(){this.triggerSynced()},this)})},triggerSynced:function(){var e=JSON.stringify(this.toJSON());t.cookie(this.cacheCookieName,e,this.cookieConfig),t.cookie(this.cookieName,this.id,this.cookieConfig),this.id&&this.trigger("synced",this.id)},getLastVisitTime:function(){return this.get("last_page_view_timestamp")}})}),rblms.define("widgets/views/visitor",["require","backbone","underscore","core/event_dispatcher","bootstrap","widgets/models/visitor"],function(e){var t=e("backbone"),i=(e("underscore"),e("core/event_dispatcher")),s=e("bootstrap"),n=e("widgets/models/visitor");return t.View.extend({initialize:function(){this.model=new n(null,{autoSync:!0}),this.options.router.trigger("visitor:model:inited",this.model),this.model.on("synced",this.applyModel,this)},applyModel:function(){this.options.router.trigger("visitor:model:synced",this.model),this.trackPageViewByUser()},trackPageViewByUser:function(e){var t=s.post;e||(e=this.model.id),e&&i.trigger("user:page:visited",this.model.toJSON(),t)}})}),function(e){"function"==typeof rblms.define&&rblms.define.amd?rblms.define("jquery.xdomainrequest",["jquery"],e):e(jQuery)}(function(e){if(!e.support.cors&&e.ajaxTransport&&window.XDomainRequest){var t=/^https?:\/\//i,i=/^get|post$/i,s=new RegExp("^"+location.protocol,"i");e.ajaxTransport("* text html xml json",function(n,o,r){if(n.crossDomain&&n.async&&i.test(n.type)&&t.test(n.url)&&s.test(n.url)){var a=null;return{send:function(t,i){var s="",r=(o.dataType||"").toLowerCase();a=new XDomainRequest,/^\d+$/.test(o.timeout)&&(a.timeout=o.timeout),a.ontimeout=function(){i(500,"timeout")},a.onload=function(){var t="Content-Length: "+a.responseText.length+"\r\nContent-Type: "+a.contentType,s={code:200,message:"success"},n={text:a.responseText};try{if("html"===r||/text\/html/i.test(a.contentType))n.html=a.responseText;else if("json"===r||"text"!==r&&/\/json/i.test(a.contentType))try{n.json=e.parseJSON(a.responseText)}catch(e){s.code=500,s.message="parseerror"}else if("xml"===r||"text"!==r&&/\/xml/i.test(a.contentType)){var o=new ActiveXObject("Microsoft.XMLDOM");o.async=!1;try{o.loadXML(a.responseText)}catch(e){o=void 0}if(!o||!o.documentElement||o.getElementsByTagName("parsererror").length)throw s.code=500,s.message="parseerror","Invalid XML: "+a.responseText;n.xml=o}}catch(e){throw e}finally{i(s.code,s.message,n,t)}},a.onprogress=function(){},a.onerror=function(){i(500,"error",{text:a.responseText})},o.data&&(s="string"===e.type(o.data)?o.data:e.param(o.data)),a.open(n.type,n.url),a.send(s)},abort:function(){a&&a.abort()}}}})}}),rblms.define("social-ux/mixin/sync_processing",["require","backbone","underscore","settings","social-ux/view/informer","jquery.xdomainrequest"],function(e){var t=e("backbone"),i=e("underscore"),s=e("settings"),n=e("social-ux/view/informer");e("jquery.xdomainrequest");var o,r,a=function(e,t){var i=t||"Error has occured",s=!1;if(e&&0===e.readyState&&(i=t||"Connection error"),!e||!e.status)return i;try{s=JSON.parse(e.responseText)}catch(e){s=!1}return e.statusText&&(i=e.statusText),s&&(s.error||s.message)&&(i=s.error&&s.error.message||s.error||s.message),i};return o=function(e,t,i,s){console.error("Error: ",a(e)),s&&new n({type:"error",message:a(e),headline:"Oops!!!",controls:[{name:"OK",callback:function(){}}]}).render()},r=function(e,n,o){var r,a=this,l=((s.site||{}).whitelabel_settings||{}).resources_base_href,c=s.base_ssl_domain&&s.base_ssl_domain.toLocaleLowerCase()||"";if(o||(o={}),"read"===e&&n instanceof t.Collection&&(o.add?o.remove=!1:o.reset=!0),r=o.url||function(e,t){if(!e||!e[t])return null;return i.isFunction(e[t])?e[t]():e[t]}(this,"url"),/^\/core\//.test(r)&&c&&c!==location.origin&&(o.url=(c||"https://"+location.host)+r,o.crossDomain={crossDomain:!0},o.xhrFields={withCredentials:!0}),/^\/res\//.test(r)&&!/\/res\/(load_more_posts|next_post_page)\//.test(r)&&l&&(o.url=l+r),this.syncProcessing){if(i.isFunction(this.syncProcessingCallback)&&this.syncProcessingCallback(),!o.force)return!1;this.lastXhr&&this.lastXhr.abort()}i.isFunction(this._syncStarted)&&this._syncStarted(),this.syncProcessing=!0;var d=t.sync.call(this,e,n,o);return this.lastXhr=d,d.always(function(){a.syncProcessing=!1,this.lastXhr=null,i.isFunction(this._syncFinished)&&this._syncFinished()}),(!0===o.forceDefaultErrorCallback||!o.forceDefaultErrorCallback&&i.isUndefined(o.error))&&d.fail(this._syncFail),d},function(){this.syncProcessing=!1,this.sync=r,this.syncProcessingCallback=function(){},this._syncFail=o,this._syncStarted=function(){},this._syncFinished=function(){}}}),rblms.define("social-ux/mixin/notifications",["jquery","underscore","hogan","social-ux/utils/htmlencoder"],function(e,t,i,s){return function(){var n=e("<ul></ul>",{id:"notification",class:"notification"}),o=[],r={message:"",type:"notify",timeout:5e3,safeHTML:!0,persistent:!1};e("body").prepend(n);var a=function(n,o){if(o=t.isString(n)?o||{}:n,o=e.extend({},r,o||{}),t.isString(n)&&(o.message=n),o.uid="notify_"+ +new Date,o.messageVars&&(o.message=i.compile(o.message).render(o.messageVars)),o.safeHTML&&!o.messageVars&&(o.message=s.encodeHTMLTags(o.message)),o.$item=e("<li></li>",{html:o.message,class:"hide "+o.type}),t.isString(o.link)&&e.trim(o.link.length)>0&&t.isFunction(o.callback)){var a=e('<a class="action-link" href="#">'+o.link+"</a>");o.$item.append(a),a.on("click",function(e){e.preventDefault(),o.callbackContext?o.callback.call(o.callbackContext,e):o.callback.call(o,e)})}return l(o)},l=function(t){var i=new c(t);return n.append(t.$item),o.push(e.extend(t,{instance:i})),o.length>=1&&d()&&n.show(),i},c=function(t){this.remove=function(){var i=this;this.uid=t.uid,this.$item=t.$item,this.$item.remove(),(o=e.grep(o,function(e,t){return e.uid!==i.uid})).length&&d()||n.hide()}},d=function(){var e=o.slice(-1)[0];return e.$item.removeClass("hide").siblings().addClass("hide"),e.persistent||setTimeout(function(){e.instance.remove()},e.timeout),!0};return function(){this.notify=a}}()}),rblms.define("libs/backbone/plugins/wrap_error",[],function(){return function(){var e=this.wrapError;this.wrapError=function(t,i,s){return t||!1===s.forceDefaultErrorCallback||(s.forceDefaultErrorCallback=!0),e(t,i,s)}}}),rblms.define("social-ux/mixin/layout_manager",["require","backbone","underscore","social-ux/mixin/notifications","libs/backbone/plugins/wrap_error"],function(e){var t=e("backbone"),i=e("underscore"),s=e("social-ux/mixin/notifications"),n=e("libs/backbone/plugins/wrap_error"),o={views:{},viewListeners:{},models2Views:{},allCallback:function(){this.trigger.apply(this,arguments)}},r=function(e,n,r){n||(n={}),i.extend(e.prototype,{appendTo:function(e){return this.$el.appendTo(e),this},prependTo:function(e){return this.$el.prependTo(e),this}}),s.call(e.prototype);var a=new e(n),l=n.model;return o.views[this.cid]?o.views[this.cid].push(a):o.views[this.cid]=[a],l instanceof t.Model&&(o.models2Views[l.cid]?o.models2Views[l.cid].push(a):o.models2Views[l.cid]=[a]),r&&(a._markedAs=r),a.on("all",o.allCallback,this),a},a=function(e,t,s,n){if("function"!=typeof this[s=s])throw"Callback should be a function and a method on this view";return i.isUndefined(e)&&console.error("error trace"),"function"==typeof e.on&&n?e.on(t,this[s],n):e.on(t,this[s]),o.viewListeners[this.cid]||(o.viewListeners[this.cid]=[]),o.viewListeners[this.cid].push({object:e,event:t,callback:s,context:n}),this},l=function(e){if(!e||!e.cid)throw"Can't get a View if Model does not exist";if(!(e instanceof t.Model))throw"Model should be an instance of Backbone model";if(i.isArray(o.models2Views[e.cid]))return i.find(o.views[this.cid],function(t){return~i.indexOf(o.models2Views[e.cid],t)&&t},this)},c=function(t,s,n,o){var r,a,l=i.isFunction(t)&&t()||t,c=i.keys(s);return this._extraDeps||(this._extraDeps={}),l?(r=this,a=0,function(){var t=arguments||o;a?i.isFunction(n)&&n.apply(r,t):(a++,e(i.map(c,function(e){return s[e]}),i.bind(function(){var e=[].slice.call(arguments,0);i.each(c,function(t,i){this._extraDeps[t]=e[i]},this),i.isFunction(n)&&n.apply(r,t)},r)))}):function(){}},d=function(t,s,n,o,r){if(this._extraDeps||(this._extraDeps={}),r||(r={}),t===this){i.isFunction(this.events)&&this.events();var a,l,c=this.events,d=this;this.undelegateEvents(),a=function(){var t=r.args||arguments,s=i.keys(n);if(l)return i.isFunction(o)&&o.apply(this,t);e(i.map(s,function(e){return n[e]}),i.bind(function(){var e=[].slice.call(arguments,0);i.each(s,function(t,i){this._extraDeps[t]=e[i]},this),l=!0,i.isFunction(o)&&o.apply(this,t)},d)),a=""},i.isFunction(this.events)?this.events=function(){var e=c();return e[s]=a,e}:this.events[s]=a,this.delegateEvents()}else{var u="_"+s+"_callback",h=i.keys(n);this[u]=function(){var a=arguments;e(i.map(h,function(e){return n[e]}),i.bind(function(){var e=[].slice.call(arguments,0);i.each(h,function(t,i){this._extraDeps[t]=e[i]},this),this.unwatchEvent(t,s,u),r.callback&&this.watchEvent(t,s,r.callback),o.apply(this,a),delete this[u]},this))},this.watchEvent(t,s,u,this)}},u=function(){i.each(o.viewListeners[this.cid],function(e){e.object.off(e.event,this[e.callback],e.context)},this),delete o.viewListeners[this.cid]},h=function(e,t,s){var n;if("function"!=typeof this[s])throw"Callback should be a function and a method on this view";i.each(o.viewListeners[this.cid],function(i,o){i.object===e&&i.event===t&&i.callback===s&&(n=o,i.object.off(i.event,this[i.callback]))},this),o.viewListeners[this.cid]&&o.viewListeners[this.cid].splice(n,1)},p=function(e){return o.views[this.cid]?e?i.filter(o.views[this.cid],function(t){return t._markedAs===e}):o.views[this.cid]:[]},g=function(e){i.each(this.getProduced(e),function(e){e.remove(),e.off("all",o.allCallback),e.model instanceof t.Model&&(o.models2Views[e.model.cid]=i.without(o.models2Views[e.model.cid],e))},this)},f=function(){this.removeAllProduced(),this.removeAllWatchers(),this.undelegateEvents(),this.BBRemove(),delete o.views[this.cid]},m=function(e,s,n){if(!~i.indexOf(["html","prepend","append"],e))throw"Method"+e+" doesn't exists";if(n||(n={}),!(s instanceof t.View))throw"view argument should be a Backbone View";n.selector&&this.$(n.selector)[e](s.el),s.trigger("dom:inserted"),s._inserted=!0,i.isFunction(n.callback)&&n.callback()},_=function(e,t){var s=this[e];return this[e]=i.bind(function(){t.apply(this,arguments),s.apply(this,arguments)},this),e};return function(){this.makeInstance=r,this.remove!==f&&(this.BBRemove=this.remove,this.remove=f),this.getViewByModel=l,this.getProduced=p,this.lazyLoadOnEvent=d,this.lazyLoad=c,this.removeAllProduced=g,this.watchEvent=a,this.unwatchEvent=h,this._extraDeps={},this.removeAllWatchers=u,this.insertView=function(){var e=[].slice.apply(arguments);return e.unshift("html"),m.apply(this,e),this},this.appendView=function(){var e=[].slice.apply(arguments);return e.unshift("append"),m.apply(this,e),this},this.prependView=function(){var e=[].slice.apply(arguments);return e.unshift("prepend"),m.apply(this,e),this},this._decorate=_,n.call(t)}}),rblms.define("libs/backbone/plugins/poststats_tracking",["require","jquery","settings","settings"],function(e){var t,i,s=e("jquery"),n=e("settings");function o(){if(-1!==(e=window.location.host).indexOf("beta.rebelmouse.com")||-1!==e.indexOf("stage.rebelmouselabs.com")){if(n.river_stats)return;if(n.widget_settings||n.site.embed_settings&&n.site.embed_settings.sharebox)return;return"/static/img/icons/small-star.png?front"}var e;if(!n.river_stats&&!(n.widget_settings||n.site.embed_settings&&n.site.embed_settings.sharebox))return"https://frontpage-stats.rbl.ms/spacer.gif?"}return t=function(t,i,r,a,l){var c=o();if(c){a=a||0;var d,u,h,p=(d=e("settings").site).is_roar||d.is_roar_subsite?d.is_roar?d.id:d.whitelabel_settings.site_id:0;l.push("roar_id="+p),[].push.call(l,"permalink="+a,"widget_name="+(!(u=n.widget_settings&&n.widget_settings.widget_name?n.widget_settings.widget_name:"")&&n.inEmbed&&(u=n.site.name+"_embed_unit"),u),"subpage_id="+(n.current_supersection_id?-n.current_supersection_id:n.site.activePage&&n.site.activePage.id||0)),c+=[Math.random(),n.site.id,t,i.join(","),r.join(","),l.join(","),encodeURIComponent(h||(n.widget_settings&&n.widget_settings.referrer?decodeURIComponent(n.widget_settings.referrer):window.location!==window.parent.location?decodeURIComponent(document.referrer):n.widget_settings?document.location.href:document.referrer))].join("&"),"click"===t?s.ajax({type:"GET",url:c,async:!1}):s(document.body).append(s("<img />",{src:c,style:"display: none",alt:""}))}},i=function(e,i,s,o,r){var a=e?[e]:[],l=i?[i]:[],c=r||[];s=s||0,!(o=o?1:0)&&s&&document.referrer&&0===document.location.href.indexOf(document.referrer)&&(o=1),o="seed="+o,c.push(o),(n.widget_settings||n.site.paid_features.enterprise)&&c.push("enterprise=1"),s&&n.user.user_reads_stats&&c.push("user_id="+(n.user.id||0)),t("impression",a,l,s,c)},function(){this.statsImpression=i}}),rblms.define("roar/widgets/models/roar_more",["require","backbone","underscore","engine","bootstrap","settings"],function(e){var t=e("backbone"),i=e("underscore"),s=(e("engine"),e("bootstrap")),n=e("settings");return t.Model.extend({initialize:function(e){this.options=e||{}},fetch:function(e){var o={resource_id:(e=e||{data:{}}).data.resource_id||n.resource_id,site_id:n.site.id},r=s.split_testing;r&&r.is_picked_by_query&&r["query-param"]&&r["query-value"]&&(o[r["query-param"]]=r["query-value"]);var a=n.path_params;a&&(o.path_params=JSON.stringify(a));var l=n.device;return l&&(o.override_device=l),i.extend(e.data,o),t.Model.prototype.fetch.call(this,e)},urlRoot:function(){var e=this.get("customUrl"),t=e||"/res/load_more_posts/data.js";return 17598894!==n.site.parent_id&&17598894!==n.site.id||(t="/learn"+t),17438707!==n.site.parent_id&&17438707!==n.site.id||(t="/learn"+t),17264338!==n.site.parent_id&&17264338!==n.site.id||(t="/blog"+t),n.user.is_autorized&&(t="/core/load_more_posts/data.js"),t},url:function(){var e="",t=["stream","site_id","rm_lazy_load"];return this.options.urlParams&&i.each(Object.keys(this.options.urlParams),function(s){i.contains(t,s)&&(e+=(e?"&":"?")+s+"="+this.options.urlParams[s])}.bind(this)),i.isEmpty(n.getparams)||i.each(Object.keys(n.getparams),function(s){i.contains(t,s)||(e+=(e?"&":"?")+s+"="+n.getparams[s])}.bind(this)),this.urlRoot()+(this.id?"/"+this.id:"")+e}})}),rblms.define("social-ux/view/load-more",["require","underscore","jquery","backbone","core/app_engine","settings","core/event_dispatcher","roar/widgets/models/roar_more"],function(e){var t,i=e("underscore"),s=e("jquery"),n=e("backbone"),o=e("core/app_engine"),r=e("settings"),a=e("core/event_dispatcher"),l=e("roar/widgets/models/roar_more"),c=(t=window.location.search.substr(1)).length?i.reduce(t.split("&"),function(e,t){var i=t.split("=");return e[i[0]]=i[1],e},{}):{};return n.View.extend({_page:1,_node_id:!1,defaults:{loadingText:"Loading",offset:550},events:function(){if(this.$el.hasClass("action-btn"))return{click:"onClickLoadMoreButton"}},initialize:function(e){this.excludeListModel=e.excludeListModel,this.checkCustomForm=e.checkCustomForm;var t=o.get("infinite_scroll_defaults")&&o.get("infinite_scroll_defaults").val();this.options=i.extend({},this.defaults,e,t||{}),c=i.extend({},{site_id:r.site.id,rm_lazy_load:1},c),this.roarFetcher=new l({urlParams:c}),this._node_id=this.$el.data("skl-id")||!1,this._isButton=this.$el.hasClass("button-load-more"),this._isLazyButton=this.$el.hasClass("lazy-load-button"),this._isOneTimeLoading=this.$el.hasClass("wrapper-lazy-loading"),this.init()},init:function(){this._setIsLoadingStatus(!1),this.status=this.$el.data("more-posts-exists"),this._isButton&&this.$el.toggleClass("hidden",!this.status),this.status&&this.$el.hasClass("infinite-scroll-wrapper")&&(this.watchEvent(this.options.router,"window:scroll","debouncedCheckScroll",this),this.checkScroll()),this.$el.hasClass("lazy-load-hover")&&s("body").one("mouseenter",this.$el.data("hover-selector"),this.onClickLoadMoreButton.bind(this)),this.$el.hasClass("lazy-load-button")&&s("body").one("click",this.$el.data("click-selector"),this.onClickLoadMoreButton.bind(this))},_isNeedToReset:function(e){this._isLazyButton?this._loadRoar=function(){this._toggleButtonStatus()}:this._isOneTimeLoading?this._resetLoading():(this.status=i.some(e,function(e){return e.more_posts_exist}),this.status||this._resetLoading())},_resetLoading:function(){this._loadRoar=function(){},this.checkScroll=function(){}},_toggleButtonStatus:function(){this.$el.toggleClass("lazy-load-button-active"),this.$el.toggleClass("lazy-load-button-inactive")},checkScroll:function(){if(!this.isVisible())return!1;this._loadRoar()},debouncedCheckScroll:function(){i.debounce(this.checkScroll(),200)},isVisible:function(){return this.viewportBottomEdge=s(window).scrollTop()+s(window).height(),this.elementTopEdge=this.$el.offset().top-this.options.offset,this.elementTopEdge<=this.viewportBottomEdge},_setIsLoadingStatus:function(e){this.$el.toggleClass("next-page-wrapper--loading",e),this._isButton&&(this.$el.data("text")||this.$el.data("text",this.$el.text()),this.$el.data("loading-text")||this.$el.data("loading-text",this.options.loadingText),this.$el.text(this.$el.data(e?"loading-text":"text")))},_lazyButtonProcessing:function(){this._isLazyButton&&(this.$el.removeClass("lazy-load-button-empty"),this.$el.toggleClass("lazy-load-button-active"))},onClickLoadMoreButton:function(e){e.preventDefault(),e.stopPropagation(),this._loadRoar()},applyStyles:function(e){var t=document.createElement("style");t.innerHTML=e.css,document.head.appendChild(t)},_loadRoar:function(){if(this._isLoading)return!1;var e={pn:this._page,exclude_post_ids:this.excludeListModel.excludeList.join(","),node_id:this._node_id};this._isLoading=!0,this._setIsLoadingStatus(!0),this._lazyButtonProcessing(),this.roarFetcher.fetch({data:e,method:"GET",wait:!0,success:i.bind(function(e,t){this._isLoading=!1,this._setIsLoadingStatus(!1),this._page++,this._initLoaded(t)},this)})},_initLoaded:function(e){this.content=s(e.posts_html),this.applyStyles(e),this.content.insertBefore(this.$el),this._isNeedToReset(e.sources),this.checkCustomForm(),a.trigger("viewRegistry:initViews",this.content,{bootstrap:e})}})}),rblms.define("social-ux/init",["require","core/stats/tracker","underscore","backbone","jquery","utils/device","settings","core/app_engine","social-ux/view/content-manager","social-ux/router/frontpage","social-ux/view/menu","core/stats/ga_tracker","widgets/views/visitor","social-ux/mixin/sync_processing","social-ux/mixin/layout_manager","social-ux/mixin/notifications","social-ux/utils/viewRegistry","libs/backbone/plugins/poststats_tracking","social-ux/view/load-more","core/event_dispatcher","bootstrap","social-ux/model/excludePostList"],function(e){e("core/stats/tracker");var t=e("underscore"),i=e("backbone"),s=e("jquery"),n=e("utils/device"),o=e("settings"),r=e("core/app_engine"),a=e("social-ux/view/content-manager"),l=e("social-ux/router/frontpage"),c=e("social-ux/view/menu"),d=e("core/stats/ga_tracker"),u=e("widgets/views/visitor"),h=e("social-ux/mixin/sync_processing"),p=e("social-ux/mixin/layout_manager"),g=e("social-ux/mixin/notifications"),f=e("social-ux/utils/viewRegistry"),m=e("libs/backbone/plugins/poststats_tracking"),_=e("social-ux/view/load-more"),v=e("core/event_dispatcher"),w=e("bootstrap"),b=e("social-ux/model/excludePostList");i=i.noConflict();h.call(i.Collection.prototype),h.call(i.Model.prototype),p.call(i.View.prototype),g.call(i.View.prototype),m.call(i.View.prototype);var k=i.View.extend({el:"body",initialize:function(){this.router=l,this.makeInstance(u,{router:this.router}),this.$win=this.$win||s(window),this.$doc=this.$doc||s(document),o.is("autorized")&&d.trackIdentify(),window.FB&&window.FB.Event.subscribe("edge.create",t.bind(this.trackFBlike,this)),v.on("viewRegistry:initViews",this.initViews,this),i.history.on("route",t.bind(this.changeLocation,this))},trackFBlike:function(e,t){var i=n.isMobile||n.isiPad?"ga-tracking-mobile":"ga-tracking",o=s(t).data(i);o&&d.trackAction("follow_social_network.%s".format(o),e)},changeLocation:function(){this.router.trigger.call(this.router,"window:location")},listenToScroll:function(){var e=t.bind(function(e){this.router.trigger.call(this.router,"window:scroll",e,this.$win.scrollTop(),{width:this._winWidth,height:this._winHeight,docHeight:this.$doc.height()})},this),i=t.bind(function(e){this.router.trigger.call(this.router,"window:scrolling",e,this.$win.scrollTop(),{width:this._winWidth,height:this._winHeight,docHeight:this.$doc.height()})},this),s=t.bind(function(t){this._winHeight=this.$win.height(),this._winWidth=this.$win.width(),e(t)},this);s(),this.$win.off("scroll.global").on("scroll.global",t.debounce(e,300)),this.$win.off("scroll.social-ux").on("scroll.social-ux",t.throttle(i,300)),this.$win.off("resize.global").on("resize.global",t.debounce(s,300))},registerViews:function(){f.register(".get-alerts",t.bind(function(e,t){this.lazyLoad(!0,{SubscribeView:"widgets/views/frontpage/site_subscribe"},function(){this.makeInstance(this._extraDeps.SubscribeView,{el:e,router:this.router}).render()})()},this)),f.register(".next-page-wrapper",t.bind(function(e,t){this.makeInstance(_,{router:this.router,el:e,excludeListModel:b,checkCustomForm:this.checkCustomForm})},this))},initViews:function(e,t){e&&t&&f.initEntries(e,t)},checkCustomForm:function(){var e=this.$(".custom-form").length;this.lazyLoad(e,{customFormView:"widgets/views/custom_form"},function(){})()},render:function(){return this.menu=this.makeInstance(c,{menuData:r.get("main_menu").val(),el:this.$el,router:this.router,isCollapsable:!0,submenuLimit:15}).render(),this.contentManager=this.makeInstance(a,{el:this.$(".main"),router:this.router}),this.listenToScroll(),i.history.start({pushState:!!history.pushState}),this.registerViews(),this.initViews(this.el,{bootstrap:w}),this.initTopbar(),this.checkCustomForm(),this},initTopbar:function(){this.lazyLoad(o.is_autorized&&o.use_river,{TopbarUserInfo:"widgets/views/river/topbar_user_info"},function(){var e=this.$(".rebel-use-info-wrapper");e.length&&e.html(this.makeInstance(this._extraDeps.TopbarUserInfo).render().$el)})()}});return{init:function(){(new k).render()},view:k}});