!function e(t,n,r){function i(a,s){if(!n[a]){if(!t[a]){var c="function"==typeof require&&require;if(!s&&c)return c(a,!0);if(o)return o(a,!0);var l=new Error("Cannot find module '"+a+"'");throw l.code="MODULE_NOT_FOUND",l}var u=n[a]={exports:{}};t[a][0].call(u.exports,function(e){var n=t[a][1][e];return i(n?n:e)},u,u.exports,e,t,n,r)}return n[a].exports}for(var o="function"==typeof require&&require,a=0;a=1)return e.render(n.many,t)}catch(o){}return e.render("",t)},allSet:function(e,t,n,r){var i;try{this.dustParams(r,e,t);var o=this.buildParamsObj(r.key,e,t);Object.keys(o).forEach(function(e){i=Array.isArray(o[e])?!o[e].length:null===o[e]||"undefined"==typeof o[e]})}catch(a){}return i?n.else?e.render(n.else,t):e.write(""):e.render(n.block,t)},anySet:function(e,t,n,r){var i;try{this.dustParams(r,e,t);var o=this.buildParamsObj(r.key,e,t);Object.keys(o).forEach(function(e){i=i||(Array.isArray(o[e])?o[e].length:null!==o[e]&&"undefined"!=typeof o[e])})}catch(a){}return i?e.render(n.block,t):n.else?e.render(n.else,t):e.write("")},deref:function(e,t,n,r){return e.write(r.obj[r.prop])},json:function(e,t,n,r){var i=2;return r.min&&(i=0),e.write(JSON.stringify(r.dump,null,i))},tzFormat:function(e,t,n,r){return this.dustParams(r,e,t),e.write((r.tz||"").replace(/\//,", ").replace("_"," "))},hoursAndMins:function(e,t,n,r){var o="";try{this.dustParams(r,e,t);var a=r.from||+new Date/1e3,s=r.to||+new Date/1e3;o=i.duration(s-a,"seconds").hours()+"h "+i.duration(s-a,"seconds").minutes()+"m"}catch(c){}return e.write(o)},duration:function(e,t,n,r){var o="";try{this.dustParams(r,e,t);var a=r.from||+new Date/1e3,s=r.to||+new Date/1e3,c=r.format||"days";o=i.duration(s-a,"seconds")[c]()}catch(l){}return e.write(o)},dateFormat:function(e,t,r,o){var a="";try{this.dustParams(o,e,t),o.unixtime=o.unixtime||+new Date/1e3;var s;s=void 0===o.offset?n(t):o.offset,a=i.unix(o.unixtime).utcOffset(-1*s).format(o.format)}catch(c){}return e.write(a)},twoDateFormat:function(e,t,r,o){var a="";try{if(this.dustParams(o,e,t),o.start&&o.end){var s;s=void 0===o.offset?n(t):o.offset;var c=i.unix(o.start).utcOffset(-1*s),l=i.unix(o.end).utcOffset(-1*s);a=c.format("YYYY")!==l.format("YYYY")?c.format("MMM D")+" - "+l.format("MMM D YYYY"):c.format("MMM D")===l.format("MMM D")?c.format("MMM D"):c.format("MMM")!==l.format("MMM")?c.format("MMM D")+" - "+l.format("MMM D"):c.format("MMM D")+"-"+l.format("D")}}catch(u){}return e.write(a)},twoDateSplit:function(e,t,r,o){this.dustParams(o,e,t);try{if(o.start&&o.end){var a=n(t),s=i.unix(o.start).utcOffset(-1*a),c=i.unix(o.end).utcOffset(-1*a),l=o.separator||"-";return s.format("MMM D")===c.format("MMM D")?e.write(s.format(o.format)):s.format("MMM")===c.format("MMM")?"MMM"===o.format?e.write(s.format(o.format)):s.format("D")===c.format("D")?e.write(s.format(o.format)):e.write(s.format(o.format)+l+c.format(o.format)):e.write(s.format(o.format)+l+c.format(o.format))}}catch(u){}return e.write("")},formatSecondsForDisplay:function(e,t,n,r){this.dustParams(r,e,t);var o="";try{if(!r.seconds)return e.write("");var a="mm:ss";r.seconds>=3600&&(a="H:mm:ss"),o=i().startOf("day").seconds(r.seconds).format(a)}catch(s){}return e.write(o)},ltNow:function(e,t,n,r){return this.dustParams(r,e,t),r.end_time?i().unix()r.len&&(i.length=r.len,i.push("..."))}catch(o){}return e.write(i.join(" "))},truncateLetters:function(e,t,n,r){var i=[];try{if(this.dustParams(r,e,t),!r.str)return e.write("");r.len=r.len||20,i=r.str.split(""),i.length>r.len&&(i.length=r.len,i.push("..."))}catch(o){}return e.write(i.join(""))},magick:function(e,t,n,r){var i;try{this.dustParams(r,e,t),i=o({config:t.get("rind.config"),url:r.url,method:r.method,width:r.width,height:r.height,prod:r.prod,cdn:r.cdn,external:r.external})}catch(a){}return e.write(i||"")},take:function(e,t,n,r){return this.dustParams(r,e,t),t.stack.ofr.limit?e.write(""):t.stack.index===r.limit?n.excess?(t=t.push({$excess:t.stack.of-r.limit}),n.excess(e,t)):e.write(""):(t.stack.of=r.limit,n.block(e,t))},titleCase:function(e,t,n,r){this.dustParams(r,e,t);var i=r.str.replace(/\w\S*/g,function(e){return e.charAt(0).toUpperCase()+e.substr(1).toLowerCase()});return e.write(i)},categoryToVertical:function(e,t,n,r){this.dustParams(r,e,t);var i=t.get("rind").config.verticals;for(var o in i)if(i[o]===r.category)return e.write(o);return e.write("")},centsToDollars:function(e,t,n,r){this.dustParams(r,e,t);var i;return 0===r.cents&&"true"===r.friendly?e.write("free"):(r.cents||0===r.cents)&&(i=r.cents%100===0?r.cents/100:(r.cents/100).toFixed(2),r.symbol)?e.write(r.symbol+i):e.write(i)},md5:function(e,t,n,r){var i=a("md5");return i.update(r.string),e.write(i.digest("hex"))},decodeHtml:function(e,t,n,r){return e.write(r.string.replace(/&/g,"&"))},robotMeta:function(e,t,n,r){return r.allowed===!1?e.write(''):e.write("")},trimWhiteSpace:function(e,t,n){return e.tap(function(e){return e.trim()}).render(n.block,t).untap()},getOgImageFromModules:function(e,t,n,r){var i=r.pageData.modules;if(i){var o=s.find(i,function(e){return"Channel Hero"===e.name||"Topic Hero"===e.name}),a=s.findWhere(i,{name:"Search"}),l="";if(r.pageData.og_image)l=r.pageData.og_image;else if(o&&o.data&&o.data.image)l=o.data.image.key;else{if(!a||!a.data)return e.write(t.get("rind").config.social.default_image);l=a.data.image}if(l&&""!==l){var u={url:l,cdn:r.cdn,width:r.width};return c.magick(e,t,n,u)}}return e.write("")}};Object.keys(c).forEach(function(e){r.helpers[e]=c[e]}),t.exports=r},{crypto:530,"dustjs-helpers":751,"ganges/magickimage":2,moment:void 0,underscore:void 0}],2:[function(e,t){"use strict";t.exports=function(e){return e.method=e.method||"fit",e.width=e.width||50,e.url.match(/^\/?(cl-ugc|ugc|gallery|profile)/)?(e.url=e.url.replace(/\/?cl-ugc-west-2\//,""),e.url=e.url.replace(/\/?ugc\/gallery\//,"gallery/"),e.url=e.url.replace(/\/?ugc\/profile-image\//,"profile-image/"),e.url=e.url.replace(/\/?ugc\/profile-background\//,"profile-background/"),e.url=e.config.hostname.protocol+"://"+e.config.cdn.ugc+"/"+e.url):e.url.match(/^\/?(cl-agc|agc)/)?e.url=e.config.hostname.protocol+"://"+e.config.cdn.agc+"/"+e.url:e.url.match(/^\/?(keyframes)/)&&(e.url=e.url.replace(/\/?keyframes\//,""),e.url=e.config.hostname.protocol+"://"+e.config.cdn.keyframes+"/"+e.url),"/"!==e.url.substr(0,1)&&"http"!==e.url.substr(0,4)&&(e.url="/"+e.url),e.magickmangler=e.config.magickmangler,e.url=encodeURIComponent(e.url),e.src=[e.magickmangler,e.method,e.url,e.width],(e.height||0===e.height)&&e.src.push(e.height),e.src.length>0?e.config.hostname.protocol+"://"+e.src.join("/"):""}},{}],3:[function(e){"use strict";var t=angular.module("cl");t.controller("LoginPage",e("./pageController"))},{"./pageController":4}],4:[function(e,t){"use strict";function n(e,t,n,r,i){function o(){s.doingAction=!0,s.email&&-1!==s.email.indexOf("@")||(s.error="Please enter a valid email"),(!s.password||s.password.length<1)&&(s.error.length>0?s.error+=" and password":s.error="Please enter a password"),e.user.Auth.login({email:s.email,password:s.password}).then(function(){s.error=void 0;var e=r.parse(s.params);t.location.href=e.dest?e.dest:"/"},function(e){s.error=e||"We didn't recognize your username or password. Please try again."}).finally(function(){s.doingAction=!1})}function a(){e.user.Auth.startFacebook("signIn","userLogin")}var s=this;angular.extend(this,{doingAction:!1,login:o,facebook:a,showPasswordResetModal:i,params:n()})}t.exports=["$rootScope","$window","locationSearch","qs","PasswordResetModal",n]},{}],5:[function(){"use strict";angular.module("cl").directive("headerSearch",["trackFactory",function(){return{restrict:"A",controllerAs:"headerSearchCtrl",controller:[function(){this.onSearchInput=function(e,t){"submit"===t&&document.querySelector(".searchbar").submit()}}]}}]),angular.module("cl").directive("mobileNavToggle",[function(){return{scope:{},replace:!0,link:function(e,t){t.bind("click",function(e){e.preventDefault();try{document.querySelector("html").classList.toggle("mobile-menu-open")}catch(t){}})}}}]),angular.module("cl").directive("mobileMenuOff",[function(){return{scope:{},template:'
',transclude:!0,replace:!0,link:function(e){e.closeMobileMenu=function(){try{document.querySelector("html").classList.remove("mobile-menu-open")}catch(e){}},e.$on("user:login",e.closeMobileMenu),e.$on("user:register",e.closeMobileMenu)}}}])},{}],6:[function(e){"use strict";if(window.Vault=e("vault.js"),window.dust=e("ganges/dust/helpers"),window.angular=e("@creativelive/angular.rind/node_modules/angular"),window.FB){var t={appId:rind.config.facebook.app_id,xfbml:!0,version:"v2.2"};window.FB.init(t)}var n=window.dust.makeBase({rind:{config:rind.config,context:rind.context}}),r={protocol:rind.config.hostname.protocol,admin:rind.config.hostname.page+"/admin",page:rind.config.hostname.page,api:rind.config.hostname.api,cdn:rind.config.cdn.assets,artifacts:rind.config.cdn.artifacts},i={env:rind.config.env,pkg:rind.pkg,hostname:{protocol:rind.config.hostname.protocol,admin:rind.config.hostname.page+"/admin",page:rind.config.hostname.page,api:rind.config.hostname.api,cdn:rind.config.cdn.assets,artifacts:rind.config.cdn.artifacts},cdn:rind.config.cdn,cachingDomain:rind.config.cdn.data?"https://"+rind.config.cdn.data:"",magickmangler:rind.config.magickmangler,clientKey:rind.config.auth.clientKey,pubnub:rind.config.pubnub,pipeline:rind.config.pipeline};angular.render=function(e,t){var r="";return dust.render(e,n.push(t||{}),function(e,t){r=e||t}),r},angular.module("cl",["cl-angular","cl.ui"]).value("config",i).value("constants",{}).config(["$httpProvider","$compileProvider","httpAuthInterceptProvider",function(e,t,n){n.authConfig({sessionService:"gangesSessionService",appKey:"bfd81b32-7ff2-468c-b266-3a88b7c0471b"}),n.hostConfig(r),n.maxRetries(3),e.interceptors.push("httpAuthIntercept"),t.debugInfoEnabled("dev"===i.env)}]).value("rind",window.rind).value("Vault",window.Vault).value("mixpanel",window.mixpanel).value("analytics",window.analytics).factory("i18n",function(){return window.rind.dump&&window.rind.dump.i18n}),window.__bootstrapAngular=function(){angular.element(document).ready(function(){var e,t=angular.element(document.querySelector("body")).data("app");t||(e=new Error("data-app attribute not found. Defaulting to cl module."),window.NREUM&&window.NREUM.noticeError&&window.NREUM.noticeError(e),t="cl"),angular.bootstrap(document,[t],{strictDi:!0})})},e("@creativelive/angular.rind"),e("public/js/tpl/auth"),e("public/js/tpl/cl-angular"),e("modules/auth/login/page.mod/client/module"),e("modules/components/nav.mod/client/module"),e("modules/ui.mod/client/main"),e("./runtime")},{"./runtime":7,"@creativelive/angular.rind":142,"@creativelive/angular.rind/node_modules/angular":496,"ganges/dust/helpers":1,"modules/auth/login/page.mod/client/module":3,"modules/components/nav.mod/client/module":5,"modules/ui.mod/client/main":18,"public/js/tpl/auth":766,"public/js/tpl/cl-angular":767,"vault.js":754}],7:[function(e){"use strict";var t=e("underscore");angular.module("cl").run(["$http","$cacheFactory","$window","$cookies","$rootScope","$timeout","$location","$anchorScroll","AnalyticsService","UserService","ScoresService","WatchProgressService","clAuthModal","clGiftModal","clOnboardingModal","Vault","rind","ReferralService",function(e,n,r,i,o,a,s,c,l,u,d,p,f,h,m,g,v,b){function y(){var e={state:"onboarding",onboarding:!0};f(e)}function M(){var e=B();e&&(o.$broadcast("register:show",{onboarding:!0}),g.Local.set("registerPrompt",1,{expires:"+3 days"}))}function w(e,t){a(function(){h(t)})}function A(e,t){t=t||{};var n={state:"intro",onboarding:t.onboarding!==!1,prompt:t.prompt||"default",promptClass:t.promptClass,meta:t.meta};f(n)}function x(e,n){n=n||{},t.extend(n,{state:n.state||"intro"}),f(n)}function k(){f({state:"forgot"})}function _(){o.user.Auth.logout()}function S(){v.context.session&&v.context.session.user&&v.context.session.user._id&&(o.user._data=v.context.session)}function $(){o.$broadcast("tutorial:show")}function z(){o.$broadcast("tutorial:hide")}function T(){return void 0===g.Local.get("registerPrompt")}function C(){return 0===angular.element(document.querySelector(".modal.in")).length}function O(){return o.user&&"function"==typeof o.user.valid&&o.user.valid()||!1}function E(){var e=r.location.pathname.split("/")[1],t={bundle:!0,conference:!0,courses:!0,calendar:!0,catalog:!0,instructors:!0,instructor:!0,upcoming:!0,onair:!0};return t[e]}function L(){return angular.element(document.querySelector("[data-hide_reg_modal=false]")).length?!0:!1}function B(){var e=T()&&C()&&!O();return(E()||L())&&e}o.user=new u,S(),o.$on("onboarding:show",y),o.$on("login:show",A),o.$on("register:show",x),o.$on("register:prompt",M),o.$on("reset:show",k),o.$on("user:logout",_),o.$on("user:login",S),o.$on("user:register",$),o.$on("menu:open",z),o.$on("user:gift",w),b.init(),o.$on("user:facebook-social-register",function(e,t){/checkout/.test(t)||f({state:"social-register",socialProvider:"facebook"})}),o.$on("user:google-social-register",function(){/checkout/.test(window.location.pathname)||f({state:"social-register",socialProvider:"google"})}),o.$on("$routeChangeSuccess",function(){o.haveRenderedDirectURL?l.page(v.dump):o.haveRenderedDirectURL=!0}),o.$on("$locationChangeStart",function(){var e=s.hash();e&&c(e)}),v.fn=v.fn||{},v.fn.socialLoggedIn=function(e,t,n,r){n=n||void 0,o.user.Auth[t](e,n,r)};var N=n.get("$http");window.httpCache=N,angular.forEach(v.preload,function(e,t){e&&N.put(t,[200,JSON.stringify({data:e}),{},"OK"])}),setTimeout(M,2e4);var q=new d;q.getScores()&&q.getScores().topics||q.updateScores(),o.user.checkUTM(),window.optimizelyLog={};var I=t.throttle(function(){angular.forEach(window.optimizelyExperiments,function(e){var t=String(e.fn);window.optimizelyLog[t]||(window.optimizelyLog[t]=0),e.config&&e.config.once&&0!==window.optimizelyLog[t]||(window.optimizelyLog[t]++,e.fn(v.pkg))})},100);o.$watch(I),a(function(){var e=g.Session.getAndRemove("socialAuth");e&&("facebook"===e.socialProvider?o.user.Auth.facebook(e.token):"google"===e.socialProvider&&o.user.Auth.google(e.token,e.userId,e.authenticatedEmail))}),l.analyticsTrack(),p.flushCache()}])},{underscore:void 0}],8:[function(e,t){"use strict";function n(e){var t=e.requestAnimationFrame||e.webkitRequestAnimationFrame||e.mozRequestAnimationFrame||e.oRequestAnimationFrame||e.msRequestAnimationFrame;return{restrict:"AE",scope:{waypoint:"@"},controllerAs:"afx",link:function(n,i){function o(){i.toggleClass("cl-affix",a())}function a(){return n.waypoint.offsetHeight+n.waypoint.offsetTop<=e.scrollY}function s(){t(o),n.$applyAsync()}return angular.extend(n,{waypoint:angular.isString(n.waypoint)?document.querySelector(n.waypoint):document.querySelector(".cl-affix-waypoint")}),!n.waypoint||angular.isArray(n.waypoint)&&n.waypoint.length<1?(n.waypoint=i[0],i.addClass("cl-affix"),void 0):(s(),angular.element(e).bind("scroll",r.debounce(s,40)),angular.element(e).bind("resize",r.debounce(s,40)),n.$on("$destroy",function(){angular.element(e).off("scroll"),angular.element(e).off("resize"),n.$apply()}),void 0)}}}var r=e("underscore");t.exports=["$window","$log",n]},{underscore:void 0}],9:[function(e,t){"use strict";function n(e,t){return{restrict:"A",link:function(n,r){angular.element(r).attr("draggable","true");var i=angular.element(r).attr("id");i||(i=t.new(),angular.element(r).attr("id",i)),r.bind("dragstart",function(t){t.dataTransfer.setData("dragId",i),r.addClass("dragging"),e.$emit("draggable:start",r,n)}),r.bind("dragend",function(){r.removeClass("dragging"),e.$emit("draggable:end:"+i,r,n)}),r.bind("dragenter",function(){r.hasClass("dragging")&&r.removeClass("draggable-over")})}}}t.exports=["$rootScope","uuid",n]},{}],10:[function(e,t){"use strict";function n(e,t,n){return{restrict:"A",scope:{onDrop:"&"},link:function(r,i){var o,a=angular.element(i).attr("id");a||(a=n.new(),angular.element(i).attr("id",a)),i.bind("dragover",function(e){return e.preventDefault&&e.preventDefault(),e.dataTransfer.dropEffect="move",!1}),i.bind("dragenter",function(){o&&!angular.equals(o,i)&&o.removeClass("draggable-over"),i.hasClass("dragging")||(o=i,i.addClass("draggable-over"))}),i.bind("dragleave",function(){t(function(){angular.equals(o,i)||i.removeClass("draggable-over")},1)}),i.bind("drop",function(t){t.preventDefault&&t.preventDefault(),t.stopPropagation&&t.stopPropagation();var n=t.dataTransfer.getData("dragId");e.$on("draggable:end:"+n,function(e,t,n){angular.element(t).removeClass("draggable-target"),i.removeClass("draggable-over"),o=void 0;var a=angular.element(i),s=angular.element(t),c=a.attr("cl-drop-index"),l=s.attr("cl-drag-data"),u=s.attr("cl-drag-index");r.onDrop({$dragEl:s,$dropEl:a,$dropIndex:c,$dragData:l,$dragIndex:u,$dropScope:n})})}),e.$on("draggable:start",function(e,t){angular.element(t).addClass("draggable-target")})}}}t.exports=["$rootScope","$timeout","uuid",n]},{}],11:[function(e,t){"use strict";function n(){return{restrict:"EA",scope:{errorStatus:"="},link:function(e,t){(!e.errorStatus||r.contains(i,e.errorStatus))&&(e.errorStatus="500"),t.html(angular.render("error/"+e.errorStatus+"-content"))}}}var r=e("underscore"),i=[401,404,500];t.exports=[n]},{underscore:void 0}],12:[function(e,t){"use strict";function n(){return{restrict:"EA",scope:{ready:"="},transclude:!0,template:'
'}}t.exports=["$rootScope",n]},{}],13:[function(e,t){"use strict";function n(){return{restrict:"A",scope:!0,link:function(e,t,n){n.loadFn&&t.on("load",function(t){e[n.loadFn]&&e[n.loadFn](t)})}}}t.exports=n},{}],14:[function(e,t){"use strict";function n(){return{restrict:"AE",template:angular.render("ui/pagination"),scope:{model:"=",previousText:"@",nextText:"@",boundaryLinks:"@","class":"@"},link:function(e,t,n){e.directionLinks=!n.directionLinks||"false"===n.directionLinks,e.maxButtons=n.maxButtons||7}}}t.exports=["PaginationFactory",n]},{}],15:[function(e,t){"use strict";function n(){return{restrict:"E",template:angular.render("ui/socialDefaultImage"),scope:{image:"=",size:"@",classes:"@",containerClasses:"@"},replace:!0,transclude:!0,link:function(e){e.willLoad=!!e.image,e.fontSize=e.size||12}}}t.exports=n},{}],16:[function(e,t){"use strict";function n(e,t){function n(n,i){var o=this;if(i=r.isObject(i)?i:{},!n)throw new Error("Pagination requires a $resource.");angular.extend(this,{resource:n,total:0,maxItems:50,current:1,page:{},getFn:"get",getOpts:{},count:"count"},i),this.page.length||t.search().page?t.search().page&&this.setPage(+t.search().page):this.getPage(),e.$watch(function(){return t.search().page},function(){var e=t.search().page;e&&"number"==typeof e&&e!==o.current&&o.setPage(e)})}return angular.extend(n.prototype,{getPageOptions:function(){return angular.extend({page:+(this.current-1),perpage:this.maxItems},this.getOpts)},getPage:function(){var e=this.resource[this.getFn](this.getPageOptions());return this.execQuery(e)},execQuery:function(e){var t=this;return e.$promise=(e.$promise||e).then(function(e){t.total=e.data[t.count],t.page=angular.copy(e.data)}),e},setPage:function(e){return this.current=e,t.search("page",e),this.getPage()}}),n}var r=e("underscore");t.exports=["$rootScope","$location",n]},{underscore:void 0}],17:[function(e,t){"use strict";function n(){return{"new":function(){function e(e){var t=(Math.random().toString(16)+"000000000").substr(2,8);return e?"-"+t.substr(0,4)+"-"+t.substr(4,4):t}return e()+e(!0)+e(!0)+e()},empty:function(){return"00000000-0000-0000-0000-000000000000"}}}t.exports=n},{}],18:[function(e){"use strict";e("public/js/tpl/ui"),e("public/js/tpl/errors"),angular.module("cl.ui",[]);var t=angular.module("cl.ui");t.directive("clPagination",e("./directives/pagination")),t.directive("onLoad",e("./directives/onload")),t.directive("loading",e("./directives/loading")),t.directive("errorPage",e("./directives/errorPage")),t.directive("clDraggable",e("./directives/draggable")),t.directive("clDropTarget",e("./directives/droptarget")),t.directive("clSocialDefaultImg",e("./directives/socialDefaultImage")),t.directive("clAffix",e("./directives/affix")),t.factory("uuid",e("./factories/uuid")),t.factory("PaginationFactory",e("./factories/pagination"))},{"./directives/affix":8,"./directives/draggable":9,"./directives/droptarget":10,"./directives/errorPage":11,"./directives/loading":12,"./directives/onload":13,"./directives/pagination":14,"./directives/socialDefaultImage":15,"./factories/pagination":16,"./factories/uuid":17,"public/js/tpl/errors":768,"public/js/tpl/ui":769}],19:[function(e,t){"use strict";var n=e("angular");e("angular-bootstrap-colorpicker"),e("angular-ui-bootstrap"),e("angular-cookies"),e("angular-elastic"),e("angular-qs"),e("angular-resource"),e("angular-route"),e("angular-sanitize"),e("angular-slugify"),e("angular-scroll"),e("./vendor/angular-ellipsis.js");var r=n.module("cl-angular",["colorpicker.module","ui.bootstrap","ngCookies","ngResource","ngRoute","ngSanitize","slugifier","monospaced.elastic","qsServices","duScroll","dibari.angular-ellipsis"]);t.exports=r},{"./vendor/angular-ellipsis.js":140,angular:496,"angular-bootstrap-colorpicker":479,"angular-cookies":481,"angular-elastic":482,"angular-qs":483,"angular-resource":485,"angular-route":487,"angular-sanitize":489,"angular-scroll":491,"angular-slugify":492,"angular-ui-bootstrap":493}],20:[function(e,t){"use strict";function n(e,t,n,r,i){function o(){return i.ready}function a(e){o()&&analytics.alias(e)}function s(e,t,n,r){if(e)try{mixpanel.register({$created:e})}catch(i){}t&&o()?analytics.identify(t,{name:n&&n.displayName},{},r):r()}function c(e,t,n,r){o()?i.track(e,t,n,r):(i.queueTrackEvent(e,t),angular.isFunction(r)&&r())}function l(e){o()&&i.trackPage(e)}function u(e,t,n,r){b[e]={name:t,node:n,setFn:r}}function d(){var e=n[0].querySelectorAll("[cl-via]");angular.forEach(e,function(e,t){var n=angular.element(e),r=n.attr("cl-module-id");h(r,t)})}function p(){d(),angular.forEach(b,function(e,t){f(t)})}function f(e){b[e].setFn(b[e].location)}function h(e,t){b[e].location=t}function m(e){return b[e].location}function g(e,t){return e+"_"+t}function v(e,t){var n;t?n=y[t]:e&&(n="https://shareasale.com/sale.cfm?amount=0.00&tracking="+e+"&transtype=lead&merchantID=59453"),n&&angular.element(document.body).append('')}var b={},y={media6HomePage:"//action.media6degrees.com/orbserv/hbpix?pixId=34633&pcv=58",media6Photo:"//action.media6degrees.com/orbserv/hbpix?pixId=34634&pcv=59",media6CheckoutConfirmation:"//action.media6degrees.com/orbserv/hbpix?pixId=34998&pcv=84"};return e.$on("user:login",p),e.$on("user:register",p),angular.element(document).ready(d),{analyticsEnabled:o,alias:a,identify:s,track:c,page:l,registerModule:u,getModuleLocation:m,getViaProperty:g,findModuleLocations:d,refreshModule:f,analyticsTrack:i&&i.analyticsTrack||angular.noop,addExtraProperties:i&&i.addExtraProperties||angular.noop,addProperties:i&&i.addProperties||angular.noop,clearExtraProperties:i&&i.clearExtraProperties||angular.noop,trackAffiliateLinkConversion:v}}t.exports=["$rootScope","$window","$document","$filter","clAnalytics",n]},{}],21:[function(e,t){"use strict";function n(){return{replaceHost:function(e){return e},isApiUrl:function(){return!1}}}t.exports=["config",n]},{}],22:[function(e,t){"use strict";function n(e){var t=e("/api/auth",{},{submitDevice:{url:"/api/auth/device",method:"POST"}});return t}t.exports=["$resource",n]},{}],23:[function(e,t){"use strict";function n(e){var t=e("/api/banner/:id",{id:"@id"},{getAll:{url:"/api/banners",cache:!0},getCurrent:{url:"/api/banner",cache:!0}});return t}t.exports=["$resource",n]},{}],24:[function(e,t){"use strict";function n(e){return e("/api/blog/posts",{},{getPosts:{url:"/api/blog/posts",cache:!0},getFullPosts:{url:"/api/blog/posts/full",cache:!0}})}t.exports=["$resource",n]},{}],25:[function(e,t){"use strict";function n(e,t){function n(){return o(!1)}function i(){return o(!0)}function o(n){function r(e){return e&&e.data?o.resolve(angular.copy(e.data)):(o.reject(e.status),void 0)}function i(e){o.reject(e)}var o=t.defer(),a=n?"getFullPosts":"getPosts";return e[a]().$promise.then(r,i),o.promise}function a(){return n().then(function(e){return r.chain(e).pluck("categories").flatten().uniq().value()})}return{getPosts:n,getFullPosts:i,getCategories:a}}var r=e("underscore");t.exports=["BlogResource","$q",n]},{underscore:void 0}],26:[function(e,t){"use strict";function n(e){var t=e("/api/bundle",{slug:"@slug"},{findById:{url:"/api/bundle/id/:id",cache:!0},findBySlug:{url:"/api/bundle/slug/:slug",cache:!0}});return t}t.exports=["$resource",n]},{}],27:[function(e,t){"use strict";function n(e,t){function n(n){var r=e.defer();t.getBySlug({slug:n}).$promise.then(function(e){var t=e&&e.data;t?r.resolve(t):r.reject(e)},r.reject)}return{Resource:t,getBySlug:n}}t.exports=["$q","bundleResource",n]},{}],28:[function(e,t){"use strict";function n(e,t,n,o){var a=e("/api/cache/clear",null,{clearCthulhu:{url:"/api/cache/clear",method:"POST",isArray:!1},clearGanges:{url:"/cache/clear",method:"POST",isArray:!1,ignoreAuthIntercept:!0}});return a.clearCourse=function(e){var n=[],r=[];if(n.push("course.slug:"+e.slug),r.push("course.getCourseBySlug:courseSlug%3A"+e.slug),n.push("course.schedule:undefined%3A%7B%22id%22%3A%22"+e._id+"%22%7D"),r.push("course.getCourseById:course%3A"+e._id),r.push("event.get:%7B%22courseId%22%3A%"+e._id),r.push("event.get:%7B%22id%22%3A%"+e._id),r.push("course.getCountsById:%7B%22id%22%3A%"+e._id),e.instructors&&e.instructors.length)for(var i=0;it.pricing.display_price,t.productLink=r("linkToProduct")(t,!1),e.appliedDiscounts.forEach(function(e){"cross-sell"===e.action.type&&e.targetId===t._id&&(t.isCrossSellItem=!0,t.cross_sells=[],t.crossSellDiscount="flat"===e.action.discount.type?"$"+e.action.discount.amount/100:e.action.discount.amount+"%")})})}var f={};return{get:o,has:a,add:s,remove:c,clear:l,addCoupon:u,removeCoupon:d}}t.exports=["CartResource","$q","$rootScope","$filter",n]},{}],31:[function(e,t){"use strict";function n(e,t){return e("/api/catalog",{},{getTags:{url:"/api/catalog/filters",cache:!0},search:{url:"/api/catalog/search",method:"POST"},updateCourse:{url:"/api/catalog/update/:id",method:"POST"},updateAll:{url:"/api/catalog/update-all"},updateAllIndexes:{url:"/api/catalog/updateall",method:"POST"},counts:{url:"/api/catalog/counts",cache:!0},get:{url:t.cachingDomain+"/bff/catalog",isArray:!0},getDetail:{url:"/bff/catalog/:id"}})}t.exports=["$resource","config",n]},{}],32:[function(e,t){"use strict";function n(e,t,n,a,s,c,l,u,d){function p(e){var n=r.extend({text:"",limit:36,page:1},e);return Object.keys(n).forEach(function(e){n[e]||delete n[e]}),t.search(n).$promise}function f(t){var n=e.defer(),i=r.extend({limit:3,page:!1},t);if(t.against&&"description"===t.against[0])p(i).then(function(e){var t=r.pluck(e.data.exact,"id");S(t,{keys:["instructors"]}).then(n.resolve,n.reject)},n.reject);else{var o,a,s,c=[],l="",u=!0;M().then(function(){o=t.text.split(" "),r.each(o,function(e){l+="(?=.*"+r.escape(e)+")"});try{a=new RegExp(l,"i")}catch(e){u=!1}u&&(r.each(E,function(e){s=!1,a.test(e.title)&&(s=!0),r.each(e.instructors,function(e){e&&e.name&&a.test(e.name)&&(s=!0)}),r.each(e.taxonomy,function(e){e.name&&a.test(e.name)&&(s=!0)}),s&&c.push(e)}),c.length&&c.sort(function(e,t){return e.popularity=e.popularity?e.popularity:0,t.popularity=t.popularity?t.popularity:0,t.popularity-e.popularity}),n.resolve(c))},n.reject)}return n.promise}function h(t){var n=e.defer();return n.resolve(t),n.promise}function m(e){return e?n.getCategoryBySlug({slug:e},function(t){t.data&&t.data.title||(t.data={title:"Not Found"}),t.data.name=t.data.title,C.category[e]=t.data,O.category[e]=t.data}).$promise:h("getCategory-no-slug")}function g(e){return e?O.topic[e]?h("getTopic-cache-used"):u.getAllTopics({},function(e){e.data.forEach(function(e){var t=e.taxonomy.category;O.topic[t]||(O.topic[t]=[]),e.url=e.path,O.topic[t].push(e),C.topic[e.path]=e})}).$promise:h("getTopic-no-slug")}function v(e){return e?(O.subtopic[e]=[],d.getSubTopicByPath({path:e},function(t){var n=t.data;n.forEach(function(t){t.url=t.path,C.subtopic[t.path]=t,O.subtopic[e].push(t)})}).$promise):h("getSubTopics-no-path")}function b(e){return e?l.getTagsByPath({path:e,flags:["is_search"]},function(t){O.tag[e]=[];var n=t.data;n.forEach(function(t){t.url=t.path,C.tag[t.path]=t,O.tag[e].push(t)})}).$promise:h("getTags-no-path")}function y(){return t.get().$promise}function M(){var n=e.defer();return o(function(e){t.get().$promise.then(function(t){angular.forEach(t||[],function(e){w(e)}),e(!0)},e)},{key:"CatalogService.Fetch",expires:"+5 minutes"},function(e){e?n.resolve():n.reject()}),n.promise}function w(e){try{E[e._id]=e,L[e.slug]=e._id,B[e.nid]=e._id,I[e.primary_category&&e.primary_category._id]=e._id,e.title||(e.title=e.short_title),e.product&&(N[e.product._id||e.product]=e._id),angular.forEach(e.taxonomy||[],function(t){t&&(q[t._id]||(q[t._id]=[]),q[t._id].push(e._id))}),angular.forEach(e.instructors||[],function(t){t&&(P[t._id]||(P[t._id]=[]),P[t._id].push(e._id))})}catch(t){}}function A(t,n,r){if(!angular.isString(t))return e.reject();var o=e.defer();return M().then(function(){var e=E[t];if(e){var a=!0;n&&angular.isArray(n.keys)&&angular.forEach(n.keys,function(t){(void 0===e[t]||null===e[t]||null===e[t][0])&&(a=!1)}),a?o.resolve(e):s.findById(t,r).then(function(r){r?(angular.forEach(n.keys,function(t){e[t]=r[t]}),o.resolve(e)):o.reject(new Error("no course found with id "+t))},o.reject)}else{var l;i.series([function(e){s.findById(t,r).then(function(t){l=t,e()},function(){e()})},function(e){return l?e():(c.Resource.findById({id:t},r).$promise.then(function(t){l=t&&t.data,e()},function(){e()}),void 0)}],function(){l?o.resolve(l):o.reject("no results")})}},o.reject),o.promise}function x(t,n){var r=e.defer();return M().then(function(){var e=L[t];A(e,n).then(r.resolve,r.reject)},r.reject),r.promise}function k(t,n){var r=e.defer();return M().then(function(){var e=B[t];A(e,n).then(r.resolve,r.reject)},r.reject),r.promise}function _(t,n){var r=e.defer();return M().then(function(){var e=N[t];e?A(e,n).then(r.resolve,r.reject):a.findById({id:t}).$promise.then(function(e){r.resolve(e&&e.data&&e.data.source)})},r.reject),r.promise}function S(t,n,r){var o=e.defer();return M().then(function(){n=n||{};var e=[];i.eachSeries(t,function(t,i){A(t,n,r).then(function(t){e.push(t),i()},i)},function(){n.sort&&e.sort(function(e,t){var r=n.sortBy||"title",i=(e[r]-t[r],t[r]-e[r]);return i}),angular.isNumber(n.limit)&&(e=e.slice(0,n.limit)),o.resolve(e)})},o.reject),o.promise}function $(t,n){var r=e.defer();return M().then(function(){var e=q[t];return e.length?(S(e,n).then(r.resolve,r.reject),void 0):r.resolve()},r.reject),r.promise}function z(t,n){var r=e.defer();return M().then(function(){var e=I[t];return e.length?(S(e,n).then(r.resolve,r.reject),void 0):r.resolve()},r.reject),r.promise}function T(t,n){var r=e.defer();return M().then(function(){var e=P[t];return e.length?(S(e,n).then(r.resolve,r.reject),void 0):r.resolve()},r.reject),r.promise}var C={category:{},topic:{},subtopic:{},tag:{}},O={category:{},topic:{},subtopic:{},tag:{}},E={},L={},B={},N={},q={},I={},P={};return M(),{maps:C,lookups:O,search:p,searchAutocomplete:f,Resource:t,getCategory:m,getTopics:g,getSubTopics:v,getTags:b,courseIndex:E,fetch:M,get:y,getCourseById:A,getCoursesByIds:S,getCourseBySlug:x,getCourseByNid:k,getCourseByProduct:_,getCoursesByTopic:$,getCoursesByCategory:z,getCoursesByInstructor:T}}var r=e("underscore"),i=e("async"),o=e("cache-stack");t.exports=["$q","catalogResource","categoryResource","productResource","CourseService","BundleService","tagResource","topicResource","subTopicResource",n]},{async:497,"cache-stack":498,underscore:void 0}],33:[function(e,t){"use strict";function n(e){var t=e("/api/category",{},{getPrimary:{url:"/api/category/primary",cache:!0},getCategoryById:{url:"/api/category/:id",cache:!0},getCategoryBySlug:{url:"/api/category/slug/:slug",cache:!0}});return t.get=t.getCategoryById,t}t.exports=["$resource",n]},{}],34:[function(e,t){"use strict";function n(e,t,n){var r={},i=e("/api/data/channel",null,{get:{url:"/api/data/channel/:id",cache:!0},getAll:{url:"/api/channel",cache:!0},query:{isArray:!1,method:"GET"}});return i.findById=function(e){var o=t.defer(),a=r[e];return a?n(function(){o.resolve(a)}):i.getAll(function(t){t.data.forEach(function(e){r[e._id]=e}),o.resolve(r[e])}),o.promise},i}t.exports=["$resource","$q","$timeout",n]},{}],35:[function(e,t){"use strict";function n(e,t){return e(t.cachingDomain+"/bff/channel/topics",null,{get:{method:"GET",isArray:!0,cache:!0}})}t.exports=["$resource","config",n]},{}],36:[function(e,t){"use strict";function n(e,t){function n(n){n=n||{};var i=t.defer();return c.channels.length?i.resolve(c.channels):e.get().$promise.then(function(e){e?(n.sort&&(e=e.sort(function(e,t){var r=n.sortBy||"title",i=(e[r]-t[r],t[r]-e[r]);return i})),c.channels=e,c.channelsById=r.indexBy(e,"_id"),c.topics=r.chain(e).pluck("topics").flatten().value(),c.topicsByChannel=r.indexBy(e,"_id"),i.resolve(e)):i.reject(new Error("ChannelTopicResource returned an empty response."))},i.reject),i.promise}function o(e,o){var a=t.defer();return n().then(function(){var t=[],n=[],l=0;if(r.each(c.topics,function(n){s(e,n.name)&&l=0;n--)if(t.segments[n].watchData||0===n)return t.segments[n]}function h(e){angular.forEach(e,function(e){if(e.segment&&e.segment.course){var t=m(e.segment.course),n=i.findWhere(t.segments,{_id:e.segment._id});n&&(n.watchData=e,angular.extend(n.watchData,g(n)))}})}function m(e){var t=A.get(e._id);t||(A.put(e._id,e),t=A.get(e._id));var n=x.get(t._id);if(!n){var r=i.flatten(i.pluck(t.sessions,"segments")),o=i.find(t.taxonomy,function(e){return e.topic&&e.topic._id});i.each(r,function(e,t){e.idx=t+1,e.lastIdx=r.length,e.taxonomy=o}),x.put(t._id,r),n=x.get(t._id)}return{course:t,segments:n}}function g(e){var n={},i=r(e,"media.0.duration");if(i){var o=Math.floor(e.watchData.furthestIndex/1e3),a=t("pad")(o%60);n.watchProgressString=Math.floor(o/60)+":"+a,n.totalSegmentLengthString=Math.floor(i/60)+":"+t("pad")(i%60),n.progressPercent=o/i*100}return n}function v(t){var n=e.defer();return o(function(e){s.getStudentCount({id:t},e)},{key:"CourseService.getCounts:"+t,expires:"+5 minutes"},function(e){n.resolve(e&&e.data)}),n.promise}function b(t,n){var r=e.defer();return n=n||{},o(function(e){a.get({contentId:t,start:n.start,playlists:!0,after:new Date/1e3,sort:{start_time:1}}).$promise.then(e,e)},{key:"CourseService.getScheduleData:"+t,expires:"+5 minutes"},function(e){r.resolve(e&&e.data)}),r.promise}function y(t){var n=e.defer();return o(function(e){c.price({productId:t}).$promise.then(e,e)},{key:"CourseService.getPrice:"+t,expires:"+5 minutes"},function(e){n.resolve(e&&e.data)}),n.promise}function M(t){var n=e.defer();return o(function(e){s.findReviewsBySlug({slug:t}).$promise.then(e,e)},{key:"CourseService.getReviews:"+t,expires:"+5 minutes"},function(e){n.resolve(e&&e.data)}),n.promise}function w(t,n){var r=e.defer(),i=angular.extend({type:"course",slug:t},n);return o(function(e){l.getImagesByTypeSlug(i).$promise.then(e,e)},{key:"CourseService.getGallery:"+JSON.stringify(i),expires:"+5 minutes"},function(e){r.resolve(e&&e.data)}),r.promise}var A=n("CourseService:course"),x=n("CourseService:segment");return{Resource:s,findById:u,getSegment:d,getSegmentByIdx:p,setWatchData:h,getFurthestSegmentForCourse:f,getStudentCount:v,getScheduleData:b,getPrice:y,getReviews:M,getGallery:w}}var r=e("deepval"),i=e("underscore"),o=e("cache-stack");t.exports=["$q","$filter","$cacheFactory","eventResource","courseResource","ecommerceResource","galleryResource",n]},{"cache-stack":498,deepval:504,underscore:void 0}],42:[function(e,t){"use strict";function n(e,t,n,i){var o={$text:{$search:":query"},"actions.type":"discount"},a={$text:{$search:":query"},"actions.type":"cross-sell"},s={$text:{$search:":query"},"actions.type":"discount"},c=e("/api/data/discount",null,{_get:{url:"/api/data/discount/:id"},"delete":{method:"DELETE",url:"/api/data/discount/:id"},findByCouponCode:{url:"/api/data/discount?criteria="+JSON.stringify({coupon_code:{$regex:":query",$options:"i"}})},search:{url:"/api/data/discount?criteria="+JSON.stringify(o)},searchCrossSell:{url:"/api/data/discount?criteria="+JSON.stringify(a)},searchDiscount:{url:"/api/data/discount?criteria="+JSON.stringify(s)},searchCount:{url:"/api/count/discount?criteria="+JSON.stringify(o)+"&fields="+JSON.stringify({_id:1})+"&limit=9999",interceptor:{response:function(e){return e.data.count=e.data.data.length,e}}},searchDiscountCount:{url:"/api/count/discount?criteria="+JSON.stringify(s)+"&fields="+JSON.stringify({_id:1})+"&limit=9999",interceptor:{response:function(e){return e.data.count=e.data.data.length,e}}},searchCrossSellCount:{url:"/api/count/discount?criteria="+JSON.stringify(a)+"&fields="+JSON.stringify({_id:1})+"&limit=9999",interceptor:{response:function(e){return e.data.count=e.data.data.length,e}}},findByProduct:{url:"/api/data/discount?criteria="+JSON.stringify({"conditions.products":":id"})},findByProductDate:{url:"/api/data/discount?criteria="+JSON.stringify({"conditions.products":":id","conditions.start":{$gte:":start"},"conditions.end":{$lte:":end"}})},getDiscounts:{url:"/api/data/discount?criteria="+JSON.stringify({"actions.type":"discount"})},getDiscountsCount:{url:"/api/count/discount?criteria="+JSON.stringify({"actions.type":"discount"})+"&fields="+JSON.stringify({_id:1})+"&limit=9999",interceptor:{response:function(e){return e.data.count=e.data.data.length,e}}},getCrossSells:{url:"/api/data/discount?criteria="+JSON.stringify({"actions.type":"cross-sell"})},getCrossSellsCount:{url:"/api/count/discount?criteria="+JSON.stringify({"actions.type":"cross-sell"})+"&fields="+JSON.stringify({_id:1})+"&limit=9999",interceptor:{response:function(e){return e.data.count=e.data.data.length,e}}},count:{url:"/api/count/discount",params:{fields:{_id:1}},responseType:"json"}});return c.get=function(e){return t(function(t){c._get(e,function(e){n(e.data,"product user",function(){t(e)})})})},c._save=c.save,c.save=function(e,t){var n=i(angular.copy(e),["product","user"]);return c._save({},n,t,t)},c.create=function(e,t){e.created=r().unix(),c.save(e,t)},c}var r=e("moment");t.exports=["$resource","$q","populate","depopulate",n]},{moment:void 0}],43:[function(e,t){"use strict";function n(e){var t=e("/api/ecom",{},{price:{url:"/api/ecom/price/:productId",cache:!0}});return t}t.exports=["$resource",n]},{}],44:[function(e,t){"use strict";function n(e,t,n,i){return function(o){function a(e){i.getAll().$promise.then(function(t){var n=r.indexBy(t&&t.data,"_id");angular.forEach(e,function(e){e.channel&&(e.channel=n[e.channel._id||e.channel])}),g.broadcasts=e,g.getCurrentBroadcast(),g.broadcastStart(),g.setNextTimer()})}function s(){g.onBroadcastStart(g.currentBroadcast)}function c(){var e=Math.round(new Date/1e3);g.nextBroadcast=null,g.prevBroadcast=null,g.currentBroadcast=null,g.broadcasts.sort(function(e,t){return e.start_time-t.start_time}),angular.forEach(g.broadcasts,function(t){!g.currentBroadcast&&t.start_time<=e&&t.end_time>=e?g.currentBroadcast=t:!g.nextBroadcast&&t.start_time>e?g.nextBroadcast=t:!g.prevBroadcast&&t.end_time0&&t.data.forEach(function(e){var t=r.chain(e.swimlanes).pluck("broadcasts").flatten().value();r.each(t,function(t){var n=r.extend({},t.meta,t),o=n.meta&&n.meta.primary_category&&n.meta.primary_category.slug;if(n.channel&&!n.channel._id&&(n.channel=A[n.channel]),e.is_container){var a=c.event[e._id];a||(c.event[e._id]=!0,c.events.push({id:e._id,title:e.title,allDay:!0,start_time:e.start_time,end_time:e.end_time,start:i.unix(e.start_time).startOf("day").toDate(),end:i.unix(e.end_time).endOf("day").add(1,"second").toDate(),className:"event-type-allday event-type-live bg2-"+o+" bd-"+o,url:"/admin/scheduler/#/event/"+e._id,broadcast:n}))}var s=c.broadcast[n._id];if(!s&&(c.broadcast[n._id]=!0,n.meta)){var l={id:n._id,title:n.meta.short_title||n.meta.title,allDay:!1,start_time:n.start_time,end_time:n.end_time,start:i.unix(n.start_time).toDate(),end:i.unix(n.end_time).toDate(),className:"event-type-"+n.broadcast_type+" bg2-"+o+" bd-"+o,url:"/admin/scheduler/#/event/"+e._id,broadcast:n};c.broadcasts.push(l)}})}),e(t)})},{key:"EventService:get:"+JSON.stringify(t),expires:"+30 seconds"},n.resolve),n.promise}function h(e,t,n){c[e][t]=n}function m(e,t){var n,i,o=[],a=[],s=[],c=Math.round(new Date/1e3);e.sort(function(e,t){return e.start_time-t.start_time});var l=e&&e[0]&&e[0].eventId;return r.each(e,function(e){e.meta&&e.meta._id===t._id&&e.eventId===l&&("pre_live"===e.broadcast_type?o.push(e):"live"===e.broadcast_type?a.push(e):e.broadcast_type.match(/playlist|rebroadcast/)&&s.push(e))}),r.each([o,a,s],function(e){n&&i||r.each(e,function(e){!n&&e.start_time<=c&&e.end_time>=c?n=e:!i&&e.start_time>c&&(i=e)})}),{lives:a,rebroadcasts:s,current:n,next:i}}function g(e){var t=[];return e=r.sortBy(e,"start_time"),angular.forEach(e,function(e){e.live&&t.push(e)}),t}function v(e){var t=Math.round(new Date/1e3);return e=r.chain(e).filter(function(e){return e.start_time>t}).sortBy("start_time").value(),e[0]}function b(e){if(!e)return{all:[]};var t=[];return t=r.isArray(e)?r.chain(e).pluck("swimlanes").flatten().pluck("broadcasts").flatten().value():r.chain(e.swimlanes).pluck("broadcasts").flatten().value(),t.sort(function(e,t){return e.start_time-t.start_time}),{all:t,first:r.first(t),last:r.last(t)}}function y(t){var n=e.defer();if(t&&!t.swimlanes)n.resolve(t);else if(t.product){var r=t.product._id||t.product;u.getCourseByProduct(r).then(function(e){e.start_time=t.start_time,e.end_time=t.end_time,n.resolve(e)},n.reject)}else{var i=b(t);i&&i.first&&i.first.meta?(i.first.meta.start_time=t.start_time,i.first.meta.end_time=t.end_time,n.resolve(i.first.meta)):n.reject("could not find broadcast meta data",t)}return n.promise}function M(e,t){return o(e,"swimlanes.0.broadcasts.0.meta._id")===o(t,"swimlanes.0.broadcasts.0.meta._id")}var w=[],A={};return t(function(){p.getAll(function(e){w=e.data,w.forEach(function(e){A[e._id]=e})})}),n&&n.preload&&angular.forEach(n.preload,function(e,t){if(t.match(/\/api\/event/)){var n=l.parse(t.replace("/api/event",""));n.date&&(n.date=parseInt(n.date,10)),c.query[JSON.stringify(n)]={data:e},angular.forEach(e,function(e){c.event[e._id]=e,c.events.push(c.event[e._id])})}}),window.eventCache=c,{broadcastTypes:s,Resource:d,get:f,addToCache:h,cache:c,channels:w,channel:A,getEventUIData:y,getCurrentLiveEvents:g,getNearestEvent:v,getEventBroadcastData:b,organizeBroadcastsForSource:m,eventCourseEqual:M}}var r=e("underscore"),i=e("moment"),o=e("deepval"),a=e("cache-stack");t.exports=["$q","$timeout","rind","qs","CatalogService","eventResource","channelResource",n];var s={pre_live:{name:"Pre-Live",start:8,duration:1,icon:"fa-desktop",continuation:!1,content_type:"course"},live:{name:"Live",start:9,duration:7,icon:"fa-video-camera",continuation:!1,content_type:"course"},rebroadcast:{name:"Rebroadcast",start:16,duration:16,icon:"fa-repeat",continuation:!0,content_type:"course"},rebroadcast_edited:{name:"Rebroadcast Edited",start:9,duration:24,icon:"fa-film",continuation:!1,content_type:"playlist"},playlist:{name:"Playlist",start:9,duration:24,icon:"fa-list",continuation:!0,content_type:"playlist"},link:{name:"Link",start:9,duration:8,icon:"fa-link",continuation:!1,content_type:null}},c={event:{},query:{},pending:{},broadcast:{},broadcasts:[],events:[]}},{"cache-stack":498,deepval:504,moment:void 0,underscore:void 0}],47:[function(e,t){"use strict";function n(e){var t=e("/api/data/file",null,{get:{url:"/api/data/file/:id"},findByKey:{url:"/api/data/file?criteria="+JSON.stringify({key:":key"})},findByBucketAndKey:{url:"/api/data/file?criteria="+JSON.stringify({bucket:":bucket",key:":key"})},findById:{url:"/api/data/file?"+JSON.stringify({_id:":_id"})+"&limit=1",method:"GET",isArray:!1,transformResponse:function(e){return{data:e.data&&e.data[0]}},responseType:"json"},findByCriteria:{url:"/api/data/file?criteria=:criteria",responseType:"json"}});return t}t.exports=["$resource",n]},{}],48:[function(e,t){"use strict";function n(e){var t=e("/api/data/galleryimage",null,{get:{url:"/api/galleries/image",cache:!0},getList:{url:"/api/galleries/:type/:slug",cache:!0},search:{url:"/api/galleries/image/search/:query"},updateImage:{url:"/api/galleries/image/update",method:"POST"},removeImage:{url:"/api/galleries/image/delete",method:"DELETE"},comment:{url:"/api/galleries/comment/image",method:"POST"},removeComment:{url:"/api/galleries/comment/image",method:"DELETE"},like:{url:"/api/galleries/image/like",method:"POST"},unlike:{url:"/api/galleries/image/unlike",method:"POST"},publish:{url:"/api/galleries/image/publish",method:"POST"},unpublish:{url:"/api/galleries/image/unpublish",method:"POST"},setFlag:{url:"/api/galleries/image/flag",method:"POST"},flagImage:{url:"/api/galleries/image/flag",method:"POST"},flagComment:{url:"/api/galleries/comment/flag",method:"POST"},findById:{url:"/api/data/galleryimage/:id"},findByOwner:{url:"/api/data/galleryimage?criteria="+angular.toJson({owner:":_id"})},getImagesByTypeSlug:{url:"/api/galleries/:type/:slug"}});return t}t.exports=["$resource",n]},{}],49:[function(e,t){"use strict";function n(e){function t(e){var t=r.Local.get("gift_data");return!t||t&&!d(t)?null:e?i.get(t,e):t}function n(e){e&&d(e)?r.Local.set("gift_data",e,{path:"/"}):u()}function s(e,n){var o=t();i.set(o,e,n),r.Local.set("gift_data",o,{path:"/"})}function c(e,t){t=t||{};var n={product_id:t.product_id||e||null,recipient:{name:i(t,"recipient.name")||null,email:i(t,"recipient.email")||null},sender:{name:i(t,"sender.name")||null,email:i(t,"sender.email")||null},delivery_date:t.delivery_date||o().unix(),message:t.message||f,state:t.state||"init"};return n}function l(e){var t=c(null,e);n(t)}function u(){r.Local.remove("gift_data")}function d(e){var t=["delivery_date"],n=Object.keys(p(e)),r=a.some(n,function(n){var r,o=i(e,n);return r=t.indexOf(n)>=0?o&&"number"!=typeof o?!0:!1:o&&"string"!=typeof o?!0:!1});return!r}function p(e){var t=["string","number","function"],n={};for(var r in e)if(null===e[r]||t.indexOf(typeof e[r])>=0||Array.isArray(e[r])||e[r]instanceof Date)n[r]=e[r];else if("object"==typeof e[r]){var i=p(e[r]);for(var o in i)n[r+"."+o]=i[o]}return n}var f=e("i18n")("cl-gift-recipient-message-text","Hey, I thought you'd love this class.");return{get:t,setObject:n,setProperty:s,createGiftObject:c,clear:u,saveToLocalStorage:l,isGiftValid:d}}var r=e("vault.js"),i=e("deepval"),o=e("moment"),a=e("underscore");t.exports=["$filter",n]},{deepval:504,moment:void 0,underscore:void 0,"vault.js":511}],50:[function(e,t){"use strict";function n(e){var t=e("/api/i18n",{},{getStrings:{url:"/api/i18n/strings"},addString:{method:"POST",url:"/api/i18n/strings"},saveString:{method:"PUT",url:"/api/i18n/strings"}});return t}t.exports=["$resource",n]},{}],51:[function(e,t){"use strict";function n(e){var t=e("/api/instructor",null,{findBySlug:{url:"/api/instructor/slug/:slug",cache:!0}});return t}t.exports=["$resource",n]},{}],52:[function(e,t){"use strict";function n(e){var t=e("/api/instructor",null,{findBySlug:{url:"/api/instructor/slug/:slug",cache:!0}});return t}t.exports=["$resource",n]},{}],53:[function(e,t){"use strict";function n(e,t){function n(){var n=e.defer();return r(function(e){t.get({},function(t){e(t&&t.data)},function(){})},{key:"InstructorService.getInstructors"},function(e){n.resolve(e)}),n.promise}return{getInstructors:n}}var r=e("cache-stack");t.exports=["$q","InstructorResource",n]},{"cache-stack":498}],54:[function(e,t){"use strict";function n(e,t){return{get:function(){var n=t.defer();return e.get("/admin/config").then(function(e){200===e.status?n.resolve(e.data):n.reject(e)}),n.promise}}}t.exports=["$http","$q",n]},{}],55:[function(e,t){"use strict";function n(e){var t=e("/api/media/play",null,{get:{url:"/api/data/media/:id"},save:{method:"POST",url:"/api/data/media"},tokenById:{url:"/api/media/play/id/:id"},token:{url:"/api/media/play/:token"},getToken:{method:"POST",url:"/api/media/token"},getCourseTokensBySlug:{url:"/api/course/slug/:slug/tokens"}});return t}t.exports=["$resource",n]},{}],56:[function(e,t){"use strict";function n(e){var t=e("/api/partner",null,{get:{url:"/api/partner",method:"GET",cache:!0},search:{url:"/api/partner",method:"GET"},count:{url:"/api/partner/count",method:"GET",isArray:!1,responseType:"json"},findBySlug:{url:"/api/partner",method:"GET"}});return t}t.exports=["$resource",n]},{}],57:[function(e,t){"use strict";function n(){function e(e){return"subdirect"===e?!1:void 0}function t(e,t,n){"subdirect"===e&&n()}return{applicable:e,sendEmail:t}}t.exports=["subdirectResource",n]},{}],58:[function(e,t){"use strict";function n(e){var t=e("/api/subdirect",{},{sendEmail:{url:"/api/subdirect/sendemail",method:"POST"}});return t}t.exports=["$resource",n]},{}],59:[function(e,t){"use strict";function n(e,t){return e("https://"+t.pipeline.hostname+"/event/:topic?cluster=:cluster",{topic:"@topic",cluster:t.pipeline.cluster})}t.exports=["$resource","config",n]},{}],60:[function(e,t){"use strict";function n(e,t,n,o,a){function s(t){return t.device="browser",t.platform="web",a&&(t.build=a.pkg&&a.pkg.version,t.version=t.build,a.context&&(t.ip=a.context.ip,t.session_token=a.context.token,t.browser=a.context.ua.family,t.os=a.context.ua.os.family),a.dump&&(t.page=a.dump.course?"class":"cms")),t.referrer=document.referrer||null,t.logged_in=e.user&&e.user.valid(),t.logged_in&&(t.user_id=e.user.get("_id"),t.uid=e.user.get("uid")),t.cc=i.Cookie.get("cc"),t }function c(e,t,n,r){var i=[];return e.forEach(function(e){var o={type:"Watched Progress",properties:{bucket:e,course:t,segment:n,user:r}};i.push(o)}),i}function l(e,t){var r=c(e.watched,e.course,e.segment,e.user),i={topic:"watchedprogress"};n.save(i,r,t)}function u(e,t){var i={topic:"media_view"},o={type:e.type,properties:s(r.omit(e,"type"))};n.save(i,o,t)}return{reportWatchProgress:l,reportVideoView:u}}var r=e("underscore"),i=e("vault.js");t.exports=["$rootScope","$q","PipelineResource","config","rind",n]},{underscore:void 0,"vault.js":511}],61:[function(e,t){"use strict";function n(e){var t=e("/api/playlist",null,{get:{url:"/api/playlist/id/:id"},getData:{url:"/api/data/playlist/:id"}});return t}t.exports=["$resource",n]},{}],62:[function(e,t){"use strict";function n(e){var t=e("/api/product",{id:"@id"},{findById:{url:"/api/product/id/:id",cache:!0},findBySourceId:{url:"/api/product/source/:id",cache:!0}});return t}t.exports=["$resource",n]},{}],63:[function(e,t){"use strict";function n(e,t){function n(n){return n?t.findById({id:n}).$promise.then(function(e){return e&&e.data?e.data:null}):e.reject("no id")}function o(n){var i=e.defer();return n?r(function(e){t.findBySourceId({id:n}).$promise.then(function(t){var n=t&&t.data&&t.data.source;e(n)},e)},{key:"ProductService:findBySourceId:"+n},function(e){i.resolve(e)}):i.reject("no id"),i.promise}function a(n){var i=e.defer();return n?r(function(e){t.findById({id:n._id||n}).$promise.then(function(t){var n=t&&t.data&&t.data.source;e(n)},e)},{key:"ProductService:getSource:"+(n._id||n)},function(e){i.resolve(e)}):i.reject("no product"),i.promise}function s(e){var t=["!published","!for_sale"];return e&&e.flags&&0===i.intersection(e.flags,t).length}return{Resource:t,findBySourceId:o,findById:n,getSource:a,isProductPurchasable:s}}var r=e("cache-stack"),i=e("underscore");t.exports=["$q","productResource",n]},{"cache-stack":498,underscore:void 0}],64:[function(e,t){"use strict";function n(e,t){var n,i=null;return e.pubnub=e.pubnub||{},e.pubnub.initialized||(n=r.init({publish_key:t.pubnub.publish_key,subscribe_key:t.pubnub.subscribe_key,origin:"pubsub.pubnub.com",ssl:!0}),e.pubnub.initialized=!0),{getUUID:function(e){return i?e(null,i):(n.uuid(function(t){i=t,e(null,i)}),void 0)},subscribe:function(e){n.subscribe(e)},unsubscribe:function(e){n.unsubscribe(e),i=null}}}var r=e("../vendor/pubnub-3.10.2");t.exports=["$rootScope","config",n]},{"../vendor/pubnub-3.10.2":141}],65:[function(e,t){"use strict";function n(e){var t=e("/api/questions/:id",{id:"@id"},{getContext:{url:"/api/questions/context"},getVotes:{url:"/api/vote"},saveQuestion:{method:"POST",url:"/api/questions"},sendOperation:{method:"POST",url:"/api/questions/operation",headers:{"Content-Type":"application/json"}}});return t}t.exports=["$resource",n]},{}],66:[function(e,t){"use strict";function n(e,t,n,a){function s(e){angular.extend(M,e)}function c(e){_=!0,k.splice(0,k.length),s(e)}function l(e,i){return e.voted?!0:(t.getUUID(function(t,o){if(t)return!1;var a={timestamp:r(),uuid:o,context:y.howManyOps,course:M.course._id,client_id:e.client_id,type:"incrementVote",data:1};e.voted=!0,n.sendOperation({},JSON.stringify(a),i)}),void 0)}function u(i,o){return i&&""!==i?(t.getUUID(function(t,s){if(t)return!1;var c=e.user._data&&e.user._data.user||e.user,l=e.user._data&&e.user._data.profile||{},u={uuid:s,context:y.howManyOps,course:M.course._id,client_id:s+"|"+M.course._id+"|"+y.howManyOps,type:"insert",data:{text:i,user:{_id:c._id,slug:c.slug,uid:c.uid,profile:{_id:l._id,image:l.image,display_name:l.display_name}},moderation_state:"submitted",course:M.course._id,created:r(),asked:r(),timestamp:r()}};n.sendOperation({},JSON.stringify(u),o),a.askQuestion({course:M.course})}),void 0):!0}function d(){return _?(_=!1,n.getContext({course:M.course._id,limit:M.limit||50},function(e){i.each(e.data.users,function(e){f({_id:e[0],uid:e[1],name:e[2],slug:e[4],profile:{display_name:e[4]}})}),e.data.questions.forEach(function(e){h({_id:e[0],course:e[1],client_id:e[2],asked:e[3],user:w[e[4]],moderation_state:e[5],moderations:e[6],votes:e[7],text:e[8],uuid:e[2].split("|")[0]})}),y=e.data.context,p()}),void 0):!0}function p(){n.getVotes({course:M.course._id,collection:"questions"},function(e){e.data&&e.data.forEach(function(e){var t=A[e.target.id];t&&(x[t.client_id].voted=!0)})})}function f(e){w[e._id]=e}function h(e){A[e._id]=e,x[e.client_id]=e,y.howManyOps?k.unshift(e):k.push(e)}function m(){var e="course"+M.course._id;t.unsubscribe({channel:e}),t.subscribe({channel:e,connect:b,message:g,error:function(){}})}function g(e){switch(e.type){case"insert":f(e.data.user),h(i.extend({client_id:e.client_id,uuid:e.uuid,votes:0},e.data));break;case"incrementVote":try{x[e.client_id].votes++}catch(t){throw new Error("questions["+e.client_id+"] not found")}break;case"incrementState":v("up",e);break;case"decrementState":v("down",e)}e.context&&(y.howManyOps=++e.context),M.onMessage&&M.onMessage(e)}function v(e,t){var n=x[t.client_id];if(n){var r,a=n.moderation_state,s=i.indexOf(o,a);"up"===e?r=s+1:"down"===e&&(r=s-1);var c=o[r];c&&(n.moderation_state=c)}}function b(){M.onConnect&&M.onConnect()}var y={},M={},w={},A={},x={},k=[],_=!0;return{init:s,reInit:c,initPubnub:m,getContext:d,askQuestion:u,upvoteQuestion:l,users:w,questions:x,questionsList:k}}function r(){return Math.round(new Date/1e3)}var i=e("underscore"),o=["flagged","doNotAsk","submitted","candidate","highlight","onDeck","asked","answered"];t.exports=["$rootScope","pubnub","questionsResource","trackFactory",n]},{underscore:void 0}],67:[function(e,t){"use strict";function n(e,t,n,o,a){function s(e){var n=t.defer(),r=new o,a=e.topicsCount||5;return r.fetchFilteredTopics(function(t){var r=t.slice(0,parseInt(a,10));e.topics=i.chain(r).pluck("_id").value().join(","),u(e).then(function(e){n.resolve(e)})}),n.promise}function c(e){var r=t.defer(),o=e.limit||10;return e.limit=o+1,n.findById({id:e.courseid}).$promise.then(function(t){e.topics=i.chain(t.data.taxonomy).flatten().pluck("topic").pluck("_id").without(void 0).value().join(","),delete e.courseid,u(e).then(function(t){var n=d(e.courseid,t);n=n.slice(0,o),r.resolve(n)})},r.reject),r.promise}function l(e){var n=t.defer(),r={userid:s,courseid:c,category:u,categoryid:u,categories:u,topics:u},i=e.courseid?"courseid":e.topics?"topics":e.categories?"categories":"userid",o=r[i];return o(e).then(function(e){n.resolve(e)}),n.promise}function u(o){var s,c,l,u,d=t.defer(),h=0,m=o.limit||10;return o.sort=o.sort||"popularity",r.series([function(t){return e.user.get("_id")?(e.user.getContent().then(function(e){s=e,h=s.purchased.courses.length,c=s.starred.courses,t()}),void 0):t()},function(e){o.topics?a.getCoursesByTopic(o.topics,{limit:o.limit+h}).then(function(t){l=p(s,t),e()}):(o.limit=m+h,n.getAllCourses(o).$promise.then(function(t){l=p(s,t.data),e()}))},function(e){u=f(c,l,m),u.length>m&&(u=i.first(u,m)),e()}],function(e){return e?d.reject(e):(d.resolve(u),void 0)}),d.promise}function d(e,t){if(e){var n=[];return i.each(t,function(t){e!==t._id&&n.push(t)}),n}return t}function p(e,t){if(e&&e.purchased.courses.length){var n={},r=[];return i.each(e.purchased.courses,function(e){n[e&&e._id]=e}),i.each(t,function(e){n[e&&e._id]||r.push(e)}),r}return t}function f(e,t){var n=[],r=[],o=0;return i.each(t,function(t){e&&e.indexOf(t._id)>-1?n.push(t):r.push(t),o++}),n.concat(r)}return{getPopularRecommendations:l,getRecommendationsByUser:s,getRecommendationsByCourse:c,getRecommendations:u}}var r=e("async"),i=e("underscore");t.exports=["$rootScope","$q","courseResource","ScoresService","CatalogService",n]},{async:497,underscore:void 0}],68:[function(e,t){"use strict";function n(e){var t=r(window.extole||{},"PROGRAM.programDomain"),n=t||"refer.creativelive.com",i="https://"+n+"/api/v4",o=e(i,null,{getToken:{url:i+"/token"},getRewards:{url:i+"/me/rewards?access_token=:token",isArray:!0},deleteToken:{method:"DELETE",url:i+"/token/:token"}});return o}var r=e("deepval");t.exports=["$resource",n]},{deepval:504}],69:[function(e,t){"use strict";function n(e,t,n){function r(){e.$on("user:login",i),e.$on("user:register",o);var t=window.location.search;-1!==t.indexOf("utm_source=extole")&&s()}function i(){s()}function o(){s()}function a(){var e=t.defer(),r=Vault.Cookie.getAndRemove("extole_access_token");return n.deleteToken({token:r}).$promise.then(function(){e.resolve()}),e.promise}function s(){c().then(function(t){e.user.addApplicableCoupon(t)})}function c(){var e=Vault.Cookie.get("extole_access_token"),r=t.defer();return e?(n.getRewards({token:e}).$promise.then(function(e){if(e){var t=_.pluck(e,"code");r.resolve(t)}else r.reject(e)}),r.promise):r.resolve()}return{init:r,logout:a}}t.exports=["$rootScope","$q","referralResource",n]},{}],70:[function(e,t){"use strict";t.exports={login:{states:{success:"login_success",facebook:{emailMissing:"fb_email_missing",connect:"fb_connect",create:"fb_create",login:"fb_login"},google:{emailMissing:"google_email_missing",connect:"google_connect",create:"google_create",login:"google_login"}},messages:{facebook:{emailMissing:'We require an email to be shared from Facebook. Change permissions for CreativeLive here.',error:"An error occurred while logging in with Facebook."},google:{emailMissing:'We require an email to be shared from Google. Change permissions for CreativeLive here.',error:"An error occurred while logging in with Google."}},errors:{}},register:{states:{},messages:{fail:"We couldn't register a new account with those details",error:"An error occured"},errors:{}},auth:{states:{},errors:{corruptToken:"x-session-api-key not found",missingToken:"x-session-api-key missing"},messages:{}}}},{}],71:[function(e,t){"use strict";function n(e,t){var n=e("/api/review",null,{get:{url:"/api/reviews",method:"GET"},search:{url:"/api/reviews",method:"GET"},flag:{url:"/api/review/flag",method:"POST"},unflag:{url:"/api/review/unflag",method:"POST"},searchCount:{url:"/api/reviews/count?criteria="+JSON.stringify({comment:{$regex:":query",$options:"i"}})+"&fields="+JSON.stringify({_id:1})+"&limit=9999",interceptor:{response:function(e){return e.data}},method:"GET"},count:{url:"/api/reviews/count",method:"GET",isArray:!1,responseType:"json"}});return n.userReviewForCourse=function(e,r){var i={course:e.courseId,user:e.userId||t.user._data._id};n.search({criteria:JSON.stringify(i)},r)},n}t.exports=["$resource","$rootScope",n]},{}],72:[function(e,t){"use strict";function n(e){var t=e("/api/schedule",null,{findByContentId:{url:"/api/schedule/content/:id"},findBySegmentId:{url:"/api/schedule/segment/:id"},save:{method:"POST",url:"/api/schedule"},"delete":{url:"/api/schedule/:id",method:"DELETE"},findById:{url:"/api/schedule/:id"},findByRange:{url:"/api/schedule"}});return t}t.exports=["$resource",n]},{}],73:[function(e,t){"use strict";function n(e){var t=e("/api/user",null,{update:{url:"/api/user/:id/scores",method:"POST"},patch:{url:"/api/user/:id/scores",method:"PATCH"}});return t}t.exports=["$resource",n]},{}],74:[function(e,t){"use strict";function n(e,t,n,o){return function(a){function s(e){_=angular.copy(e)}function c(){if(!_||!_.scores){var e={categories:[],topics:[]};return A(e)}return A(_.scores)}function l(e){t.getPrimary({},function(t){e(p(t.data))})}function u(e){n.get({}).then(function(t){e(f(t))})}function d(e){n.get({}).then(function(t){e(h(t))})}function p(e){var t=m(),n=[],r=[];return angular.forEach(e,function(e){e.score=t[e._id],e.score?n.push(e):r.push(e)}),n.sort(function(e,t){return t.score-e.score}),n=n.concat(r)}function f(e){var t=g();r.each(e,function(e){e.score=t[e._id]});var n=r.sortBy(e,"score").reverse();return n}function h(e){var t=[],n=g();r.each(e,function(e){n[e._id]&&(e.score=n[e._id],t.push(e))});var i=r.sortBy(t,"score").reverse();return i}function m(){var e=c(),t={};return r.each(e.categories,function(e){if(e.source){var n=e.source._id||e.source;t[n]=e.score}}),t}function g(){var e=c(),t={};return r.each(e.topics,function(e){if(e.source){var n=e.source._id||e.source;t[n]=e.score}}),t}function v(e){var t=m();return t[e]?t[e]:0}function b(e){var t=g();return t[e]?t[e]:0}function y(){_&&_._id&&o.update({id:_._id},null)}function M(e){_&&_._id&&o.patch({id:_._id},null,function(t){_.scores=t.data,e()})}function w(e){var t=i.Local.get("pageViews")||{categories:{},topics:{}};r.each(e.categories,function(e){t.categories[e]=t.categories[e]?t.categories[e]+1:1}),r.each(e.topics,function(e){t.topics[e]=t.topics[e]?t.topics[e]+1:1}),i.Local.set("pageViews",t)}function A(e){if(!k.usePageViewScores)return e;var t={categories:[],topics:[],version:e.version,timestamp:e.timestamp},n=i.Local.get("pageViews")||{},o={};return r.each(e.categories,function(e){var r=e.source._id||e.source;n.categories&&(e.score+=n.categories[r]||0),o[r]=!0,t.categories.push(e)}),r.each(e.topics,function(e){var r=e.source._id||e.source;n.topics&&(e.score+=n.topics[r]||0),o[r]=!0,t.topics.push(e)}),r.each(n.categories,function(e,n){if(!o[n]){var r={source:n,score:e};t.categories.push(r)}}),r.each(n.topics,function(e,n){if(!o[n]){var r={source:n,score:e};t.topics.push(r)}}),t}function x(){k.usePageViewScores=!1}var k=this,_=e.user&&e.user._data&&e.user._data.user;angular.extend(k,{usePageViewScores:!0,setUser:s,getScores:c,getSortedCategories:p,fetchSortedCategories:l,getSortedTopics:f,getFilteredTopics:h,fetchSortedTopics:u,fetchFilteredTopics:d,getCategoriesByScore:m,getScoreByCategory:v,getScoreByTopic:b,updateScores:y,patchScores:M,pageView:w,disablePageViewScores:x},a||{})}}var r=e("underscore"),i=e("vault.js");t.exports=["$rootScope","categoryResource","TopicService","ScoresResource",n]},{underscore:void 0,"vault.js":511}],75:[function(e,t){"use strict";function n(e){var t=new RegExp("^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$");return{getToken:function(){var n=Vault.Cookie.get(e.config.auth.cookie);if(!n)return null;var r=decodeURIComponent(n).split(":")[0];return r&&r.match(t)?r:null}}}t.exports=["rind",n]},{}],76:[function(e,t){"use strict";function n(){var e=500,t=null,n=null,r=0,i=!1,o=!1,a=new RegExp("(^/api/auth$)|(^/api/auth/valid$)"),s=new RegExp("^/api/");this.requestDelay=function(t){e=t},this.authConfig=function(e){t=e},this.hostConfig=function(e){n=e},this.maxRetries=function(e){r=e},this.allowSessionRefresh=function(e){i=e},this.allowRetries=function(e){o=e},this.$get=["$rootScope","$injector","$q","$timeout","$log","$window",function(c,l,u,d,p){function f(t){function n(e){return s.resolve(e)}function i(e){return y(e)?s.reject(e):f(t)}var a=t.config,s=t.deferred;return o&&t.retries<=r?(d(function(){p.warn("Retrying: count",t.retries),l.get("$http")(a).then(n,i)},e),t.retries++,2e3>e&&(e+=Math.floor(e/2)),s.promise):s.reject()}function h(e){function n(t){var n=t.data.data.session_api_key;return angular.isFunction(A.setToken)&&A.setToken(n),e.config.headers["x-session-api-key"]=n,e.deferred.resolve(e.config)}function r(t){return e.deferred.reject(t)}var o=0,a=A.getToken();return a?(e.config.headers["x-session-api-key"]=a,e.deferred.resolve(e.config)):i&&3>o?(d(function(){var e=l.get("$http");e({url:"/api/auth",method:"POST",headers:{"x-application-api-key":t.appKey}}).then(n,r),c.$applyAsync()},500,!1),o++):e.deferred.reject(),e.deferred.promise}function m(e){e&&v(e)&&w.indexOf(e)>-1&&(w=w.splice(w.indexOf(e),1))}function g(e){return e.match(a)?!0:!1}function v(e){return e.match(s)?!0:!1}function b(e){return e&&"OPTIONS"===e.toUpperCase()?!0:!1}function y(e){return 401===e.status&&e.data&&e.data.message&&"x-session-api-key not found"===e.data.message?(p.warn("SESSION NOT FOUND OR CORRUPTED - clear and create a new session!"),angular.isFunction(A.clearToken)&&A.clearToken(),!0):!1}function M(e){var t=[503];return-1!==t.indexOf(e.status)}if(!t||"object"!=typeof t)throw new Error("httpAuthIntercept expects an authConfig object containing appKey {String} and sessionService {String} (parsed and injected) properties");if(!n||"object"!=typeof n)throw new Error("httpAuthIntercept expects a hostConfig with an api {String} property");var w=[],A=l.get(t.sessionService);return{request:function(e){return!v(e.url)||g(e.url)?e:h({deferred:u.defer(),config:e})},response:function(e){return m(e&&e.config&&e.config.url),e},responseError:function(e){if(v(e.config.url)&&!b(e.config.method)){if(y(e),-1===w.indexOf(e.config.url)&&M(e)){var t=u.defer("responseErrorHttpBuffer"),n={config:e.config,deferred:t};return h(n).then(function(){f({config:e.config,deferred:u.defer(),retries:0})}),w.push(e.config.url),t.promise}return u.reject(e)}return e}}}]}t.exports=n},{}],77:[function(e,t){"use strict";function n(e){var t=new RegExp("^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$"),n={getToken:function(){var n=e.localStorage.getItem("token");return n&&n.match(t)?n:null},setToken:function(n){return n&&n.match(t)?(e.localStorage.setItem("token",n),!0):!1},clearToken:function(){return e.localStorage.removeItem("token"),e.localStorage.removeItem("mcpUser"),!0},refreshCorruptSession:function(){this.clearToken(),e.location.reload()}};return n}t.exports=["$window",n]},{}],78:[function(e,t){"use strict";function n(e){return e("/api/stats",{},{getSocial:{method:"GET",url:"/api/stats/social",cache:!0}})}t.exports=["$resource",n]},{}],79:[function(e,t){"use strict";function n(e,t){function n(){return t.getSocial().$promise}return{getSocial:n}}t.exports=["$q","StatsResource",n]},{}],80:[function(e,t){"use strict";function n(e){var t=e("/api/subtopic",{},{get:{url:"/api/subtopic/:id"},getByPath:{url:"/api/subtopic/path/:path"},getByTopic:{url:"/api/subtopic/topic/:topic"},getBySlug:{url:"/api/subtopic/slug/:slug"},getAllSubTopics:{url:"/api/subtopic",cache:!0},getSubTopicById:{url:"/api/subtopic/:id",cache:!0},getSubTopicByPath:{url:"/api/subtopic/path/:path",cache:!0},getSubTopicBySlug:{url:"/api/subtopic/slug/:slug",cache:!0}});return t}t.exports=["$resource",n]},{}],81:[function(e,t){"use strict";function n(e){var t=e("/api/tag",{},{getTopics:{url:"/api/tag",cache:!0},getTagById:{url:"/api/tag/:id",cache:!0},getTagBySlug:{url:"/api/tag/slug/:slug",cache:!0},getTagsByPath:{url:"/api/tag/path/:path",cache:!0}});return t}t.exports=["$resource",n]},{}],82:[function(e,t){"use strict";function n(e){var t=e("/api/tier/:id?",{id:"@_id"},{count:{},search:{url:"/api/tiers"},update:{method:"PUT"},create:{method:"POST",url:"/api/tier"}});return t}t.exports=["$resource",n]},{}],83:[function(e,t){"use strict";function n(e,t){function n(n){var r=e.defer();return t.get({id:n},function(e){r.resolve(e&&e.data)},r.reject),r.promise}function r(){var n=e.defer();return t.get({},function(e){n.resolve(e&&e.data)},n.reject),n.promise}function i(n){var r=e.defer();return t.update(n).$promise.then(function(e){r.resolve(e&&e.data)},r.reject),r.promise}function o(n){var r=e.defer();return t.create(n).$promise.then(function(e){r.resolve(e&&e.data)},r.reject),r.promise}function a(e){return t.delete({id:e}).$promise}return{getTier:n,getAllTiers:r,updateTier:i,createTier:o,deleteTier:a}}t.exports=["$q","TierResource",n]},{}],84:[function(e,t){"use strict";function n(e){var t=e("/api/topic",{id:"@id"},{getAllTopics:{url:"/api/topic",cache:!0},getTopicById:{url:"/api/topic/:id"},getTopicBySlug:{url:"/api/topic/slug/:slug"},getTopicByCategory:{url:"/api/topic/category/:id"},getAllByCategory:{url:"/api/topic/all/category",cache:!0},archiveTopic:{method:"PUT",url:"/api/topic/:id/archive"},unArchiveTopic:{method:"PUT",url:"/api/topic/:id/unarchive"},addTopicToTopics:{method:"POST",url:"/api/topic/:id/add-to"}});return t.get=t.getTopicById,t}t.exports=["$resource",n]},{}],85:[function(e,t){"use strict";function n(e,t){function n(n){n=n||{};var i=e.defer();return r(function(e){t.get(n).$promise.then(function(t){var n=t&&t.data;n&&angular.forEach(n,function(e){a[e._id]=e,o[e.primary_category]||(o[e.primary_category]=[]),o[e.primary_category].push(e)}),e(n)})},{key:"TopicService.get:"+JSON.stringify(n)},function(e){i.resolve(e)}),i.promise}function i(n){n=n||{};var i=e.defer();return r(function(e){t.getAllByCategory({primary:n.primary||!0}).$promise.then(function(t){e(t&&t.data)})},{key:"TopicService.getAllByCategory:"+JSON.stringify(n)},function(e){i.resolve(e)}),i.promise}var o={},a={};return{Resource:t,get:n,getAllByCategory:i,getById:function(e){return a[e]},topicsByCategory:function(){return o},topicsById:function(){return a}}}var r=e("cache-stack");t.exports=["$q","topicResource",n]},{"cache-stack":498}],86:[function(e,t){"use strict";function n(e,t,n,i,o,a,s,c,l,u){function d(e){this.user=e}function p(e,n){var r=t.defer();return angular.isObject(n)?this.user.getPending(e)?r.reject():(this.user.setPending(e,!0),r.resolve()):r.reject(),r.promise}function f(t){angular.extend(this.user._data,t),o.context.session=angular.copy(t),e.$broadcast("user:updated")}function h(e,t){var r=e&&e.status,i=e&&e.data&&e.data.message;return 401===r&&i===l.auth.errors.corruptToken&&n.location.reload(),"facebook"===t&&(i=l.login.messages.facebook.error),i||r||void 0}function m(e){var n=this,r=t.defer();return c.login({email:e.email,password:e.password,profile:e.profile}).$promise.then(function(e){angular.isString(e)&&(e=angular.fromJson(e)),e.status===l.login.states.success?(n.setUser(e.data),r.resolve(e)):r.reject(e),N()},r.reject),r.promise}function g(n){var i=this,o=t.defer();return i.validateOperation("register",n).then(function(){c.register({email:n.email,password:n.password,profile:n.profile}).$promise.then(function(t){t&&t.success?r.bind(m,i)(n).then(function(){e.$broadcast("user:register"),i.signUpComplete("email",i.user.get("uid"),o.resolve)},o.reject):o.reject(l.register.messages.fail)},function(e){o.reject(h(e,"register"))}).finally(function(){i.user.removePending("register")})},o.reject),o.promise}function v(n){var i=this,o=t.defer();return i.validateOperation("login",n).then(function(){r.bind(m,i)(n).then(function(t){e.$broadcast("user:login"),i.signInComplete("email",i.user.get("uid"),function(){o.resolve(t.data)})},function(e){o.reject(h(e,"login"))}).finally(function(){i.user.removePending("login")})},o.reject),o.promise}function b(e){var t=n.open(e,"clSocialLogin","width=800, height=600, resizeable, centerscreen");t.focus()}function y(){var e="/redirects/fb-oauth-init";b(e)}function M(r){var i=this,o=t.defer();return r&&angular.isString(r)?(i.validateOperation("facebook",{}).then(function(){c.facebookLogin({fb_token:r}).$promise.then(function(t){if(!t.success){var r=l.login.messages.facebook.error;return t.status===l.login.messages.facebook.emailMissing&&(r=l.login.messages.facebook.emailMissing),e.$broadcast("user:facebook:error",r),N(),o.resolve()}i.setUser(t.data),"fb_register"===t.status&&e.$broadcast("user:facebook-social-register",n.location.pathname),"google_register"===t.status&&e.$broadcast("user:google-social-register",n.location.pathname),(t.status===l.login.states.facebook.login||t.status===l.login.states.facebook.connect)&&(i.signInStart("facebook","clIntroModal"),i.signInComplete("facebook",i.user.get("uid"),o.resolve),e.$broadcast("user:login"))},function(t){e.$broadcast("user:facebook:error"),o.reject(h(t,"facebook"))}).finally(function(){i.user.removePending("facebook")})},o.reject),void 0):(o.reject("Malformed Token"),o.promise)}function w(){var e="/redirects/google-oauth-init";b(e)}function A(n,r,i){var o=this,a=t.defer();return n&&angular.isString(n)?(o.validateOperation("google",{}).then(function(){c.googleLogin({authenticatedEmail:i,google_token:n,userId:r}).$promise.then(function(t){if(!t.success){var n=l.login.messages.google.error;return t.status===l.login.messages.google.emailMissing&&(n=l.login.messages.google.emailMissing),e.$broadcast("user:google:error",n),N(),a.resolve()}o.setUser(t.data),"google_register"===t.status&&e.$broadcast("user:google-social-register"),(t.status===l.login.states.google.login||t.status===l.login.states.google.connect)&&(o.signInStart("google","clIntroModal"),o.signInComplete("google",o.user.get("uid"),a.resolve),e.$broadcast("user:login"))},function(t){e.$broadcast("user:google:error"),a.reject(h(t,"google"))}).finally(function(){o.user.removePending("google")})},a.reject),void 0):(a.reject("Malformed Token"),a.promise)}function x(n,r){var i=t.defer(),o=this;return c[r+"Registration"](n).$promise.then(function(t){t.status===l.login.states[r].create?(o.setUser(t.data),o.signUpComplete(r,o.user.get("uid"),function(){e.$broadcast("user:register"),i.resolve()})):i.reject()},i.reject),i.promise}function k(e){e&&e.preventDefault();var r=this,i=t.defer();return r.validateOperation("logout",{}).then(function(){c.logout().$promise.then(function(){i.resolve(!0),r.handleCompletion(!1),u.logout().then(function(){n.location="/"})},function(e){i.reject(e.message)}).finally(function(){r.user.removePending("logout")})},i.reject),i.promise}function _(e){var n=this,r=t.defer();return n.validateOperation("resetPassword",e).then(function(){c.resetPassword({email:e.email}).$promise.then(function(e){r.resolve(e)},r.reject).finally(function(){n.user.removePending("resetPassword")})},r.reject),r.promise}function S(e){var n=this,r=t.defer();return n.validateOperation("updatePassword",e).then(function(){c.updatePassword(e).$promise.then(function(e){r.resolve(e)},r.reject).finally(function(){n.user.removePending("updatePassword")})},r.reject),r.promise}function $(e,t){var n={label:e,modal_ID:t};s.signInStart(n)}function z(e,t){var n={label:e,modal_ID:t};s.signUpStart(n)}function T(e,t,n){var r=this;Vault.Session.set("first_time_user",!1),r.sendAuthAnalytics(function(){s.signInComplete(e,function(){r.handleCompletion(!0,e,"login"),n()})})}function C(e,t,n){var r=this;r.user.addUTMTraits(),a.alias(t),r.sendAuthAnalytics(function(){s.signUpComplete(e,function(){r.handleCompletion(!0,e,"register"),n()})})}function O(e){a.identify(Date.now(),this.user.get("uid"),this.user.get("profile"),e),a.trackAffiliateLinkConversion(this.user.get("_id")),a.clearExtraProperties()}function E(e,t){var n=this;e?(n.user.mergeExistingInterests(),n.user.updateInterest().then(function(){L(e,t)})):L(e,t)}function L(){var e=window.location.pathname.indexOf("oauth-init")>=0;e||Vault.Session.remove("next");var t=null!=window.location.pathname.match(/(login|register)/),i=null!==window.location.pathname.match(/checkout/),o=Vault.Session.getAndRemove("next");if(o)n.location.href=o;else if(t&&!i){var a="/",s=decodeURIComponent(n.location.search.substring(1)),c=[];r.each(s.split("&"),function(e){var t=e.split("=");"dest"===t[0]?a=t[1]:c.push(e)}),c.length>0&&c[0]&&(a+="?"+c.join("&")),n.location.href=a}}function B(e){if(e){var t=this.user.get("_id");return"signedIn"===e&&t||"signedOut"===e&&!t}return!0}function N(){i.get(window.location.href,{cache:!1})}function q(e,t){a.addExtraProperties(e),s.accountModalShown(t)}return angular.extend(d.prototype,{validateOperation:p,setUser:f,register:g,login:v,startFacebook:y,facebook:M,startGoogle:w,google:A,socialRegistration:x,logout:k,resetPassword:_,updatePassword:S,signInStart:$,signUpStart:z,signInComplete:T,signUpComplete:C,handleCompletion:E,filterLogInState:B,sendAuthAnalytics:O,breakCache:N,modalShown:q}),d}var r=e("underscore");t.exports=["$rootScope","$q","$window","$http","rind","AnalyticsService","trackFactory","UserResource","Responses","ReferralService",n]},{underscore:void 0}],87:[function(e,t){"use strict";function n(e){function t(t){return e.updateIntent(t).$promise}function n(t,n){return e.getIntent({user:t,category:n}).$promise}return{updateIntent:t,getRecommendations:n}}t.exports=["UserResource",n]},{}],88:[function(e,t){"use strict";function n(e){var t=e("/api/user/profile",null,{emailVerify:{url:"/api/user/verify/send",method:"POST"}});this.emailVerifySend=function(e){t.emailVerify(function(t){e(null,t)},function(t){e(t)})},this.save=function(e,n){var i=angular.extend({},e.profile);i.uid=e.uid,angular.forEach(r,function(e){delete i[e]}),t.save(i,function(e){n(null,e)},function(e){n(e)})}}t.exports=["$resource",n];var r=["background_version","background","_id","blog_rss_url","created","image","image_version","slug","verify_emails"]},{}],89:[function(e,t){"use strict";function n(e,t){function n(){return t.user.valid()?t.user._data.user._id:null}function r(e){return e&&e.entity&&delete e.entity,angular.toJson(e)}return e("/api/auth",{userId:"@userId"},{validSession:{method:"GET",url:"/api/auth/valid"},login:{method:"POST",url:"/bff/login"},logout:{method:"POST",url:"/bff/logout"},facebookLogin:{method:"POST",url:"/api/user/facebook"},facebookRegistration:{method:"POST",url:"/api/user/facebook/register"},googleLogin:{method:"POST",url:"/api/user/google"},googleRegistration:{method:"POST",url:"/api/user/google/register"},register:{method:"POST",url:"/bff/register"},resetPassword:{method:"POST",url:"/api/user/reset-password/send"},updatePassword:{method:"POST",url:"/api/user/reset-password/update"},saveProfile:{method:"POST",url:"/api/user/profile"},search:{url:"/api/user/search"},findById:{url:"/api/user/id/:id"},findBySlug:{url:"/api/user/slug/:slug"},content:{url:"/api/user/content"},getFull:{url:"/api/user/full"},enroll:{method:"POST",url:"/api/user/content/enroll"},unenroll:{method:"POST",url:"/api/user/content/unenroll"},star:{method:"POST",url:"/api/user/content/star"},unstar:{method:"POST",url:"/api/user/content/unstar"},checkValidEmail:{method:"GET",url:"/api/user/checkemail/:email"},updateIntent:{method:"PUT",url:"/api/user/intent"},getIntent:{url:"/api/user/intent",cache:!0},getNotifications:{url:"/api/user/notifications"},setNotifications:{method:"POST",url:"/api/user/notifications"},addTraits:{method:"POST",url:"/api/user/traits"},getTraits:{method:"GET",url:"/api/user/traits"},addCoupons:{method:"POST",url:"/api/user/:userId/coupon"},getCoupons:{method:"GET",url:"/api/user/:userId/coupon"},removeCoupons:{method:"DELETE",url:"/api/user/:userId/coupon/:couponCode"},updateFurthestSegmentIndex:{method:"POST",url:"/api/user/segment/furthest"},follow:{method:"POST",url:"/api/user/:userId/follows/:entity",params:{entity:"@entity",userId:n},transformRequest:r},unfollow:{method:"DELETE",url:"/api/user/:userId/follows/:entity/:entityType/:entityKey",params:{entity:"@entity",userId:n},transformRequest:r},getFollows:{method:"GET",url:"/api/user/:userId/follows",params:{userId:n}},getFollow:{method:"GET",url:"/api/user/:userId/follows/:entity/:entityId",params:{entity:"@entity",userId:n},transformRequest:r},watchData:{url:"/api/user/segment"},upcomingEvents:{url:"/api/user/:userId/events",cache:!0},getOrders:{url:"/api/user/orders"},getOrder:{url:"/api/user/order/:orderId"}})}t.exports=["$resource","$rootScope",n]},{}],90:[function(e,t){"use strict";function n(e,t,n,c,l,u,d,p,f,h,m,g,v,b,y,M){function w(){this.reset()}function A(){return!(!this._data||!this._data._id)}function x(){this._data={},this._pending={},this.cart=null,this.Auth=new u(this),"undefined"!=typeof rind&&rind&&rind.context.buckets.variations.name.NewCheckout&&k.call(this)}function k(){function t(e){_(y,e).then(function(e){return e?S(d,e):null}).then(function(e){e&&(n.cart=e)},function(){})}var n=this;t(),e.$on("cart:updated",function(e,t){S(d,t).then(function(e){n.cart=e})}),e.$on("user:login",t.bind(null,!0)),e.$on("user:register",t.bind(null,!0))}function _(e,t){return e.has(t).then(function(e){return e})}function S(e,n){if(!n.lineItems)return t.resolve();if(!n.lineItems.length)return t.resolve(n);var i=r.chain(n.lineItems).pluck("cross_sells").flatten(),o=i.indexBy("courseId").value(),a=r.keys(o);return e.getCoursesByIds(a,{keys:["description","instructors","tagline","flags"]}).then(function(e){var t=r.chain(e).map(function(e){var t=o[e._id];return t&&(t.current_price=t.price,r.extend(e,t)),e}).indexBy("courseId").value();return n.lineItems=r.map(n.lineItems,function(e){return e.cross_sells=r.chain(e.cross_sells).map(function(e){return t[e.courseId]}).filter(M.isProductPurchasable).value(),e }),n})}function $(e,t,n){if(!this[e].user)return n;if("profile"===t)return this[e].profile||n;if("contentRights"===t)return this[e].contentRights||n;if("contentDetail"===t)return this[e].contentDetail||n;var r={};try{r=o(this,e+".user")}catch(i){return n}return r[t]||n}function z(e,t){return r.bind($,this,"_data",e,t)()}function T(e,t){return r.bind($,this,"_pending",e,t)()}function C(e,t,n){return angular.isDefined(t)?(this[e].user||(this[e].user={}),o.set(this[e].user,t,n),o(this[e].user,t)):null}function O(e,t){return r.bind(C,this,"_data",e,t)()}function E(e,t){return r.bind(C,this,"_pending",e,t)()}function L(e,t){return angular.isDefined(t)&&this[e].user?(o.del(this[e].user,t),void 0):null}function B(e){return r.bind(L,this,"_data",e)()}function N(e){return r.bind(L,this,"_pending",e)()}function q(e){var t={};e._data.user&&angular.extend(t,e._data.user.traits);var n=window.Vault.Local.getList();return r.each(n,function(e){var n=r.keys(e)[0],i=e[n];if("string"==typeof n&&0===n.indexOf("trait_")){var o=n.replace(/trait_/,"");0!==o.indexOf("_")&&0!==o.indexOf("^")&&(t[o]=i)}}),t}function I(){var e=n.absUrl(),t=e.substring(e.indexOf("?"),e.length),r=c.parse(t);(r.utm_source||r.utm_medium||r.utm_campaign||r.utm_content||r.utm_term)&&this.addUTMTraits()}function P(){var e=["_source","_medium","_campaign","_content","_term","source","medium","campaign","content","term"];this.addTraits(e)}function R(e,t,n){Vault.Local.set("trait_"+e,t,n)}function D(e,t,n,r){this.setTraitOnClient(e,t,n),this.addTraits([e],r)}function W(e,t,n){var r=this;n||(n=t,t=void 0);var i=[];angular.forEach(e,function(e,n){i.push(n),r.setTraitOnClient(n,e,t)}),this.addTraits(i,n)}function j(e,t){var n=this,i=this._data&&this._data.user&&this._data.user._id;if(i){var o=Vault.Local.getList(),a={};r.each(o,function(e){var t=Object.keys(e)[0];t&&0===t.indexOf("trait_")&&(a[t.replace(/trait_/,"")]=e[t])});var s={};if(r.each(e,function(e){var t=decodeURIComponent(a[e]);t&&(s[e]=t)}),s=this.minimizeSendData(s,rind.context.session.user.traits||{}),Object.keys(s).length>0){var c={_id:i,traits:s};f.addTraits(c,function(){n._data.user.traits||(n._data.user.traits={}),angular.forEach(s,function(e,t){n._data.user.traits[t]=e}),t&&t()})}}}function X(){var e=t.defer(),n=this,r=this.get("_id");if(r){var i={userId:r};f.getCoupons(i,function(t){var r=t&&t.data||[];n.set("coupons",r),e.resolve(r)})}else e.reject(new Error("no userId"));return e.promise}function F(e){var n=t.defer(),r=this,i=this.get("_id");return i&&e?f.addCoupons({userId:i},{coupons:e},function(){var t=r.get("coupons")||[];t.concat(e),r.set("coupons",t),n.resolve(t)}):n.reject(new Error("no userId")),n.promise}function U(e){var n=t.defer(),r=this,i=this.get("_id");if(i&&e){var o={userId:i,couponCode:e};f.removeCoupons(o,function(e){var t=e&&e.coupons||[];r.set("coupons",t),n.resolve(t)})}else n.reject(new Error("no userId"));return n.promise}function V(e,t){var n={};for(var r in e)0===r.indexOf("_")?t[r]||(n[r]=e[r]):e[r]!==t[r]&&(n[r]=e[r]);return n}function H(){var e=this;["","Pending"].forEach(function(t){var n=e["get"+t]("follows");n||(n=e["set"+t]("follows",{})),n.topic||(n.topic=[])})}function G(e){return this.checkForInterests(),e&&e.pending?this.getPending("follows").topic.length>0:this.get("follows").topic.length>0}function K(e){this.checkForInterests();var t=this.getPending("follows");return t.topic.length?t.topic.indexOf(e)>=0:this.get("follows").topic.indexOf(e)>=0}function Y(e){if(this.checkForInterests(),!this.hasInterest(e)){var t=this.getPending("follows");t.topic.push(e)}}function J(e){this.checkForInterests();var t=this.getPending("follows");t.topic=t.topic.filter(function(t){return t!==e})}function Q(){this.checkForInterests();var e=this.get("follows"),t=this.getPending("follows");t.topic=r.union(t.topic,e.topic),this.setPending("follows",t)}function Z(){var e=t.defer(),n=this;this.checkForInterests();var i=this.get("follows").topic,o=this.getPending("follows").topic,a=r.difference(i,o),s=r.difference(o,i);return t.all([n.follow("topic",{entityIds:s}),n.unfollow("topic",{entityIds:a})]).finally(function(){n.removePending("follows.topic"),e.resolve()}),e.promise}function et(e){return f.checkValidEmail({email:e}).$promise}function tt(e,t,n){if(!n||!this._data.contentRights)return!1;t=t||"course";var i=r.indexOf(this._data.contentRights[e][Lt[t]],n);return i>-1}function nt(e){if(!this._data||!this._data.user||!this._data.user.roles)return!1;var t=this._data.user.roles.indexOf(e);return t>-1}function rt(e){e=r.extend({populate:!1},e);var n=t.defer();return a(function(t){f.content(e).$promise.then(function(e){i.each(e.data,function(e,t){return e&&e.courses&&angular.isArray(e.courses)?angular.isString(e.courses[0])?(d.getCoursesByIds(e.courses,{},{owner_only:!0}).then(function(n){e.courses=n,t()}),void 0):t():t()},function(){t(e.data)})})},{key:"UserService.getContent:"+JSON.stringify(e)},function(e){n.resolve(e)}),n.promise}function it(t,n,r,i,o,a){var s=this;return n=n||"course",f[t]({id:r,type:n},function(){f.content({populate:!1},function(c){s._data.contentRights=c.data,e.$broadcast("user:updateContent"),ot(i,r,n,function(e){st(t,n,r,e,o,a),"course"===n&&b.clearCourseCounts(e)})})})}function ot(e,t,n,r){e?r(e):at(n,t,r)}function at(e,t,n){var r=Et[e];r&&r.findById?r.findById({id:t},function(e){n(e.data)}):n()}function st(e,t,n,r,i,o){if(r)switch("string"==typeof r.product&&(r.product={_id:r.product,source:{source_type:t,source_id:r._id,nid:r.nid}}),e){case"star":v.star(r,i,o);break;case"unstar":v.unStar(r,i,o);break;case"enroll":v.rsvp(r,i,o);break;case"unenroll":v.unRsvp(r,i,o)}}function ct(e,t){this.valid()&&g.updateIntent({category:e||"all",tag:t||null})}function lt(){return f.getNotifications().$promise}function ut(e){return f.setNotifications(e).$promise}function dt(e){var t=!0;if(e&&e.length&&(t=!1,this._data.user)){var n=q(this);angular.forEach(e,function(e){n[e.key]===e.value&&(t=!0)})}return t}function pt(e){var t=this,n=this._data&&this._data.user&&this._data.user._id;if(n){var r={_id:n};f.getTraits(r,function(n){rind.context.session.user.traits=n.data,t._data.traits=n.data,e&&e()})}}function ft(e){var t=this,n=t.get("traits");return n&&0!==r.size(n)?n[e]:void 0}function ht(){var e=this;return e.get("traits")}function mt(e){var t=this,n=q(t),i=r.keys(e),o=!0;return angular.forEach(i,function(t){var r=n[t];"true"===r?r=!0:"false"===r&&(r=!1),o&&r!==e[t]&&(o=!1)}),o}function gt(e,t){f.updateFurthestSegmentIndex(e,function(){t&&t()})}function vt(n,r){var i=t.defer(),o=this,a={entity:n};if(!o.valid())return i.reject(),i.promise;if(r.entityId)a.entityId=r.entityId;else if(angular.isArray(r.entityIds)){if(0===r.entityIds.length)return i.reject(),i.promise;a.entityId=r.entityIds.join(",")}else if(r.entitySlug)a.entitySlug=r.entitySlug;else{if(!r.entityName)return i.reject(),i.promise;a.entityName=r.entityName}return f.follow(a).$promise.then(function(t){t&&t.success&&t.data?(angular.isArray(t.data)?angular.forEach(t.data,function(e){-1===o.get("follows")[n].indexOf(e._id)&&o._data.user.follows[n].push(e._id)}):-1===o.get("follows")[n].indexOf(t.data._id)&&o._data.user.follows[n].push(t.data._id),e.$broadcast("user:follow",t.data),i.resolve(t.data)):i.reject()},function(e){i.reject(e)}),i.promise}function bt(e,n){var r=null,i=[],o=null,a=this,s={entity:e};if(!a.valid())return r=t.defer(),r.reject(),r.promise;if(n.entityId)o=[n.entityId],s.entityType="id";else if(angular.isArray(n.entityIds))o=n.entityIds,s.entityType="id";else if(n.entitySlug)o=[n.entitySlug],s.entityType="slug";else{if(!n.entityName)return r=t.defer(),r.reject(),r.promise;o=[n.entityName],s.entityType="name"}return o.forEach(function(e){var n=angular.copy(s);n.entityKey=e;var r=t.defer();yt.call(a,n).then(r.resolve,r.reject),i.push(r.promise)}),t.all(i)}function yt(n){var r=t.defer(),i=this;return f.unfollow(n).$promise.then(function(t){t&&t.success&&t.data&&(angular.isArray(t.data)?angular.forEach(t.data,function(e){i._data.user.follows[n.entity].splice(i._data.user.follows[n.entity].indexOf(e._id),1)}):i._data.user.follows[n.entity].splice(i._data.user.follows[n.entity].indexOf(t.data._id),1),e.$broadcast("user:unfollow",t.data),r.resolve(t.data)),r.reject()},function(e){r.reject(e)}),r.promise}function Mt(e,t){return f.getFollow({entity:e,entityId:t}).$promise}function wt(){return f().$promise}function At(e,n){var r=t.defer(),i=this,o=null;return i.valid()?(i.get("follows")||i.set("follows",{}),i.get("follows")[e]||i.set("follows."+e,[]),n.entityId?r.resolve(i._data.user.follows[e].indexOf(n.entityId)>-1):angular.isArray(n.entityIds)?(o=n.entityIds.filter(function(t){return i._data.user.follows[e].indexOf(t)>-1}),r.resolve(n.entityIds.length>0?o.length>0:!1)):f.getFollows().$promise.then(function(t){t&&t.success&&t.data&&(t.data[e]||angular.isArray(t.data[e])?(o=t.data[e].filter(function(e){return n.entitySlug?e.slug===n.entitySlug:n.entityName?e.name===n.entityName:void 0}).length>0,r.resolve(o)):r.resolve(!1))}),r.promise):(r.reject(),r.promise)}function xt(e,t){var n=this,r=angular.isArray(e)?e:[e];angular.forEach(r,function(e){p.get({id:e}).then(function(e){var r=e&&e.data;if(r&&r.product){var i=angular.isObject(r.product)?r.product._id:r.product;d.getCourseByProduct(i).then(function(e){if(e){var r=e.courses?"bundle":"course";n[t](r,{entityId:e._id})}})}})})}function kt(e){var n=this,r=t.defer();return a(function(t){var r=angular.extend({limit:5,sort:"-modified",populate:"segment"},e);f.watchData(r).$promise.then(function(e){m.setWatchData(e.data);var r={};return angular.forEach(e.data,function(e){if(e.segment&&e.segment.course&&!r.recentCourse){var i=n.hasContent("purchased","course",e.segment.course._id);if(i)return t(e.segment.course)}}),t()},t)},{key:"UserService:recentlyWatched"},r.resolve),r.promise}function _t(){var e=this,n=t.defer();return a(function(t){var n=r.indexBy(e.get("contentDetail"),function(e){return e.course}),i=r.last(e.get("contentRights").purchased.courses);return i?(m.Resource.findById({id:i}).$promise.then(function(e){return e.data?(e.data.purchased=o(n[i]||{},"purchased.date"),t(e.data),void 0):t()},function(){t()}),void 0):t()},{key:"UserService:recentPurchase"},n.resolve),n.promise}function St(){var e=this,n=t.defer(),r={recentlyWatched:void 0,recentPurchase:void 0};return t.all([e.recentlyWatched().then(function(e){r.recentlyWatched=e},angular.noop),e.recentPurchase().then(function(e){r.recentPurchase=e},angular.noop)]).finally(function(){var e=0,t=r.recentPurchase&&r.recentPurchase.purchased||0;if(r.recentlyWatched){var i=m.getFurthestSegmentForCourse(r.recentlyWatched);i&&i.watchData&&(e=i.watchData.modified)}r.recentlyWatched&&e>=t?r.mostRecent=r.recentlyWatched:r.recentPurchase&&(r.mostRecent=r.recentPurchase),n.resolve(r)}),n.promise}function $t(e,t){var n=o(e,"product"),r=o(t,"product"),i=o(e,"swimlanes.0.broadcasts.0.meta"),a=o(t,"swimlanes.0.broadcasts.0.meta"),s=n||i&&i._id||e._id,c=r||a&&a._id||t._id;return s===c}function zt(){var e=this,n=t.defer(),o=s().tz("America/Los_Angeles").unix();return a(function(t){var n={courses:new l};i.series([function(t){e.recentInteraction().then(function(e){e&&e.mostRecent&&(n.recent=e.mostRecent,n.recent.type="keep-watching",n.courses.addToSet(n.recent,$t)),t()},function(){t()})},function(t){e.getContent().then(function(e){n.content=e,angular.forEach(n.content.purchased.courses,function(e){var t=n.courses.addToSet(e,$t);t&&(e.type="keep-watching")}),angular.forEach(n.content.starred.courses,function(e){var t=n.courses.addToSet(e,$t);t&&(e.type="wishlisted")}),t()},function(){t()})},function(t){e.upcomingEvents({limit:0}).then(function(e){var i=e.events;i&&(n.onair=p.getCurrentLiveEvents(i),n.onair.length&&(r.each(n.onair,function(e){e.type="live-now"}),n.courses.addToSet(n.onair,$t)),angular.forEach(i,function(e){var t=n.courses.addToSet(e,$t);e.end_time0?o+"?"+e(s):o}}var r=e("underscore");t.exports=["$httpParamSerializer",n]},{underscore:void 0}],93:[function(e,t){"use strict";t.exports=function(){return function(e){try{return JSON.stringify(e).length}catch(t){}return""}}},{}],94:[function(e,t){"use strict";t.exports=[function(){return function(e){return e?e.substring(0,1).toUpperCase()+e.substring(1):""}}]},{}],95:[function(e,t){"use strict";t.exports=function(){return function(e,t,n,r){if(!e)return"";void 0===n&&(n=2),t=t||"";var i=(e/100).toFixed(n),o=e%100;return 0===o&&r&&(i*=1),(t+i).replace(t+"-","-"+t)}}},{}],96:[function(e,t){"use strict";function n(){return r.memoize(function(e,t){return angular.isArray(e)?(angular.isNumber(t)||(t=2),r.chain(e).groupBy(function(n,r){return Math.floor(r/(e.length/t))}).toArray().value()):e},function(e,t,n){return n?e.map(function(e){return e[n]}):e})}var r=e("underscore");t.exports=n},{underscore:void 0}],97:[function(e,t){"use strict";t.exports=function(){return function(e){return e.match(/\/([^\/]*)$/)[1]}}},{}],98:[function(e,t){"use strict";var n=e("underscore"),r={B:1e9,M:1e6,K:1e3},i={B:2,M:2,K:0};t.exports=["$filter",function(e){return function(t,o){if(void 0===t)return"";var a,s;n.each(r,function(e,n){!a&&t>e&&(a=t/e,s=n)}),!o&&s&&(o=i[s]);var c=e("number")(a||t,o||0);return c=c.replace(/\.0$/gi,""),c+(s||"")}}]},{underscore:void 0}],99:[function(e,t){"use strict";function n(){return function(e){var t=angular.copy(e);if(angular.isObject(t)){var n=t.file||t,r=n.key;return"string"!=typeof r?!1:!0}return t?t.match(/cl-public/)||t.match(/^\/?sites\/default/)?!0:t.match(/^\/(ugc|agc)/)||"/"!==t.substr(0,1)&&"http"!==t.substr(0,4)?!0:!1:!1}}t.exports=n},{}],100:[function(e,t){"use strict";t.exports=["$filter","i18nResource","i18n","$interpolate","$sce",function(e,t,n,r,i){return function(e,o,a){if(!e)return"";if(!n||!n.strings)return o?a?r(o)(a,!1,i.HTML):o:e;var s=o,c=n.strings[e];return void 0===c?t.addString({key:e,value:o}):s=c,a&&(s=r(s)(a,!1,i.HTML)),s}}]},{}],101:[function(e,t){"use strict";t.exports=[function(){return function(e){if(!e)return null;if(!e.type||!e.slug)return null;var t={bundle:"/bundle/",courses:"/courses/"};return t[e.type]?t[e.type]+e.slug:null}}]},{}],102:[function(e,t){"use strict";t.exports=[function(){return function(e,t){if(!e)return null;var n={bundle:t?"/admin/bundles/#/":"/bundle/",course:t?"/admin/courses/#/":"/courses/",playlist:t?"/admin/playlists/#/":"/playlist/"};return e.event&&e.event.url?e.event.url:e.url?e.url:e.meta&&e.meta.url?e.meta.url:e.nid?e.courses?n.bundle+e.slug:n.course+e.slug:void 0!==e.segments?n.playlist+e.slug:""}}]},{}],103:[function(e,t){"use strict";function n(e,t,n){var o=e.devicePixelRatio||1;return function(t,a){var s=angular.copy(t);if(angular.isObject(s)){var c=s.file||s,l=c.key;if("string"!=typeof l)return null;s=c.key}if(!s)return null;if(s.match(/cl-public/)||s.match(/^\/?sites\/default/))return s;var u=angular.extend({},r,a);if(u.magickmangler=n.hostname.protocol+"://"+(n.magickmangler||n.hostname.cdn),s.match(/^\/?(cl-ugc|ugc|gallery|profile)/)?(s=s.replace(/\/?cl-ugc-west-2\//,""),s=s.replace(/\/?ugc\/gallery\//,"gallery/"),s=s.replace(/\/?ugc\/profile-image\//,"profile-image/"),s=s.replace(/\/?ugc\/profile-background\//,"profile-background/"),s=n.hostname.protocol+"://"+n.cdn.ugc+"/"+s):s.match(/^\/?(cl-agc|agc)/)?s=n.hostname.protocol+"://"+n.cdn.agc+"/"+s:s.match(/^\/?(keyframes)/)&&(s=s.replace(/\/?keyframes\//,""),s=n.hostname.protocol+"://"+n.cdn.keyframes+"/"+s),u.raw)return s;u.url=encodeURIComponent(s),!u.fullWidth&&e.innerWidth&&angular.forEach(i,function(t){var n=Math.round(t*o);e.innerWidth<=t&&u.width>n&&(u.width=n)}),u.src=[u.magickmangler,u.method,u.url,u.width],(u.height||0===u.height)&&u.src.push(u.height);var d=u.src.join("/");return d}}t.exports=["$window","$sce","config",n];var r={method:"fit",width:50},i=[480,768,992,1200,1500]},{}],104:[function(e,t){"use strict";function n(){return function(e){var t=r.createHash("md5");return t.update(e),t.digest("hex")}}var r=e("crypto");t.exports=["$filter",n]},{crypto:530}],105:[function(e,t){"use strict";t.exports=function(){return function(e){return(""+e).length>1?e:"0"+e}}},{}],106:[function(e,t){"use strict";t.exports=function(){return function(e,t,n){var r=1===t?"":n?"es":"s";return e+r}}},{}],107:[function(e,t){"use strict";function n(e){return function(t,n,r,i,o){return n=n||"a CreativeLive Student",t?i&&t._id===e.user._data._id?"you":o&&t.profile&&t.profile.first_name?t.profile.first_name:t.profile&&t.profile.display_name&&!t.profile.display_name.match(/^user|^fbuser/gi)?t.profile.display_name:t.profile&&t.profile.first_name?t.profile.first_name:r?t.slug:n:n}}t.exports=["$rootScope",n]},{}],108:[function(e,t){"use strict";function n(e){return function(t,n){var r=t%3600%60;r=e("pad")(r);var i=Math.floor(t%3600/60);i=e("pad")(i);var o=Math.floor(t/3600);return"microformat"===n?(o=o?o+"H":"","T"+o+i+"M"+r+"S"):(o=o?o+":":"",""+o+i+":"+r)}}t.exports=["$filter",n]},{}],109:[function(e,t){"use strict";function n(){return function(e){return e?parseInt(e,10):0}}t.exports=[n]},{}],110:[function(e,t){"use strict";var n=e("striptags");t.exports=["$filter",function(){return function(e){return n(e).replace(/'/g,"'")}}]},{striptags:509}],111:[function(e,t){"use strict";var n=e("moment");t.exports=["$filter",function(){return function(e){return n.unix(e).fromNow()}}]},{moment:void 0}],112:[function(e,t){"use strict";function n(){return function(e){return"string"==typeof e?e.split(" ").map(function(e){return e.charAt(0).toUpperCase()+e.slice(1)}).join(" "):e}}t.exports=n},{}],113:[function(e,t){"use strict";function n(e){return function(t,n,i,o,a){a=a||"day";var s=e("date")(1e3*t,i);if(n){var c=r.unix(t),l=r.unix(n);c.isSame(l,a)||(s+=o||"-",s+=e("date")(1e3*n,i))}return s}}var r=e("moment");t.exports=["$filter",n]},{moment:void 0}],114:[function(e,t){"use strict";function n(e,t){var n=e.user.get("timezone"),i=n&&n.name||"America/Los_Angeles";return function(e,n,o){return o?r.unix(e).tz(i).format(n):t("date")(1e3*e,n)}}var r=e("moment");t.exports=["$rootScope","$filter",n]},{moment:void 0}],115:[function(e){"use strict";var t=e("underscore"),n=e("deepval"),r=e("vault.js"),i=e("moment"),o=e("./app");t.mixin({deepOmit:function(e,r){"string"==typeof r&&(r=r.split(" "));var i=!0;return t.isArray(e)||(e=[e],i=!1),t.each(e,function(e){t.each(r,function(t){n.del(e,t)})}),i?e:e[0]}}),o.value("Responses",e("./data/responses")),o.value("Vault",r),o.value("moment",i),o.value("_",t),o.value("deepval",n),o.filter("bytes",e("./filters/bytes")),o.filter("pluralize",e("./filters/pluralize")),o.filter("centsToDollars",e("./filters/centsToDollars")),o.filter("magick",e("./filters/magick")),o.filter("hasImage",e("./filters/hasImage")),o.filter("md5",e("./filters/md5")),o.filter("pad",e("./filters/pad")),o.filter("secondsToHours",e("./filters/secondsToHours")),o.filter("twoDateSplit",e("./filters/twoDateSplit")),o.filter("unixDate",e("./filters/unixDate")),o.filter("stripHtml",e("./filters/stripHtml")),o.filter("timeAgo",e("./filters/timeAgo")),o.filter("titleCase",e("./filters/titleCase")),o.filter("friendlyNumber",e("./filters/friendlyNumber")),o.filter("prettyUsername",e("./filters/prettyUsername")),o.filter("addQueryParams",e("./filters/addQueryParams")),o.filter("i18n",e("./filters/i18n")),o.filter("linkToSource",e("./filters/linkToSource")),o.filter("linkToProduct",e("./filters/linkToProduct")),o.filter("filenameFromPath",e("./filters/filenameFromPath")),o.filter("capitalize",e("./filters/capitalize")),o.filter("chunk",e("./filters/chunk")),o.filter("stringToInt",e("./filters/stringToInt")),o.filter("add",e("./filters/add")),o.factory("api",e("./data/api")),o.factory("mcpConfig",e("./data/mcpConfig")),o.factory("pubnub",e("./data/pubnub")),o.factory("cacheClear",e("./data/cacheClear")),o.factory("apiConfig",e("./data/config")),o.factory("authResource",e("./data/auth")),o.factory("bannerResource",e("./data/banner")),o.factory("counterResource",e("./data/counter")),o.factory("i18nResource",e("./data/i18n")),o.factory("categoryResource",e("./data/category")),o.factory("ecommerceResource",e("./data/ecommerce")),o.factory("fileResource",e("./data/file")),o.factory("galleryResource",e("./data/gallery")),o.factory("instructorResource",e("./data/instructor")),o.factory("partnerResource",e("./data/partner")),o.factory("mediaResource",e("./data/media")),o.factory("questionsResource",e("./data/questions/resource")),o.factory("reviewResource",e("./data/review")),o.factory("channelResource",e("./data/channel")),o.factory("scheduleResource",e("./data/schedule")),o.factory("subTopicResource",e("./data/subtopic")),o.factory("tagResource",e("./data/tag")),o.factory("playlistResource",e("./data/playlist")),o.factory("discountResource",e("./data/discount")),o.factory("couponResource",e("./data/coupon")),o.factory("RecommendationsService",e("./data/recommendations/service")),o.factory("AnalyticsService",e("./data/analytics/service")),o.factory("CourseService",e("./data/course/service")),o.factory("courseResource",e("./data/course/resource")),o.factory("bundleResource",e("./data/bundle/resource")),o.service("BundleService",e("./data/bundle/service")),o.factory("productResource",e("./data/product/resource")),o.service("ProductService",e("./data/product/service")),o.service("ReferralService",e("./data/referral/service")),o.factory("referralResource",e("./data/referral/resource")),o.factory("ScoresService",e("./data/scores/service")),o.factory("ScoresResource",e("./data/scores/resource")),o.factory("catalogResource",e("./data/catalog/resource")),o.factory("CatalogService",e("./data/catalog/service")),o.factory("topicResource",e("./data/topic/resource")),o.factory("TopicService",e("./data/topic/service")),o.factory("TierResource",e("./data/tiers/resource")),o.factory("TierService",e("./data/tiers/service")),o.factory("UserResource",e("./data/user/resource")),o.service("UserAuthService",e("./data/user/auth")),o.service("UserService",e("./data/user/service")),o.service("UserIntent",e("./data/user/intentService")),o.service("UserProfileService",e("./data/user/profileService")),o.factory("EventService",e("./data/event/service")),o.factory("eventResource",e("./data/event/resource")),o.service("broadcastService",e("./data/event/broadcastService")),o.provider("httpAuthIntercept",e("./data/session/httpAuthIntercept")),o.service("gangesSessionService",e("./data/session/gangesSessionService")),o.service("mcpSessionService",e("./data/session/mcpSessionService")),o.factory("BlogResource",e("./data/blog/resource")),o.service("BlogService",e("./data/blog/service")),o.factory("StatsResource",e("./data/stats/resource")),o.service("StatsService",e("./data/stats/service")),o.factory("PipelineResource",e("./data/pipeline/resource")),o.service("PipelineService",e("./data/pipeline/service")),o.factory("topicResource",e("./data/topic/resource")),o.service("topicService",e("./data/topic/service")),o.factory("ChannelTopicResource",e("./data/channelTopic/resource")),o.factory("ChannelTopicService",e("./data/channelTopic/service")),o.factory("subdirectResource",e("./data/partnerCampaigns/subdirectResource")),o.factory("PartnersService",e("./data/partnerCampaigns/service")),o.factory("InstructorResource",e("./data/instructors/resource")),o.factory("InstructorService",e("./data/instructors/service")),o.factory("CartResource",e("./data/cart/resource")),o.factory("CartService",e("./data/cart/service")),o.factory("GiftService",e("./data/gift/service")),o.factory("focus",e("./utils/services/focus")),o.factory("DataSet",e("./utils/services/dataSet")),o.service("arrayMove",e("./utils/services/arrayMove")),o.service("parseQS",e("./utils/services/parseQs")),o.service("parseTransclusions",e("./utils/services/parseTransclusions")),o.service("flowControl",e("./utils/services/flowControl")),o.service("DuplicateService",e("./utils/services/duplicateService")),o.service("urlify",e("./utils/services/urlify")),o.service("locationChanger",e("./utils/services/locationChanger")),o.service("QuestionsService",e("./data/questions/service")),o.service("inViewDirector",e("./utils/services/inViewDirector")),o.directive("autoFocus",e("./utils/directives/autoFocus")),o.directive("clVia",e("./utils/directives/clVia")),o.directive("contactForm",e("./utils/directives/contactForm")),o.directive("eventFocus",e("./utils/directives/eventFocus")),o.directive("fillViewport",e("./utils/directives/fillViewport")),o.directive("loginRequired",e("./utils/directives/loginRequired")),o.directive("popup",e("./utils/directives/popup")),o.directive("ngClickable",e("./utils/directives/ngClickable")),o.directive("ngVisible",e("./utils/directives/ngVisible")),o.directive("clSetFocus",e("./utils/directives/setFocus")),o.directive("clLazyLoad",e("./utils/directives/lazyLoad")),o.directive("clBackgroundImage",e("./utils/directives/backgroundImage")),o.directive("clTheme",e("./utils/directives/theme")),o.controller("EmailVerifyController",e("./utils/controllers/email-verify-controller")),o.config(["$httpProvider","$provide",function(e,t){e.interceptors.push("apiConfig"),t.decorator("$timeout",["$delegate",function(e){function t(t,r,i){return r>n?!1:e(t,r,i)}var n=2147483647;return angular.extend(t,e),t}])}])},{"./app":19,"./data/analytics/service":20,"./data/api":21,"./data/auth":22,"./data/banner":23,"./data/blog/resource":24,"./data/blog/service":25,"./data/bundle/resource":26,"./data/bundle/service":27,"./data/cacheClear":28,"./data/cart/resource":29,"./data/cart/service":30,"./data/catalog/resource":31,"./data/catalog/service":32,"./data/category":33,"./data/channel":34,"./data/channelTopic/resource":35,"./data/channelTopic/service":36,"./data/config":37,"./data/counter":38,"./data/coupon":39,"./data/course/resource":40,"./data/course/service":41,"./data/discount":42,"./data/ecommerce":43,"./data/event/broadcastService":44,"./data/event/resource":45,"./data/event/service":46,"./data/file":47,"./data/gallery":48,"./data/gift/service":49,"./data/i18n":50,"./data/instructor":51,"./data/instructors/resource":52,"./data/instructors/service":53,"./data/mcpConfig":54,"./data/media":55,"./data/partner":56,"./data/partnerCampaigns/service":57,"./data/partnerCampaigns/subdirectResource":58,"./data/pipeline/resource":59,"./data/pipeline/service":60,"./data/playlist":61,"./data/product/resource":62,"./data/product/service":63,"./data/pubnub":64,"./data/questions/resource":65,"./data/questions/service":66,"./data/recommendations/service":67,"./data/referral/resource":68,"./data/referral/service":69,"./data/responses":70,"./data/review":71,"./data/schedule":72,"./data/scores/resource":73,"./data/scores/service":74,"./data/session/gangesSessionService":75,"./data/session/httpAuthIntercept":76,"./data/session/mcpSessionService":77,"./data/stats/resource":78,"./data/stats/service":79,"./data/subtopic":80,"./data/tag":81,"./data/tiers/resource":82,"./data/tiers/service":83,"./data/topic/resource":84,"./data/topic/service":85,"./data/user/auth":86,"./data/user/intentService":87,"./data/user/profileService":88,"./data/user/resource":89,"./data/user/service":90,"./filters/add":91,"./filters/addQueryParams":92,"./filters/bytes":93,"./filters/capitalize":94,"./filters/centsToDollars":95,"./filters/chunk":96,"./filters/filenameFromPath":97,"./filters/friendlyNumber":98,"./filters/hasImage":99,"./filters/i18n":100,"./filters/linkToProduct":101,"./filters/linkToSource":102,"./filters/magick":103,"./filters/md5":104,"./filters/pad":105,"./filters/pluralize":106,"./filters/prettyUsername":107,"./filters/secondsToHours":108,"./filters/stringToInt":109,"./filters/stripHtml":110,"./filters/timeAgo":111,"./filters/titleCase":112,"./filters/twoDateSplit":113,"./filters/unixDate":114,"./utils/controllers/email-verify-controller":116,"./utils/directives/autoFocus":117,"./utils/directives/backgroundImage":118,"./utils/directives/clVia":119,"./utils/directives/contactForm":120,"./utils/directives/eventFocus":121,"./utils/directives/fillViewport":122,"./utils/directives/lazyLoad":123,"./utils/directives/loginRequired":124,"./utils/directives/ngClickable":125,"./utils/directives/ngVisible":126,"./utils/directives/popup":127,"./utils/directives/setFocus":128,"./utils/directives/theme":129,"./utils/services/arrayMove":130,"./utils/services/dataSet":131,"./utils/services/duplicateService":132,"./utils/services/flowControl":133,"./utils/services/focus":134,"./utils/services/inViewDirector":135,"./utils/services/locationChanger":136,"./utils/services/parseQs":137,"./utils/services/parseTransclusions":138,"./utils/services/urlify":139,deepval:504,moment:void 0,underscore:void 0,"vault.js":511}],116:[function(e,t){"use strict";function n(e,t){this.type="info",this.email=((rind.context.session.user||{}).primary_email||{}).address,this.show=!0,this.verify=function(){var e=this;e.verifying=!0,e.errorMessage=void 0,t.emailVerifySend(function(t){e.verifying=!1,t?(e.errorMessage=t.data&&t.data.message,e.type="danger"):e.type="success"})},this.close=function(){this.show=!1},this.requiresVerification=function(){var t=rind.context.session||{},n=e.user,r=t._id===n._data._id,i=((t.user||{}).primary_email||{}).verified;return r&&!i}}t.exports=["$rootScope","UserProfileService",n]},{}],117:[function(e,t){"use strict";function n(e){return{restrict:"A",link:function(t,n){e(function(){n[0].focus()})}}}t.exports=["$timeout",n]},{}],118:[function(e,t){"use strict"; function n(e){return{restrict:"A",scope:{image:"=?clBackgroundImage",options:"=?clBackgroundOptions"},link:function(t,n,r){function i(){t.image&&(o=e("magick")(t.image,a),n.css("background-image","url("+o+")"),c||l())}var o,a,s={width:1600},c="true"===r.clBackgroundWatch,l=t.$watch("image",i);a=t.options?t.options:s,i()}}}t.exports=["$filter",n]},{}],119:[function(e,t){"use strict";function n(e,t,n){return{restrict:"A",link:function(i,o,a){function s(t){var r,i,a=o[0].querySelectorAll("a"),s=o[0].querySelectorAll("form");r=n.getViaProperty(c,t),i={via:r},angular.forEach(a,function(t){var n=t.href,r=e("addQueryParams")(t.href,i);n!==r&&(t.href=r)}),angular.forEach(s,function(e){var t,n=e.querySelector("input.via");n?(t=n.getAttribute("value"),r!==t&&n.setAttribute("value",r)):angular.element(e).append('')})}var c=a.clModule,l=a.clModuleId;if(1===o[0].nodeType&&c){var u=r.debounce(s,300);c=c.replace(/\-cms$/,""),n.registerModule(l,c,o,u),i.$watch(r.debounce(function(){t(function(){n.refreshModule(l)})},300))}}}}var r=e("underscore");t.exports=["$filter","$timeout","AnalyticsService",n]},{underscore:void 0}],120:[function(e,t){"use strict";function n(e){return{restrict:"A",link:function(t,n){function r(){var r={url:window.location.pathname},i=n[0],o=i.querySelectorAll("input, select, textarea");angular.forEach(o,function(e){var t=e.getAttribute("ng-model");t&&(r[t]=e.value)}),e.post("/bff/email",r).then(function(){t.sendSuccess=!0},function(e){t.sendError=e})}n.bind("submit",r)}}}t.exports=["$http",n]},{}],121:[function(e,t){"use strict";function n(e){return function(t,n,r){n.on(r.eventFocus,function(t){e(r.eventFocusId,t)}),t.$on("$destroy",function(){n.off(r.eventFocus)})}}t.exports=["focus",n]},{}],122:[function(e,t){"use strict";function n(e,t){return{restrict:"AE",replace:!0,scope:{},link:function(n,r,i){n.minHeight=i.minHeight&&parseInt(i.minHeight)||300;try{var o=Math.max(t[0].documentElement.clientHeight,e.innerHeight||0),a=r[0].offsetTop,s=o-a+1;s>n.minHeight&&r.css("height",s+"px")}catch(c){}}}}t.exports=["$window","$document",n]},{}],123:[function(e,t){"use strict";function n(e){return{restrict:"A",scope:{src:"@lazyLoadSrc",bkg:"@lazyLoadBkg",bounds:"=lazyLoadBounds",debounce:"=lazyLoadDebounce",delay:"=lazyLoadDelay",done:"=lazyLoadDone",initDelay:"=lazyLoadInitDelay",reInit:"=lazyLoadReInit"},link:function(t,n){function r(){n.ready(function(){if(t.src||t.bkg)c.push(n[0]),l.track(n[0]).then(o,angular.noop,i);else{var e=n[0].querySelectorAll("[lazy-load-src], [lazy-load-bkg]");e.length&&Array.prototype.forEach.call(e,function(e){a(e,"transparent"),-1===c.indexOf(e)&&c.push(e)}),c.length>0&&l.track(c).then(o,angular.noop,i)}})}function i(e){function t(){r&&e.setAttribute("src",r),e.removeEventListener("error",t,!1)}function n(){a(e,"lazyLoaded"),s(e,"transparent")}var r=e.getAttribute("src"),i=e.getAttribute("lazy-load-src"),o=e.getAttribute("lazy-load-bkg");e.addEventListener("error",t,!1),e.addEventListener("load",n,!1),i?e.setAttribute("src",i):o&&(e.style.backgroundImage='url("'+o+'")')}function o(){angular.isFunction(t.done)&&t.done()}function a(e,t){e.classList?e.classList.add(t):e.className+=" "+t}function s(e,t){e.classList?e.classList.remove(t):e.className=e.className.replace(new RegExp("(^|\\b)"+t.split(" ").join("|")+"(\\b|$)","gi")," ")}var c=[],l=e({debounce:t.debounce,bounds:t.bounds,deltaSpeed:t.deltaSpeed,deltaTimeout:t.deltaTimeout});if("boolean"==typeof t.initDelay)var u=t.$watch("initDelay",function(e){e&&(r(),u())});else r();var d=t.$watch("reInit",function(e){e&&(r(),d())});t.$on("$$destroy",function(){l.destroy()})}}}t.exports=["inViewDirector","$filter",n]},{}],124:[function(e,t){"use strict";function n(e,t){return{restrict:"A",link:function(n,r,i){function o(){l&&t(function(){try{r[0].click()}catch(e){r.click()}})}function a(){var e=rind&&rind.dump&&rind.dump.course||{};return n.entityName||e.short_title||e.title}function s(){return n.product?"buy":n.toggleFollow?"remind":void 0}function c(){var e={};return n.entity&&(n.entityId||n.entityIds)&&(e.entity=n.entity,e.entityIds=n.entityId?[n.entityId]:n.entityIds),e}var l=!1;e.$on("user:login",o),e.$on("user:register",o),e.$on("user:logout",o),r.on("mousedown keydown touchstart",function(t){if(!e.user.valid()){t.preventDefault(),t.stopPropagation(),l=!0;var n={buttonType:s(),courseName:a(),meta:c()};e.$broadcast("login:show",{onboarding:"false"!==i.onboarding,prompt:n.courseName?n.buttonType:"default",promptClass:n.courseName,meta:n.meta})}})}}}t.exports=["$rootScope","$timeout","$window",n]},{}],125:[function(e,t){"use strict";function n(){return{restrict:"AE",scope:{model:"=ngClickable"},link:function(e,t){e.$watch("model",function(e){e?t.css("pointer-events","auto").removeClass("disable-pointer"):t.css("pointer-events","none").addClass("disable-pointer")})}}}t.exports=[n]},{}],126:[function(e,t){"use strict";function n(){return function(e,t,n){e.$watch(n.ngVisible,function(e){e?t.addClass("ng-visible"):t.removeClass("ng-visible")})}}t.exports=n},{}],127:[function(e,t){"use strict";function n(e){return{restrict:"EA",scope:{},link:function(t,n,i){try{t.config=i.popup?JSON.parse(i.popup):{}}catch(o){t.config={}}var a=[];t.config.width||(t.config.width=640),t.config.height||(t.config.height=480),t.config.top||(t.config.top=e.screen.height/2-t.config.height/2),t.config.left||(t.config.left=e.screen.width/2-t.config.width/2),r.each(t.config,function(e,t){a.push(t+"="+e)}),n.on("click",function(t){t.preventDefault(),e.open(i.href,"clpopup",a.join(","))})}}}var r=e("underscore");t.exports=["$window",n]},{underscore:void 0}],128:[function(e,t){"use strict";function n(e){return{restrict:"A",link:function(t,n,r){t.$watch(function(){return e(r.clSetFocus)(t)},function(e){e&&n.focus()})}}}t.exports=["$parse",n]},{}],129:[function(e,t){"use strict";function n(e){return{restrict:"E",scope:{theme:"@"},link:function(t){e.headerTheme=t.theme,e.$applyAsync()}}}t.exports=["$rootScope",n]},{}],130:[function(e,t){"use strict";function n(){return function(e,t,n){if(n>=e.length)for(var r=n-e.length;r--+1;)e.push(void 0);return e.splice(n,0,e.splice(t,1)[0]),e}}t.exports=[n]},{}],131:[function(e,t){"use strict";function n(){function e(e,t){if(angular.isObject(e)){var n=r.find(this,function(n){return a(n,e,t)});return void 0!==n}return this.indexOf(e)>-1}function t(e,t){return null===e||void 0===e?!1:angular.isArray(e)?this.addEachToSet(e,t):this.hasItem(e,t)?!1:(this.push(e),!0)}function n(e,t){var n=this,r=[];return angular.forEach(e,function(e){var i=n.addToSet(e,t);r.push(i)}),r}function i(e,t){var n;angular.isObject(e)?r.each(this,function(r,i){a(r,e,t)&&(n=i)}):n=this.indexOf(e),n>-1&&this.splice(n,1)}function o(){this.splice(0,this.length)}function a(e,t,n){return angular.isFunction(n)?n(e,t):angular.isString(n)?e[n]===t[n]:angular.equals(e,t)}var s=angular.copy(Array);return window.DataSet=s,angular.extend(s.prototype,{hasItem:e,addToSet:t,addEachToSet:n,pull:i,clear:o}),s}var r=e("underscore");t.exports=[n]},{underscore:void 0}],132:[function(e,t){"use strict";function n(e){function t(e,t,n){r.addToSet(t,n)&&(e.addToSet?e.addToSet(t,n):e.push(t))}function n(e,n,r){angular.forEach(n,function(n){t(e,n,r)})}var r=new e;return{getList:function(){return r},hasItem:r.hasItem,registerItem:r.addToSet,removeItem:r.pull,clear:r.clear,addItem:t,addItems:n}}t.exports=["DataSet",n]},{}],133:[function(e,t){"use strict";function n(){function e(e,t,n){function i(){for(var n=0;n-1?v.splice(v.indexOf(e),1):angular.isArray(e)&&angular.forEach(e,function(e){angular.isElement(e)&&v.indexOf(e)>-1&&v.splice(v.indexOf(e))})}function a(){angular.element(e).off("scroll",s),angular.element(e).off("scroll",u),e.removeEventListener("resize",u),v=[],b=[],w=!1,x=!1,g=null}function s(){var t;y=e.scrollY||e.pageYOffset,null!==M&&(h.velocity=y-M,h.delta=h.velocity>=0?h.velocity:-1*h.velocity),M=y,t&&n.cancel(t),t=n(function(){M=null},30,!0)}function c(n){var r=n.getBoundingClientRect();return r.bottom>=0&&r.right>=0&&r.top<=(e.innerHeight||t[0].documentElement.clientHeight)+p&&r.left<=(e.innerWidth||t[0].documentElement.clientWidth)+p}function l(e,t){return function(){var r=this,i=arguments;n.cancel(A),A=n(function(){e.apply(r,i)},t)}}function u(){h.delta1&&(r="?"+(i[1]||"")),n=i[0].split("/"),1===n.length?n[0]+r:(n=n.map(function(t){return t&&e.slugify(t)||""}),n=n.join("/"),n=n.replace(/\/+/g,"/"),n+r)}return t}return t}t.exports=["Slug",n]},{}],140:[function(){"use strict";angular.module("dibari.angular-ellipsis",[]).directive("ellipsis",["$timeout","$window","$sce",function(e,t,n){var r=function(t){var n=null,r=[];this.remove=function(t){-1!==r.indexOf(t)&&(r.splice(r.indexOf(t),1),0===r.length&&(e.cancel(n),n=null))},this.add=function(i){-1===r.indexOf(i)&&r.push(i),n||(n=e(function(){var e=r.slice();n=null,r.length=0,e.forEach(function(e){e()})},t))}},i=new r(0),o=new r(75);return{restrict:"A",scope:{ngBind:"=",ngBindHtml:"=",ellipsisAppend:"@",ellipsisAppendClick:"&",ellipsisSymbol:"@",ellipsisSeparator:"@",useParent:"@",ellipsisSeparatorReg:"="},compile:function(){return function(e,r,a){function s(e){var t=0;return angular.forEach(e.parent().children(),function(n){n!=e[0]&&(t+=n.clientHeight)}),e.parent()[0].clientHeight-t}function c(){var t=e.ngBind||e.ngBindHtml,i=!1;if(n.isEnabled()&&angular.isObject(t)&&n.getTrustedHtml(t)&&(i=!0,t=n.getTrustedHtml(t)),t){var o=!e.ngBind&&!!e.ngBindHtml,c=0,u="undefined"!=typeof a.ellipsisSymbol?a.ellipsisSymbol:"…",d="undefined"!=typeof e.ellipsisSeparator?a.ellipsisSeparator:" ",p="undefined"!=typeof e.ellipsisSeparatorReg?e.ellipsisSeparatorReg:!1,f="undefined"!=typeof e.ellipsisAppend&&""!==e.ellipsisAppend?u+""+e.ellipsisAppend+"":u,h=p?t.match(p):t.split(d);if(a.isTruncated=!1,o?r.html(t):r.text(t),l(r,e.useParent)){var m=h.length,g=e.useParent?s(r):r[0].clientHeight;for(o?r.html(t+f):r.text(t).html(r.html()+f),r.attr("data-overflowed","true");m>c;c++)if(h.pop(),o?r.html(h.join(d)+f):r.text(h.join(d)).html(r.html()+f),(e.useParent?r.parent()[0]:r[0]).scrollHeighte[0].clientHeight}function u(){(a.lastWindowResizeWidth!=window.innerWidth||a.lastWindowResizeHeight!=window.innerHeight)&&c(),a.lastWindowResizeWidth=window.innerWidth,a.lastWindowResizeHeight=window.innerHeight}function d(){o.add(u)}a.lastWindowResizeTime=0,a.lastWindowResizeWidth=0,a.lastWindowResizeHeight=0,a.lastWindowTimeoutEvent=null,a.isTruncated=!1,e.$watch("ngBind",function(){i.add(c)}),e.$watch("ngBindHtml",function(){i.add(c)}),e.$watch("ellipsisAppend",function(){c()}),e.$watch(function(){return 0!=r[0].offsetWidth&&0!=r[0].offsetHeight},function(){o.add(c)});var p=e.$on("dibari:refresh-ellipsis",function(){i.add(c)}),f=angular.element(t);f.bind("resize",d),e.$on("$destroy",function(){f.unbind("resize",d),i.remove(c),o.remove(u),p&&(p(),p=null)})}}}}])},{}],141:[function(require,module,exports){!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.PUBNUB=t():e.PUBNUB=t()}(this,function(){return function(e){function t(r){if(n[r])return n[r].exports;var i=n[r]={exports:{},id:r,loaded:!1};return e[r].call(i.exports,i,i.exports,t),i.loaded=!0,i.exports}var n={};return t.m=e,t.c=n,t.p="",t(0)}([function(e,t,n){function r(e,t){var n=g.HmacSHA256(e,t);return n.toString(g.enc.Base64)}function i(e){return document.getElementById(e)}function o(){}function a(e,t){var n=[];return b.each(e.split(/\s+/),function(e){b.each((t||document).getElementsByTagName(e),function(e){n.push(e)})}),n}function s(e,t,n){b.each(e.split(","),function(e){var r=function(e){e||(e=window.event),n(e)||(e.cancelBubble=!0,e.preventDefault&&e.preventDefault(),e.stopPropagation&&e.stopPropagation())};t.addEventListener?t.addEventListener(e,r,!1):t.attachEvent?t.attachEvent("on"+e,r):t["on"+e]=r})}function c(){return a("head")[0]}function l(e,t,n){return n?(e.setAttribute(t,n),void 0):e&&e.getAttribute&&e.getAttribute(t)}function u(e,t){for(var n in t)if(t.hasOwnProperty(n))try{e.style[n]=t[n]+("|width|height|top|left|".indexOf(n)>0&&"number"==typeof t[n]?"px":"")}catch(r){return}}function d(e){return document.createElement(e)}function p(e){var t,n,r=0,i=0,o=!0,a=e.timeout||b.DEF_TIMEOUT,s=e.data||{},c=e.fail||function(){},l=e.success||function(){},u=function(){if(!i){var e;i=1,clearTimeout(n);try{e=JSON.parse(t.responseText)}catch(r){return d(1)}l(e)}},d=function(e,i){r||(r=1,clearTimeout(n),t&&(t.onerror=t.onload=null,t.abort&&t.abort(),t=null),e&&c(i))};n=b.timeout(function(){d(1)},a);try{t="undefined"!=typeof XDomainRequest&&new XDomainRequest||new XMLHttpRequest,t.onerror=t.onabort=function(){d(1,t.responseText||{error:"Network Connection Error"})},t.onload=t.onloadend=u,t.onreadystatechange=function(){if(t&&4===t.readyState)switch(t.status){case 200:break;default:try{var e=JSON.parse(t.responseText);d(1,e)}catch(n){return d(1,{status:t.status,payload:null,message:t.responseText})}return}},s.pnsdk=M;var p=b.build_url(e.url,s);t.open("GET",p,o),o&&(t.timeout=a),t.send()}catch(f){d(1,{error:"XHR Failed",stacktrace:f})}return d}function f(){if(!("onLine"in navigator))return 1;try{return navigator.onLine}catch(e){return!0}}function h(e){return"sendBeacon"in navigator?navigator.sendBeacon(e):!1}n(1);var m=n(2),g=n(3),v=n(4),b=n(5),y=n(6),M="PubNub-JS-Web/"+v.version;window.console||(window.console=window.console||{}),console.log||(console.log=console.error=(window.opera||{}).postError||function(){});var w=function(){var e={},t=!1;try{t=window.localStorage}catch(n){return}var r=function(e){return-1===document.cookie.indexOf(e)?null:((document.cookie||"").match(RegExp(e+"=([^;]+)"))||[])[1]||null},i=function(e,t){document.cookie=e+"="+t+"; expires=Thu, 1 Aug 2030 20:00:00 UTC; path=/"},o=function(){try{return i("pnctest","1"),"1"===r("pnctest")}catch(e){return!1}}();return{get:function(n){try{return t?t.getItem(n):o?r(n):e[n]}catch(i){return e[n]}},set:function(n,r){try{if(t)return t.setItem(n,r)&&0;o&&i(n,r),e[n]=r}catch(a){e[n]=r}}}}(),A={list:{},unbind:function(e){A.list[e]=[]},bind:function(e,t){(A.list[e]=A.list[e]||[]).push(t)},fire:function(e,t){b.each(A.list[e]||[],function(e){e(t)})}},x=function(e){var t=e.leave_on_unload||0;e.xdr=p,e.db=w,e.error=e.error||o,e._is_online=f,e.hmac_SHA256=r,e.crypto_obj=m(),e.sendBeacon=h,e.params={pnsdk:M};var n=function(e){return x(e)},g=b.PN_API(e);for(var v in g)g.hasOwnProperty(v)&&(n[v]=g[v]);return n.css=u,n.$=i,n.create=d,n.bind=s,n.head=c,n.search=a,n.attr=l,n.events=A,n.init=n,n.secure=n,n.crypto_obj=m(),n.WS=y,n.PNmessage=b.PNmessage,s("beforeunload",window,function(){return t&&n["each-channel"](function(e){n.LEAVE(e.name,0)}),!0}),n.ready(),e.notest?n:(s("offline",window,n.offline),s("offline",document,n.offline),n)};x.init=x,x.secure=x,x.crypto_obj=m(),x.WS=y,x.db=w,x.PNmessage=b.PNmessage,x.uuid=b.uuid,x.css=u,x.$=i,x.create=i,x.bind=s,x.head=c,x.search=a,x.attr=l,x.events=A,x.map=b.map,x.each=b.each,x.grep=b.grep,x.supplent=b.supplant,x.now=b.now,x.unique=b.unique,x.updater=b.updater,window.jQuery&&(window.jQuery.PUBNUB=x),e.exports=x},function(module,exports){(function(){window.JSON&&window.JSON.stringify||function(){function toJSON(){try{return this.valueOf()}catch(e){return null}}function quote(e){return escapable.lastIndex=0,escapable.test(e)?'"'+e.replace(escapable,function(e){var t=meta[e];return"string"==typeof t?t:"\\u"+("0000"+e.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+e+'"'}function str(e,t){var n,r,i,o,a,s=gap,c=t[e];switch(c&&"object"==typeof c&&(c=toJSON.call(c,e)),"function"==typeof rep&&(c=rep.call(t,e,c)),typeof c){case"string":return quote(c);case"number":return isFinite(c)?String(c):"null";case"boolean":case"null":return String(c);case"object":if(!c)return"null";if(gap+=indent,a=[],"[object Array]"===Object.prototype.toString.apply(c)){for(o=c.length,n=0;o>n;n+=1)a[n]=str(n,c)||"null";return i=0===a.length?"[]":gap?"[\n"+gap+a.join(",\n"+gap)+"\n"+s+"]":"["+a.join(",")+"]",gap=s,i}if(rep&&"object"==typeof rep)for(o=rep.length,n=0;o>n;n+=1)r=rep[n],"string"==typeof r&&(i=str(r,c),i&&a.push(quote(r)+(gap?": ":":")+i));else for(r in c)Object.hasOwnProperty.call(c,r)&&(i=str(r,c),i&&a.push(quote(r)+(gap?": ":":")+i));return i=0===a.length?"{}":gap?"{\n"+gap+a.join(",\n"+gap)+"\n"+s+"}":"{"+a.join(",")+"}",gap=s,i}}window.JSON||(window.JSON={});var cx=/[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,escapable=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,gap,indent,meta={"\b":"\\b"," ":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},rep;"function"!=typeof JSON.stringify&&(JSON.stringify=function(e,t,n){var r;if(gap="",indent="","number"==typeof n)for(r=0;n>r;r+=1)indent+=" ";else"string"==typeof n&&(indent=n);if(rep=t,t&&"function"!=typeof t&&("object"!=typeof t||"number"!=typeof t.length))throw new Error("JSON.stringify");return str("",{"":e})}),"function"!=typeof JSON.parse&&(JSON.parse=function(text){return eval("("+text+")")})}()}).call(window)},function(e,t,n){function r(){function e(e){return i.SHA256(e).toString(i.enc.Hex)}function t(e){return e=e||{},e.hasOwnProperty("encryptKey")||(e.encryptKey=d.encryptKey),e.hasOwnProperty("keyEncoding")||(e.keyEncoding=d.keyEncoding),e.hasOwnProperty("keyLength")||(e.keyLength=d.keyLength),e.hasOwnProperty("mode")||(e.mode=d.mode),-1==c.indexOf(e.keyEncoding.toLowerCase())&&(e.keyEncoding=d.keyEncoding),-1==l.indexOf(parseInt(e.keyLength,10))&&(e.keyLength=d.keyLength),-1==u.indexOf(e.mode.toLowerCase())&&(e.mode=d.mode),e}function n(e,t){return"base64"===t.keyEncoding?i.enc.Base64.parse(e):"hex"===t.keyEncoding?i.enc.Hex.parse(e):e}function r(t,r){return t=n(t,r),r.encryptKey?i.enc.Utf8.parse(e(t).slice(0,32)):t}function o(e){return"ecb"===e.mode?i.mode.ECB:i.mode.CBC}function a(e){return"cbc"===e.mode?i.enc.Utf8.parse(s):null}var s="0123456789012345",c=["hex","utf8","base64","binary"],l=[128,256],u=["ecb","cbc"],d={encryptKey:!0,keyEncoding:"utf8",keyLength:256,mode:"cbc"};return{encrypt:function(e,n,s){if(!n)return e;s=t(s);var c=a(s),l=o(s),u=r(n,s),d=JSON.stringify(e),p=i.AES.encrypt(d,u,{iv:c,mode:l}).ciphertext,f=p.toString(i.enc.Base64);return f||e},decrypt:function(e,n,s){if(!n)return e;s=t(s);var c=a(s),l=o(s),u=r(n,s);try{var d=i.enc.Base64.parse(e),p=i.AES.decrypt({ciphertext:d},u,{iv:c,mode:l}).toString(i.enc.Utf8),f=JSON.parse(p);return f}catch(h){return void 0}}}}var i=n(3);e.exports=r},function(e){var t=t||function(e,t){var n={},r=n.lib={},i=function(){},o=r.Base={extend:function(e){i.prototype=this;var t=new i;return e&&t.mixIn(e),t.hasOwnProperty("init")||(t.init=function(){t.$super.init.apply(this,arguments)}),t.init.prototype=t,t.$super=this,t},create:function(){var e=this.extend();return e.init.apply(e,arguments),e},init:function(){},mixIn:function(e){for(var t in e)e.hasOwnProperty(t)&&(this[t]=e[t]);e.hasOwnProperty("toString")&&(this.toString=e.toString)},clone:function(){return this.init.prototype.extend(this)}},a=r.WordArray=o.extend({init:function(e,n){e=this.words=e||[],this.sigBytes=n!=t?n:4*e.length},toString:function(e){return(e||c).stringify(this)},concat:function(e){var t=this.words,n=e.words,r=this.sigBytes;if(e=e.sigBytes,this.clamp(),r%4)for(var i=0;e>i;i++)t[r+i>>>2]|=(n[i>>>2]>>>24-8*(i%4)&255)<<24-8*((r+i)%4);else if(65535i;i+=4)t[r+i>>>2]=n[i>>>2];else t.push.apply(t,n);return this.sigBytes+=e,this},clamp:function(){var t=this.words,n=this.sigBytes;t[n>>>2]&=4294967295<<32-8*(n%4),t.length=e.ceil(n/4)},clone:function(){var e=o.clone.call(this);return e.words=this.words.slice(0),e},random:function(t){for(var n=[],r=0;t>r;r+=4)n.push(4294967296*e.random()|0);return new a.init(n,t)}}),s=n.enc={},c=s.Hex={stringify:function(e){var t=e.words;e=e.sigBytes;for(var n=[],r=0;e>r;r++){var i=t[r>>>2]>>>24-8*(r%4)&255;n.push((i>>>4).toString(16)),n.push((15&i).toString(16))}return n.join("")},parse:function(e){for(var t=e.length,n=[],r=0;t>r;r+=2)n[r>>>3]|=parseInt(e.substr(r,2),16)<<24-4*(r%8);return new a.init(n,t/2)}},l=s.Latin1={stringify:function(e){var t=e.words;e=e.sigBytes;for(var n=[],r=0;e>r;r++)n.push(String.fromCharCode(t[r>>>2]>>>24-8*(r%4)&255));return n.join("")},parse:function(e){for(var t=e.length,n=[],r=0;t>r;r++)n[r>>>2]|=(255&e.charCodeAt(r))<<24-8*(r%4);return new a.init(n,t)}},u=s.Utf8={stringify:function(e){try{return decodeURIComponent(escape(l.stringify(e)))}catch(t){throw Error("Malformed UTF-8 data")}},parse:function(e){return l.parse(unescape(encodeURIComponent(e)))}},d=r.BufferedBlockAlgorithm=o.extend({reset:function(){this._data=new a.init,this._nDataBytes=0},_append:function(e){"string"==typeof e&&(e=u.parse(e)),this._data.concat(e),this._nDataBytes+=e.sigBytes},_process:function(t){var n=this._data,r=n.words,i=n.sigBytes,o=this.blockSize,s=i/(4*o),s=t?e.ceil(s):e.max((0|s)-this._minBufferSize,0);if(t=s*o,i=e.min(4*t,i),t){for(var c=0;t>c;c+=o)this._doProcessBlock(r,c);c=r.splice(0,t),n.sigBytes-=i}return new a.init(c,i)},clone:function(){var e=o.clone.call(this);return e._data=this._data.clone(),e},_minBufferSize:0});r.Hasher=d.extend({cfg:o.extend(),init:function(e){this.cfg=this.cfg.extend(e),this.reset()},reset:function(){d.reset.call(this),this._doReset()},update:function(e){return this._append(e),this._process(),this},finalize:function(e){return e&&this._append(e),this._doFinalize()},blockSize:16,_createHelper:function(e){return function(t,n){return new e.init(n).finalize(t)}},_createHmacHelper:function(e){return function(t,n){return new p.HMAC.init(e,n).finalize(t)}}});var p=n.algo={};return n}(Math);!function(e){for(var n=t,r=n.lib,i=r.WordArray,o=r.Hasher,r=n.algo,a=[],s=[],c=function(e){return 4294967296*(e-(0|e))|0},l=2,u=0;64>u;){var d;e:{d=l;for(var p=e.sqrt(d),f=2;p>=f;f++)if(!(d%f)){d=!1;break e}d=!0}d&&(8>u&&(a[u]=c(e.pow(l,.5))),s[u]=c(e.pow(l,1/3)),u++),l++}var h=[],r=r.SHA256=o.extend({_doReset:function(){this._hash=new i.init(a.slice(0))},_doProcessBlock:function(e,t){for(var n=this._hash.words,r=n[0],i=n[1],o=n[2],a=n[3],c=n[4],l=n[5],u=n[6],d=n[7],p=0;64>p;p++){if(16>p)h[p]=0|e[t+p];else{var f=h[p-15],m=h[p-2];h[p]=((f<<25|f>>>7)^(f<<14|f>>>18)^f>>>3)+h[p-7]+((m<<15|m>>>17)^(m<<13|m>>>19)^m>>>10)+h[p-16]}f=d+((c<<26|c>>>6)^(c<<21|c>>>11)^(c<<7|c>>>25))+(c&l^~c&u)+s[p]+h[p],m=((r<<30|r>>>2)^(r<<19|r>>>13)^(r<<10|r>>>22))+(r&i^r&o^i&o),d=u,u=l,l=c,c=a+f|0,a=o,o=i,i=r,r=f+m|0}n[0]=n[0]+r|0,n[1]=n[1]+i|0,n[2]=n[2]+o|0,n[3]=n[3]+a|0,n[4]=n[4]+c|0,n[5]=n[5]+l|0,n[6]=n[6]+u|0,n[7]=n[7]+d|0},_doFinalize:function(){var t=this._data,n=t.words,r=8*this._nDataBytes,i=8*t.sigBytes;return n[i>>>5]|=128<<24-i%32,n[(i+64>>>9<<4)+14]=e.floor(r/4294967296),n[(i+64>>>9<<4)+15]=r,t.sigBytes=4*n.length,this._process(),this._hash},clone:function(){var e=o.clone.call(this);return e._hash=this._hash.clone(),e}});n.SHA256=o._createHelper(r),n.HmacSHA256=o._createHmacHelper(r)}(Math),function(){var e=t,n=e.enc.Utf8;e.algo.HMAC=e.lib.Base.extend({init:function(e,t){e=this._hasher=new e.init,"string"==typeof t&&(t=n.parse(t));var r=e.blockSize,i=4*r;t.sigBytes>i&&(t=e.finalize(t)),t.clamp();for(var o=this._oKey=t.clone(),a=this._iKey=t.clone(),s=o.words,c=a.words,l=0;r>l;l++)s[l]^=1549556828,c[l]^=909522486;o.sigBytes=a.sigBytes=i,this.reset()},reset:function(){var e=this._hasher;e.reset(),e.update(this._iKey)},update:function(e){return this._hasher.update(e),this},finalize:function(e){var t=this._hasher;return e=t.finalize(e),t.reset(),t.finalize(this._oKey.clone().concat(e))}})}(),function(){var e=t,n=e.lib.WordArray;e.enc.Base64={stringify:function(e){var t=e.words,n=e.sigBytes,r=this._map;e.clamp(),e=[];for(var i=0;n>i;i+=3)for(var o=(t[i>>>2]>>>24-8*(i%4)&255)<<16|(t[i+1>>>2]>>>24-8*((i+1)%4)&255)<<8|t[i+2>>>2]>>>24-8*((i+2)%4)&255,a=0;4>a&&n>i+.75*a;a++)e.push(r.charAt(o>>>6*(3-a)&63));if(t=r.charAt(64))for(;e.length%4;)e.push(t);return e.join("")},parse:function(e){var t=e.length,r=this._map,i=r.charAt(64);i&&(i=e.indexOf(i),-1!=i&&(t=i));for(var i=[],o=0,a=0;t>a;a++)if(a%4){var s=r.indexOf(e.charAt(a-1))<<2*(a%4),c=r.indexOf(e.charAt(a))>>>6-2*(a%4);i[o>>>2]|=(s|c)<<24-8*(o%4),o++}return n.create(i,o)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="}}(),function(e){function n(e,t,n,r,i,o,a){return e=e+(t&n|~t&r)+i+a,(e<>>32-o)+t}function r(e,t,n,r,i,o,a){return e=e+(t&r|n&~r)+i+a,(e<>>32-o)+t}function i(e,t,n,r,i,o,a){return e=e+(t^n^r)+i+a,(e<>>32-o)+t}function o(e,t,n,r,i,o,a){return e=e+(n^(t|~r))+i+a,(e<>>32-o)+t}for(var a=t,s=a.lib,c=s.WordArray,l=s.Hasher,s=a.algo,u=[],d=0;64>d;d++)u[d]=4294967296*e.abs(e.sin(d+1))|0;s=s.MD5=l.extend({_doReset:function(){this._hash=new c.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(e,t){for(var a=0;16>a;a++){var s=t+a,c=e[s];e[s]=16711935&(c<<8|c>>>24)|4278255360&(c<<24|c>>>8)}var a=this._hash.words,s=e[t+0],c=e[t+1],l=e[t+2],d=e[t+3],p=e[t+4],f=e[t+5],h=e[t+6],m=e[t+7],g=e[t+8],v=e[t+9],b=e[t+10],y=e[t+11],M=e[t+12],w=e[t+13],A=e[t+14],x=e[t+15],k=a[0],_=a[1],S=a[2],$=a[3],k=n(k,_,S,$,s,7,u[0]),$=n($,k,_,S,c,12,u[1]),S=n(S,$,k,_,l,17,u[2]),_=n(_,S,$,k,d,22,u[3]),k=n(k,_,S,$,p,7,u[4]),$=n($,k,_,S,f,12,u[5]),S=n(S,$,k,_,h,17,u[6]),_=n(_,S,$,k,m,22,u[7]),k=n(k,_,S,$,g,7,u[8]),$=n($,k,_,S,v,12,u[9]),S=n(S,$,k,_,b,17,u[10]),_=n(_,S,$,k,y,22,u[11]),k=n(k,_,S,$,M,7,u[12]),$=n($,k,_,S,w,12,u[13]),S=n(S,$,k,_,A,17,u[14]),_=n(_,S,$,k,x,22,u[15]),k=r(k,_,S,$,c,5,u[16]),$=r($,k,_,S,h,9,u[17]),S=r(S,$,k,_,y,14,u[18]),_=r(_,S,$,k,s,20,u[19]),k=r(k,_,S,$,f,5,u[20]),$=r($,k,_,S,b,9,u[21]),S=r(S,$,k,_,x,14,u[22]),_=r(_,S,$,k,p,20,u[23]),k=r(k,_,S,$,v,5,u[24]),$=r($,k,_,S,A,9,u[25]),S=r(S,$,k,_,d,14,u[26]),_=r(_,S,$,k,g,20,u[27]),k=r(k,_,S,$,w,5,u[28]),$=r($,k,_,S,l,9,u[29]),S=r(S,$,k,_,m,14,u[30]),_=r(_,S,$,k,M,20,u[31]),k=i(k,_,S,$,f,4,u[32]),$=i($,k,_,S,g,11,u[33]),S=i(S,$,k,_,y,16,u[34]),_=i(_,S,$,k,A,23,u[35]),k=i(k,_,S,$,c,4,u[36]),$=i($,k,_,S,p,11,u[37]),S=i(S,$,k,_,m,16,u[38]),_=i(_,S,$,k,b,23,u[39]),k=i(k,_,S,$,w,4,u[40]),$=i($,k,_,S,s,11,u[41]),S=i(S,$,k,_,d,16,u[42]),_=i(_,S,$,k,h,23,u[43]),k=i(k,_,S,$,v,4,u[44]),$=i($,k,_,S,M,11,u[45]),S=i(S,$,k,_,x,16,u[46]),_=i(_,S,$,k,l,23,u[47]),k=o(k,_,S,$,s,6,u[48]),$=o($,k,_,S,m,10,u[49]),S=o(S,$,k,_,A,15,u[50]),_=o(_,S,$,k,f,21,u[51]),k=o(k,_,S,$,M,6,u[52]),$=o($,k,_,S,d,10,u[53]),S=o(S,$,k,_,b,15,u[54]),_=o(_,S,$,k,c,21,u[55]),k=o(k,_,S,$,g,6,u[56]),$=o($,k,_,S,x,10,u[57]),S=o(S,$,k,_,h,15,u[58]),_=o(_,S,$,k,w,21,u[59]),k=o(k,_,S,$,p,6,u[60]),$=o($,k,_,S,y,10,u[61]),S=o(S,$,k,_,l,15,u[62]),_=o(_,S,$,k,v,21,u[63]);a[0]=a[0]+k|0,a[1]=a[1]+_|0,a[2]=a[2]+S|0,a[3]=a[3]+$|0},_doFinalize:function(){var t=this._data,n=t.words,r=8*this._nDataBytes,i=8*t.sigBytes;n[i>>>5]|=128<<24-i%32;var o=e.floor(r/4294967296);for(n[(i+64>>>9<<4)+15]=16711935&(o<<8|o>>>24)|4278255360&(o<<24|o>>>8),n[(i+64>>>9<<4)+14]=16711935&(r<<8|r>>>24)|4278255360&(r<<24|r>>>8),t.sigBytes=4*(n.length+1),this._process(),t=this._hash,n=t.words,r=0;4>r;r++)i=n[r],n[r]=16711935&(i<<8|i>>>24)|4278255360&(i<<24|i>>>8);return t},clone:function(){var e=l.clone.call(this);return e._hash=this._hash.clone(),e}}),a.MD5=l._createHelper(s),a.HmacMD5=l._createHmacHelper(s)}(Math),function(){var e=t,n=e.lib,r=n.Base,i=n.WordArray,n=e.algo,o=n.EvpKDF=r.extend({cfg:r.extend({keySize:4,hasher:n.MD5,iterations:1}),init:function(e){this.cfg=this.cfg.extend(e)},compute:function(e,t){for(var n=this.cfg,r=n.hasher.create(),o=i.create(),a=o.words,s=n.keySize,n=n.iterations;a.lengthl;l++)c=r.finalize(c),r.reset();o.concat(c)}return o.sigBytes=4*s,o}});e.EvpKDF=function(e,t,n){return o.create(n).compute(e,t)}}(),t.lib.Cipher||function(e){var n=t,r=n.lib,i=r.Base,o=r.WordArray,a=r.BufferedBlockAlgorithm,s=n.enc.Base64,c=n.algo.EvpKDF,l=r.Cipher=a.extend({cfg:i.extend(),createEncryptor:function(e,t){return this.create(this._ENC_XFORM_MODE,e,t) },createDecryptor:function(e,t){return this.create(this._DEC_XFORM_MODE,e,t)},init:function(e,t,n){this.cfg=this.cfg.extend(n),this._xformMode=e,this._key=t,this.reset()},reset:function(){a.reset.call(this),this._doReset()},process:function(e){return this._append(e),this._process()},finalize:function(e){return e&&this._append(e),this._doFinalize()},keySize:4,ivSize:4,_ENC_XFORM_MODE:1,_DEC_XFORM_MODE:2,_createHelper:function(e){return{encrypt:function(t,n,r){return("string"==typeof n?m:h).encrypt(e,t,n,r)},decrypt:function(t,n,r){return("string"==typeof n?m:h).decrypt(e,t,n,r)}}}});r.StreamCipher=l.extend({_doFinalize:function(){return this._process(!0)},blockSize:1});var u=n.mode={},d=function(t,n,r){var i=this._iv;i?this._iv=e:i=this._prevBlock;for(var o=0;r>o;o++)t[n+o]^=i[o]},p=(r.BlockCipherMode=i.extend({createEncryptor:function(e,t){return this.Encryptor.create(e,t)},createDecryptor:function(e,t){return this.Decryptor.create(e,t)},init:function(e,t){this._cipher=e,this._iv=t}})).extend();p.Encryptor=p.extend({processBlock:function(e,t){var n=this._cipher,r=n.blockSize;d.call(this,e,t,r),n.encryptBlock(e,t),this._prevBlock=e.slice(t,t+r)}}),p.Decryptor=p.extend({processBlock:function(e,t){var n=this._cipher,r=n.blockSize,i=e.slice(t,t+r);n.decryptBlock(e,t),d.call(this,e,t,r),this._prevBlock=i}}),u=u.CBC=p,p=(n.pad={}).Pkcs7={pad:function(e,t){for(var n=4*t,n=n-e.sigBytes%n,r=n<<24|n<<16|n<<8|n,i=[],a=0;n>a;a+=4)i.push(r);n=o.create(i,n),e.concat(n)},unpad:function(e){e.sigBytes-=255&e.words[e.sigBytes-1>>>2]}},r.BlockCipher=l.extend({cfg:l.cfg.extend({mode:u,padding:p}),reset:function(){l.reset.call(this);var e=this.cfg,t=e.iv,e=e.mode;if(this._xformMode==this._ENC_XFORM_MODE)var n=e.createEncryptor;else n=e.createDecryptor,this._minBufferSize=1;this._mode=n.call(e,this,t&&t.words)},_doProcessBlock:function(e,t){this._mode.processBlock(e,t)},_doFinalize:function(){var e=this.cfg.padding;if(this._xformMode==this._ENC_XFORM_MODE){e.pad(this._data,this.blockSize);var t=this._process(!0)}else t=this._process(!0),e.unpad(t);return t},blockSize:4});var f=r.CipherParams=i.extend({init:function(e){this.mixIn(e)},toString:function(e){return(e||this.formatter).stringify(this)}}),u=(n.format={}).OpenSSL={stringify:function(e){var t=e.ciphertext;return e=e.salt,(e?o.create([1398893684,1701076831]).concat(e).concat(t):t).toString(s)},parse:function(e){e=s.parse(e);var t=e.words;if(1398893684==t[0]&&1701076831==t[1]){var n=o.create(t.slice(2,4));t.splice(0,4),e.sigBytes-=16}return f.create({ciphertext:e,salt:n})}},h=r.SerializableCipher=i.extend({cfg:i.extend({format:u}),encrypt:function(e,t,n,r){r=this.cfg.extend(r);var i=e.createEncryptor(n,r);return t=i.finalize(t),i=i.cfg,f.create({ciphertext:t,key:n,iv:i.iv,algorithm:e,mode:i.mode,padding:i.padding,blockSize:e.blockSize,formatter:r.format})},decrypt:function(e,t,n,r){return r=this.cfg.extend(r),t=this._parse(t,r.format),e.createDecryptor(n,r).finalize(t.ciphertext)},_parse:function(e,t){return"string"==typeof e?t.parse(e,this):e}}),n=(n.kdf={}).OpenSSL={execute:function(e,t,n,r){return r||(r=o.random(8)),e=c.create({keySize:t+n}).compute(e,r),n=o.create(e.words.slice(t),4*n),e.sigBytes=4*t,f.create({key:e,iv:n,salt:r})}},m=r.PasswordBasedCipher=h.extend({cfg:h.cfg.extend({kdf:n}),encrypt:function(e,t,n,r){return r=this.cfg.extend(r),n=r.kdf.execute(n,e.keySize,e.ivSize),r.iv=n.iv,e=h.encrypt.call(this,e,t,n.key,r),e.mixIn(n),e},decrypt:function(e,t,n,r){return r=this.cfg.extend(r),t=this._parse(t,r.format),n=r.kdf.execute(n,e.keySize,e.ivSize,t.salt),r.iv=n.iv,h.decrypt.call(this,e,t,n.key,r)}})}(),function(){for(var e=t,n=e.lib.BlockCipher,r=e.algo,i=[],o=[],a=[],s=[],c=[],l=[],u=[],d=[],p=[],f=[],h=[],m=0;256>m;m++)h[m]=128>m?m<<1:m<<1^283;for(var g=0,v=0,m=0;256>m;m++){var b=v^v<<1^v<<2^v<<3^v<<4,b=b>>>8^255&b^99;i[g]=b,o[b]=g;var y=h[g],M=h[y],w=h[M],A=257*h[b]^16843008*b;a[g]=A<<24|A>>>8,s[g]=A<<16|A>>>16,c[g]=A<<8|A>>>24,l[g]=A,A=16843009*w^65537*M^257*y^16843008*g,u[b]=A<<24|A>>>8,d[b]=A<<16|A>>>16,p[b]=A<<8|A>>>24,f[b]=A,g?(g=y^h[h[h[w^y]]],v^=h[h[v]]):g=v=1}var x=[0,1,2,4,8,16,32,64,128,27,54],r=r.AES=n.extend({_doReset:function(){for(var e=this._key,t=e.words,n=e.sigBytes/4,e=4*((this._nRounds=n+6)+1),r=this._keySchedule=[],o=0;e>o;o++)if(n>o)r[o]=t[o];else{var a=r[o-1];o%n?n>6&&4==o%n&&(a=i[a>>>24]<<24|i[a>>>16&255]<<16|i[a>>>8&255]<<8|i[255&a]):(a=a<<8|a>>>24,a=i[a>>>24]<<24|i[a>>>16&255]<<16|i[a>>>8&255]<<8|i[255&a],a^=x[o/n|0]<<24),r[o]=r[o-n]^a}for(t=this._invKeySchedule=[],n=0;e>n;n++)o=e-n,a=n%4?r[o]:r[o-4],t[n]=4>n||4>=o?a:u[i[a>>>24]]^d[i[a>>>16&255]]^p[i[a>>>8&255]]^f[i[255&a]]},encryptBlock:function(e,t){this._doCryptBlock(e,t,this._keySchedule,a,s,c,l,i)},decryptBlock:function(e,t){var n=e[t+1];e[t+1]=e[t+3],e[t+3]=n,this._doCryptBlock(e,t,this._invKeySchedule,u,d,p,f,o),n=e[t+1],e[t+1]=e[t+3],e[t+3]=n},_doCryptBlock:function(e,t,n,r,i,o,a,s){for(var c=this._nRounds,l=e[t]^n[0],u=e[t+1]^n[1],d=e[t+2]^n[2],p=e[t+3]^n[3],f=4,h=1;c>h;h++)var m=r[l>>>24]^i[u>>>16&255]^o[d>>>8&255]^a[255&p]^n[f++],g=r[u>>>24]^i[d>>>16&255]^o[p>>>8&255]^a[255&l]^n[f++],v=r[d>>>24]^i[p>>>16&255]^o[l>>>8&255]^a[255&u]^n[f++],p=r[p>>>24]^i[l>>>16&255]^o[u>>>8&255]^a[255&d]^n[f++],l=m,u=g,d=v;m=(s[l>>>24]<<24|s[u>>>16&255]<<16|s[d>>>8&255]<<8|s[255&p])^n[f++],g=(s[u>>>24]<<24|s[d>>>16&255]<<16|s[p>>>8&255]<<8|s[255&l])^n[f++],v=(s[d>>>24]<<24|s[p>>>16&255]<<16|s[l>>>8&255]<<8|s[255&u])^n[f++],p=(s[p>>>24]<<24|s[l>>>16&255]<<16|s[u>>>8&255]<<8|s[255&d])^n[f++],e[t]=m,e[t+1]=g,e[t+2]=v,e[t+3]=p},keySize:8});e.AES=n._createHelper(r)}(),t.mode.ECB=function(){var e=t.lib.BlockCipherMode.extend();return e.Encryptor=e.extend({processBlock:function(e,t){this._cipher.encryptBlock(e,t)}}),e.Decryptor=e.extend({processBlock:function(e,t){this._cipher.decryptBlock(e,t)}}),e}(),e.exports=t},function(e){e.exports={name:"pubnub",preferGlobal:!1,version:"3.10.2",author:"PubNub ",description:"Publish & Subscribe Real-time Messaging with PubNub",contributors:[{name:"Stephen Blum",email:"stephen@pubnub.com"}],bin:{},scripts:{test:"grunt test --force"},main:"./node.js/pubnub.js",browser:"./modern/dist/pubnub.js",repository:{type:"git",url:"git://github.com/pubnub/javascript.git"},keywords:["cloud","publish","subscribe","websockets","comet","bosh","xmpp","real-time","messaging"],dependencies:{agentkeepalive:"~0.2",lodash:"^4.1.0"},noAnalyze:!1,devDependencies:{chai:"^3.5.0",eslint:"^1.10.3","eslint-config-airbnb":"^5.0.0","eslint-plugin-mocha":"^1.1.0","eslint-plugin-react":"^3.16.1",grunt:"^0.4.5","grunt-contrib-clean":"^0.6.0","grunt-contrib-uglify":"^0.11.1","grunt-env":"^0.4.4","grunt-eslint":"^17.3.1","grunt-karma":"^0.12.1","grunt-mocha-istanbul":"^3.0.1","grunt-text-replace":"^0.4.0","grunt-webpack":"^1.0.11","imports-loader":"^0.6.5",istanbul:"^0.4.2","json-loader":"^0.5.4",karma:"^0.13.21","karma-chai":"^0.1.0","karma-mocha":"^0.2.1","karma-phantomjs-launcher":"^1.0.0","karma-spec-reporter":"0.0.24","load-grunt-tasks":"^3.4.0",mocha:"^2.1.0",nock:"^1.1.0","node-uuid":"^1.4.7",nodeunit:"^0.9.0","phantomjs-prebuilt":"^2.1.4",sinon:"^1.17.2","uglify-js":"^2.6.1",underscore:"^1.7.0",webpack:"^1.12.13"},bundleDependencies:[],license:"MIT",engine:{node:">=0.8"},files:["core","node.js","modern","CHANGELOG","FUTURE.md","LICENSE","README.md"]}},function(e,t,r){function i(){return"x"+ ++x+ +new Date}function o(){return+new Date}function a(e,t){var n=e.join(L),r=[];return t?(f(t,function(e,t){var n="object"==typeof t?JSON.stringify(t):t;"undefined"!=typeof t&&null!=t&&g(n).length>0&&r.push(e+"="+g(n))}),n+="?"+r.join(B)):n}function s(e,t){var n,r=0,i=function(){r+t>o()?(clearTimeout(n),n=setTimeout(i,t)):(r=o(),e())};return i}function c(e,t){var n=[];return f(e||[],function(e){t(e)&&n.push(e)}),n}function l(e,t){return e.replace(P,function(e,n){return t[n]||e})}function u(e,t){return setTimeout(e,t)}function d(e){var t="xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(e){var t=16*Math.random()|0,n="x"==e?t:3&t|8;return n.toString(16)});return e&&e(t),t}function p(e){return!!e&&"string"!=typeof e&&(Array.isArray&&Array.isArray(e)||"number"==typeof e.length)}function f(e,t){if(e&&t)if(p(e))for(var n=0,r=e.length;r>n;)t.call(e[n],e[n],n++);else for(var n in e)e.hasOwnProperty&&e.hasOwnProperty(n)&&t.call(e[n],n,e[n])}function h(e,t){var n=[];return f(e||[],function(e,r){n.push(t(e,r))}),n}function m(e){return encodeURIComponent(e).replace(/[!'()*~]/g,function(e){return"%"+e.charCodeAt(0).toString(16).toUpperCase()})}function g(e){return encodeURIComponent(e)}function v(e,t){var n=[];return f(e,function(e,r){t?e.search("-pnpres")<0&&r.subscribed&&n.push(e):r.subscribed&&n.push(e)}),n.sort()}function b(e,t){var n=[];return f(e,function(e,r){t?e.search("-pnpres")<0&&r.subscribed&&n.push(e):r.subscribed&&n.push(e)}),n.sort()}function y(){_||(_=1,f(S,function(e){e()}))}function M(e){return msg=e||{apns:{}},msg.getPubnubMessage=function(){var e={};if(Object.keys(msg.apns).length){e.pn_apns={aps:{alert:msg.apns.alert,badge:msg.apns.badge}};for(var t in msg.apns)e.pn_apns[t]=msg.apns[t];var n=["badge","alert"];for(var t in n)delete e.pn_apns[n[t]]}msg.gcm&&(e.pn_gcm={data:msg.gcm});for(var t in msg)e[t]=msg[t];var r=["apns","gcm","publish","channel","callback","error"];for(var t in r)delete e[r[t]];return e},msg.publish=function(){var e=msg.getPubnubMessage();msg.pubnub&&msg.channel&&msg.pubnub.publish({message:e,channel:msg.channel,callback:msg.callback,error:msg.error})},msg}function w(e){function t(e){return e||(e={}),f(Et,function(t,n){t in e||(e[t]=n)}),e}function r(e){var t=[];return f(e,function(e){t.push(e)}),t}function M(e){return r(e).sort()}function w(e){var t="",n=M(e);for(var r in n){var i=n[r];t+=i+"="+m(e[i]),r!=n.length-1&&(t+="&")}return t}function A(e,t,n){var r=!1;if("undefined"==typeof e)return t;if("number"==typeof e)r=e>N||0==e?!1:!0;else{if("boolean"==typeof e)return e?q:0;r=!0}return r?(n&&n("Presence Heartbeat value invalid. Valid range ( x > "+N+" or x = 0). Current Value : "+(t||N)),t||N):e}function x(e,t){return Ft.encrypt(e,t||It)||e}function T(e,t){return Ft.decrypt(e,t||It)||Ft.decrypt(e,It)||e}function L(){return clearTimeout(_t),!$t||$t>=500||1>$t||!v(At,!0).length&&!b(xt,!0).length?(zt=!1,void 0):(zt=!0,Ut.presence_heartbeat({callback:function(){_t=u(L,$t*E)},error:function(e){Lt&&Lt("Presence Heartbeat unable to reach Pubnub servers."+JSON.stringify(e)),_t=u(L,$t*E)}}),void 0)}function B(){!zt&&L()}function P(e){if(Tt){if(!ft.length)return}else{if(e&&(ft.sending=0),ft.sending||!ft.length)return;ft.sending=1}Ot(ft.shift())}function D(e){var t=0;return f(b(xt),function(n){var r=xt[n];r&&(t++,(e||function(){})(r))}),t}function W(e){var t=0;return f(v(At),function(n){var r=At[n];r&&(t++,(e||function(){})(r))}),t}function j(e,t,n){if("object"==typeof e){if(e.error){var r={};return e.message&&(r.message=e.message),e.payload&&(r.payload=e.payload),n&&n(r),void 0}if(e.payload)return e.next_page?t&&t(e.payload,e.next_page):t&&t(e.payload),void 0}t&&t(e)}function X(e,t){if("object"==typeof e&&e.error){var n={};return e.message&&(n.message=e.message),e.payload&&(n.payload=e.payload),t&&t(n),void 0}t&&t(e)}function F(e,n,r,i){var n=e.callback||n,o=e.error||Lt,a=Nt();i=i||{},i.auth||(i.auth=e.auth_key||ot);var s=[ut,"v1","channel-registration","sub-key",it];s.push.apply(s,r),a&&(i.callback=a),Ot({callback:a,data:t(i),success:function(e){j(e,n,o)},fail:function(e){X(e,o)},url:s})}function U(){Bt()||H(1,{error:"Offline. Please check your network settings. "}),Y&&clearTimeout(Y),Y=u(U,E)}function V(){tt&&Ut.time(function(e){K(function(){},e),e||H(1,{error:"Heartbeat failed to connect to Pubnub Servers.Please check your network settings."}),J&&clearTimeout(J),J=u(V,et)})}function H(e,t){bt&&bt(e,t),bt=null,clearTimeout(Y),clearTimeout(J)}function G(e){var t=o()-mt;return t-e/1e4}function K(e,t){function n(t){if(t){var n=t/1e4,i=(o()-r)/2;mt=o()-(n+i),e&&e(mt)}}var r=o();t&&n(t)||Ut.time(n)}var Y,J,Q=+e.windowing||z,Z=(+e.timeout||C)*E,et=(+e.keepalive||O)*E,tt=e.timecheck||0,nt=e.noleave||0,rt=e.publish_key,it=e.subscribe_key,ot=e.auth_key||"",at=e.secret_key||"",st=e.hmac_SHA256,ct=e.ssl?"s":"",lt="http"+ct+"://"+(e.origin||"pubsub.pubnub.com"),ut=R(lt),dt=R(lt),pt=function(){},ft=[],ht=!0,mt=0,gt=0,vt=0,bt=0,yt=e.restore||0,Mt=0,wt=!1,At={},xt={},kt={},_t=null,St=A(e.heartbeat||e.pnexpires||0,e.error),$t=e.heartbeat_interval||St/2-1,zt=!1,Tt=e.no_wait_for_pending,Ct=e["compatible_3.5"]||!1,Ot=e.xdr,Et=e.params||{},Lt=e.error||function(){},Bt=e._is_online||function(){return 1},Nt=e.jsonp_cb||function(){return 0},qt=e.db||{get:function(){},set:function(){}},It=e.cipher_key,Pt=e.uuid||!e.unique_uuid&&qt&&qt.get(it+"uuid")||"",Rt=e.instance_id||!1,Dt="",Wt=e.shutdown,jt="undefined"!=typeof e.use_send_beacon?e.use_send_beacon:!0,Xt=jt?e.sendBeacon:null;2===St&&($t=1);var Ft=e.crypto_obj||{encrypt:function(e){return e},decrypt:function(e){return e}},Ut={LEAVE:function(e,n,r,i,o){var s,c,l={uuid:Pt,auth:r||ot},u=R(lt),i=i||function(){},d=o||function(){},p=Nt();if(e.indexOf($)>0)return!0;if(Ct){if(!ct)return!1;if("0"==p)return!1}return nt?!1:("0"!=p&&(l.callback=p),Rt&&(l.instanceid=Dt),s=[u,"v2","presence","sub_key",it,"channel",g(e),"leave"],c=t(l),Xt&&(url_string=a(s,c),Xt(url_string))?(i&&i({status:200,action:"leave",message:"OK",service:"Presence"}),!0):(Ot({blocking:n||ct,callback:p,data:c,success:function(e){j(e,i,d)},fail:function(e){X(e,d)},url:s}),!0))},LEAVE_GROUP:function(e,n,r,i,o){var s,c,l={uuid:Pt,auth:r||ot},u=R(lt),i=i||function(){},d=o||function(){},p=Nt();if(e.indexOf($)>0)return!0;if(Ct){if(!ct)return!1;if("0"==p)return!1}return nt?!1:("0"!=p&&(l.callback=p),e&&e.length>0&&(l["channel-group"]=e),Rt&&(l.instanceid=Dt),s=[u,"v2","presence","sub_key",it,"channel",g(","),"leave"],c=t(l),Xt&&(url_string=a(s,c),Xt(url_string))?(i&&i({status:200,action:"leave",message:"OK",service:"Presence"}),!0):(Ot({blocking:n||ct,callback:p,data:c,success:function(e){j(e,i,d)},fail:function(e){X(e,d)},url:s}),!0))},set_resumed:function(e){wt=e},get_cipher_key:function(){return It},set_cipher_key:function(e){It=e},raw_encrypt:function(e,t){return x(e,t)},raw_decrypt:function(e,t){return T(e,t)},get_heartbeat:function(){return St},set_heartbeat:function(e,t){St=A(e,St,Lt),$t=t||St/2-1,2==St&&($t=1),pt(),L()},get_heartbeat_interval:function(){return $t},set_heartbeat_interval:function(e){$t=e,L()},get_version:function(){return I},getGcmMessageObject:function(e){return{data:e}},getApnsMessageObject:function(e){var t={aps:{badge:1,alert:""}};for(k in e)k[t]=e[k];return t},newPnMessage:function(){var e={};gcm&&(e.pn_gcm=gcm),apns&&(e.pn_apns=apns);for(k in n)e[k]=n[k];return e},_add_param:function(e,t){Et[e]=t},channel_group:function(e,t){var n,r,i=e.channel_group,t=t||e.callback,o=e.channels||e.channel,a=e.cloak,s=[],c={},l=e.mode||"add";if(i){var u=i.split(":");u.length>1?(n="*"===u[0]?null:u[0],r=u[1]):r=u[0]}n&&s.push("namespace")&&s.push(g(n)),s.push("channel-group"),r&&"*"!==r&&s.push(r),o?(p(o)&&(o=o.join(",")),c[l]=o,c.cloak=ht?"true":"false"):"remove"===l&&s.push("remove"),"undefined"!=typeof a&&(c.cloak=a?"true":"false"),F(e,t,s,c)},channel_group_list_groups:function(e,t){var n;n=e.namespace||e.ns||e.channel_group||null,n&&(e.channel_group=n+":*"),Ut.channel_group(e,t)},channel_group_list_channels:function(e,t){return e.channel_group?(Ut.channel_group(e,t),void 0):Lt("Missing Channel Group")},channel_group_remove_channel:function(e,t){return e.channel_group?e.channel||e.channels?(e.mode="remove",Ut.channel_group(e,t),void 0):Lt("Missing Channel"):Lt("Missing Channel Group")},channel_group_remove_group:function(e,t){return e.channel_group?e.channel?Lt("Use channel_group_remove_channel if you want to remove a channel from a group."):(e.mode="remove",Ut.channel_group(e,t),void 0):Lt("Missing Channel Group")},channel_group_add_channel:function(e,t){return e.channel_group?e.channel||e.channels?(Ut.channel_group(e,t),void 0):Lt("Missing Channel"):Lt("Missing Channel Group")},channel_group_cloak:function(e,t){return"undefined"==typeof e.cloak?(t(ht),void 0):(ht=e.cloak,Ut.channel_group(e,t),void 0)},channel_group_list_namespaces:function(e,t){var n=["namespace"];F(e,t,n)},channel_group_remove_namespace:function(e,t){var n=["namespace",e.namespace,"remove"];F(e,t,n)},history:function(e,n){var n=e.callback||n,r=e.count||e.limit||100,i=e.reverse||"false",o=e.error||function(){},a=e.auth_key||ot,s=e.cipher_key,c=e.channel,l=e.channel_group,u=e.start,d=e.end,p=e.include_token,f=e.string_message_token||!1,h={},m=Nt();return c||l?n?it?(h.stringtoken="true",h.count=r,h.reverse=i,h.auth=a,l&&(h["channel-group"]=l,c||(c=",")),m&&(h.callback=m),u&&(h.start=u),d&&(h.end=d),p&&(h.include_token="true"),f&&(h.string_message_token="true"),Ot({callback:m,data:t(h),success:function(e){if("object"==typeof e&&e.error)return o({message:e.message,payload:e.payload}),void 0;for(var t=e[0],r=[],i=0;i2&&(a.state=JSON.stringify(kt)),St&&(a.heartbeat=St),Rt&&(a.instanceid=Dt),B(),bt=Ot({timeout:x,callback:e,fail:function(e){e&&e.error&&e.service?(X(e,p),r(1)):Ut.time(function(t){!t&&X(e,p),r(t)})},data:t(a),url:[dt,"subscribe",it,g(n),e,Mt],success:function(e){if(!e||"object"==typeof e&&"error"in e&&e.error)return p(e.error),u(pt,E);if(m(e[1]),Mt=!Mt&&yt&&qt.get(it)||e[1],W(function(e){e.connected||(e.connected=1,e.connect(e.name))}),D(function(e){e.connected||(e.connected=1,e.connect(e.name))}),wt&&!yt)return Mt=0,wt=!1,qt.set(it,0),u(i,k),void 0;w&&(Mt=1e4,w=0),qt.set(it,e[1]);var t=function(){var t="",n="";e.length>3?(t=e[3],n=e[2]):t=e.length>2?e[2]:h(v(At),function(t){return h(Array(e[0].length).join(",").split(","),function(){return t})}).join(",");var r=t.split(","),i=n?n.split(","):[];return function(){var e=r.shift()||vt,t=i.shift(),n={};t?(e&&e.indexOf("-pnpres")>=0&&t.indexOf("-pnpres")<0&&(t+="-pnpres"),n=xt[t]||At[t]||{callback:function(){}}):n=At[e];var o=[n.callback||gt,e.split($)[0]];return t&&o.push(t.split($)[0]),o}}(),n=G(+e[1]);f(e[0],function(r){var i=t(),o=T(r,At[i[1]]?At[i[1]].cipher_key:null);i[0]&&i[0](o,e,i[2]||i[1],n,i[1])}),u(i,k)}})}}var a=e.channel,s=e.channel_group,n=n||e.callback,n=n||e.message,c=e.connect||function(){},l=e.reconnect||function(){},d=e.disconnect||function(){},p=e.error||p||function(){},m=e.idle||function(){},y=e.presence||0,M=e.noheresync||0,w=e.backfill||0,A=e.timetoken||0,x=e.timeout||Z,k=e.windowing||Q,z=e.state,C=e.heartbeat||e.pnexpires,O=e.heartbeat_interval,L=e.restore||yt;return ot=e.auth_key||ot,yt=L,Mt=A,a||s?n?it?((C||0===C||O||0===O)&&Ut.set_heartbeat(C,O),a&&f((a.join?a.join(","):""+a).split(","),function(r){var i=At[r]||{};At[vt=r]={name:r,connected:i.connected,disconnected:i.disconnected,subscribed:1,callback:gt=n,cipher_key:e.cipher_key,connect:c,disconnect:d,reconnect:l},z&&(kt[r]=r in z?z[r]:z),y&&(Ut.subscribe({channel:r+$,callback:y,restore:L}),i.subscribed||M||Ut.here_now({channel:r,data:t({uuid:Pt,auth:ot}),callback:function(e){f("uuids"in e?e.uuids:[],function(t){y({action:"join",uuid:t,timestamp:Math.floor(o()/1e3),occupancy:e.occupancy||1},e,r)})}}))}),s&&f((s.join?s.join(","):""+s).split(","),function(r){var i=xt[r]||{};xt[r]={name:r,connected:i.connected,disconnected:i.disconnected,subscribed:1,callback:gt=n,cipher_key:e.cipher_key,connect:c,disconnect:d,reconnect:l},y&&(Ut.subscribe({channel_group:r+$,callback:y,restore:L,auth_key:ot}),i.subscribed||M||Ut.here_now({channel_group:r,data:t({uuid:Pt,auth:ot}),callback:function(e){f("uuids"in e?e.uuids:[],function(t){y({action:"join",uuid:t,timestamp:Math.floor(o()/1e3),occupancy:e.occupancy||1},e,r)})}}))}),pt=function(){H(),u(i,k)},_?(pt(),void 0):S.push(pt)):Lt("Missing Subscribe Key"):Lt("Missing Callback"):Lt("Missing Channel")},here_now:function(e,n){var n=e.callback||n,r=e.debug,i=e.error||function(){},o=e.auth_key||ot,a=e.channel,s=e.channel_group,c=Nt(),l="uuids"in e?e.uuids:!0,u=e.state,d={uuid:Pt,auth:o};if(l||(d.disable_uuids=1),u&&(d.state=1),!n)return Lt("Missing Callback");if(!it)return Lt("Missing Subscribe Key");var p=[ut,"v2","presence","sub_key",it];a&&p.push("channel")&&p.push(g(a)),"0"!=c&&(d.callback=c),s&&(d["channel-group"]=s,!a&&p.push("channel")&&p.push(",")),Rt&&(d.instanceid=Dt),Ot({callback:c,data:t(d),success:function(e){j(e,n,i)},fail:function(e){X(e,i)},debug:r,url:p})},where_now:function(e,n){var n=e.callback||n,r=e.error||function(){},i=e.auth_key||ot,o=Nt(),a=e.uuid||Pt,s={auth:i};return n?it?("0"!=o&&(s.callback=o),Rt&&(s.instanceid=Dt),Ot({callback:o,data:t(s),success:function(e){j(e,n,r)},fail:function(e){X(e,r)},url:[ut,"v2","presence","sub_key",it,"uuid",g(a)]}),void 0):Lt("Missing Subscribe Key"):Lt("Missing Callback")},state:function(e,n){var r,n=e.callback||n||function(){},i=e.error||function(){},o=e.auth_key||ot,a=Nt(),s=e.state,c=e.uuid||Pt,l=e.channel,u=e.channel_group,d=t({auth:o});return it?c?l||u?("0"!=a&&(d.callback=a),"undefined"!=typeof l&&At[l]&&At[l].subscribed&&s&&(kt[l]=s),"undefined"!=typeof u&&xt[u]&&xt[u].subscribed&&(s&&(kt[u]=s),d["channel-group"]=u,l||(l=",")),d.state=JSON.stringify(s),Rt&&(d.instanceid=Dt),r=s?[ut,"v2","presence","sub-key",it,"channel",l,"uuid",c,"data"]:[ut,"v2","presence","sub-key",it,"channel",l,"uuid",g(c)],Ot({callback:a,data:t(d),success:function(e){j(e,n,i)},fail:function(e){X(e,i)},url:r}),void 0):Lt("Missing Channel"):Lt("Missing UUID"):Lt("Missing Subscribe Key")},grant:function(e,n){var n=e.callback||n,r=e.error||function(){},i=e.channel||e.channels,o=e.channel_group,a=Nt(),s=e.ttl,c=e.read?"1":"0",l=e.write?"1":"0",u=e.manage?"1":"0",d=e.auth_key||e.auth_keys;if(!n)return Lt("Missing Callback");if(!it)return Lt("Missing Subscribe Key");if(!rt)return Lt("Missing Publish Key");if(!at)return Lt("Missing Secret Key");var f=Math.floor((new Date).getTime()/1e3),h=it+"\n"+rt+"\ngrant\n",m={w:l,r:c,timestamp:f};e.manage&&(m.m=u),p(i)&&(i=i.join(",")),p(d)&&(d=d.join(",")),"undefined"!=typeof i&&null!=i&&i.length>0&&(m.channel=i),"undefined"!=typeof o&&null!=o&&o.length>0&&(m["channel-group"]=o),"0"!=a&&(m.callback=a),(s||0===s)&&(m.ttl=s),d&&(m.auth=d),m=t(m),d||delete m.auth,h+=w(m);var g=st(h,at);g=g.replace(/\+/g,"-"),g=g.replace(/\//g,"_"),m.signature=g,Ot({callback:a,data:m,success:function(e){j(e,n,r)},fail:function(e){X(e,r)},url:[ut,"v1","auth","grant","sub-key",it]})},mobile_gw_provision:function(e){var t,n,r=e.callback||function(){},i=e.auth_key||ot,o=e.error||function(){},a=Nt(),s=e.channel,c=e.op,l=e.gw_type,u=e.device_id;return u?l?c?s?rt?it?(n=[ut,"v1/push/sub-key",it,"devices",u],t={uuid:Pt,auth:i,type:l},"add"==c?t.add=s:"remove"==c&&(t.remove=s),Rt&&(data.instanceid=Dt),Ot({callback:a,data:t,success:function(e){j(e,r,o)},fail:function(e){X(e,o)},url:n}),void 0):Lt("Missing Subscribe Key"):Lt("Missing Publish Key"):Lt("Missing gw destination Channel (channel)"):Lt("Missing GW Operation (op: add or remove)"):Lt("Missing GW Type (gw_type: gcm or apns)"):Lt("Missing Device ID (device_id)")},audit:function(e,n){var n=e.callback||n,r=e.error||function(){},i=e.channel,o=e.channel_group,a=e.auth_key,s=Nt();if(!n)return Lt("Missing Callback");if(!it)return Lt("Missing Subscribe Key");if(!rt)return Lt("Missing Publish Key");if(!at)return Lt("Missing Secret Key");var c=Math.floor((new Date).getTime()/1e3),l=it+"\n"+rt+"\naudit\n",u={timestamp:c};"0"!=s&&(u.callback=s),"undefined"!=typeof i&&null!=i&&i.length>0&&(u.channel=i),"undefined"!=typeof o&&null!=o&&o.length>0&&(u["channel-group"]=o),a&&(u.auth=a),u=t(u),a||delete u.auth,l+=w(u);var d=st(l,at);d=d.replace(/\+/g,"-"),d=d.replace(/\//g,"_"),u.signature=d,Ot({callback:s,data:u,success:function(e){j(e,n,r)},fail:function(e){X(e,r)},url:[ut,"v1","auth","audit","sub-key",it]})},revoke:function(e,t){e.read=!1,e.write=!1,Ut.grant(e,t)},set_uuid:function(e){Pt=e,pt()},get_uuid:function(){return Pt},isArray:function(e){return p(e)},get_subscribed_channels:function(){return v(At,!0)},presence_heartbeat:function(e){var n=e.callback||function(){},r=e.error||function(){},i=Nt(),o={uuid:Pt,auth:ot},a=JSON.stringify(kt);a.length>2&&(o.state=JSON.stringify(kt)),St>0&&320>St&&(o.heartbeat=St),"0"!=i&&(o.callback=i);var s=g(v(At,!0).join(",")),c=b(xt,!0).join(",");s||(s=","),c&&(o["channel-group"]=c),Rt&&(o.instanceid=Dt),Ot({callback:i,data:t(o),url:[ut,"v2","presence","sub-key",it,"channel",s,"heartbeat"],success:function(e){j(e,n,r)},fail:function(e){X(e,r)}})},stop_timers:function(){clearTimeout(Y),clearTimeout(J),clearTimeout(_t)},shutdown:function(){Ut.stop_timers(),Wt&&Wt()},xdr:Ot,ready:y,db:qt,uuid:d,map:h,each:f,"each-channel":W,grep:c,offline:function(){H(1,{message:"Offline. Please check your network settings."})},supplant:l,now:o,unique:i,updater:s};return Pt||(Pt=Ut.uuid()),Dt||(Dt=Ut.uuid()),qt.set(it+"uuid",Pt),Y=u(U,E),J=u(V,et),_t=u(B,($t-3)*E),K(),Ut}var A=r(4),x=1,_=!1,S=[],$="-pnpres",z=10,T=15e3,C=310,O=60,E=1e3,L="/",B="&",N=5,q=30,I=A.version,P=/{([\w\-]+)}/g,R=function(){var e=20,t=Math.floor(Math.random()*e);return function(n,r){return n.indexOf("pubsub.")>0&&n.replace("pubsub","ps"+(r?d().split("-")[0]:++t2?angular.isFunction(e.history.back)?e.history.back():e.history.go(-1):e.location.href="/",void 0)}var r=this,i=t.$watchGroup(["link","action"],function(e){(e[0]||e[1])&&(angular.extend(r,{link:e[0],action:e[1]||n}),i())});r.action||(r.action=n)}]}}t.exports=["$window",n]},{}],146:[function(e){"use strict";var t=e("../../common/app");t.directive("clBack",e("./directive"))},{"../../common/app":19,"./directive":145}],147:[function(e,t){"use strict";function n(e,t,n){return{restrict:"AE",scope:{},template:function(e,t){return""!==e.html()||t.disableTemplate?(this.replace=!1,void 0):angular.render("banner-top/view")},replace:!0,link:function(t){t.extole=window.extole&&window.extole._bootstrapped,t.banner=!1,t.iosSmartBannerIsShowing=n.context.showIOSSmartBanner;var r=n.dump;if(r){var i=r.course&&r.course.primary_category||r.bundle&&r.bundle.primary_category||r.data&&r.data.primary_category,o=i&&i.slug;e.getCurrent({categorySlug:o,pathname:window.location.pathname},function(e){t.banner=e.data,t.ready=!0})}}}}t.exports=["bannerResource","$location","rind",n]},{}],148:[function(e){"use strict";var t=e("../../common/app");t.directive("bannerTop",e("./directives/view"))},{"../../common/app":19,"./directives/view":147}],149:[function(e,t){"use strict";function n(e,t){return{restrict:"E",transclude:!0,replace:!0,template:angular.render("banner/fixed"),link:function(n,r){function i(){r.removeClass("pristine"),e.removeEventListener("scroll",i)}e.addEventListener("scroll",i),t[0].body.classList.contains("mobile")||t[0].body.appendChild(r[0])}}}t.exports=["$window","$document",n]},{}],150:[function(e,t){"use strict";function n(e,t){return{restrict:"AE",template:angular.render("banner/rsvp-course"),scope:{course:"="},link:function(n){function i(){e.get({courseId:n.course._id,time:"end_time",date:c}).then(function(e){n.event=e.data,n.event&&n.event.is_container&&(n.is_container=n.event.is_container,n.event.product&&(n.product={_id:n.event.product.source.source_id._id,type:n.event.product.source.source_type,nid:n.event.product.source.nid,product:n.event.product}),n.date=o(),a())})}function o(){var e=r.unix(n.event.start_time).format("MMM"),t=r.unix(n.event.end_time).format("MMM"),i=r.unix(n.event.start_time).format("D"),o=r.unix(n.event.end_time).format("D");return e!==t?e+" "+i+" - "+t+" "+o:i!==o?e+" "+i+" - "+o:e+" "+i}function a(){t.user&&t.user.hasContent&&(n.owned=t.user.hasContent("purchased","courses",n.course._id),n.owned===!1&&t.user.hasRole("owns_all_courses")&&(n.owned=!0,n.comped=!0),n.$applyAsync())}function s(){return n.product?t.user.hasContent("enrolled",n.product.type,n.product._id):!1}var c=Math.floor((new Date).getTime()/1e3);angular.extend(n,{hasContent:s,product:null}),n.$watch("course",function(){i()})}}}var r=e("moment");t.exports=["EventService","$rootScope",n]},{moment:void 0}],151:[function(e,t){"use strict";function n(e){return{restrict:"AE",scope:{data:"=?"},template:angular.render("banner/rsvp-edit"),replace:!0,link:function(t){t.config=e,t.data||(t.data=t.$parent.data),t.data.event||(t.data.event={}),t.event=angular.copy(t.data.event),t.addEvent=function(e){t.data.event=e,t.data.event={_id:e._id,title:e.title}},t.removeEvent=function(){t.data.event={}}}}}t.exports=["config",n]},{}],152:[function(e,t){"use strict";function n(e,t,n){return{restrict:"AE",template:angular.render("banner/rsvp"),scope:{data:"=?"},replace:!0,link:function(i,o,a){function s(){t.get({id:i.data.event._id}).then(function(e){i.event=e.data,i.product={_id:i.event.product.source.source_id._id,type:i.event.product.source.source_type,nid:i.event.product.source.nid,product:i.event.product},i.date=c()})}function c(){var e=r.unix(i.event.start_time).format("MMM"),t=r.unix(i.event.end_time).format("MMM"),n=r.unix(i.event.start_time).format("D"),o=r.unix(i.event.end_time).format("D");return e!==t?e+" "+n+" - "+t+" "+o:n!==o?e+" "+n+" - "+o:e+" "+n}function l(){return i.product?n.user.hasContent("enrolled",i.product.type,i.product._id):!1}function u(){return i.event?r.unix(i.event.end_time).unix()>r().unix():!1}i.config=e,i.isAdmin="true"===a.isAdmin,angular.extend(i,{hasContent:l,isUpcoming:u,product:null}),i.data||(i.data=i.$parent&&i.$parent.data),i.data.event._id&&i.$watch("data.event",function(){s()})}}}var r=e("moment");t.exports=["config","EventService","$rootScope",n]},{moment:void 0}],153:[function(e,t){"use strict";function n(e,t,n){return{restrict:"AE",template:angular.render("banner/terms"),replace:!0,link:function(i,o,a){function s(){var t=r();if(d&&d.isBefore(t)&&p&&p.isAfter(t)){i.showTermsBanner=!0,u="terms-"+d.format("YYYY-MM-DD"),f[u]=!0;var o=n.Session.get("first_time_user")||!1,a=e.user&&e.user.hasTraits(f);i.showTermsBanner=!o&&!a}}function c(){f[u]&&e.user&&(e.user.setTraits(f),angular.element(document.querySelector(".banner-terms")).addClass("hide-terms"),l(),t(function(){i.showTermsBanner=!1},301))}function l(){u&&f[u]&&e.user&&e.user.addTraits([u])}var u,d=a.bannerTermsStart&&""!==a.bannerTermsStart&&r(a.bannerTermsStart).hours(0).minutes(0).seconds(0),p=a.bannerTermsEnd&&""!==a.bannerTermsEnd&&r(a.bannerTermsEnd).hours(0).minutes(0).seconds(0),f={};i.onTermsClick=c,e.$on("user:login",function(){t(s,300)}),e.$on("user:register",function(){c(),l()}),s()}}}var r=e("moment");t.exports=["$rootScope","$timeout","Vault",n]},{moment:void 0}],154:[function(e){"use strict";var t=e("../../common/app");t.directive("bannerFixed",e("./directives/fixed")),t.directive("bannerRsvp",e("./directives/rsvp")),t.directive("bannerRsvpCourse",e("./directives/rsvp-course")),t.directive("bannerRsvpEdit",e("./directives/rsvp-edit")),t.directive("bannerTerms",e("./directives/terms"))},{"../../common/app":19,"./directives/fixed":149,"./directives/rsvp":152,"./directives/rsvp-course":150,"./directives/rsvp-edit":151,"./directives/terms":153}],155:[function(e,t){"use strict";function n(){return function(e,t){return e&&e.length&&t&&t.length?e.filter(function(e){return e.categories?e.categories.filter(function(e){return t.indexOf(e)>=0}).length===t.length:!1}):e}}t.exports=n},{}],156:[function(e,t){"use strict";function n(e,t){return{restrict:"AE",scope:{data:"=?"},template:angular.render("blog-posts/edit"),replace:!0,link:function(n){n.config=e,n.data||(n.data=n.$parent.data),angular.isArray(n.data.categories)||(n.data.categories=[]),t.getCategories().then(function(e){n.categories=e})}}}t.exports=["config","BlogService",n]},{}],157:[function(e,t){"use strict";function n(e,t,n,r){return{restrict:"AE",scope:{data:"=?"},template:angular.render("blog-posts/view"),replace:!0,link:function(i,o,a){var s;i.config=e,i.data||(i.data=i.$parent.data),t.getPosts().then(function(e){s=r("categoriesFilter")(e,i.data.categories),s=r("limitTo")(s,i.data.maxPosts),i.postList=s}),i.track=function(){n.clickExternalLink(i.data.title,"thumbnail","Blog",a.clModuleId)}}}}t.exports=["config","BlogService","trackFactory","$filter",n]},{}],158:[function(e){"use strict";var t=e("../../common/app");t.directive("blogPosts",e("./directives/view")),t.directive("blogPostsEdit",e("./directives/edit")),t.filter("categoriesFilter",e("./categoriesFilter"))},{"../../common/app":19,"./categoriesFilter":155,"./directives/edit":156,"./directives/view":157}],159:[function(e,t){"use strict";function n(){return{restrict:"AE",replace:!0,scope:{startTime:"=?",endTime:"=?",monthFormat:"@",dayFormat:"@",yearFormat:"@",fullFormat:"@",separator:"@"},transclude:!0,template:angular.render("broadcast-time/view"),link:function(e){angular.extend(e,{monthFormat:e.monthFormat||"MMM",dayFormat:e.dayFormat||"dd",yearFormat:e.yearFormat||"yyyy",separator:e.separator||"-"}),e.fullFormat=e.fullFormat||e.monthFormat+" "+e.dayFormat+", "+e.yearFormat;var t=e.$watchCollection("[startTime, endTime]",function(n){i.contains(n,void 0)||(e.multiMonth=!r.unix(n[0]).isSame(r.unix(n[1]),"month"),t())})}}}var r=e("moment"),i=e("underscore");t.exports=n},{moment:void 0,underscore:void 0}],160:[function(e){"use strict";var t=e("../../common/app");t.directive("broadcastTime",e("./directive"))},{"../../common/app":19,"./directive":159}],161:[function(e,t){"use strict";function n(e){return{restrict:"AE",scope:{data:"=?"},template:angular.render("bundle-courses/edit"),replace:!0,link:function(t){t.data||(t.data=t.$parent.data),t.addBundle=function(n){e.getPopulated({slug:n.slug},function(e){if(e.data){var n={_id:e.data._id,image:e.data.image.file.key,title:e.data.title,short_title:e.data.short_title};t.data.bundle=n}})},t.removeBundle=function(){t.data={}}}}}t.exports=["bundle",n]},{}],162:[function(e,t){"use strict";function n(e){return{restrict:"AE",replace:!0,scope:{bundleId:"@",bundleSlug:"@"},template:angular.render("bundle-courses/view"),link:function(t){function n(e){e&&e.data&&e.data.courses&&(t.bundleCourses=e.data.courses)}function r(){}t.bundleId?e.findById({id:t.bundleId},n,r):t.bundleSlug&&e.findBySlug({slug:t.bundleSlug},n,r)}}}t.exports=["bundleResource",n]},{}],163:[function(e,t){"use strict";function n(e){return{restrict:"AE",replace:!0,scope:{data:"=?"},template:angular.render("bundle-courses/view"),link:function(t){function n(n){e.findById({id:n},function(e){e&&(t.bundleCourses=e.data.courses)},function(){})}t.data||(t.data=t.$parent.data),t.$watch("data.bundle",function(e){e&&n(e._id)},!0)}}}t.exports=["bundleResource",n]},{}],164:[function(e){"use strict";var t=e("../../common/app");t.directive("bundleCourses",e("./directives/view")),t.directive("bundleCoursesEdit",e("./directives/edit")),t.directive("bundleCoursesList",e("./directives/list"))},{"../../common/app":19,"./directives/edit":161,"./directives/list":162,"./directives/view":163}],165:[function(e,t){"use strict";function n(e){return{restrict:"AE",replace:!0,scope:{bundles:"="},template:angular.render("bundles/list"),controllerAs:"bundlesListCtrl",controller:["$scope","$attrs",function(t){var n=t.$watch("bundles",function(r){r&&(_.each(t.bundles,function(t){t.image&&t.image.file&&(t.imageUrl=e("magick")(t.image.file.key,{width:380}))}),n())})}]}}t.exports=["$filter",n]},{}],166:[function(e){"use strict";var t=e("../../common/app");t.directive("bundlesList",e("./directives/list"))},{"../../common/app":19,"./directives/list":165}],167:[function(e,t){"use strict";function n(e){return{restrict:"E",scope:{clSlide:"="},template:'
',link:function(t,n){t.$watch("clSlide.content",function(){try{var r=angular.element(t.clSlide.content);n.empty().append(r),e(r)(t)}catch(i){t.$parent.edit}})}}}t.exports=["$compile",n]},{}],168:[function(e){"use strict";var t=e("../../common/app");t.directive("carouselSlide",e("./directives/view"))},{"../../common/app":19,"./directives/view":167}],169:[function(e,t){"use strict";function n(e,t,n,o){return{restrict:"AE",template:angular.render("carousel/edit"),replace:!0,link:function(a){function s(){a.data.slides.push({}),p()}function c(e){var t=r().tz("America/Los_Angeles").hours(8).startOf("hour");e.start=t.unix(),e.end=t.add(1,"week").unix()}function l(e){delete e.start,delete e.end}function u(e){a.data.slides.splice(e,1),p()}function d(e){var t=a.data.slides[a.data.currentSlideIndex];return e?t[e]:t}function p(){a.data.slides&&(a.maxReached=3===a.data.slides.length,a.data.currentSlideIndex=a.data.slides.length-1)}function f(e,t,r){n(e,t,r),a.data.currentSlideIndex=r,a.$apply()}function h(e){var t=a.data.slides[a.data.currentSlideIndex];t.image=a.cdn+e.key}function m(e){var t=a.data.slides[a.data.currentSlideIndex];t.freeformImages=t.freeformImages||[],t.freeformImages.push(a.cdn+e.key)}function g(e){t.findBySlug({slug:e.slug},function(e){var t=a.data.slides[a.data.currentSlideIndex];t.image=a.cdn+i(e,"data.image.file.key")})}function v(e){try{var t=document.createRange();t.selectNode(e.currentTarget),window.getSelection().addRange(t),document.execCommand("copy")}catch(n){}}angular.extend(a,{config:e,addSlide:s,addStartAndEndTimes:c,removeStartAndEndTimes:l,removeSlide:u,getCurrentSlide:d,dropSlide:f,onUpload:h,uploadFreeform:m,setBackgroundImageFromCourse:g,copyLink:v,themes:{white:"Light Text",black:"Dark Text"}}),a.constants=o,a.data.interval=a.data.interval||5;var b=e.hostname;a.cdn=b.protocol+"://"+b.cdn+"/",p()}}}var r=e("moment-timezone"),i=e("deepval");t.exports=["config","courseResource","arrayMove","constants",n]},{deepval:504,"moment-timezone":506}],170:[function(e,t){"use strict";function n(){return{restrict:"AE",scope:{data:"=?"},template:angular.render("carousel/view"),replace:!0,link:function(e){e.data||(e.data=e.$parent.data),e.data.slides||(e.data.slides=[])}}}t.exports=["$sce",n]},{}],171:[function(e,t){"use strict";function n(e,t){return{restrict:"AE",scope:{editIndex:"=?",slides:"=",interval:"="},template:angular.render("carousel/index"),link:function(n,a){function s(){var t=u();n.currentIndex>=t.length?n.currentIndex=0:n.currentIndex<0&&(n.currentIndex=t.length-1);var r=t[n.currentIndex];r&&r.headerTheme&&(e.headerTheme=r.headerTheme,e.$applyAsync())}function c(e){n.currentIndex=e,s(),n.sliding=!0,h&&t.cancel(h),h=t(function(){n.sliding=!1},500)}function l(){return p()?n.slides:u()}function u(){return i.filter(n.slides,function(e){return f(e)})}function d(e,t){return p()?n.editIndex===t:e}function p(){return o(n,"$parent.$parent.edit.editing")}function f(e){if(!e.start&&!e.end)return!0;var t=r().tz("America/Los_Angeles").unix();return e.start<=t&&e.end>t}angular.extend(n,{getActiveSlide:d,getCurrentSlides:l,onUserNav:c,currentIndex:0,sliding:!1}),s(),a.bind("slide.bs.carousel",function(){if(!n.sliding)try{var e=angular.element(a[0].querySelector(".carousel-inner .item.active")),t=e.attr("index");n.currentIndex=++t,s()}catch(r){}});var h}}}var r=e("moment-timezone"),i=e("underscore"),o=e("deepval");t.exports=["$rootScope","$timeout",n]},{deepval:504,"moment-timezone":506,underscore:void 0}],172:[function(e){"use strict";var t=e("../../common/app");t.directive("clCarousel",e("./directives/index")),t.directive("carouselCms",e("./directives/cms/view")),t.directive("carouselCmsEdit",e("./directives/cms/edit"))},{"../../common/app":19,"./directives/cms/edit":169,"./directives/cms/view":170,"./directives/index":171}],173:[function(e,t){"use strict";function n(e,t){return{restrict:"AE",scope:{data:"=?"},template:angular.render("category-nav/edit"),replace:!0,link:function(e){e.config=t,e.data||(e.data=e.$parent.data)}}}t.exports=["$sce","config",n]},{}],174:[function(e,t){"use strict";function n(e,t,n){return{restrict:"AE",scope:{data:"=?"},template:angular.render("category-nav/view"),replace:!0,link:function(e){e.config=t,e.data||(e.data=e.$parent.data),n.getPrimary(function(t){e.categories=t.data})}}}t.exports=["$sce","config","categoryResource",n]},{}],175:[function(e){"use strict";var t=e("../../common/app");t.directive("categoryNav",e("./directives/view")),t.directive("categoryNavEdit",e("./directives/edit"))},{"../../common/app":19,"./directives/edit":173,"./directives/view":174}],176:[function(e,t){"use strict";function n(e){return{restrict:"AE",scope:{categorySlug:"@"},template:angular.render("category-stats/view"),replace:!0,link:function(t){e.getSocial().then(function(e){t.stats=e.data})}}}t.exports=["StatsService",n]},{}],177:[function(e){"use strict";var t=e("../../common/app");t.directive("categoryStats",e("./directives/view"))},{"../../common/app":19,"./directives/view":176}],178:[function(e,t){"use strict";function n(e,t,n){return{restrict:"EA",template:angular.render("channel-hero/cms-edit"),link:function(i){function o(e){t.findBySlug({slug:e.slug},function(e){i.data.image=e.data.image.file})}angular.extend(i,{config:e,setImageFromCourse:o,themes:{white:"Light Text",black:"Dark Text"}}),i.data.theme||(i.data.theme="white"),i.data.category||(i.data.category={});var a=i.$watch("page.primary_category",function(e){e&&n.getCategoryById({id:e}).$promise.then(function(e){e&&e.success&&e.data&&e.data.slug&&(i.data.category=r.pick(e.data,["_id","slug","title"]),a())})});i.$watch("data.theme",function(e){i.page.theme=e})}}}var r=e("underscore");t.exports=["config","courseResource","categoryResource",n]},{underscore:void 0}],179:[function(e,t){"use strict";function n(){return{restrict:"EA",template:angular.render("channel-hero/cms-view"),scope:{data:"=?"},controllerAs:"channelHeroCtrl",controller:["$scope",function(e){this.data=e.data||e.$parent.data||{}}]}}t.exports=[n]},{}],180:[function(e,t){"use strict";function n(e,t,n,i,o){return{restrict:"E",template:angular.render("channel-hero/view"),replace:!0,transclude:!0,scope:{imagePath:"@",videoPath:"@",title:"@clTitle",lead:"@",statement:"@",category:"=?",isPrimary:"=?"},link:function(a,s){if(a.imagePath){var c=e("magick")(a.imagePath,{width:1600});s.css("background-image","url("+c+")")}n&&n.context&&n.context.ua&&(a.mobile=n.context.ua.mobile);var l=new o,u={categories:[r(a,"category._id")]};l.pageView(u),a.videoPath&&(a.videoUrl=i.trustAsResourceUrl(t.hostname.protocol+"://"+t.hostname.cdn+"/"+a.videoPath))}}}var r=e("deepval");t.exports=["$filter","config","rind","$sce","ScoresService",n]},{deepval:504}],181:[function(e){"use strict";var t=e("../../common/app");t.directive("channelHero",e("./directives/index")),t.directive("channelHeroCms",e("./directives/cms/view")),t.directive("channelHeroCmsEdit",e("./directives/cms/edit"))},{"../../common/app":19,"./directives/cms/edit":178,"./directives/cms/view":179,"./directives/index":180}],182:[function(e,t){"use strict";function n(e){return{restrict:"AE",scope:{data:"=?"},template:angular.render("channel-snapshot/edit"),replace:!0,link:function(t){t.config=e,t.data||(t.data=t.$parent.data),t.data.limit||(t.data.limit=5)}}}t.exports=["config",n]},{}],183:[function(e,t){"use strict";function n(){return{restrict:"AE",scope:{data:"=?"},template:angular.render("channel-snapshot/view"),controllerAs:"channelSnapshotCtrl",controller:["$scope",function(e){this.data=e.data||e.$parent.data||{}}]}}t.exports=n},{}],184:[function(e,t){"use strict";function n(e,t,n,i,o,a){return{restrict:"AE",template:angular.render("channel-snapshot/index"),scope:{limit:"=?"},link:function(e){function t(){c.fetchSortedCategories(function(e){s=e,i()})}function i(){r.eachSeries(s,function(t,r){var i={categories:t._id,limit:e.limit};t.courses=[],a.getRecommendations(i).then(function(e){n.addItems(t.courses,e,"_id"),r()})},function(){e.categories=s})}angular.extend(e,{categories:[]});var s,c=new o;t()}}}var r=e("async");t.exports=["$rootScope","$timeout","DuplicateService","categoryResource","ScoresService","RecommendationsService","trackFactory",n]},{async:497}],185:[function(e,t){"use strict";function n(){return{restrict:"AE",scope:{course:"=?clChannelSnapshotRecommendation"},template:angular.render("channel-snapshot/recommendation")}}t.exports=[n]},{}],186:[function(e){"use strict";var t=e("../../common/app");t.directive("clChannelSnapshot",e("./directives/index")),t.directive("channelSnapshotCms",e("./directives/cms/view")),t.directive("channelSnapshotCmsEdit",e("./directives/cms/edit")),t.directive("clChannelSnapshotRecommendation",e("./directives/tiles/recommendation"))},{"../../common/app":19,"./directives/cms/edit":182,"./directives/cms/view":183,"./directives/index":184,"./directives/tiles/recommendation":185}],187:[function(e){"use strict";var t=e("../../common/app");t.service("clAnalytics",e("./services/clAnalytics"))},{"../../common/app":19,"./services/clAnalytics":188}],188:[function(e,t){"use strict";function n(e,t,n,s){function c(){var e=n.Session.get("analyticsToTrack");e&&(angular.forEach(e,function(e){v.apply(document,e)}),n.Session.remove("analyticsToTrack"))}function l(){if(!n.Session.get("externalReferrer")){var e=document.referrer||null;n.Session.set("externalReferrer",e)}M.trackPage(s.dump)}function u(e,t){var r=n.Session.get("analyticsToTrack",[]);r.push([e,t]),n.Session.set("analyticsToTrack",r)}function d(e){if(t._readied&&e){var n=$(e.relatedTarget||e.currentTarget),r=n.data("analytics");r&&(M.extraPropsTimer&&clearTimeout(M.extraPropsTimer),M.extraProps=r)}}function p(e){M.extraProps=e}function f(e){t._readied&&(M.extraPropsTimer=setTimeout(function(){(!e||e())&&(M.extraProps={})},500))}function h(e,t){t=t.replace(/[\[]/,"\\[").replace(/[\]]/,"\\]");var n="[\\?&]"+t+"=([^&#]*)",r=new RegExp(n),i=r.exec(e);return null===i||i&&"string"!=typeof i[1]&&i[1].length?"":decodeURIComponent(i[1]).replace(/\+/g," ")}function m(e){var t="utm_source utm_medium utm_campaign utm_content utm_term".split(" "),n="",r={};return t.forEach(function(t){n=M.getQueryParam(document.URL,t),n.length&&(e?r[t.concat("_session")]=n:r[t]=n)}),r}function g(e){var t=o("md5");return t.update(e),t.digest("hex")}function v(e,i,o,c){var l;try{l=s.context.session.user.uid}catch(u){}var d=r.extend({platform:"web",page:window.location.pathname,url:window.location.href,date:Date.now(),externalReferrer:n.Session.get("externalReferrer")||null,logged_in:!!s.context.session._id,first_time_user:n.Session.get("first_time_user")||!1,cta_label:n.Session.getAndRemove("cta_label"),cc:n.Cookie.get(a),productVersion:s.pkg.version,uid:l,session_token:n.Cookie.get(s.config.auth.cookie)},M.extraProps,i);t._history=[];var p=n.Cookie.getList();for(var f in p){var h=Object.keys(p[f])[0];h&&0===h.indexOf("trait_")&&(d[h]=decodeURIComponent(p[f][h]))}var m=s.context.session&&s.context.session.user&&s.context.session.user.traits;for(var g in m)d["trait_"+g]=m[g];try{d.email=M.getMd5(s.context.session.user.primary_email.address),d.hashed_email=M.getMd5(s.context.session.user.primary_email.address)}catch(u){}var v=s.context.session.contentRights;if(v&&v.starred&&v.enrolled&&v.purchased){d.units=0;var b;for(b in v.purchased)d.units+=v.purchased[b].length;d.stars=0;for(b in v.starred)d.stars+=v.starred[b].length;d.enrollments=0;for(b in v.enrolled)d.enrollments+=v.enrolled[b].length}var y=n.Session.get("utms");if(y&&"object"==typeof y)for(var w in y)d[w]=y[w];if(o&&o.trackOnNextPage===!0){var A=n.Session.get("analyticsToTrack",[]);A.push([e,d]),n.Session.set("analyticsToTrack",A)}else t._history.push({name:e,event:d}),t._history.length>9&&t._history.pop(),t.track(e,d,{},c)}function b(){M.ready=!0,c()}function y(e){var i;try{i=s.context.session.user.uid}catch(o){}var c=window.location.pathname.match(/\W[a-z]*/)[0],l={platform:"web",page_title:document.title,url:window.location.href,page_level_1:c,page:window.location.pathname,date:Date.now(),externalReferrer:n.Session.get("externalReferrer"),logged_in:!!s.context.session._id,first_time_user:n.Session.get("first_time_user")||!1,path:window.location.pathname||"/",productVersion:s.pkg.version,uid:i,cc:n.Cookie.get(a),session_token:n.Cookie.get(s.config.auth.cookie)},u=n.Cookie.getList();for(var d in u){var p=Object.keys(u[d])[0];p&&0===p.indexOf("trait_")&&(l[p]=decodeURIComponent(u[d][p]))}var f=s.context.session&&s.context.session.user&&s.context.session.user.traits;for(var h in f)l["trait_"+h]=f[h];var m={"/":"home","/catalog":"searchresults","/courses":"program"};if(l.GoogleRemarketingPageType=m[c]||"other",e.course&&"/courses"===c&&(l.courseID=e.course.nid,l.course_page_price=e.course.product.current_price_formatted,l.channel=e.course.primary_category.title,l.course_title=e.course.title,l.productIDs=[e.course._id],l.content_ids=[e.course._id],l.content_type="product",l.category_ids=[e.course.primary_category._id],l.topics_ids=r.chain(e.course.taxonomy).flatten().pluck("topic").pluck("_id").without(void 0).value()),e.data&&(l.category_ids=[e.data.primary_category&&e.data.primary_category._id],l.topics_ids=r.chain(e.data.taxonomy).flatten().pluck("topic").without(void 0).value(),l.type=e.data.type),e.bundle&&"/bundle"===c&&(l.content_ids=[e.bundle._id],l.content_type="product"),window.location.search.match(/utm/)){var g=this.getUTMCampaignParams(!0);if(g&&"object"==typeof g){n.Session.set("utms",g);for(var v in g)l[v]=g[v]}var b=this.getUTMCampaignParams(!1);if(b&&"object"==typeof b)for(var y in b){var M=y.replace("utm_","");n.Local.set("trait_"+M,b[y]),n.Local.set("trait__"+M,b[y])}}var w=this.getQueryParam(document.URL,"via");w&&(l.via=w),t.page(l)}var M=this;angular.extend(M,{ready:!1,getQueryParam:h,getUTMCampaignParams:m,getMd5:g,analyticsTrack:l,analyticsReady:b,track:v,trackPage:y,queueTrackEvent:u,addExtraProperties:d,addProperties:p,clearExtraProperties:f}),n.Local.get("prior_visit")||n.Session.set("first_time_user",!0),n.Local.set("prior_visit",!0);var w=n.Cookie.get(a);if(!w){var A=i.v4();n.Cookie.set(a,A,{path:"/",expires:"+10 years"})}t._readied?M.analyticsReady():t.on("ready",function(){M.analyticsReady()})}var r=e("underscore"),i=e("node-uuid"),o=e("crypto").createHash,a="cc";t.exports=["$rootScope","analytics","Vault","rind",n]},{crypto:530,"node-uuid":508,underscore:void 0}],189:[function(e,t){"use strict";function n(e,t,n){return{restrict:"AE",template:angular.render("cl-auth/device"),link:function(r){function i(){r.state=e.user.valid()?"form":"logout"}function o(){var e={device_pin:r.devicePin.toUpperCase(),device_type:r.deviceType};t.submitDevice({},e).$promise.then(function(e){e.success?(n.track("Authorization",{tvosCode:r.devicePin.toUpperCase(),accountType:"web",userAgent:"browser"},{},function(){}),r.state="thankyou"):r.error="This code is invalid or has expired."})}r.deviceType="tvos",e.$on("user:login",i),e.$on("user:logout",i),i(),angular.extend(r,{onRegisterDevice:o})}}}t.exports=["$rootScope","authResource","AnalyticsService",n]},{}],190:[function(e,t){"use strict";function n(e){return{restrict:"AE",template:angular.render("cl-auth/forgot-password"),link:function(t){function n(){e.user.Auth.resetPassword({email:e.user._data.primary_email.address}).then(function(e){e.success?t.sent=!0:t.error=e&&e.message||"Please check the email address you have submitted."},r)}function r(e){if(-1===e)t.errorMsg="Please try again later";else{var n=e&&e.data&&e.data.message;t.errorMsg=n||"Please check the email address you have submitted."}}function i(){e.$broadcast("user:reset-password")}angular.extend(t,{onResetPassword:n,closeModal:i,sent:!1})}}}t.exports=["$rootScope",n]},{}],191:[function(e,t){"use strict";function n(e){return{restrict:"AE",scope:{theme:"@",prompt:"=",promptClass:"=",state:"=?",done:"&onDone",cancel:"&onCancel",analyticsProps:"=?"},template:function(e,t){return t.template?angular.render("cl-auth/"+t.template):angular.render("cl-auth/modalView")},controller:["$scope",function(t){function n(n){"onboarding"!==t.state&&(e.$broadcast("auth:hide"),t.done(n,"login_success"))}function r(e){t.onboarding&&!rind.context.ua.mobile?t.state="onboarding":t.done(e,"registration_success")}function i(n){t.accountType=n,s||(s=!0,e.user.Auth[o[t.state]](n,a[t.state]))}angular.extend(t,{inputFocus:i,state:"intro",accountType:void 0});var o={login:"signInStart",intro:"signInStart",reg:"signUpStart"},a={intro:"clIntroModal",login:"clLoginModal",reg:"clRegisterModal",forgot:"clPasswordModal"};t.$on("user:login",n),t.$on("user:register",r),t.$on("user:reset-password",t.done),t.$on("auth:set-opts",function(e,n){angular.extend(t,n)}),t.$on("auth:change-state",function(e,n){n&&(t.state=n)});var s=!1;t.$watch("state",function(){t.error="";try{t.email=e.user._data.primary_email.address }catch(n){}e.$broadcast("cl-form:verify-email"),t.elementId="registerPrompt"===t.state?"registerPrompt":"clAuth",s=!1})}]}}t.exports=["$rootScope",n]},{}],192:[function(e,t){"use strict";function n(e,t,n,i,o,a){return{restrict:"AE",template:angular.render("cl-auth/interests"),link:function(s){function c(){n.user.mergeExistingInterests();var e=new a;i.get().then(function(r){var i={};try{i=s.meta||s.$parent.meta}catch(o){}angular.isObject(i)&&t(function(){(i.entityIds||[]).forEach(function(e){e&&n.user.addInterest(e)})}),r.sort(function(t,n){return e.getScoreByCategory(n._id)-e.getScoreByCategory(t._id)}),r.forEach(function(t){t.topics.sort(function(t,n){return e.getScoreByTopic(n.ids[0])-e.getScoreByTopic(t.ids[0])})}),s.channelTopics=r})}function l(e){var t=u(e.ids);t?(o.onboardingRemoveTopic(s.accountType,e.name,e.primary_category.title),(e.ids||[]).forEach(function(e){n.user.removeInterest(e)})):(o.onboardingAddTopic(s.accountType,e.name,e.primary_category.title),(e.ids||[]).forEach(function(e){n.user.addInterest(e)}))}function u(e){return r.any(e,function(e){return n.user.hasInterest(e)})}function d(){o.onboardingFinishUp(s.accountType),s.forceAbort=!0,n.user.updateInterest().then(h)}function p(){o.onboardingSkip(s.accountType),s.verifyAbort=!0}function f(){o.onboardingQuit(s.accountType),s.forceAbort=!0,h()}function h(){n.$broadcast("auth:cancel")}function m(){e.history.go(-1)}function g(){o.onboardingContinue(s.accountType),s.verifyAbort=!1}angular.extend(s,{toggleInterest:l,hasInterest:u,save:d,skip:p,back:m,forceSkip:f,"continue":g,isModal:!0,verifyAbort:!1,forceAbort:!1}),s.$watch("verifyAbort",function(e){try{s.$parent.$parent.closeButton=!e,s.$on("modal.closing",function(e){s.forceAbort||(o.onboardingX(s.accountType),s.verifyAbort||(s.verifyAbort=!0),s.verifyAbort?e.preventDefault():o.onboardingSkipX(s.accountType))})}catch(t){s.isModal=!1}}),c()}}}var r=e("underscore");t.exports=["$window","$timeout","$rootScope","ChannelTopicService","trackFactory","ScoresService",n]},{underscore:void 0}],193:[function(e,t){"use strict";function n(e,t){return{restrict:"AE",template:angular.render("cl-auth/intro"),controller:["$scope",function(n){function r(){Vault.Session.set("next",window.location.href,{expires:"+5 minutes"}),e.user.Auth.startFacebook()}function i(){Vault.Session.set("next",window.location.href,{expires:"+5 minutes"}),e.user.Auth.startGoogle()}function o(r){return r.$valid?(e.user.checkValidEmail(r.$viewValue).then(function(t){t.success&&t.data?(t.data.user?(e.user.Auth.setUser({first_name:t.data.first_name}),e.$broadcast("auth:change-state","login")):e.$broadcast("auth:change-state","reg"),e.user.Auth.setUser({primary_email:{address:r.$viewValue}})):n.error="Something went wrong. Please try again."},function(){n.error="Something went wrong"}),void 0):(n.error=t("i18n")("cl-auth-intro-error","Whoops! That's not an email address."),void 0)}angular.extend(n,{checkEmail:o,onFacebook:r,onGoogle:i})}]}}t.exports=["$rootScope","$filter",n]},{}],194:[function(e,t){"use strict";function n(e,t){return{restrict:"AE",template:angular.render("cl-auth/login"),link:function(n){function i(){n.submitted=!0,e.user.Auth.login({email:e.user._data.primary_email.address,password:n.password,profile:e.user.get("profile")}).then(o,a)}function o(){n.error=void 0,n.submitted=!1,n.loginAttempts=0}function a(e){if(-1===e&&(n.error="Please try again later"),"login_failed"===e)if(n.loginAttempts++,n.loginAttempts<5)n.error=c("cl-auth-password-wrong");else{if(5!==n.loginAttempts)return n.error=c("cl-auth-password-locked"),n.greeting=c("cl-auth-login-locked"),n.submitted=!0,void 0;n.error=c("cl-auth-password-warning")}n.error||(n.error="There was a problem. Please try again."),n.submitted=!1}function s(){n.greeting=c("cl-auth-login-greeting")+l()+"!"}function c(e){return t("i18n")(e,r[e])}function l(){var t=e.user._data.first_name;return t?", "+t:""}angular.extend(n,{error:!1,submitted:!1,onLogin:i,loginAttempts:0}),s(),e.$on("user:updated",s)}}}t.exports=["$rootScope","$filter",n];var r={"cl-auth-login-greeting":"It's great to see you again","cl-auth-login-locked":"Uh Oh! Try again later.","cl-auth-password-reset":"Reset your password","cl-auth-password-wrong":"Whoops! This password isn't valid.","cl-auth-password-warning":"That's 5 attempts. 1 more and your account will be locked.","cl-auth-password-locked":"That's 6 attempts. Your account has been locked."}},{}],195:[function(e,t){"use strict";function n(e){return{restrict:"AE",template:angular.render("cl-auth/registration"),link:function(t){function n(){t.submitted=!0,e.user.Auth.register({email:e.user._data.primary_email.address,password:t.regPassword,profile:e.user._data.profile}).then(o,a)}function r(e){return t.formDirty=e.$dirty,e.$dirty&&!e.firstName.$viewValue?"Required":""}function i(){t.iconColor=t.passwordError?"brand-warning":t.passwordSuccess?"brand-affirmative":"gray3"}function o(){t.passwordError=void 0,t.passwordSuccess=void 0,t.submitted=!1,i()}function a(e){t.passwordError=!0,t.iconClass="exclamation-circle",t.passwordErrorMsg=-1===e?"Please try again later":"There was a problem. Please try again.",t.submitted=!1,i()}angular.extend(t,{passwordError:!1,passwordErrorMsg:"at least 8 characters long",passwordSuccess:!1,submitted:!1,onRegister:n,showRequired:r,iconClass:"exclamation-circle"}),t.$watch("regPassword",function(){t.passwordError=!1,t.passwordSuccess=!1,t.regPassword&&t.regPassword.length<8?t.passwordError=!0:t.regPassword&&t.regPassword.length>=8&&(t.passwordSuccess=!0,t.iconClass="check-circle"),i()})}}}t.exports=["$rootScope","$timeout",n]},{}],196:[function(e,t){"use strict";function n(e){function t(){e.$broadcast("auth:cancel")}return{restrict:"AE",scope:{provider:"="},template:angular.render("cl-auth/social"),replace:!0,controller:["$scope",function(n){function r(){n.submitted=!0,n.user.displayName=n.firstname+" "+n.lastname,e.user.Auth.socialRegistration(n.user,n.provider).then(angular.noop,t)}function i(){n.submitted=!0,n.user.displayName=n.firstname+" "+n.lastname,e.user.Auth.socialRegistration(n.user,n.provider).then(angular.noop,t)}var o=e.user._data;n.register="facebook"===n.provider?r:i,n.user={email:o.email},"facebook"===n.provider?(e.user.Auth.signUpStart("facebook","clOauthModal"),n.register=r,n.firstname=o.first_name||"",n.lastname=o.last_name||"",n.user.fb_id=o.id,n.user.profilePicture=o.picture.data.is_silhouette?!1:o.picture.data.url):"google"===n.provider&&(e.user.Auth.signUpStart("google","clOauthModal"),n.register=i,n.firstname=o.name.givenName||"",n.lastname=o.name.familyName||"",n.user.google_id=o.id,n.user.profilePicture=o.image.isDefault?!1:o.image.url)}]}}t.exports=["$rootScope",n]},{}],197:[function(e){"use strict";var t=e("../../common/app");t.service("clAuthModal",e("./services/clAuthModal")),t.directive("clAuth",e("./directives/index")),t.directive("clAuthIntro",e("./directives/intro")),t.directive("clAuthDevice",e("./directives/device")),t.directive("clLogIn",e("./directives/login")),t.directive("clReg",e("./directives/registration")),t.directive("clAuthSocial",e("./directives/social")),t.directive("clForgot",e("./directives/forgot-password")),t.directive("clInterests",e("./directives/interests"))},{"../../common/app":19,"./directives/device":189,"./directives/forgot-password":190,"./directives/index":191,"./directives/interests":192,"./directives/intro":193,"./directives/login":194,"./directives/registration":195,"./directives/social":196,"./services/clAuthModal":198}],198:[function(e,t){"use strict";function n(e,t,n){function r(r){e.lockBody=!0,o?e.$broadcast("auth:set-opts",r):(o=t.open({template:angular.render("cl-auth/modal"),windowClass:"cl-modal modal-cl-auth",controller:["$scope","$modalInstance",function(t,i){t.state=r.state,t.onboarding=r.onboarding,t.prompt=r.prompt,t.promptClass=r.promptClass,t.meta=r.meta,t.closeButton=!0;var o={intro:"clIntroModal",login:"clLoginModal",reg:"clRegisterModal",forgot:"clPasswordModal"};t.analyticsProps=t.analyticsProps||{};var a={modalType:o[t.state],via:t.analyticsProps.via};e.user.Auth.modalShown(void 0,a),t.$on("auth:cancel",i.dismiss),n(function(){e.$broadcast("auth:set-opts",r)})}]}),o.result.then(i,i))}function i(){e.lockBody=!1,o=void 0}var o;return r}t.exports=["$rootScope","$modal","$timeout",n]},{}],199:[function(e,t){"use strict";function n(e,t,n,i,o){return{restrict:"AE",template:angular.render("cl-gift/recipientDetails"),link:function(e,a,s){function c(){if(!e.gift)return e.buttonText;var t=["error","error-sent"];return t.indexOf(e.gift.state)>-1?g:e.buttonText}function l(){m||(m=!0,i.gifting("start",e.analyticsProps))}function u(){e.showNotification=!1}function d(){e.isMobile?t(function(){document.querySelector("#mobile-date-picker").click()}):e.popupOpen=!e.popupOpen,i.gifting("reschedule",e.analyticsProps)}function p(){e.gift&&e.gift.message?(e.gift.message.length>h&&(e.gift.message=e.gift.message.slice(0,1e3)),e.charRemaining=h-e.gift.message.length):e.charRemaining=h}function f(){e.setUnixDeliveryDate();var t={recipient_email:e.gift.recipient.email,note_added:e.gift.message!==n("i18n")("cl-gift-recipient-message-text")};_.extend(t,e.analyticsProps),window.location.pathname.match(/my-orders/)?i.gifting("resend",{gift_type:"order details",coupon_code:e.gift.coupon_code}):i.gifting("complete",t),e.nextState(e.recipientForm.$valid)}var h=1e3,m=!1;angular.extend(e,{limitMessageCharCount:p,onRecipientFormFocus:l,togglePopup:d,title:s.title,buttonText:s.buttonText,proceed:f,popupOpen:!1,setButtonText:c,dismissError:u}),e.analyticsProps={modal_id:"gift",gift_type:"recipient detail"},o(rind||{},"dump.course._id")?e.analyticsProps.course_id=rind.dump.course._id:o(rind||{},"dump.bundle._id")&&(e.analyticsProps.bundle_id=rind.dump.bundle._id),o(rind||{},"dump.course.product._id")?e.analyticsProps.product_id=rind.dump.course.product._id:o(rind||{},"dump.bundle.product._id")&&(e.analyticsProps.product_id=rind.dump.bundle.product._id),e.showNotification=!1,p();var g=n("i18n")("cl-gift-recipient-button-save-and-resend","Save and Resend"),v=e.date.javascript_delivery_date_object;e.$watch("date.javascript_delivery_date_object",function(t){e.popupOpen&&(e.popupOpen=!1),r(e.date.javascript_delivery_date_object).isAfter(r(e.maxDate))?e.showNotification=!0:(v=t,u(),e.setUnixDeliveryDate(),e.setDeliveryDateMessage())}),e.$watch("showNotification",function(t){var n=!t;n&&(e.date.javascript_delivery_date_object=v)}),e.$on("user:gift:cancel",function(){i.gifting("x",e.analyticsProps)})}}}var r=e("moment");t.exports=["$rootScope","$timeout","$filter","trackFactory","deepval",n]},{moment:void 0}],200:[function(e,t){"use strict";function n(e,t,n,r){return{restrict:"AE",template:angular.render("cl-gift/senderDetails"),link:function(i){function o(){if(i.gift.sender.name="",e.user.valid()){var t=e.user.get("profile");t.first_name&&(i.gift.sender.name=t.first_name,t.last_name&&(i.gift.sender.name=i.gift.sender.name+" "+t.last_name)),i.gift.sender.email=e.user.get("primary_email").address}}function a(){i.showFullMessage=!0}function s(){var e={recipient_email:i.gift.recipient.email,note_added:i.gift.message!==t("i18n")("cl-gift-recipient-message-text")};_.extend(e,i.analyticsProps),n.gifting("edit",e),i.prevState()}function c(){n.gifting("complete",i.analyticsProps),i.nextState(i.senderForm.$valid)}function l(){u||(u=!0,n.gifting("start",i.analyticsProps))}var u=!1;angular.extend(i,{seeMore:a,onSenderFormFocus:l,edit:s,proceed:c}),i.analyticsProps={modal_id:"gift",gift_type:"recipient confirm"},r(rind||{},"dump.course._id")?i.analyticsProps.course_id=rind.dump.course._id:r(rind||{},"dump.bundle._id")&&(i.analyticsProps.bundle_id=rind.dump.bundle._id),r(rind||{},"dump.course.product._id")?i.analyticsProps.product_id=rind.dump.course.product._id:r(rind||{},"dump.bundle.product._id")&&(i.analyticsProps.product_id=rind.dump.bundle.product._id),o(),i.showFullMessage=!1,i.setDeliveryDateMessage(),i.$on("user:gift:cancel",function(){n.gifting("x",i.analyticsProps)}),i.$on("user:gift:back",function(){n.gifting("back",i.analyticsProps)})}}}t.exports=["$rootScope","$filter","trackFactory","deepval",n]},{}],201:[function(e,t){"use strict";function n(){return{restrict:"AE",template:angular.render("cl-gift/summary"),scope:{gift:"=?"}}}t.exports=["$rootScope",n]},{}],202:[function(e){"use strict";var t=e("../../common/app");t.service("clGiftModal",e("./services/clGiftModal")),t.directive("clGiftRecipientDetails",e("./directives/recipientDetails")),t.directive("clGiftSenderDetails",e("./directives/senderDetails")),t.directive("clGiftSummary",e("./directives/summary"))},{"../../common/app":19,"./directives/recipientDetails":199,"./directives/senderDetails":200,"./directives/summary":201,"./services/clGiftModal":203}],203:[function(e,t){"use strict";function n(e,t,n,a,s,c){function l(l){e.lockBody=!0,a.open({template:function(){return l.gift?angular.render("cl-gift/edit-modal"):angular.render("cl-gift/modal")},windowClass:"cl-modal",controller:["$scope","$modalInstance",function(a,u){function d(){e.$broadcast("user:gift:back",a.stateIndex),v()}function p(){e.$broadcast("user:gift:cancel",a.stateIndex),u.dismiss()}function f(){var e=new Date;a.gift.delivery_date&&(e=new Date(1e3*a.gift.delivery_date)),a.date.javascript_delivery_date_object=e}function h(){var e=o(a.date.javascript_delivery_date_object);e.isAfter(o(),"day")?e.hours(6).startOf("hour"):e.isBefore(o(),"day")&&(a.date.javascript_delivery_date_object=new Date,e=o()),a.gift.delivery_date=e.unix()}function m(){var e=o.tz(a.date.javascript_delivery_date_object,o.tz.guess());e.isAfter(o(),"day")?(a.sendToday=!1,a.delivery_date_message=e.format("MMMM DD, YYYY"),a.delivery_date_message_timing="(Approx. 6AM "+e.format("zz")+")"):(a.sendToday=!0,a.delivery_date_message=n("i18n")("cl-gift-recipient-delivery-date-message","Today"))}function g(e){e&&(l.gift?s.updateGift({orderId:l.orderId},{gift:a.gift}).$promise.then(u.close,u.dismiss):(M(a.gift),a.stateIndex=0?t:a.giftingStates.length-1}function y(){return c.get()}function M(e){c.saveToLocalStorage(e)}if(angular.extend(a,{nextState:g,prevState:v,setJsDeliveryDate:f,setDeliveryDateMessage:m,setUnixDeliveryDate:h,date:{},gift:l.gift||{},abort:p,back:d}),a.today=new Date,a.maxDate=o().add(6,"M").toDate(),a.isMobile=rind.context.ua.mobile?!0:!1,a.isChrome=!!window.chrome&&!!window.chrome.webstore,a.giftingStates=["recipient","sender"],u.result.then(function(){e.lockBody=!1},function(){e.lockBody=!1}),l.product){var w=y();w&&w.product_id===l.product._id?(a.gift=w,a.stateIndex=b()):(c.clear(),c.setObject(c.createGiftObject(l.product._id)),a.gift=y(),a.stateIndex=0),a.state=a.giftingStates[a.stateIndex]}f(),m()}]})}return l}var r=e("underscore"),i=e("deepval"),o=e("moment-timezone");t.exports=["$rootScope","$window","$filter","$modal","Ecommerce","GiftService","Vault","trackFactory",n]},{deepval:504,"moment-timezone":506,underscore:void 0}],204:[function(e,t){"use strict";function n(){return{restrict:"AE",scope:{totalSteps:"=",currentStep:"="},template:angular.render("cl-steps/view"),replace:!0,link:function(e){e.steps={};for(var t=0;tO&&(O++,e(c))}function u(){M=parseInt(w.offsetLeft,10);var e=y-M;w.style.width=e+"px",p()}function d(){var e=y-M+2*v,t=Math.floor(e/b);return _.length-t>=0?_.length-t:0}function p(){var e=d();x.style.left=-M+"px";var t=Math.floor(M/b);"title-side"===a.template&&(x.style.left=0,t=0),t>=T?$.addClass("ng-hide"):$.removeClass("ng-hide"),T>=e?z.addClass("ng-hide"):z.removeClass("ng-hide")}function f(){var e=d();T>e&&g(e)}function h(){0!==T&&g(T-1)}function m(){var e=d();T!==e&&g(T+1)}function g(n){T=n;var r=n*b;A.style.webkitTransform="translateX(-"+r+"px)",A.style.MozTransform="translateX(-"+r+"px)",A.style.msTransform="translateX(-"+r+"px)",A.style.OTransform="translateX(-"+r+"px)",A.style.transform="translateX(-"+r+"px)",e(function(){angular.element(t).triggerHandler("scroll")},1e3),p()}var v,b,y,M,w=o[0],A=o[0].querySelector("ul"),x=o[0].querySelector(".arrow-left"),k=o[0].querySelector(".arrow-right"),_=A.children,S=i[0].querySelector("body"),$=angular.element(x),z=angular.element(k),T=0,C=3,O=0;angular.extend(n,{prev:h,next:m,initList:s})}]}}var r=e("underscore");t.exports=["$timeout","$window",n]},{underscore:void 0}],209:[function(e,t){"use strict";function n(e,t,n,r){return{restrict:"AE",scope:{courses:"=?",courseIds:"@",clTitle:"@",subtitle:"@",lessonsCount:"@",seeMore:"@",seeMoreLink:"@",cta:"@",ctaLink:"@",pageName:"@",moduleSlug:"@"},template:angular.render("class-list-collection/view"),replace:!0,link:function(i){function o(e){var t=e?"{{ subtitle }}":'{{ "class-list-collection-subtitle" | i18n:"classes" }}';i.subtitleAttribute=r(t)(i)}function a(){return i.seeMore}function s(){return i.cta}angular.extend(i,{ctaThumbnail:a,ctaButton:s}),i.config=e,n(function(){i.reInit=!0}),i.courseIds&&t.getTileData({ids:i.courseIds},function(e){i.courses=e.data},function(){}),i.$watch("subtitle",o)}}}t.exports=["config","courseResource","$timeout","$interpolate",n]},{}],210:[function(e){"use strict";var t=e("../../common/app");t.directive("classListCollection",e("./directives/view")),t.directive("listThumbHorizontal",e("./directives/listThumbHorizontal")),t.directive("classListCollectionCms",e("./directives/cms/view")),t.directive("classListCollectionCmsEdit",e("./directives/cms/edit"))},{"../../common/app":19,"./directives/cms/edit":206,"./directives/cms/view":207,"./directives/listThumbHorizontal":208,"./directives/view":209}],211:[function(e,t){"use strict";function n(){return{restrict:"AE",scope:{},template:angular.render("class-recommendation/edit"),replace:!0,link:function(e){e.data=e.$parent.data,e.data.topicsCount||(e.data.topicsCount=5),e.data.coursesLimitMax||(e.data.coursesLimitMax=7),e.data.coursesLimitMin||(e.data.coursesLimitMin=2)}}}t.exports=[n]},{}],212:[function(e,t){"use strict";function n(e,t){return{restrict:"AE",scope:{data:"=?"},template:angular.render("class-recommendation/cms"),replace:!0,link:function(e,n,r){e.config=t,e.isAdmin="true"===r.isAdmin,e.edit=e.$parent.edit,e.data||(e.data=e.$parent.data||r.data&&JSON.parse(r.data))}}}t.exports=["$sce","config",n]},{}],213:[function(e,t){"use strict";function n(e,t,n){return{restrict:"AE",template:angular.render("class-recommendation/view"),replace:!0,scope:{topicsCount:"=",coursesLimitMax:"=",coursesLimitMin:"=",clTitle:"=",subtitle:"="},link:function(i){function o(){l.fetchFilteredTopics(function(e){c=e.slice(0,i.topicsCount),a()})}function a(){r.eachSeries(c,function(t,r){var o={topics:t._id,limit:i.coursesLimitMax};t.courses=[],e.getRecommendations(o).then(function(e){n.addItems(t.courses,e,"_id"),t.courses=_.first(t.courses,i.coursesLimitMax),r()})},function(){i.topics=s(c)})}function s(e){var t=[];return angular.forEach(e,function(e){e.courses&&e.courses.length>=i.coursesLimitMin&&t.push(e)}),t}angular.extend(i,{topics:[]});var c,l=new t;o()}}}var r=e("async");t.exports=["RecommendationsService","ScoresService","DuplicateService",n]},{async:497}],214:[function(e){"use strict";var t=e("../../common/app");t.directive("classRecommendation",e("./directives/view")),t.directive("classRecommendationCms",e("./directives/cms/view")),t.directive("classRecommendationCmsEdit",e("./directives/cms/edit"))},{"../../common/app":19,"./directives/cms/edit":211,"./directives/cms/view":212,"./directives/view":213}],215:[function(e,t){"use strict";function n(e,t){return{restrict:"AE",scope:{course:"=?",courseId:"@",productId:"@",event:"=?",hideOnair:"@",liveNow:"@",image:"@",title:"@clTitle",instructors:"@"},template:function(e,t){return t.template?angular.render("class-tile/"+t.template):angular.render("class-tile/view")},replace:!0,link:function(n,i,o){function a(){n.courseId?e.getCourseById(n.courseId,{keys:["instructors"]}).then(function(e){n.course=e,n.productId=n.courseId,n.event||(n.event=t.getNearestEvent(n.course.broadcast_schedules)),n.reInit=!0}):n.reInit=!0}function s(){n.course&&(n.course.title=n.course.short_title,n.productId=n.course._id,u())}function c(){if(n.event){n.eventId=n.event._id;var e=t.getEventBroadcastData(n.event);n.event.isLive=void 0!==_.findWhere(e.all,{broadcast_type:"live"}),n.course&&(n.course.day=l(n.event.start_time,"D"),n.course.month=l(n.event.start_time,"MMM")),d()}}function l(e,t){return r.unix(e).tz("America/Los_Angeles").format(t)}n.allowUnfollow="true"===o.allowUnfollow,n.actionable="false"!==o.actionable;var u=n.$watch("course",s),d=n.$watch("event",c);a()}}}t.exports=["CatalogService","EventService",n];var r=e("moment-timezone")},{"moment-timezone":506}],216:[function(e){"use strict";var t=e("../../common/app");t.directive("classTile",e("./directives/view"))},{"../../common/app":19,"./directives/view":215}],217:[function(e,t){"use strict";function n(e,t,n,i,o){function a(n,r){e.headerTheme=r||t.page.theme}function s(e){return r.any(t.page.urls,function(t){return t.path==="/"+e})}function c(){var e=t.page;return e.acl&&-1!==e.acl.indexOf("admin_pages_homepage")}angular.extend(t,{$window:n,setPageTheme:a,page:i&&i.dump&&i.dump.data}),c()?o.trackAffiliateLinkConversion(null,"media6HomePage"):s("photography")&&o.trackAffiliateLinkConversion(null,"media6Photo"),t.$on("user:login",a),t.$on("user:register",a)}var r=e("underscore");t.exports=["$rootScope","$scope","$window","rind","AnalyticsService",n]},{underscore:void 0}],218:[function(e){"use strict";var t=e("../../common/app");t.controller("cmsPage",e("./controllers/page"))},{"../../common/app":19,"./controllers/page":217}],219:[function(e,t){"use strict";function n(e){return{restrict:"AE",scope:{conditions:"=?",startText:"@",addText:"@"},template:angular.render("conditionals/edit"),replace:!0,link:function(t,n,r){function i(){t.newCondition.key&&t.newCondition.value&&(t.conditions.push(angular.copy(t.newCondition)),t.addingCondition=!1,t.newCondition.key="",t.newCondition.value="")}function o(){t.addingCondition=!0,e(function(){n[0].querySelector("input").focus()},10)}function a(){t.addingCondition=!1}function s(e){t.conditions.splice(e,1)}function c(){t.conditions=[]}angular.extend(t,{addCondition:i,addNewCondition:o,notAddingCondition:a,removeCondition:s,removeAllConditions:c,startText:r.startText||"If",addText:r.addText||"Add condition",newCondition:{key:"",value:""}}),t.data=t.$parent.module&&t.$parent.module.data,t.conditions||(t.data&&!t.data.conditions&&(t.data.conditions=[]),t.conditions=t.data&&t.data.conditions||[]),t.addingCondition=!t.conditions.length}}}t.exports=["$timeout",n]},{}],220:[function(e,t){"use strict";function n(){return{restrict:"AE",scope:{conditions:"=?",readOnly:"@",onRemove:"&",startText:"@"},template:angular.render("conditionals/list"),replace:!0,link:function(e,t,n){e.startText=n.startText||"If"}}}t.exports=[n]},{}],221:[function(e){"use strict";var t=e("../../common/app");t.directive("conditionalsEdit",e("./directives/edit")),t.directive("conditionalsList",e("./directives/list"))},{"../../common/app":19,"./directives/edit":219,"./directives/list":220}],222:[function(e,t){"use strict";function n(e){return{restrict:"AE",template:angular.render("countdown-timer/view"),replace:!0,scope:{wording:"@",dealStart:"=",dealEnd:"=",format:"=?",showProgressBar:"="},link:function(t){function n(){var n=r(),a=o.diff(n,"milliseconds");if(t.percent=100-Math.round(100*a/s),t.displayTimer=a>=0,t.displayTimer){var c=r.duration(a);t.days=Math.floor(c.asDays()),t.hours=c.hours(),t.minutes=c.minutes(),t.seconds=c.seconds(),t.countdownSale=t.days<=6}else e.cancel(i)}var i,o=r.unix(t.dealEnd),a=r.unix(t.dealStart),s=o.diff(a,"milliseconds");i=e(function(){n()},t.getTimeout()),n()},controller:["$scope",function(e){var t="dd-hh-mm-ss",n=1e3;e.getTimeout=function(){var r,i=["ss","mm","hh","dd"],o={ss:1e3,mm:6e4,hh:36e5,dd:864e5},a=i.length;if(void 0===e.format)return e.format=t,n;for(var s=0;a>s;s++)if(r=i[s],e.hasFormat(r))return o[r];return e.format=t,n},e.hasFormat=function(t){return e.format.indexOf(t)>=0}}]}}var r=e("moment");t.exports=["$interval",n]},{moment:void 0}],223:[function(e){"use strict";var t=e("../../common/app");t.directive("countdownTimer",e("./directives/view"))},{"../../common/app":19,"./directives/view":222}],224:[function(e,t){"use strict";function n(e,t){return{restrict:"AE",scope:{},template:angular.render("course-collection/edit"),replace:!0,link:function(n){n.data=n.$parent.data,n.data.courses||(n.data.courses=[]),n.addCourse=function(t){e.getComplete({slug:t.slug},function(e){if(e.data){var t={_id:e.data._id,nid:e.data.nid,slug:e.data.slug,image:e.data.image,title:e.data.title,short_title:e.data.short_title,instructors:r.deepOmit(e.data.instructors,"courses profile.bio profile.short_bio")};n.data.courses.push(t)}})},n.removeCourse=function(e){n.data.courses.splice(e,1)},n.onDrop=function(e,r,i,o,a,s){t(e,s,o),n.$apply()}}}}var r=e("underscore");t.exports=["courses","arrayMove",n]},{underscore:void 0}],225:[function(e,t){"use strict";function n(e,t,n){return{restrict:"AE",scope:{model:"=ngModel",edit:"=",size:"@"},template:angular.render("course-collection/tile"),replace:!0,link:function(e){e.config=t,e.constants=n}}}t.exports=["$sce","config","constants",n]},{}],226:[function(e,t){"use strict";function n(e,t){return{restrict:"AE",scope:{data:"=?"},template:angular.render("course-collection/view"),replace:!0,link:function(e){e.config=t,e.edit=e.$parent.edit,e.data||(e.data=e.$parent.data),e.$watch("data.courses",function(){if(e.edit){if(e.data.courses.length>0){e.courses=[],e.firstCourse=e.data.courses[0];for(var t=1;t0&&(n.counts.recommendPercentage=Math.round(n.counts.recommended/e*100))}}var c=n.$watch("productId",function(e){e&&(r(),c())})}}}t.exports=["CourseService","productResource","$document","$location",n]},{}],229:[function(e){"use strict";var t=e("../../common/app");t.directive("courseStats",e("./directives/view"))},{"../../common/app":19,"./directives/view":228}],230:[function(e,t){"use strict";function n(e,t,n){return{restrict:"AE",scope:{model:"=ngModel"},template:angular.render("course-tile/view"),replace:!0,link:function(t){t.config=n,t.owned=e.user.hasContent("purchased","course",t.model._id)}}}t.exports=["$rootScope","$sce","config",n]},{}],231:[function(e){"use strict";var t=e("../../common/app");t.directive("courseTile",e("./directives/view"))},{"../../common/app":19,"./directives/view":230}],232:[function(e,t){"use strict";function n(e){return{restrict:"AE",template:angular.render("course-video/edit"),replace:!0,scope:{data:"=?"},link:function(t){t.config=e,t.data||(t.data=t.$parent.data),t.data.course||(t.data.course={}),t.course=angular.copy(t.data.course),t.addCourse=function(e){t.data.course={_id:e._id,slug:e.slug,short_title:e.short_title}},t.removeCourse=function(){t.data.course={}}}}}t.exports=["config",n]},{}],233:[function(e,t){"use strict";function n(e,t,n,r){return{restrict:"AE",template:angular.render("course-video/view"),replace:!0,scope:{data:"=?"},link:function(i){function o(){n.findById({id:i.data.course._id},function(e){i.course=e.data,i.product=i.course.product,s(),i.videoPlayer=r.addVideoPlayer(i.course._id,i),i.videoPlayer.segments.getCourseToken(i.course.slug,a)})}function a(){i.segments=i.videoPlayer.segments.getSegments(i.course)}function s(){e.user&&e.user.hasContent&&(i.owned=e.user.hasContent("purchased","courses",i.course._id),i.owned===!1&&e.user.hasRole("owns_all_courses")&&(i.owned=!0,i.comped=!0),i.$applyAsync()) }i.config=t,i.data||(i.data=i.$parent&&i.$parent.data),i.data.course._id&&i.$watch("data.course",function(){o()})}}}t.exports=["$rootScope","config","courseResource","videoPlayerFactory",n]},{}],234:[function(e){"use strict";var t=e("../../common/app");t.directive("courseVideo",e("./directives/view")),t.directive("courseVideoEdit",e("./directives/edit"))},{"../../common/app":19,"./directives/edit":232,"./directives/view":233}],235:[function(e,t){"use strict";function n(e,t,n,r,i,o){return{restrict:"AE",scope:{product:"=",dismiss:"=?"},template:function(e,t){return t.template?angular.render("cross-sell-tile/cross-sell-"+t.template):angular.render("cross-sell-tile/cross-sell-large")},replace:!0,link:function(a,s,c){function l(){var e=a.$watch("playUrl",function(t){t&&(a.$broadcast("video:queue",{playUrl:t,posterUrl:a.product.image}),e())})}function u(){n.path(a.productLink)}function d(){return t.getCourseById(a.product.courseId,{keys:["promo"]}).then(function(e){return e}).catch(console.error)}function p(){a.course.promo&&a.course.promo[0]&&a.course.promo[0].media&&a.course.promo[0].media.title&&i.tokenById({id:a.course.promo[0].media._id},function(e){e&&e.data&&(a.course.hasPromoVideo=!0,a.playUrl=e.data.playUrl)})}if(a.product){var f=a.$watch("product",function(e){e&&(a.reInit=!0,f())});angular.extend(a,{onVideoPlayerReady:l,productId:a.product._id,productLink:r("linkToSource")(a.product,!1),seeMore:u}),a.product.image=r("magick")(a.product.image,{width:768}),d().then(function(e){return a.course=e,"small"!==c.template?p():void 0}),e.$on("video:event",function(e,t,n){n.playUrl&&n.playUrl===a.playUrl&&o.onDemandVideoView(a.course)})}}}}t.exports=["$rootScope","CatalogService","$location","$filter","mediaResource","trackFactory",n]},{}],236:[function(e){"use strict";var t=e("../../common/app");t.directive("crossSellTile",e("./directives/cross-sell"))},{"../../common/app":19,"./directives/cross-sell":235}],237:[function(e,t){"use strict";function n(e,t,n,r,i,o,a,s,c,l){return{restrict:"AE",scope:{productId:"@",product:"=?",via:"=?",type:"@?"},template:function(){return r.context.buckets.variations.name.NewCheckout?angular.render("cta/buy-new"):angular.render("cta/buy")},replace:!0,transclude:!0,link:function(u,d,p,f,h){function m(){return o.findById(u.productId||u.product._id).then(function(t){return t?(u.product=t,u.product.source.product={source:{source_type:u.sourceType}},u.addToCartUrl="/add-to-cart/"+t._id,null):e.reject("no product")})}function g(){var t=e.defer();return a.price({productId:u.product._id},function(e){u.price=e.data,M(),t.resolve()},t.reject),t.promise}function v(){try{u.purchasable=o.isProductPurchasable(u.product)}catch(e){u.purchasable=!0}u.price&&0===u.price.current_price&&d.on("mousedown keydown touchstart",function(e){t.user.valid()||(e.preventDefault(),e.stopPropagation(),t.$broadcast("login:show",{onboarding:"false"!==p.onboarding,prompt:"buy",promptClass:u.product&&u.product.source&&u.product.source.title}))})}function b(){d.on("mousedown keydown touchstart",function(){i.freeClassOptInStart(u.product,d.text().trim(),"button")})}function y(){d.addClass("disabled"),d.removeClass("btn-primary"),u.buttonText=n("i18n")("item-in-cart","In Cart"),u.clone.length&&d.find("span").empty(),u.showSpinner=!1}function M(){u.clone&&0===u.clone.length&&(u.price&&0===u.price.current_price?(d.addClass("cta-buy-free-class"),u.buttonText="Get the free class",b()):u.buttonText="Buy")}function w(){u.showSpinner=!0,u.buttonText="",u.clone.length&&d.find("span").empty()}function A(e){e.preventDefault(),e.stopPropagation();var n=d.text().trim(),o=u.buyType,a="crossSell"===u.type?"cross":"anchor";if(u.price&&u.price.current_price>0)u.product.pricing||(u.product.pricing=u.price),i.addToCart(u.product,a,n,o),r.context.buckets.variations.name.NewCheckout?(w(),"crossSell"===u.type?l.add(u.productId).then(function(){y(),u.$emit("dropdownCart:open"),window.scrollTo(0,0)}):window.location=u.addToCartUrl):window.location=u.addToCartUrl;else if(!u.showSpinner){var p="Getting the free class";u.showSpinner=!0,u.buttonText=p,s.processFreeOrder({productId:u.product._id}).$promise.then(function(){i.freeClassOptInComplete(u.product,n,o,function(){t.$broadcast("order:free:complete")});var e=new c;e.updateScores()})}}var x=null;angular.extend(u,{productAction:p.productAction||"buy",buyType:p.buyType||"button",showSpinner:!1,sourceType:p.sourceType||"course",addToCart:A}),h(function(e){u.clone=e});var k=u.$watchGroup(["product","productId"],function(e){if(e){var t=e[0],n=e[1];(t||n)&&(k(),m().then(g).then(v))}});r.context.buckets.variations.name.NewCheckout&&(x=t.$watch("user.cart",function(e){var t;e&&(t=u.productId||u.product&&u.product._id,t&&(_.contains(e.cart.items,t)&&y(),x()))})),p.class||d.attr("class","btn btn-primary product-buy-button")}}}t.exports=["$q","$rootScope","$filter","rind","trackFactory","ProductService","ecommerceResource","Ecommerce","ScoresService","CartService",n]},{}],238:[function(e,t){"use strict";function n(e,t,n){return{restrict:"AE",scope:{entity:"@",entityId:"@",entityIds:"=?",entitySlug:"@",entityName:"@",ctaLabel:"@"},replace:!0,transclude:!0,template:'',link:function(r,i,o,a,s){function c(){var e={};return r.entityId?e.entityId=r.entityId:angular.isArray(r.entityIds)?e.entityIds=r.entityIds:r.entitySlug?e.entitySlug=r.entitySlug:r.entityName&&(e.entityName=r.entityName),e}function l(){var e=c();u&&angular.isFunction(u.valid)&&(u.isFollowing(r.entity,e).then(function(e){r.following=e}),r.ready=!0)}var u=e.user;angular.extend(r,{following:!1}),t(l,0),r.$on("user:updateContent",l),r.$on("user:login",l),r.$on("user:register",l),r.$watchCollection(function(){return e.user&&angular.isFunction(e.user.valid)&&e.user.valid()&&e.user._data.user.follows&&e.user._data.user.follows[r.entity]},l),s(r,function(e){var t=n(e);i.html(t.nodes.FOLLOWING||'Following')})}}}t.exports=["$rootScope","$timeout","parseTransclusions",n]},{}],239:[function(e,t){"use strict";function n(e,t,n,i,o){return{restrict:"AE",scope:{entity:"@",entityId:"@",entityIds:"=?",entitySlug:"@",entityName:"@",ctaLabel:"@"},replace:!0,transclude:!0,template:'',link:function(t,a,s,c,l){function u(){var e={};return t.entityId?e.entityId=t.entityId:angular.isArray(t.entityIds)?e.entityIds=t.entityIds:t.entitySlug?e.entitySlug=t.entitySlug:t.entityName&&(e.entityName=t.entityName),e}function d(n){if(n.preventDefault(),!t.pending){t.pending=!0;var c,l=u();g.isFollowing(t.entity,l).then(function(n){return c=n?"unfollow":"follow","unfollow"!==c||y?"follow"!==c||b?(a.removeClass("no-pointer"),"follow"===c&&e.user.followEventSource(l.entityId||l.entityIds,c),g[c](t.entity,l).then(function(){try{var e=r.keys(l)[0]}catch(t){}i.follow(c,m,l[e],s.moduleLocation,"button"),p();var n=new o;n.updateScores()}).finally(function(){t.pending=!1}),void 0):(t.pending=!1,!1):(a.addClass("no-pointer"),t.pending=!1,!1)})}}function p(){var e=u();return g&&angular.isFunction(g.valid)?(g.isFollowing(t.entity,e).then(function(e){t.following=e,e?a.html(h):f()},function(){t.following=!1,f()}),t.ready=!0,void 0):(f(),t.ready=!0,void 0)}function f(){b?a.html(v):a.html("")}var h,m={cta_label:t.ctaLabel||a.find("button").text()||"Follow",follow_type:t.entity||void 0,follow_name:t.entityName||t.entitySlug||void 0},g=e.user,v='Follow',b="false"!==s.canFollow,y="false"!==s.canUnfollow;angular.extend(t,{toggleFollow:d,ready:!1,following:!1,pending:!1,getParams:u}),l(t,function(e){var t=n(e);v=t.nodes.FOLLOW||t.raw||v,h=t.nodes.FOLLOWING||'Following'}),p(),t.$on("user:updateContent",p),t.$on("user:login",p),t.$on("user:register",p)}}}var r=e("underscore");t.exports=["$rootScope","$timeout","parseTransclusions","trackFactory","ScoresService",n]},{underscore:void 0}],240:[function(e,t){"use strict";function n(e,t,n,r){return{restrict:"AE",scope:{product:"="},template:angular.render("cta/gift"),replace:!0,transclude:!0,link:function(i){function o(){r.findById({id:i.productId},function(e){i.product=e.data})}var a=i.$watch("product",function(e){if(e){var t=e;t&&(t.source&&t.source.flags||i.productId?(i.purchasable=-1===i.product.source.flags.indexOf("!for_sale")?!0:!1,i.isFreeCourse=0===i.product.full_price,a()):(i.productId=t._id,o()))}});i.startGifting=function(){e.$emit("user:gift",{product:i.product}),n.addToCart(i.product,"gift",t("i18n")("gifting-button","gift this class"))}}}}t.exports=["$rootScope","$filter","trackFactory","productResource",n]},{}],241:[function(e,t){"use strict";function n(e,t,n,r){return{restrict:"AE",scope:{product:"=",productAction:"@",ctaLabel:"@",ctaType:"@",productId:"@",productType:"@"},template:'',replace:!0,transclude:!0,link:function(i,o,a,s,c){function l(){i.productId=i.productId||i.product&&i.product._id,i.productType=i.productType||i.product&&i.product.type;try{i.enrollable=-1===i.product.flags.indexOf("!allow_enrollment")}catch(e){i.enrollable=!0}}function u(){return e.user.hasContent?(l(),e.user.hasContent("enrolled",i.productType,i.productId)):void 0}function d(){u()?o.html(h):o.html(f),i.ready=!0}function p(t){t.preventDefault();var n=u()?"unenroll":"enroll";if("unenroll"===n&&!m)return!1;l();var a=i.ctaLabel||o.text().trim();e.user.updateContent(n,i.productType,i.productId,i.product,a,i.ctaType);var s=new r;s.updateScores()}var f,h,m="true"===a.canUnRsvp;i.toggleRsvp=p,i.$on("user:updateContent",d),i.$on("user:login",d),i.$on("user:register",d),t(d,100);var g=i.$watch("product",function(){i.product&&(l(),d(),g())});c(i,function(e){var t=n(e);f=t.nodes.RSVP||t.raw||'RSVP',h=t.nodes.ENROLLED||'You are enrolled.'})}}}t.exports=["$rootScope","$timeout","parseTransclusions","ScoresService",n]},{}],242:[function(e,t){"use strict";function n(e,t){return{restrict:"AE",replace:!0,transclude:!0,template:angular.render("cta/share"),scope:{product:"="},link:function(n){var r=n.$watch("product",function(i){if(i){var o=n.product.social||{};n.text=o.retweet_text||"Check out this amazing class from CreativeLive",n.url=encodeURIComponent(e.context.url),n.img=t("magick")(n.product.image.file,{raw:!0}),n.title=n.product.short_title,r()}})}}}t.exports=["rind","$filter",n]},{}],243:[function(e,t){"use strict";function n(e,t){var n=new t;return{restrict:"AE",scope:{product:"=",ctaType:"@",productId:"@",productType:"@",hideLabel:"=",onLabel:"@",offLabel:"@"},template:angular.render("cta/star"),replace:!0,transclude:!0,link:function(t,r,i,o,a){function s(){t.buttonLabel=t.onLabel&&t.offLabel?t.starred?t.onLabel:t.offLabel:a()[0]&&a()[0].textContent}function c(){return e&&e.user&&"function"==typeof e.user.hasContent?(t.starred=e.user.hasContent("starred",t.productType,t.productId),t.starred):void 0}function l(i){var o;i.preventDefault(),i.stopPropagation();var o="star",a="follow";t.starred&&(o="unstar",a="unfollow"),e.user.updateContent(o,t.productType,t.productId,t.product,r.text().trim(),t.ctaType||"button"),e.user[a](t.productType||"course",{entityId:t.productId}),n.updateScores()}if(t.toggleStar=l,t.$on("user:updateContent",c),t.$watch("starred",s),t.product)var u=t.$watch("product",function(e){e&&(c(),t.productId=e._id,t.productType=e.type,u())});else c()}}}t.exports=["$rootScope","ScoresService",n]},{}],244:[function(e){"use strict";var t=e("../../common/app");t.directive("ctaBuy",e("./directives/buy")),t.directive("ctaRsvp",e("./directives/rsvp")),t.directive("ctaStar",e("./directives/star")),t.directive("ctaShare",e("./directives/share")),t.directive("ctaFollow",e("./directives/follow")),t.directive("ctaFollowStatus",e("./directives/follow-status")),t.directive("ctaGift",e("./directives/gift"))},{"../../common/app":19,"./directives/buy":237,"./directives/follow":239,"./directives/follow-status":238,"./directives/gift":240,"./directives/rsvp":241,"./directives/share":242,"./directives/star":243}],245:[function(e,t){"use strict";function n(){return{restrict:"EA",template:function(){return rind.context.buckets.variations.name.NewCheckout?angular.render("ecom/billingForm"):angular.render("ecom/billingFormOriginal")}}}t.exports=[n]},{}],246:[function(e,t){"use strict";function n(e,t){return{restrict:"AE",template:angular.render("ecom/cart"),replace:!0,scope:{data:"=?"},link:function(n,i){function o(e){$.contains(i[0],e.target)||(n.cartDropdownOpen=!1)}function a(e,i,o,a){var s=void 0,c=void 0,l=0,u=void 0,d=void 0;n.lineItems&&n.lineItems.length&&(u=n.lineItems.length,d=r.pluck(n.lineItems,"_id"),s=n.lineItems.filter(function(e){return!r.contains(e.cross_sells,e._id)}).length,c=n.lineItems.filter(function(e){return e.isCrossSellItem}).length,n.lineItems.forEach(function(e){e.cross_sells&&e.cross_sells.length&&(l+=e.cross_sells.length)}));var p={action:e,cta_type:i,count_anchor:s,count_cross:c,count_offer:l,num_items:u,product_ids:d};o&&(p.cta_label=o),a&&(p.offer_type="cross",p.product_id=a),t.cart(p)}angular.extend(n,{cartDropdownOpen:!1,anchorClassesCount:0,crossSellCount:0,crossSells:[]}),n.$watch("cartDropdownOpen",function(e){e&&a("dropdown","button")}),e.$on("dropdownCart:open",function(){n.cartDropdownOpen=!0}),e.$watch("user.cart",function(){if(e.user.cart){if(!e.user.cart.lineItems||!e.user.cart.lineItems.length)return n.numLineItems=0,void 0;n.lineItems=e.user.cart.lineItems,n.numLineItems=n.lineItems.length,n.crossSells=[],n.lineItems.forEach(function(e){n.crossSells=e.cross_sells.concat(n.crossSells)})}}),n.toggleCart=function(){n.cartDropdownOpen=!n.cartDropdownOpen},n.closeDropdownCart=function(){n.cartDropdownOpen=!1},$(document.body).mousedown(o),n.removeCrossSellFromCart=function(e){n.crossSells=r.filter(n.crossSells,function(t){return t._id!==e}),a("dismiss","button","dismiss",e)}}}}var r=e("underscore");t.exports=["$rootScope","trackFactory",n]},{underscore:void 0}],247:[function(e,t){"use strict";function n(e){return{restrict:"E",template:angular.render("ecom/ccFormatDetect"),link:function(t,n){function r(){g.on("keypress",s),g.on("keypress",c),g.on("keypress",l),g.on("paste",u),g.on("change",u),g.on("input",u)}function i(){t.paymentInfo&&(h=f(t.paymentInfo.creditCard),t.cardType=h?h.type:!1)}function o(e){var t;return null!=e.prop("selectionStart")&&e.prop("selectionStart")!==e.prop("selectionEnd")?!0:null!=("undefined"!=typeof document&&null!==document?null!=(t=document.selection)?t.createRange:void 0:void 0)&&document.selection.createRange().text?!0:!1}function a(e){var t,n,r,i,o,a,s,c;for(null==e&&(e=""),r="0123456789",i="0123456789",a="",t=e.split(""),s=0,c=t.length;c>s;s++)n=t[s],o=r.indexOf(n),o>-1&&(n=i[o]),a+=n;return a}function s(e){var t;return e.metaKey||e.ctrlKey?!0:32===e.which?!1:0===e.which?!0:e.which<33?!0:(t=String.fromCharCode(e.which),!!/[\d\s]/.test(t))}function c(e){var t,n,r,i;return t=$(e.currentTarget),r=String.fromCharCode(e.which),/^\d+$/.test(r)&&!o(t)?(i=(t.val()+r).replace(/\D/g,""),n=f(i),n?i.length<=n.length[n.length.length-1]:i.length<=16):void 0}function l(e){var t,n,r,i,o,a,s;return r=String.fromCharCode(e.which),!/^\d+$/.test(r)||(t=$(e.currentTarget),s=t.val(),n=f(s+r),i=(s.replace(/\D/g,"")+r).length,a=16,n&&(a=n.length[n.length.length-1]),i>=a||null!=t.prop("selectionStart")&&t.prop("selectionStart")!==s.length)?void 0:(o=n&&"amex"===n.type?/^(\d{4}|\d{4}\s\d{6})$/:/(?:^|\s)(\d{4})$/,o.test(s)?(e.preventDefault(),setTimeout(function(){return t.val(s+" "+r)})):o.test(s+r)?(e.preventDefault(),setTimeout(function(){return t.val(s+r+" ")})):void 0)}function u(e){var t;return t=$(e.currentTarget),setTimeout(function(){var e;return e=t.val(),e=a(e),e=p(e),d(e,t)})}function d(e,t){var n,r,i,o,a;try{r=t.prop("selectionStart")}catch(s){r=null}return o=t.val(),t.val(e),null!==r&&t.is(":focus")?(r===o.length&&(r=e.length),o!==e&&(a=o.slice(r-1,+r+1||9e9),n=e.slice(r-1,+r+1||9e9),i=e[r],/\d/.test(i)&&a===""+i+" "&&n===" "+i&&(r+=1)),t.prop("selectionStart",r),t.prop("selectionEnd",r)):void 0}function p(e){var t,n,r,i;return e=e.replace(/\D/g,""),(t=f(e))?(r=t.length[t.length.length-1],e=e.slice(0,r),t.format.global?null!=(i=e.match(t.format))?i.join(" "):void 0:(n=t.format.exec(e),null!=n?(n.shift(),n=$.grep(n,function(e){return e}),n.join(" ")):void 0)):e}function f(e){var t,n,r,i,o,a,s,c;for(e=(e+"").replace(/\D/g,""),i=0,a=m.length;a>i;i++)for(t=m[i],c=t.patterns,o=0,s=c.length;s>o;o++)if(r=c[o],n=r+"",e.substr(0,n.length)===n)return t}var h,m=e,g=angular.element(n.find("input")[0]);t.cardType=!1,t.$watch("paymentInfo.creditCard",i),r()}}}t.exports=["PaymentCards",n]},{}],248:[function(e,t){"use strict";function n(e,t,n,o,a,s,c,l,u,d,p,f,h,m,g,v,b,y,M,w,A){return{restrict:"AE",template:angular.render("ecom/checkout"),replace:!0,scope:{userCart:"=cart",type:"@"},link:function(a){function w(t){Ot&&(t?(x(t),_()):a.cart={items:[]},e.ready||k()||$(),e.ready=!0),Ot=!0}function x(e){p.set(e.cart,e.lineItems),a.cart=p.get(),a.items=e.lineItems,a.coupons=e.coupons,a.subtotal=e.subtotal,a.total=e.total,a.discountedTotal=r.reduce(r.pluck(a.coupons,"impact"),function(e,t){return e+t},0),N(),a.analyticsProps={num_items:a.items.length,course_ids:r.chain(a.items).pluck("source").pluck("_id").value(),product_ids:r.pluck(a.items,"_id")};var t={action:"start",checkout_type:"order"};a.customer&&a.customer.creditCards&&a.customer.creditCards.length&&(t.action="auto",t.checkout_type="billing"),gt||(r.extend(t,a.analyticsProps),c.checkoutOrderStart(t),gt=!0),yt&&!bt&&(c.checkout("complete","billing",a.analyticsProps),bt=!0);var n={action:"start",checkout_type:"order"};a.customer&&a.customer.creditCards&&a.customer.creditCards.length&&(n.action="auto",n.checkout_type="billing"),gt||(r.extend(n,a.analyticsProps),c.checkoutOrderStart(n),gt=!0)}function k(){return a.coupons&&a.coupons.length}function _(){a.subDirectOptions={total:a.total,minLimit:2e3},a.subdirect=v.applicable("subdirect",a.subDirectOptions)}function S(){braintree.setup(a.providerToken,"custom",{onReady:function(e){a.checkout=e},onError:function(){},onPaymentMethodReceived:function(e){it(),document.getElementById(Ct).setAttribute("value",e.nonce),T(),"PayPalAccount"===e.type&&(a.paypal=e,X())},paypal:{paymentMethodNonceInputField:Ct,singleUse:!1,headless:!0,amount:parseFloat(o("centsToDollars")(a.total)),currency:"USD",locale:"en_us"},dataCollector:{paypal:!0}})}function $(){e.user.getApplicableCoupons().then(function(e){i.eachSeries(e,function(e,n){k()||(a.coupon.code=e,F(function(){t(function(){n()},10)}))})})}function z(e){a.freeOrder=0===e,a.freeOrder&&(a.checkoutForm.$invalid=!1,it())}function T(){a.paymentInfo.selectedPaymentMethod&&(q()||I()?E():a.checkoutForm.$invalid=angular.element("#"+Ct).val()?!1:!0)}function C(e){var t=a.paymentInfo&&a.paymentInfo.selectedPaymentMethod&&a.paymentInfo.selectedPaymentMethod.type;t&&t!==e&&c.tabSection(null,e),D(e)}function O(e){13===e.keyCode&&a.coupon.code&&F()}function E(){a.checkoutForm.$invalid=!0;var e,t=a.billingAddress;R()?t.selectedState&&(e=t.selectedState.code):e=!0,t.firstName&&t.lastName&&t.country&&t.streetAddress&&t.city&&e&&t.zipCode&&(a.checkoutForm.$invalid=I()?a.paymentInfo.creditCard&&a.paymentInfo.expirationMonth&&a.paymentInfo.expirationYear&&a.paymentInfo.cvv?!1:!0:!1),a.checkoutForm.$invalid||bt||(yt=!0),t.vat||(a.vatError="")}function L(){a.showVat=a.billingAddress&&a.billingAddress.country&&a.billingAddress.country.vat,a.billingAddress.vat="",a.vatExemptCodeValid=!1,a.vatError="",N()}function B(){N(),E()}function N(){a.billingAddress.country&&!r.isUndefined(a.total)&&(a.vatExemptCodeValid?(a.total=a.subtotal-(a.discountedTotal||0),a.taxobject={total:0,userVAT:a.billingAddress.vat}):f.getTax({billingInfo:a.billingAddress,amount:a.subtotal-(a.discountedTotal||0)},function(e){e.success&&(a.total=a.subtotal-(a.discountedTotal||0)+e.data.total,a.taxobject=e.data)}))}function q(){return a.paymentInfo.selectedPaymentMethod?"CreditCard"===a.paymentInfo.selectedPaymentMethod.type&&a.paymentInfo.selectedPaymentMethod.token:!1}function I(){return a.paymentInfo.selectedPaymentMethod?"CreditCard"===a.paymentInfo.selectedPaymentMethod.type&&!a.paymentInfo.selectedPaymentMethod.token:!1}function P(){return a.paymentInfo.selectedPaymentMethod?"PayPal"===a.paymentInfo.selectedPaymentMethod.type:!1}function R(){return a.billingAddress.country&&"US"===a.billingAddress.country.code?!0:!1}function D(e,t){it();var n=((a.paymentInfo||{}).selectedPaymentMethod||{}).type;n&&n!==e&&c.tabSection(null,n),"CreditCard"!==e||t||a.customer&&a.customer.creditCards&&a.customer.creditCards.length&&(t=a.customer.creditCards[0].token),a.paymentInfo.selectedPaymentMethod={type:e,token:t?t:null}}function W(){a.paypal={},document.getElementById(Ct).setAttribute("value",""),T()}function j(e){e.billingAddress.countryCodeAlpha2&&(a.billingAddress.country=a.countries.filter(function(t){return t.code===e.billingAddress.countryCodeAlpha2})[0]),a.billingAddress.streetAddress="",e.billingAddress.streetAddress&&(a.billingAddress.streetAddress+=e.billingAddress.streetAddress),e.billingAddress.extendedAddress&&(a.billingAddress.streetAddress+=", "+e.billingAddress.extendedAddress),e.billingAddress.locality&&(a.billingAddress.city=e.billingAddress.locality),R()?a.billingAddress.selectedState=a.states.filter(function(t){return t.code===e.billingAddress.region})[0]:e.billingAddress.region&&(a.billingAddress.inputState=e.billingAddress.region),e.billingAddress.postalCode&&(a.billingAddress.zipCode=e.billingAddress.postalCode)}function X(){var e=a.paypal.details,t=a.billingAddress;t.firstName=e.firstName?e.firstName:t.firstName,t.lastName=e.lastName?e.lastName:t.lastName,e.billingAddress&&j(e)}function F(e){e=e||function(){},a.coupon.code&&(a.couponCodeError="",a.applyingCoupon=!0,a.coupon&&a.coupon.code&&(a.coupon.code=a.coupon.code.toUpperCase()),b.addCoupon(a.coupon.code,a.cart._id).then(function(t){a.applyingCoupon=!1;var n=r.find(t.appliedDiscounts,function(e){return e.code===a.coupon.code}),i={coupon_id:r.chain(n).pick("discountId").values().first().value()};r.extend(i,a.analyticsProps),c.checkout("complete","coupon",i),a.coupon.code="",e(null,!0)},function(t){a.applyingCoupon=!1,a.couponCodeError=t.message?t.message:Mt,e(null,!1)}))}function U(e){b.removeCoupon(e,a.cart._id).then(function(){},function(e){e.message&&at(e.message)})}function V(){a.vatExemptCodeValid=!1,a.billingAddress.vat=void 0,N()}function H(){a.vatError="",a.vatExemptCodeValid=!1,G(),h.verify(a.vat.countryCode,a.vat.number,function(e){e.valid?(a.vatExemptCodeValid=!0,e.vat_number&&(a.billingAddress.vat=a.vat.countryCode+e.vat_number)):(a.vatError=wt,a.vatExemptCodeValid=!1),N()})}function G(){var e;e=a.billingAddress.vat.substr(0,2).match(/[A-Za-z]{2}/),a.vat=e?{countryCode:e[0].toUpperCase(),number:a.billingAddress.vat.substr(2)}:{countryCode:a.billingAddress.country.code,number:a.billingAddress.vat}}function K(){return G(),h.verify(a.vat.countryCode,a.vat.number,function(e){return e.valid?et():at(wt)})}function Y(){var e={number:a.paymentInfo.creditCard,expirationMonth:a.paymentInfo.expirationMonth,expirationYear:a.paymentInfo.expirationYear,cvv:a.paymentInfo.cvv};return e&&e.number&&e.expirationMonth&&e.expirationYear&&e.cvv?f.validatePayment(a.providerToken,e).then(function(e){return a.paymentInfo.ccToken=e,tt()},function(){return at(),ot()}):at(St)}function J(){var e=angular.element("#"+Ct).val();return e?(a.cart.selectedPaymentMethod="PayPal",a.paymentInfo.ccToken=e,tt()):at(At)}function Q(){return a.cart.selectedPaymentMethod="Existing",a.paymentInfo.ccToken=a.paymentInfo.selectedPaymentMethod.token,tt()}function Z(){return a.cart.selectedPaymentMethod="Free",a.paymentInfo.ccToken="Free",tt()}function et(){if(0===a.total)Z();else if(I())Y();else if(P())J();else{if(!q())return at(xt);Q()}}function tt(){if(!a.orderProcessing){rt(),m.set(a.billingAddress),g.set(a.paymentInfo);var e={ccToken:g.get().ccToken,billingInfo:m.get(),selectedPaymentMethod:a.cart.selectedPaymentMethod};"gift"===a.type&&(e.gift=y.get()),f.review(e,function(e){return e.success?(a.order=e.data.order,dt(),void 0):!e.success&&e.message?(nt(),"braintree"===e.processor?at(xt):at(e.message)):(nt(),at())},function(e){var t=null;return e&&e.data&&400===e.data.statusCode&&e.data.message&&e.data.message.match(/state/i)&&(t=kt),nt(),at(t)})}}function nt(){a.orderProcessing=!1,a.orderCreateError=!0}function rt(){a.orderProcessing=!0,a.orderCreateError=!1}function it(){a.error={}}function ot(){a.showSpinner=!1}function at(e){return e||(e=_t),a.error.message=e,ot()}function st(e){a.removingCard||(a.removingCard=e,f.removeCard({ccToken:e},function(t){a.removingCard=!1,t.success?(a.customer.creditCards&&(a.customer.creditCards=r.reject(a.customer.creditCards,function(t){return t.token===e}),a.customer.creditCards.length||D("CreditCard")),a.customer.paypalAccounts&&(a.customer.paypalAccounts=r.reject(a.customer.paypalAccounts,function(t){return t.token===e}))):at($t)}))}function ct(){return a.checkoutForm.$submitted=!0,a.showSpinner=!0,it(),a.paymentInfo?a.freeOrder?et():a.paymentInfo.selectedPaymentMethod?a.billingAddress.firstName&&a.billingAddress.lastName&&a.billingAddress.country&&a.billingAddress.country.code&&a.billingAddress.streetAddress&&a.billingAddress.city&&a.billingAddress.zipCode?!R()||a.billingAddress.selectedState&&a.billingAddress.selectedState.code?a.billingAddress.country.vat&&a.billingAddress.vat?K():et():at(Tt):at(Tt):at(zt):void 0}function lt(){vt||(c.checkout("start","billing",a.analyticsProps),vt=!0)}function ut(){c.checkout("start","coupon",a.analyticsProps)}function dt(){var e=a.user.traits,t=Vault.Local.getList(),i={};r.each(t,function(e){var t=Object.keys(e)[0];t&&0===t.indexOf("trait_")&&(i[t.replace(/trait_/,"")]=e[t])}),a.order.traits=angular.extend({},i,e),a.showSpinner=!0,f.process({order:a.order,device_data:a.checkout.deviceData},function(e){return e.success?(ft(a.order),pt(a.order),a.items.forEach(function(e){M.clearProduct(e)}),a.redeem?a.partner&&a.partner.slug?(n.path("/redeem/"+a.partner.slug+"/confirmation"),a.showSpinner=!1):window.location="/redeem/confirmation":(a.$emit("ecom:order:process:success"),a.showSpinner=!1),a.orderSuccess=!0,ht(),void 0):(nt(),at())},function(){return nt(),at()})}function pt(t){var n=s(t||{},"raw.cart.coupon_codes.0");n&&e.user.removeApplicableCoupon(n)}function ft(t){var n=e.user.get("contentRights"),i=n.purchased&&n.purchased.courses&&n.purchased.courses.length||0,o=s(t||{},"raw.cart.coupon_code.0"),l={repeat:i>0,total:t.summaries.revenue,orderId:t.oid,checkout_type:"order",coupon_code:o,coupon:o,payment_method:a.paymentInfo&&a.paymentInfo.selectedPaymentMethod&&a.paymentInfo.selectedPaymentMethod.type,salePrice:t.summaries.salePrice};r.extend(l,a.analyticsProps);var u=a.user.traits;u&&r.each(Object.keys(u),function(e){l["trait_"+e]=u[e]}),e.user.updateTraits(function(){c.checkoutOrderComplete(l)})}function ht(){var e=new A;e.updateScores(),mt()}function mt(){var e;try{e=a.payeeDetails.billing_info.country.code}catch(t){}a.subDirectOptions.country=e,v.applicable("subdirect",a.subDirectOptions)&&v.sendEmail("subdirect",{order:a.order},function(e){e.success!==!0})}var gt=!1,vt=!1,bt=!1,yt=!1;r.extend(a,{error:{},cart:{},items:[],checkoutForm:{},coupon:{},couponCodeError:"",removingCard:!1,freeOrder:!1,enableLineItemRemove:"gift"!==a.type,billingAddress:{},paymentInfo:{},paypal:{},countries:l,states:u,years:d,checkout:!1,vatExemptCodeValid:!1,setSelectedPaymentMethod:D,isCardPayment:q,isNewCardPayment:I,removeCard:st,removePayPal:W,applyCoupon:F,applyVatExemptCode:H,removeCoupon:U,removeVatExemptCode:V,onSubmit:ct,onFocus:lt,couponStart:ut,couponKeypressHandler:O,onTabSelected:C,orderProcessing:!1});var Mt="Coupon code invalid",wt="VAT verification failed",At="Please provide your PayPal Account",xt="We had trouble processing your order. Check your payment info and try again.",kt="Address Missing State or Territory",_t="We had trouble processing your order. Check your information and try again.",St="Oops, we're missing your card info",$t="There was an error removing your card, please try again",zt="Please select a payment method",Tt="You forgot something, please complete all fields to complete purchase.",Ct="payPalNonce",Ot=!1;a.$watchCollection("paymentInfo",E),a.$watchCollection("billingAddress",E),a.$watch("billingAddress.country",L),a.$watch("billingAddress.selectedState",B),a.$watchCollection("paymentInfo.selectedPaymentMethod",T),a.$watch("total",z),a.$watch("userCart",w),a.$on("ecom:checkout:data:received",function(){D("CreditCard"),N(),S()})},controllerAs:"EcommerceCheckoutCtrl",controller:["$scope","$element",function(t){function n(n){if(!n.getToken.success)return e.errorStatus=500,void 0;t.providerToken=n.getToken.data.token,t.customer=n.getCustomer.braintree;try{n.getCustomer.historical&&(t.billingAddress=n.getCustomer.historical.payee_details.billing_info,t.billingAddress?(t.billingAddress.country=t.countries.filter(function(e){return e.code===t.billingAddress.country.code})[0],t.billingAddress.selectedState=t.states.filter(function(e){return e.code===t.billingAddress.selectedState.code})[0]):t.billingAddress={}),t.$emit("ecom:checkout:data:received")}catch(r){}}function i(){e.errorStatus=500,e.ready=!0}r.extend(t,{user:rind.context.session.user}),a.all({getToken:f.getToken().$promise,getCustomer:f.getCustomer({customer_id:t.user._id}).$promise}).then(n,i)}]}}var r=e("underscore"),i=e("async");t.exports=["$rootScope","$timeout","$location","$filter","$q","deepval","trackFactory","Countries","States","Years","Cart","Ecommerce","VAT","BillingInfo","PaymentInfo","PartnersService","CartService","GiftService","cacheClear","ReferralService","ScoresService",n]},{async:497,underscore:void 0}],249:[function(e,t){"use strict";function n(e,t,n,i){return{restrict:"EA",template:angular.render("ecom/orderDetail"),scope:{order:"=?",orderId:"@"},link:function(o){function a(e){if(!e)return s(new Error("no-order"));o.order=e,o.taxobject={total:0,userVAT:r(e||{},"payee_details.billing_info.vat"),taxtotal:e.tax_total},c(),o.coupons=e.raw.coupons,o.subtotal=e.subtotal,o.total=e.total;var t=r(o.order||{},"payee_details.method.card_type");t&&(o.order.payee_details.method.card_type=t.toLowerCase()),angular.forEach(o.order.line_items,function(e){var t=e.product.course_id||e.product.bundle_id;n.getCourseById(t).then(function(t){e.instructors=t.instructors,o.gift&&(e.slug=t.slug)})}),o.orderDetailReady=!0,l(),u()}function s(){t.path("/my-orders").replace(),l()}function c(){_.each(o.order.tax,function(e){e.cl_exemption_code&&(o.taxobject.userVAT=e.exemption_code,o.taxobject.clVAT=e.cl_exemption_code)})}var l=o.$watch("orderId",function(){e.user.valid()&&o.orderId&&e.user.getOrder({orderId:o.orderId,select:"slim"}).then(a,s)}),u=o.$watch("order",function(){o.order&&a(o.order)});o.editGift=function(){e.$emit("user:gift",{gift:o.order.gift,orderId:o.order._id}),i.gifting("edit",{gift_type:"order details",coupon_code:o.order.gift.coupon_code,orderId:o.order._id})}}}}var r=e("deepval");t.exports=["$rootScope","$location","CatalogService","trackFactory",n]},{deepval:504}],250:[function(e,t){"use strict";function n(e){return{restrict:"EA",template:angular.render("ecom/orderHistory"),link:function(t){e.user.valid()&&e.user.getOrders({select:"slim"}).then(function(e){t.orders=e,t.orderHistoryReady=!0},function(){t.orderHistoryReady=!0})}}}t.exports=["$rootScope",n]},{}],251:[function(e,t){"use strict";function n(){return{restrict:"E",scope:{order:"=",cart:"=",coupons:"=",savings:"=",subtotal:"=",total:"=",taxobject:"=",discountedTotal:"=?"},template:angular.render("ecom/totals"),link:function(e){rind.context.buckets.variations.name.NewCheckout?(e.$watch("taxobject",function(){e.taxobject&&(e.taxtotal=e.taxobject.total||e.taxobject.taxtotal||0) }),e.$watch("coupons",function(){e.discountedTotal=_.reduce(_.pluck(e.coupons,"impact"),function(e,t){return e+t},0)})):e.$watch("taxobject",function(){e.taxobject&&(e.taxtotal=e.taxobject.taxtotal)})}}}t.exports=[n]},{}],252:[function(e){"use strict";var t=e("../../common/app");t.directive("clEcomCart",e("./directives/cart")),t.directive("clCheckout",e("./directives/checkout")),t.directive("ccFormatDetect",e("./directives/ccFormatDetect")),t.directive("billingForm",e("./directives/billingForm")),t.directive("totals",e("./directives/totals")),t.directive("orderHistory",e("./directives/orderHistory")),t.directive("orderDetail",e("./directives/orderDetail")),t.service("BillingInfo",e("./services/billingInfo")),t.service("PaymentInfo",e("./services/paymentInfo")),t.service("Cart",e("./services/cart")),t.service("Ecommerce",e("./services/ecommerce")),t.service("Product",e("./services/product")),t.service("Countries",e("./services/countries")),t.service("PaymentCards",e("./services/paymentCards")),t.service("Years",e("./services/years")),t.service("States",e("./services/states")),t.service("VAT",e("./services/vat"))},{"../../common/app":19,"./directives/billingForm":245,"./directives/cart":246,"./directives/ccFormatDetect":247,"./directives/checkout":248,"./directives/orderDetail":249,"./directives/orderHistory":250,"./directives/totals":251,"./services/billingInfo":253,"./services/cart":254,"./services/countries":255,"./services/ecommerce":256,"./services/paymentCards":257,"./services/paymentInfo":258,"./services/product":259,"./services/states":260,"./services/vat":261,"./services/years":262}],253:[function(e,t){"use strict";function n(){var e=null,t=function(){e&&e.country&&"US"!==e.country.code&&(e.selectedState={code:"",name:e.inputState||""})};return{set:function(n){e=n,t()},get:function(){return e}}}t.exports=n},{}],254:[function(e,t){"use strict";function n(){function e(){if(t.lineItems){var e=_.map(t.lineItems,function(e){return e.flags?e.flags:void 0});e=_.compact(_.uniq(_.flatten(e))),t.flagged||(t.flagged={}),e&&e.length&&_.each(e,function(e){"!"===e[0]?(e=e.substr(1),t.flagged[e]=!1):t.flagged[e]=!0})}}var t={lineItems:null};return{set:function(n,r){t=n,t.lineItems=r,e()},get:function(){return t}}}t.exports=n},{}],255:[function(e,t){"use strict";function n(){return[{code:"US",name:"United States"},{code:"CA",name:"Canada"},{code:"AU",name:"Australia"},{code:"GB",name:"United Kingdom",vat:!0},{code:"DE",name:"Germany",vat:!0},{code:void 0,name:"-----------------------"},{name:"Afghanistan",code:"AF"},{name:"Åland",code:"AX"},{name:"Albania",code:"AL"},{name:"Algeria",code:"DZ"},{name:"American Samoa",code:"AS"},{name:"Andorra",code:"AD"},{name:"Angola",code:"AO"},{name:"Anguilla",code:"AI"},{name:"Antarctica",code:"AQ"},{name:"Antigua and Barbuda",code:"AG"},{name:"Argentina",code:"AR"},{name:"Armenia",code:"AM"},{name:"Aruba",code:"AW"},{name:"Australia",code:"AU"},{name:"Austria",code:"AT",vat:!0},{name:"Azerbaijan",code:"AZ"},{name:"Bahamas",code:"BS"},{name:"Bahrain",code:"BH"},{name:"Bangladesh",code:"BD"},{name:"Barbados",code:"BB"},{name:"Belarus",code:"BY"},{name:"Belgium",code:"BE",vat:!0},{name:"Belize",code:"BZ"},{name:"Benin",code:"BJ"},{name:"Bermuda",code:"BM"},{name:"Bhutan",code:"BT"},{name:"Bolivia",code:"BO"},{name:"Bonaire, Sint Eustatius and Saba",code:"BQ"},{name:"Bosnia and Herzegovina",code:"BA"},{name:"Botswana",code:"BW"},{name:"Bouvet Island",code:"BV"},{name:"Brazil",code:"BR"},{name:"British Indian Ocean Territory",code:"IO"},{name:"Brunei Darussalam",code:"BN"},{name:"Bulgaria",code:"BG",vat:!0},{name:"Burkina Faso",code:"BF"},{name:"Burundi",code:"BI"},{name:"Cambodia",code:"KH"},{name:"Cameroon",code:"CM"},{name:"Canada",code:"CA"},{name:"Cape Verde",code:"CV"},{name:"Cayman Islands",code:"KY"},{name:"Central African Republic",code:"CF"},{name:"Chad",code:"TD"},{name:"Chile",code:"CL"},{name:"China",code:"CN"},{name:"Christmas Island",code:"CX"},{name:"Cocos (Keeling) Islands",code:"CC"},{name:"Colombia",code:"CO"},{name:"Comoros",code:"KM"},{name:"Congo (Brazzaville)",code:"CG"},{name:"Congo (Kinshasa)",code:"CD"},{name:"Cook Islands",code:"CK"},{name:"Costa Rica",code:"CR"},{name:"Côte d'Ivoire",code:"CI"},{name:"Croatia",code:"HR",vat:!0},{name:"Cuba",code:"CU"},{name:"Curaçao",code:"CW"},{name:"Cyprus",code:"CY",vat:!0},{name:"Czech Republic",code:"CZ",vat:!0},{name:"Denmark",code:"DK",vat:!0},{name:"Djibouti",code:"DJ"},{name:"Dominica",code:"DM"},{name:"Dominican Republic",code:"DO"},{name:"Ecuador",code:"EC"},{name:"Egypt",code:"EG"},{name:"El Salvador",code:"SV"},{name:"Equatorial Guinea",code:"GQ"},{name:"Eritrea",code:"ER"},{name:"Estonia",code:"EE",vat:!0},{name:"Ethiopia",code:"ET"},{name:"Falkland Islands",code:"FK"},{name:"Faroe Islands",code:"FO"},{name:"Fiji",code:"FJ"},{name:"Finland",code:"FI",vat:!0},{name:"France",code:"FR",vat:!0},{name:"French Guiana",code:"GF"},{name:"French Polynesia",code:"PF"},{name:"French Southern Lands",code:"TF"},{name:"Gabon",code:"GA"},{name:"Gambia",code:"GM"},{name:"Georgia",code:"GE"},{name:"Germany",code:"DE",vat:!0},{name:"Ghana",code:"GH"},{name:"Gibraltar",code:"GI"},{name:"Greece",code:"EL",vat:!0},{name:"Greenland",code:"GL"},{name:"Grenada",code:"GD"},{name:"Guadeloupe",code:"GP"},{name:"Guam",code:"GU"},{name:"Guatemala",code:"GT"},{name:"Guernsey",code:"GG"},{name:"Guinea",code:"GN"},{name:"Guinea-Bissau",code:"GW"},{name:"Guyana",code:"GY"},{name:"Haiti",code:"HT"},{name:"Heard and McDonald Islands",code:"HM"},{name:"Honduras",code:"HN"},{name:"Hong Kong",code:"HK"},{name:"Hungary",code:"HU",vat:!0},{name:"Iceland",code:"IS"},{name:"India",code:"IN"},{name:"Indonesia",code:"ID"},{name:"Iran",code:"IR"},{name:"Iraq",code:"IQ"},{name:"Ireland",code:"IE",vat:!0},{name:"Isle of Man",code:"IM"},{name:"Israel",code:"IL"},{name:"Italy",code:"IT",vat:!0},{name:"Jamaica",code:"JM"},{name:"Japan",code:"JP"},{name:"Jersey",code:"JE"},{name:"Jordan",code:"JO"},{name:"Kazakhstan",code:"KZ"},{name:"Kenya",code:"KE"},{name:"Kiribati",code:"KI"},{name:"Korea, North",code:"KP"},{name:"Korea, South",code:"KR"},{name:"Kuwait",code:"KW"},{name:"Kyrgyzstan",code:"KG"},{name:"Laos",code:"LA"},{name:"Latvia",code:"LV",vat:!0},{name:"Lebanon",code:"LB"},{name:"Lesotho",code:"LS"},{name:"Liberia",code:"LR"},{name:"Libya",code:"LY"},{name:"Liechtenstein",code:"LI"},{name:"Lithuania",code:"LT",vat:!0},{name:"Luxembourg",code:"LU",vat:!0},{name:"Macau",code:"MO"},{name:"Macedonia",code:"MK"},{name:"Madagascar",code:"MG"},{name:"Malawi",code:"MW"},{name:"Malaysia",code:"MY"},{name:"Maldives",code:"MV"},{name:"Mali",code:"ML"},{name:"Malta",code:"MT",vat:!0},{name:"Marshall Islands",code:"MH"},{name:"Martinique",code:"MQ"},{name:"Mauritania",code:"MR"},{name:"Mauritius",code:"MU"},{name:"Mayotte",code:"YT"},{name:"Mexico",code:"MX"},{name:"Micronesia",code:"FM"},{name:"Moldova",code:"MD"},{name:"Monaco",code:"MC"},{name:"Mongolia",code:"MN"},{name:"Montenegro",code:"ME"},{name:"Montserrat",code:"MS"},{name:"Morocco",code:"MA"},{name:"Mozambique",code:"MZ"},{name:"Myanmar",code:"MM"},{name:"Namibia",code:"NA"},{name:"Nauru",code:"NR"},{name:"Nepal",code:"NP"},{name:"Netherlands",code:"NL",vat:!0},{name:"Netherlands Antilles",code:"AN"},{name:"New Caledonia",code:"NC"},{name:"New Zealand",code:"NZ"},{name:"Nicaragua",code:"NI"},{name:"Niger",code:"NE"},{name:"Nigeria",code:"NG"},{name:"Niue",code:"NU"},{name:"Norfolk Island",code:"NF"},{name:"Northern Mariana Islands",code:"MP"},{name:"Norway",code:"NO",vat:!0},{name:"Oman",code:"OM"},{name:"Pakistan",code:"PK"},{name:"Palau",code:"PW"},{name:"Palestine",code:"PS"},{name:"Panama",code:"PA"},{name:"Papua New Guinea",code:"PG"},{name:"Paraguay",code:"PY"},{name:"Peru",code:"PE"},{name:"Philippines",code:"PH"},{name:"Pitcairn",code:"PN"},{name:"Poland",code:"PL",vat:!0},{name:"Portugal",code:"PT",vat:!0},{name:"Puerto Rico",code:"PR"},{name:"Qatar",code:"QA"},{name:"Reunion",code:"RE"},{name:"Romania",code:"RO",vat:!0},{name:"Russian Federation",code:"RU"},{name:"Rwanda",code:"RW"},{name:"Saint Barthélemy",code:"BL"},{name:"Saint Helena",code:"SH"},{name:"Saint Kitts and Nevis",code:"KN"},{name:"Saint Lucia",code:"LC"},{name:"Saint Martin (French part)",code:"MF"},{name:"Saint Pierre and Miquelon",code:"PM"},{name:"Saint Vincent and the Grenadines",code:"VC"},{name:"Samoa",code:"WS"},{name:"San Marino",code:"SM"},{name:"Sao Tome and Principe",code:"ST"},{name:"Saudi Arabia",code:"SA"},{name:"Senegal",code:"SN"},{name:"Serbia",code:"RS"},{name:"Seychelles",code:"SC"},{name:"Sierra Leone",code:"SL"},{name:"Singapore",code:"SG"},{name:"Sint Maarten (Dutch part)",code:"SX"},{name:"Slovakia",code:"SK",vat:!0},{name:"Slovenia",code:"SI",vat:!0},{name:"Solomon Islands",code:"SB"},{name:"Somalia",code:"SO"},{name:"South Africa",code:"ZA"},{name:"South Georgia and South Sandwich Islands",code:"GS"},{name:"South Sudan",code:"SS"},{name:"Spain",code:"ES",vat:!0},{name:"Sri Lanka",code:"LK"},{name:"Sudan",code:"SD"},{name:"Suriname",code:"SR"},{name:"Svalbard and Jan Mayen Islands",code:"SJ"},{name:"Swaziland",code:"SZ"},{name:"Sweden",code:"SE",vat:!0},{name:"Switzerland",code:"CH"},{name:"Syria",code:"SY"},{name:"Taiwan",code:"TW"},{name:"Tajikistan",code:"TJ"},{name:"Tanzania",code:"TZ"},{name:"Thailand",code:"TH"},{name:"Timor-Leste",code:"TL"},{name:"Togo",code:"TG"},{name:"Tokelau",code:"TK"},{name:"Tonga",code:"TO"},{name:"Trinidad and Tobago",code:"TT"},{name:"Tunisia",code:"TN"},{name:"Turkey",code:"TR"},{name:"Turkmenistan",code:"TM"},{name:"Turks and Caicos Islands",code:"TC"},{name:"Tuvalu",code:"TV"},{name:"Uganda",code:"UG"},{name:"Ukraine",code:"UA"},{name:"United Arab Emirates",code:"AE"},{name:"United Kingdom",code:"GB",vat:!0},{name:"United States Minor Outlying Islands",code:"UM"},{name:"United States of America",code:"US"},{name:"Uruguay",code:"UY"},{name:"Uzbekistan",code:"UZ"},{name:"Vanuatu",code:"VU"},{name:"Vatican City",code:"VA"},{name:"Venezuela",code:"VE"},{name:"Vietnam",code:"VN"},{name:"Virgin Islands, British",code:"VG"},{name:"Virgin Islands, U.S.",code:"VI"},{name:"Wallis and Futuna Islands",code:"WF"},{name:"Western Sahara",code:"EH"},{name:"Yemen",code:"YE"},{name:"Zambia",code:"ZM"},{name:"Zimbabwe",code:"ZW"}]}t.exports=n},{}],256:[function(e,t){"use strict";function n(e,t){var n=e("/api/ecom",{},{getCart:{url:"/api/ecom/cart"},addItem:{method:"POST",url:"/api/ecom/cart/add"},addCoupon:{method:"POST",url:"/api/ecom/cart/addcoupon",transformRequest:function(e){return e.couponCode=e.couponCode.toUpperCase(),JSON.stringify(e)}},removeCoupon:{method:"POST",url:"/api/ecom/cart/removecoupon"},removeItem:{method:"POST",url:"/api/ecom/cart/remove"},review:{method:"POST",url:"/api/ecom/order/create"},process:{method:"POST",url:"/api/ecom/order/process"},processFreeOrder:{method:"POST",url:"/api/ecom/order/free"},getToken:{url:"/api/ecom/provider/token"},getOrder:{url:"/api/ecom/order"},getCustomer:{url:"/api/ecom/customer/:customer_id"},removeCard:{method:"POST",url:"/api/ecom/customer/removecard"},getTax:{method:"POST",url:"/api/ecom/tax/calculate"},updateGift:{method:"PATCH",url:"/api/ecom/order/:orderId/gift"}});return n.validatePayment=function(e,n){var r=t.defer(),i=new braintree.api.Client({clientToken:e});return i.tokenizeCard(n,function(e,t){return e?r.reject(e):(r.resolve(t),void 0)}),r.promise},n}t.exports=["$resource","$q","$timeout",n]},{}],257:[function(e,t){"use strict";function n(){var e=/(\d{1,4})/g;return[{type:"visa",patterns:[4],format:e,length:[13,16],cvcLength:[3],luhn:!0},{type:"mastercard",patterns:[51,52,53,54,55,22,23,24,25,26,27],format:e,length:[16],cvcLength:[3],luhn:!0},{type:"amex",patterns:[34,37],format:/(\d{1,4})(\d{1,6})?(\d{1,5})?/,length:[15],cvcLength:[3,4],luhn:!0},{type:"discover",patterns:[60,64,65,622],format:e,length:[16],cvcLength:[3],luhn:!0}]}t.exports=n},{}],258:[function(e,t){"use strict";function n(){var e=null;return{set:function(t){e=t},get:function(){return e}}}t.exports=n},{}],259:[function(e,t){"use strict";function n(e){var t=e("/api/product",{},{findById:{url:"/api/product/id/:id"}});return t}t.exports=["$resource",n]},{}],260:[function(e,t){"use strict";function n(){return[{code:"AL",name:"Alabama"},{code:"AK",name:"Alaska"},{code:"AS",name:"American Samoa"},{code:"AZ",name:"Arizona"},{code:"AR",name:"Arkansas"},{code:"CA",name:"California"},{code:"CO",name:"Colorado"},{code:"CT",name:"Connecticut"},{code:"DE",name:"Delaware"},{code:"DC",name:"District Of Columbia"},{code:"FM",name:"Federated States Of Micronesia"},{code:"FL",name:"Florida"},{code:"GA",name:"Georgia"},{code:"GU",name:"Guam"},{code:"HI",name:"Hawaii"},{code:"ID",name:"Idaho"},{code:"IL",name:"Illinois"},{code:"IN",name:"Indiana"},{code:"IA",name:"Iowa"},{code:"KS",name:"Kansas"},{code:"KY",name:"Kentucky"},{code:"LA",name:"Louisiana"},{code:"ME",name:"Maine"},{code:"MH",name:"Marshall Islands"},{code:"MD",name:"Maryland"},{code:"MA",name:"Massachusetts"},{code:"MI",name:"Michigan"},{code:"MN",name:"Minnesota"},{code:"MS",name:"Mississippi"},{code:"MO",name:"Missouri"},{code:"MT",name:"Montana"},{code:"NE",name:"Nebraska"},{code:"NV",name:"Nevada"},{code:"NH",name:"New Hampshire"},{code:"NJ",name:"New Jersey"},{code:"NM",name:"New Mexico"},{code:"NY",name:"New York"},{code:"NC",name:"North Carolina"},{code:"ND",name:"North Dakota"},{code:"MP",name:"Northern Mariana Islands"},{code:"OH",name:"Ohio"},{code:"OK",name:"Oklahoma"},{code:"OR",name:"Oregon"},{code:"PW",name:"Palau"},{code:"PA",name:"Pennsylvania"},{code:"PR",name:"Puerto Rico"},{code:"RI",name:"Rhode Island"},{code:"SC",name:"South Carolina"},{code:"SD",name:"South Dakota"},{code:"TN",name:"Tennessee"},{code:"TX",name:"Texas"},{code:"UT",name:"Utah"},{code:"VT",name:"Vermont"},{code:"VI",name:"Virgin Islands"},{code:"VA",name:"Virginia"},{code:"WA",name:"Washington"},{code:"WV",name:"West Virginia"},{code:"WI",name:"Wisconsin"},{code:"WY",name:"Wyoming"}]}t.exports=n},{}],261:[function(e,t){"use strict";function n(e){var t=e("/api/vat/verify/:country/:number",{country:"@country",number:"@number"});this.verify=function(e,n,r){t.get({country:e,number:n},function(e){return r(e.data)},function(){return r({valid:!0})})}}t.exports=["$resource",n]},{}],262:[function(e,t){"use strict";function n(){for(var e=[],t=(new Date).getFullYear(),n=t+10,r=t;n>r;r++)e.push(r);return e}t.exports=n},{}],263:[function(e,t){"use strict";function n(e,t,n){return{restrict:"AE",template:angular.render("event/chat"),scope:{eventId:"@"},replace:!0,controller:["$scope",function(r){var i=new n({onBroadcastStart:function(t){r.channel=void 0,t&&t.channel&&e(function(){r.channel=t.channel})}});r.$on("swimlane:select",function(e,t){try{r.channel=t.swimlane.broadcasts[0].channel}catch(n){}});var o=r.$watch("eventId",function(){t.get({id:r.eventId}).then(function(e){r.event=e.data;try{i.setBroadcasts(r.event.swimlanes[0].broadcasts)}catch(t){}o()})})}]}}t.exports=["$timeout","EventService","broadcastService",n]},{}],264:[function(e,t){"use strict";function n(e,t){return{restrict:"AE",link:function(n,r,i){function o(t){var r=Math.round(new Date/1e3),i=t.start_time<=r&&t.end_time>=r;if(n.isLive=i,r-1&&e.$applyAsync(function(){e.image=t.images[i]}))}e.type=e.type||t.url().split("/")[1].slice(0,-1),e.slug=n.slug,e.gallery=i.getList({type:e.type,slug:e.slug}).$promise.then(function(t){e.gallery=t.data}),e.$watch("gallery",o,!0)}var r=e("underscore");t.exports=["$scope","$location","$routeParams","galleryResource",n]},{underscore:void 0}],285:[function(e,t){"use strict";function n(e,t){e.cancel=function(){t.dismiss("cancel")}}t.exports=["$scope","$modalInstance",n]},{}],286:[function(e,t){"use strict";function n(e,t,n){return{restrict:"EA",template:angular.render("galleries/fileUpload"),scope:{onFile:"&",errors:"="},replace:!0,link:function(e,t,r){function i(){n.getDataUri(e.files[0]).then(function(t){e.imageSource=t.result,e.onFile()(e.files)},function(t){e.errors=t})}e.label=r.label||"Share your work with the community",e.icon=r.icon||"cl-icon-font cl-icon-cloud",e.imageSource=void 0,e.files=[],e.openFileDialog=function(){t.find("input").click()};var o=t[0].querySelector("#fileInput");angular.element(o).bind("change",function(t){t.target.files&&(e.files=t.target.files,i())});var a=angular.element(document.body);a.bind("dragenter dragover",function(e){e.preventDefault(),e.stopPropagation(),t.addClass("active")}),a.bind("dragend dragleave",function(e){e.preventDefault(),e.stopPropagation(),t.removeClass("active")}),a.bind("drop",function(n){n.preventDefault(),n.stopPropagation(),t.removeClass("active");var r=n.originalEvent||n;r.dataTransfer&&r.dataTransfer.files&&(e.files=r.dataTransfer.files,i())})}}}t.exports=["$filter","$location","GalleryUploaderService",n]},{}],287:[function(e,t){"use strict";function n(e){return{restrict:"AE",template:angular.render("galleries/galleryActions"),scope:{gallery:"=",image:"="},replace:!0,link:function(t){t.delete=function(n){n.preventDefault(),n.stopPropagation(),e.removeImage({image_id:t.image._id}).$promise.then(function(){var e=t.gallery.images.indexOf(t.image);t.$applyAsync(function(){t.gallery.images.splice(e,1),t.$emit("gallery:action",{type:"delete"})})})},t.unpublish=function(n){n.preventDefault(),n.stopPropagation(),e.unpublish({id:t.image._id}).$promise.then(function(){t.$applyAsync(function(){t.image.state="unpublished",t.$emit("gallery:action",{type:"unpublish"})})})},t.publish=function(n){n.preventDefault(),n.stopPropagation(),e.publish({id:t.image._id}).$promise.then(function(){t.$applyAsync(function(){t.image.state="published",t.$emit("gallery:action",{type:"publish"})})})}}}}t.exports=["galleryResource",n]},{}],288:[function(e,t){"use strict";function n(e,t,n){return{restrict:"EA",template:angular.render("galleries/galleryComments"),scope:{image:"="},replace:!0,link:function(i){i.addComment=function(){if(i.newComment){var e={text:i.newComment,image_id:i.image._id};n.comment(e).$promise.then(function(e){e.success&&(i.image.comments.push(e.data),t.track("Gallery Submit Comment",{cta_label:"submit_comment",cta_item_id:i.image._id})),i.clearComment()})}},i.clearComment=function(){i.newComment=""},i.removeComment=function(e){n.removeComment({comment_id:e}).$promise.then(function(t){t.success&&(i.image.comments=r.reject(i.image.comments,function(t){return t._id===e}))})},i.$watch(function(){return e.user},function(){i.placeholder=e.user.valid()?"Leave a comment ...":"Please log in to comment ..."})}}}var r=e("underscore");t.exports=["$rootScope","AnalyticsService","galleryResource",n]},{underscore:void 0}],289:[function(e,t){"use strict";function n(e){return{restrict:"EA",template:angular.render("galleries/galleryDetail"),replace:!0,scope:{gallery:"=",image:"=",type:"@",imageWidth:"@",imageHeight:"@"},link:function(t){t.ready=!1,t.imageLoaded=function(){t.$applyAsync(function(){t.ready=!0})},t.onUserClick=function(n){n.preventDefault(),setTimeout(function(){window.location="/users/"+t.image.owner.user.slug},120),e.track("Gallery Tap Profile Icon",{cta_item_id:t.image._id,cta_label:"profile_submitter"})}}}}t.exports=["AnalyticsService",n]},{}],290:[function(e,t){"use strict";function n(e,t,n){e.cancel=t.dismiss,e.onSubmit=function(){var t=e.image;if(t._id||t.title||t.description){var r={id:t._id};t.title&&(r.title=t.title),t.description&&(r.description=t.description),n.updateImage(r).$promise.then(function(t){t.success&&e.cancel()})}}}function r(e){return{template:angular.render("galleries/galleryEditButton"),replace:!0,link:function(t){t.openModal=function(){e.open({template:angular.render("galleries/galleryEditModal"),controller:["$scope","$modalInstance","galleryResource",n],scope:t})}}}}t.exports=["$modal","galleryResource",r]},{}],291:[function(e,t){"use strict";function n(e,t,n){return{template:angular.render("galleries/galleryFlagging"),scope:{image:"=",comment:"=",type:"="},replace:!0,link:function(t){t.flag={},t.showFlag=function(){var n=e.user&&e.user.valid();if(!n)return!1;var r=t.image||t.comment,i=r&&r.owner&&r.owner.user&&r.owner.user._id;return r&&e.user._data._id!==i},t.toggleFlagDialog=function(){t.showFlagDialog=!t.showFlagDialog,t.showFlagDialog&&(t.feedback=!1)},t.feedback=!1,t.submitFlag=function(){if(!(t.image&&t.image.owner&&t.image.owner.user&&t.image.owner.user._id))return t.feedback="danger",t.feedbackMessage="At the moment this user does not exist in our system. Please try again later.",!1;t.disabled=!0;var e,r=t.flag;if(t.image)e="flagImage",r.image_uploader_id=t.image.owner.user._id,r.image_id=t.image._id;else{if(!t.comment)return!1;e="flagComment",r.commenter_id=t.comment.owner.user._id,r.comment_id=t.comment._id}n[e](r,function(){t.disabled=!1,t.feedback="success",t.feedbackMessage="Thanks for the feedback."},function(){t.disabled=!1,t.feedback="danger",t.feedbackMessage="There was an error."})}}}}t.exports=["$rootScope","$modal","galleryResource",n]},{}],292:[function(e,t){"use strict";function n(e,t,n){return{restrict:"EA",template:angular.render("galleries/galleryImage"),scope:{gallery:"=",image:"=",type:"@",owner:"="},replace:!0,link:function(r,i,o){r.width=o.width||300,r.height=o.height||300,r.method=o.method||"fit",r.imgClass=o.imgClass||"img-responsive",r.target="_self",(e.slug||e.userId)&&(r.target=void 0);var a=t.location.pathname;a.indexOf("/gallery")>0&&(a=a.replace("/gallery","")),a.indexOf("/student-work")>0&&(a=a.replace("/student-work","")),r.href=a+"/photo/"+r.image._id,r.onClick=function(){n.track("Gallery Image Tap",{cta_label:"gallery_tile",cta_item_id:this.image._id})}}}}t.exports=["$routeParams","$window","AnalyticsService",n]},{}],293:[function(e,t){"use strict";function n(e,t,n){return{restrict:"EA",template:angular.render("galleries/galleryLikes"),scope:{image:"=",iconClass:"@"},replace:!0,link:function(i,o){function a(){var e=i.image.likes;e=r.map(e,function(e){return e.user?''+e.display_name+"":""}),i.usersThatLiked=e.join("
")}function s(){if(!angular.isArray(i.image&&i.image.likes))return!1;var t=!1;return angular.forEach(i.image.likes,function(n){angular.isObject(n)&&n.user&&n.user._id&&n.user._id===e.user._data._id&&(t=!0)}),t}i.hasUserLiked=s(),o.on("click",".profile-liker",function(e){e.preventDefault();var n=angular.element(e.target).data("like-id"),o=r.findWhere(i.image.likes,{_id:n});setTimeout(function(){window.location="/users/"+o.user.slug},120),t.track("Gallery Liker Profile Tap",{cta_label:"gallery_liker_tooltip",cta_item_id:o.user.slug}) }),i.$watch("image.likes",function(){i.image&&i.image.likes&&(i.image.like_count=i.image.likes.length,a())}),i.onClick=function(t){return t.preventDefault(),t.stopPropagation(),i.image&&i.image.owner&&i.image.owner.user&&i.image.owner.user._id===e.user._data._id?!1:(i.hasUserLiked?n.unlike({id:i.image._id}).$promise.then(function(t){t.success&&(i.image.likes=r.reject(i.image.likes,function(t){return t===e.user._data._id}),i.hasUserLiked=!1,i.$applyAsync())}):n.like({id:i.image._id}).$promise.then(function(t){t.success&&(i.hasUserLiked=!0,i.image.likes.push(e.user._data._id),i.$applyAsync())}),a(),void 0)}}}}var r=e("underscore");t.exports=["$rootScope","AnalyticsService","galleryResource",n]},{underscore:void 0}],294:[function(e,t){"use strict";function n(e,t){return{restrict:"EA",template:angular.render("galleries/galleryList"),scope:{gallery:"=",image:"=",type:"@",limit:"@",imageWidth:"@",imageHeight:"@",imagesInit:"=",reInit:"="},replace:!0,transclude:!0,link:function(n,i,o,a,s){n.type=n.type||e.url().split[1],n.hasGallery=function(){return n.gallery&&n.gallery.images?n.gallery&&n.gallery.page&&n.gallery.page.images?n.gallery.page.images.length>0:n.gallery.images.length>0:!1},n.hasUnpublished=function(){return n.gallery&&n.gallery.images?r.chain(n.gallery.images).pluck("state").contains("unpublished").value():!1},n.isOwnProfile=function(){return n.gallery&&n.gallery.parent&&n.gallery.parent.user&&t.user&&t.user.valid()?n.gallery.parent.user===t.user._data._id:!1},s(function(e){e.length&&(n.transcluded=!0)})}}}var r=e("underscore");t.exports=["$location","$rootScope","$timeout",n]},{underscore:void 0}],295:[function(e,t){"use strict";function n(e){return{restrict:"EA",template:angular.render("galleries/galleryNav"),scope:{gallery:"=",image:"=",type:"=",edit:"="},replace:!0,link:function(t){function n(){var n,i,o,a,s,c;t.image&&t.gallery&&t.gallery.images&&(n=e.url().split("/"),i=r.pluck(t.gallery.images,"_id"),o=i.indexOf(t.image._id),c=t.gallery.images,o>=0&&o-1>=0&&(s=c[o-1]._id),o>=0&&o+10?n.image.courses[0]:{},t=n.image.owner,r+="course"===n.type?"/courses/"+i.slug:t?"/users/"+t.user.slug:"/courses/"+i.slug,n.imageUrl=r+"/photo/"+n.image._id,n.imageSrc=e.config.cdn.assets+n.image.image,n.shareText="Check out ",n.shareText+=t&&(t.display_name||t.slug)?(t.display_name||t.slug)+"'s":"my",n.shareText+=" work from @CreativeLive's "+((i||{}).short_title+" ")||(i||{}).title+" student gallery")}),n.onFacebook=function(r){if(window.FB&&window.FB.ui){r.preventDefault(),r.stopPropagation();var i={method:"feed",link:e.context.url,picture:n.imageSrc,caption:n.image.description,name:n.image.title,description:n.shareText};window.FB.ui(i)}t.track("Gallery Social Share",{cta_label:"tap_social_share",social_share_type:"facebook",cta_item_id:this.image._id})},n.onTwitter=function(){t.track("Gallery Social Share",{cta_label:"tap_social_share",social_share_type:"twitter",cta_item_id:this.image._id})},n.onPinterest=function(){t.track("Gallery Social Share",{cta_label:"tap_social_share",social_share_type:"pinterest",cta_item_id:this.image._id})},n.onGooglePlus=function(){t.track("Gallery Social Share",{cta_label:"tap_social_share",social_share_type:"google_plus",cta_item_id:this.image._id})}}}}t.exports=["rind","AnalyticsService",n]},{}],297:[function(e,t){"use strict";function n(e,t,n,r){return{restrict:"EA",template:angular.render("galleries/galleryUpload"),scope:{gallery:"=",course:"=",image:"="},replace:!0,link:function(i,o,a){function s(){n.open({template:angular.render("galleries/galleryUploaderModal"),controller:"GalleryModal",scope:i}),r.track("Gallery Upload Modal Shown",{cta_label:"modal_shown",modal_ID:"galleryImageUpload"})}i.onClick=function(){a.href?window.location.href=a.href:(r.track("Gallery Upload Tap",{cta_label:"gallery_uploadwork"}),s())},t.$$search.upload&&(e.user&&e.user._data._id?s():(e.$broadcast("login:show",{onboarding:!1}),i.$broadcast("user:login",function(){s()})))}}}t.exports=["$rootScope","$location","$modal","AnalyticsService",n]},{}],298:[function(e,t){"use strict";function n(e,t,n){return{restrict:"EA",template:angular.render("galleries/galleryUploader"),scope:{gallery:"=",course:"=",cancel:"&"},replace:!0,link:function(r,i){r.file=void 0,r.onFile=function(t){r.imageError=!1,r.file=t[0],e(function(){i[0].querySelector('[ng-model="title"]').focus()})},r.onSubmit=function(){return r.course&&r.course.nid?(r.progress=25,n.uploadFile(r.course.nid,r.file,{title:r.title,description:r.description}).then(function(e){r.progress=100,r.cancel(),e.success&&(r.$applyAsync(function(){r.gallery.images.unshift(e.data)}),t.track("Gallery Upload Success",{cta_label:"gallery_image_submit",cta_item_id:e.data._id,cta_item_title:e.data.title,cta_item_description:e.data.description}))},function(){r.progress=0,r.imageError=!0}),void 0):(rind.dump.course||(r.imageError="error"),r.course=rind.dump.course,void 0)}}}}t.exports=["$timeout","AnalyticsService","GalleryUploaderService",n]},{}],299:[function(e,t){"use strict";function n(){return{restrict:"EA",template:angular.render("galleries/galleryUser"),scope:{user:"="}}}t.exports=n},{}],300:[function(e,t){"use strict";function n(){return function(e){return Array.isArray(e)?r.filter(e,function(e){return"published"===e.state}):void 0}}var r=e("underscore");t.exports=n},{underscore:void 0}],301:[function(e,t){"use strict";function n(){return function(e){return Array.isArray(e)?r.filter(e,function(e){return"unpublished"===e.state}):void 0}}var r=e("underscore");t.exports=n},{underscore:void 0}],302:[function(e){"use strict";var t=e("../../common/app");t.controller("GalleryCtrl",e("./controllers/gallery")),t.controller("GalleryModal",e("./controllers/galleryModal")),t.service("GalleryUploaderService",e("./services/uploader")),t.directive("galleryList",e("./directives/galleryList")),t.directive("galleryDetail",e("./directives/galleryDetail")),t.directive("galleryNav",e("./directives/galleryNav")),t.directive("galleryImage",e("./directives/galleryImage")),t.directive("galleryUser",e("./directives/galleryUser")),t.directive("galleryLikes",e("./directives/galleryLikes")),t.directive("galleryComments",e("./directives/galleryComments")),t.directive("galleryUploadModal",e("./directives/galleryUploadModal")),t.directive("galleryUploader",e("./directives/galleryUploader")),t.directive("gallerySharing",e("./directives/gallerySharing")),t.directive("fileUpload",e("./directives/fileUpload")),t.directive("galleryActions",e("./directives/galleryActions")),t.directive("galleryFlagging",e("./directives/galleryFlagging")),t.directive("galleryEdit",e("./directives/galleryEdit")),t.filter("publishedImages",e("./filters/publishedImages")),t.filter("unpublishedImages",e("./filters/unpublishedImages"))},{"../../common/app":19,"./controllers/gallery":284,"./controllers/galleryModal":285,"./directives/fileUpload":286,"./directives/galleryActions":287,"./directives/galleryComments":288,"./directives/galleryDetail":289,"./directives/galleryEdit":290,"./directives/galleryFlagging":291,"./directives/galleryImage":292,"./directives/galleryLikes":293,"./directives/galleryList":294,"./directives/galleryNav":295,"./directives/gallerySharing":296,"./directives/galleryUploadModal":297,"./directives/galleryUploader":298,"./directives/galleryUser":299,"./filters/publishedImages":300,"./filters/unpublishedImages":301,"./services/uploader":303}],303:[function(e,t){"use strict";function n(e,t,n){function r(e){var n=t.defer(),r=new FileReader;return r.onload=function(e){e.total>=16777216&&n.reject("tooLarge"),n.resolve(r)},r.readAsDataURL(e),n.promise}function i(e){for(var t=e.split(","),n=atob(t[1]),r=t[0].split(":")[1].split(";")[0],i=new Uint8Array(n.length),o=0;o"),a=t.title,c=o().contents().text();c&&(a=c),i.html(a),t.format&&i.addClass(t.format),t.textCase&&i.addClass(t.textCase),angular.forEach(r,function(e,t){if("string"==typeof e)if("class"===t){var n=e.split(" ");angular.forEach(n,function(e){i.addClass(e)})}else i.attr(t,e)});try{s.replaceWith(i),e(i)(c?t.$parent:t),s=i}catch(l){}}var s=n;t.$watchGroup(["title","level","format","textCase","class"],a)}}}t.exports=["$compile","$timeout",n]},{}],305:[function(e){"use strict";var t=e("../../common/app");t.directive("h",e("./directives/view"))},{"../../common/app":19,"./directives/view":304}],306:[function(e,t){"use strict";function n(){return{restrict:"AE",scope:{},template:angular.render("heading/edit"),replace:!0,link:function(e){e.levels=[1,2,3,4,5,6],e.data=e.$parent.data,e.$watch("data.isPrimary",function(){e.data.isPrimary||"h1"!==e.data.hLevel?e.data.isPrimary&&(e.data.hLevel="h1"):e.data.hLevel="h2"}),e.data.topPadding="pad-top-xl",e.data.bottomPadding="pad-bottom-xl",e.data.hLevel||(e.data.hLevel="h2"),e.data.template||(e.data.template="center")}}}t.exports=[n]},{}],307:[function(e,t){"use strict";function n(e,t){return{restrict:"AE",scope:{data:"=?",clModuleId:"@"},template:angular.render("heading/view"),replace:!0,link:function(e){e.config=t,e.data||(e.data=e.$parent.data)}}}t.exports=["$sce","config",n]},{}],308:[function(e,t){"use strict";function n(){return{restrict:"AE",scope:{clTitle:"@",hLevel:"@",hFormat:"@",subtitle:"@",isPrimary:"=?",textAlign:"@",textCase:"@",boldHr:"=?",showFollow:"=?",topPadding:"@",bottomPadding:"@",moduleSlug:"@",clModuleId:"@",template:"@",containerClass:"@",lead:"=?"},template:angular.render("heading/index"),transclude:{right:"?right"},link:function(e,t,n){function r(){return!(e.data.topPadding||e.data.bottomPadding||e.data.textAlign||e.data.hLevel)}e.data&&r()&&(e.data.topPadding="pad-top-xl",e.data.bottomPadding="pad-bottom-xl",e.data.textAlign="text-center",e.data.hLevel="h2"),e.containerClass=void 0!==n.containerClass?n.containerClass:"container"}}}t.exports=[n]},{}],309:[function(e){"use strict";var t=e("../../common/app");t.directive("clHeading",e("./directives/index")),t.directive("headingCms",e("./directives/cms/view")),t.directive("headingCmsEdit",e("./directives/cms/edit"))},{"../../common/app":19,"./directives/cms/edit":306,"./directives/cms/view":307,"./directives/index":308}],310:[function(e,t){"use strict";function n(){return{restrict:"AE",scope:{},template:angular.render("home-hero/edit"),replace:!0,link:function(e){e.levels=[1,2,3,4,5,6],e.data=e.$parent.data,e.$watch("data.isPrimary",function(){e.data.isPrimary||"h1"!==e.data.hLevel?e.data.isPrimary&&(e.data.hLevel="h1"):e.data.hLevel="h2"}),e.data.template||(e.data.template="default")}}}t.exports=[n]},{}],311:[function(e,t){"use strict";function n(e,t){return{restrict:"AE",scope:{data:"=?",clModuleId:"@"},template:angular.render("home-hero/view"),replace:!0,link:function(e){e.config=t,e.data||(e.data=e.$parent.data)}}}t.exports=["$sce","config",n]},{}],312:[function(e,t){"use strict";function n(){return{restrict:"E",template:function(e,t){return t.template?angular.render("home-hero/"+t.template):angular.render("home-hero/index")},replace:!0}}t.exports=[n]},{}],313:[function(e){"use strict";var t=e("../../common/app");t.directive("homeHero",e("./directives/index")),t.directive("homeHeroCms",e("./directives/cms/view")),t.directive("homeHeroCmsEdit",e("./directives/cms/edit"))},{"../../common/app":19,"./directives/cms/edit":310,"./directives/cms/view":311,"./directives/index":312}],314:[function(e,t){"use strict";function n(e,t){return{restrict:"AE",scope:{selectedImageKey:"=?",imageKeys:"=",onSelectImage:"&"},template:angular.render("image-dropdown/view"),link:function(n){function i(){n.showImageSelections=!1,n.$applyAsync()}n.showImageSelections=!1,n.imageURLs=[],n.$watch("imageKeys",function(e){e&&(n.imageURLs=[],r.each(n.imageKeys,function(e){n.imageURLs.push(t("magick")(e,{width:380}))}))},!0),e.on("click",i),n.toggleImageSelections=function(){n.showImageSelections=!n.showImageSelections},n.onSelect=function(e){n.onSelectImage()(e),n.showImageSelections=!1}}}}var r=e("underscore");t.exports=["$document","$filter",n]},{underscore:void 0}],315:[function(e){"use strict";var t=e("../../common/app");t.directive("imageDropdown",e("./directives/view"))},{"../../common/app":19,"./directives/view":314}],316:[function(e,t){"use strict";function n(e,t){return{restrict:"AE",scope:{instructors:"="},template:angular.render("instructors/facepile"),replace:!0,link:function(n){n.instructors.forEach(function(n){n.img=e.trustAsResourceUrl("//"+t.config.cdn.assets+"/"+n.image)})}}}t.exports=["$sce","rind",n]},{}],317:[function(e,t){"use strict";function n(){return{restrict:"AE",scope:{instructors:"=",clickable:"=?"},template:angular.render("instructors/list"),link:function(e){e.instructorsString="",e.$watch("instructors",function(){e.instructors&&(e.instructorsString="",e.instructorsStringHtml="",r.each(e.instructors,function(t,n){if(t)switch(!0){case 3>n:""!==e.instructorsString&&(e.instructorsString+=", ",e.instructorsStringHtml+=", "),e.instructorsString+=t.name||t.profile.name,e.instructorsStringHtml+=''+(t.name||t.profile.name)+"";break;case 3===n:e.instructorsString+=" and more",e.instructorsStringHtml+=" and more"}}))})}}}var r=e("underscore");t.exports=["$sce",n]},{underscore:void 0}],318:[function(e,t){"use strict";function n(){return{restrict:"AE",scope:{instructor:"="},template:angular.render("instructors/profile-lg"),replace:!0}}t.exports=["$sce",n]},{}],319:[function(e,t){"use strict";function n(){return{restrict:"AE",scope:{instructor:"=",courseTitle:"="},template:angular.render("instructors/profile-md"),replace:!0}}t.exports=["$sce",n]},{}],320:[function(e,t){"use strict";function n(){return{restrict:"AE",scope:{instructor:"="},template:angular.render("instructors/profile-sm"),replace:!0}}t.exports=["$sce",n]},{}],321:[function(e){"use strict";var t=e("../../common/app");t.directive("instructorFacepile",e("./directives/facepile")),t.directive("instructorProfileLg",e("./directives/profile-lg")),t.directive("instructorProfileMd",e("./directives/profile-md")),t.directive("instructorProfileSm",e("./directives/profile-sm")),t.directive("instructorList",e("./directives/list"))},{"../../common/app":19,"./directives/facepile":316,"./directives/list":317,"./directives/profile-lg":318,"./directives/profile-md":319,"./directives/profile-sm":320}],322:[function(e,t){"use strict";function n(){return{require:"^clViewFlow",restrict:"AE",template:'
Categories
',replace:!0,link:function(e,t,n,r){r.done()}}}t.exports=[n]},{}],323:[function(e,t){"use strict";function n(e,t,n,r){return{restrict:"AE",scope:{onDone:"&onDone",cancel:"&onCancel",abort:"&onAbort"},template:angular.render("interest/index"),link:function(i){function o(){e.user.mergeExistingInterests(),angular.forEach(i.data,function(t){t.activeCount=t.topics.filter(function(t){return e.user.get("follows").topic.indexOf(t._id)>=0}).length})}function a(){if(t.onboardingContinue(i.currentCategory.active?"topic":"category",i.currentCategory.title),e.user.valid()){var n=new r;n.updateScores(),e.user.updateInterest()}i.onDone()}function s(e){e.active?t.onboardingBack():t.interestCategorySelected(e.title,"add"),e.active=e.active?!1:!0,i.currentCategory=e,i.categoriesOpen=e.active}function c(n,r){n.active=n.active?!1:!0,r.activeCount||(r.activeCount=0),r.activeCount=n.active?r.activeCount+1:r.activeCount-1,n.active?(e.user.addInterest(n._id),t.interestTopicSelected(n.name,"add")):(e.user.removeInterest(n._id),t.interestTopicSelected(n.name,"remove"),r.activeCount<1&&(e.user.removeInterest("category",r.slug),t.interestCategorySelected(r.title,"remove")))}angular.extend(i,{data:{},categoriesOpen:!1,currentCategory:{},done:a,selectCategory:s,selectTopic:c}),n.getAllByCategory({onboarding:!0,primary:!0}).$promise.then(function(e){e&&e.success&&e.data&&(i.data=angular.copy(e.data),o())})}}}t.exports=["$rootScope","trackFactory","topicResource","ScoresService",n]},{}],324:[function(e,t){"use strict";function n(){return{require:"^clViewFlow",restrict:"AE",template:'
Tag
',replace:!0,link:function(e,t,n,r){r.done()}}}t.exports=[n]},{}],325:[function(e){"use strict";var t=e("../../common/app");t.directive("clInterest",e("./directives/index")),t.directive("clInterestCategory",e("./directives/category")),t.directive("clInterestTag",e("./directives/tag"))},{"../../common/app":19,"./directives/category":322,"./directives/index":323,"./directives/tag":324}],326:[function(e,t){"use strict";function n(){return{restrict:"EA",template:angular.render("keep-watching/cms-view"),scope:{data:"=?"},controllerAs:"keepWatchingCtrl",controller:["$scope",function(e){this.data=e.data||e.$parent.data||{}}]}}t.exports=[n]},{}],327:[function(e,t){"use strict";function n(e,t,n,r,i){return{restrict:"AE",scope:{course:"="},template:angular.render("keep-watching/view"),controllerAs:"ctrl",controller:["$scope","$attrs",function(t,o){function a(e){return e?(e._id&&i.getCourseById(e._id,{keys:["sessions","segments"]},{owner_only:!0}).then(function(e){p.course=e,s()}),void 0):!1}function s(){if(!p.course)return!1;if(p.courseUrl="/courses/"+r("addQueryParams")(p.course.slug,{autoplay:!0}),p.segment=n.getFurthestSegmentForCourse(p.course),!p.segment)return c();var e=p.segment.watchData;return e?(p.watchProgressString=e.watchProgressString,p.totalSegmentLengthString=e.totalSegmentLengthString,p.progressPercent=e.progressPercent,p.nextSegment=n.getSegmentByIdx(p.course._id,p.segment.idx),l(e.progressPercent),u(p.segment.idx,p.segment.lastIdx,p.progressPercent),d(p.course.taxonomy),void 0):c()}function c(){p.watchProgressString=void 0,p.totalSegmentLengthString=void 0,p.progressPercent=void 0,p.progressTimeLeftPosition=void 0,p.nextSegment=void 0,p.view=void 0}function l(e){p.progressTimeLeftPosition=e>85?85:8>e?8:e}function u(e,t,n){p.view=e===t&&n>90?"complete":void 0}function d(e){e&&(p.taxonomy=_.find(e,function(e){return e.topic&&!e.topic.archive}))}var p=this;angular.extend(p,{view:void 0}),"true"===o.watch&&t.$watch("course",a),t.course?a(t.course):e.user&&e.user.recentInteraction&&e.user.recentInteraction().then(function(e){a(e.mostRecent)})}]}}t.exports=["$rootScope","EventService","CourseService","$filter","CatalogService",n]},{}],328:[function(e){"use strict";var t=e("../../common/app");t.directive("clKeepWatching",e("./directives/view")),t.directive("keepWatchingCms",e("./directives/cms/view"))},{"../../common/app":19,"./directives/cms/view":326,"./directives/view":327}],329:[function(e,t){"use strict";function n(e,t,n){return{restrict:"AE",scope:{},template:angular.render("landing-page-collection/edit"),replace:!0,link:function(r){r.data=r.$parent.data;var i;r.data.tiles||(r.data.tiles=[]),r.addCourse=function(t){e.getComplete({slug:t.slug},function(e){i=e.data,i&&i.slug&&(r.image=i.image,r.slug=i.slug,r.url||(r.url="/courses/"+i.slug),r.title||(r.title=i.short_title))})},r.addTile=function(){r.url=n(r.url);var e={};["title","url","image","slug"].forEach(function(t){e[t]=r[t]}),void 0!==r.editingTile?r.data.tiles[r.editingTile]=e:r.data.tiles.push(e),r.title="",r.url="",r.courseData=void 0,r.editingTile=void 0},r.editTile=function(t,n){r.editingTile=n,r.title=t.title,r.url=t.url,r.image=t.image,e.getComplete({slug:t.slug},function(e){r.courseData=e.data})},r.removeTile=function(e){r.data.tiles.splice(e,1)},r.onDrop=function(e,n,i,o,a,s){t(e,s,o),r.$apply()}}}}t.exports=["courses","arrayMove","urlify",n]},{}],330:[function(e,t){"use strict";function n(e,t){return{restrict:"AE",scope:{model:"=ngModel",size:"@"},template:angular.render("landing-page-collection/tile"),replace:!0,link:function(e){e.config=t}}}t.exports=["$sce","config",n]},{}],331:[function(e,t){"use strict";function n(e,t){return{restrict:"AE",scope:{data:"=?"},template:angular.render("landing-page-collection/view"),replace:!0,link:function(e){e.config=t,e.data||(e.data=e.$parent.data),e.$watch("data.tiles",function(){e.tiles=angular.copy(e.data.tiles),e.firstTile=e.tiles.shift()},!0)}}}t.exports=["$sce","config",n]},{}],332:[function(e){"use strict";var t=e("../../common/app");t.directive("landingPageCollection",e("./directives/view")),t.directive("landingPageCollectionTile",e("./directives/tile")),t.directive("landingPageCollectionEdit",e("./directives/edit"))},{"../../common/app":19,"./directives/edit":329,"./directives/tile":330,"./directives/view":331}],333:[function(e,t){"use strict";function n(){return{restrict:"AE",scope:{kvps:"=?",key:"=?",value:"=?",expires:"=?",editingKVP:"=?"},template:angular.render("landing-tracking/edit"),replace:!0,link:function(e){e.data=e.$parent.data,e.data.kvps=e.data.kvps||[],e.illegalKeyName=!1,e.addKVP=function(){var t={key:e.key,value:e.value,expires:e.expires};void 0!==e.editingKVP?(e.data.kvps[e.editingKVP]=t,e.editingKVP=void 0):e.data.kvps.push(t)},e.editKVP=function(t,n){e.editingKVP=n,e.key=t.key,e.value=t.value,e.expires=t.expires},e.remove=function(t){e.data.kvps.splice(t,1)},e.startsWithIllegalChar=function(t){var n=/^\^/.test(t);return e.illegalKeyName=n,e.illegalKeyName}}}}t.exports=["arrayMove",n]},{}],334:[function(e,t){"use strict";function n(){return{restrict:"AE",scope:{data:"=?"},template:angular.render("landing-tracking/view"),replace:!0,link:function(e,t,n){if(e.isAdmin="true"===n.isAdmin,e.data||(e.data=e.$parent.data),e.data)for(var r in e.data.kvps){var i=e.data.kvps[r];if(!e.isAdmin){var o=encodeURIComponent(i.value);window.Vault.Local.set("trait_"+i.key,o,{expires:"+"+i.expires+" days",path:"/"})}}}}}t.exports=[n]},{}],335:[function(e){"use strict";var t=e("../../common/app");t.directive("landingTracking",e("./directives/view")),t.directive("landingTrackingEdit",e("./directives/edit"))},{"../../common/app":19,"./directives/edit":333,"./directives/view":334}],336:[function(e,t){"use strict";function n(){return{restrict:"AE",scope:{items:"=?",item:"=?",editingItem:"=?"},template:angular.render("landing-traits/edit"),replace:!0,link:function(e){e.data=e.$parent.data,e.add=function(){e.data.items||(e.data.items=[]);var t=e.item;void 0!==e.editingItem?(e.data.items[e.editingItem]=t,e.editingItem=void 0):e.data.items.push(t)},e.editItem=function(t,n){e.editingItem=n,e.item=t},e.remove=function(t){e.data.items.splice(t,1)},e.startsWithIllegalChar=function(t){var n=/^\^/.test(t);return e.illegalKeyName=n,e.illegalKeyName}}}}t.exports=[n]},{}],337:[function(e,t){"use strict";function n(e,t){return{restrict:"AE",scope:{data:"=?"},template:angular.render("landing-traits/view"),replace:!0,link:function(n,r,i){n.isAdmin="true"===i.isAdmin,n.config=t,n.data||(n.data=n.$parent.data),n.isAdmin||e.user.addTraits(n.data.items)}}}t.exports=["$rootScope","config",n]},{}],338:[function(e){"use strict";var t=e("../../common/app");t.directive("landingTraits",e("./directives/view")),t.directive("landingTraitsEdit",e("./directives/edit"))},{"../../common/app":19,"./directives/edit":336,"./directives/view":337}],339:[function(e,t){"use strict";var n=e("./upcomingEvents");t.exports={upcomingEvents:n}},{"./upcomingEvents":340}],340:[function(e,t){"use strict";function n(e,t,n){function a(e){return e.flags||(e.flags=[]),"pre_live"!==e.broadcast_type&&-1===e.flags.indexOf("!on_calendar")&&-1===e.flags.indexOf("!published")}var s={onair:[],upcoming:[],events:e},c={},l={};return e&&e.length&&e.forEach(function(e){var u=r.chain(e.swimlanes).pluck("broadcasts").flatten().sort(function(e,t){return e.start_time-t.start_time}).value();u.forEach(function(u){if(u.eventId=e._id,!u.meta){var d=i(e||{},"product.source.source_id");u.meta=d._id?d:{}}e.is_container?(["title","url","image","start_time","end_time"].forEach(function(t){e[t]&&(u.meta[t]=e[t])}),e.title&&(u.meta.short_title=e.title),u.meta.is_container=!0):(u.meta.start_time=u.start_time,u.meta.end_time=u.end_time);try{u.meta._id=e.product.source.source_id._id||e.product.source.source_id,u.content.content_id=e.product.source.source_id,u.content.content_type=e.product.source.source_type}catch(p){}var f=r.extend({},u,u.meta);if(u.live&&!l[e._id]&&(l[e._id]=f,s.onair.push(f)),n&&n!==o[u.broadcast_type])return!0;var h=f.primary_category&&f.primary_category.slug;return t&&t.slug!==h?!0:(a(f)&&(c[e._id]?(n||"live"===f.broadcast_type)&&(c[e._id].end_time=f.end_time):(c[e._id]=f,s.upcoming.push(f))),void 0)})}),s}var r=e("underscore"),i=e("deepval");t.exports=n;var o={live:"live",playlist:"rebroadcast",rebroadcast:"rebroadcast",rebroadcast_edited:"rebroadcast",link:"link"}},{deepval:504,underscore:void 0}],341:[function(e,t){"use strict";function n(e,t,n){return{restrict:"AE",scope:{cart:"=",enableRemove:"=?"},template:angular.render("line-item-tiles/view"),link:function(r){function i(e){e&&e.lineItems&&(r.lineItems=e.lineItems,r.numLineItems=r.lineItems.length)}function o(r){t.remove(r._id).then(function(){n.removeFromCart(r,r.crossSellDiscount?"cross":r.type,"remove");var t=e.location.pathname.split("/")[2];(t===r._id||t===r.slug)&&(e.location.href=r.productLink)})}void 0===r.enableRemove&&(r.enableRemove=!0),angular.extend(r,{lineItems:null,numLineItems:0,reInit:!0,removeFromCart:o}),r.$watch("cart",i)}}}t.exports=["$window","CartService","trackFactory",n]},{}],342:[function(e){"use strict";var t=e("../../common/app");t.directive("lineItemTiles",e("./directives/index"))},{"../../common/app":19,"./directives/index":341}],343:[function(e,t){"use strict";function n(e){return{restrict:"A",link:function(t,n){function r(){var e=n[0].querySelector("li.active");if(e){var t=e.querySelector("a");i.css({width:t.offsetWidth,left:e.offsetLeft,top:e.offsetTop})}}n.addClass("tabs-style-linemove");var i=angular.element('
  • ');angular.element(n[0].querySelector("ul")).append(i),e(r),t.ctrl&&t.ctrl.tab?t.$watch("ctrl.tab",function(){e(r)}):n.bind("click",r)}}}t.exports=["$timeout",n]},{}],344:[function(e){"use strict";var t=e("../../common/app");t.directive("linemove",e("./directives/index"))},{"../../common/app":19,"./directives/index":343}],345:[function(e,t){"use strict";function n(e){return{restrict:"EA",template:angular.render("link-to-catalog/cms-edit"),scope:{data:"=?",meta:"=?"},link:function(t){t.data=t.data||t.$parent.data||{},t.meta=t.meta||t.$parent.meta||{},t.$parent.page.primary_category&&e.getCategoryById({id:t.$parent.page.primary_category}).$promise.then(function(e){var n=e&&e.data||{};t.data.path||(t.data.path=n.slug),t.data.topic||(t.data.topic=n.title)}),t.$watchGroup(["data.topic","data.path"],function(){t.meta.valid=t.linkToCatalogForm.$valid})}}}t.exports=["categoryResource",n]},{}],346:[function(e,t){"use strict";t.exports=function(){return{restrict:"EA",template:angular.render("link-to-catalog/cms-view"),scope:{data:"=?"},link:function(e){e.data=e.data||e.$parent.data||{}}}}},{}],347:[function(e,t){"use strict";function n(){return{restrict:"E",template:angular.render("link-to-catalog/view"),replace:!0,scope:{showAsButton:"=?",topic:"@",path:"@",url:"@"},link:function(e){e.link=e.url||"/catalog/",e.path&&(e.link+=e.path)}}}t.exports=["config",n]},{}],348:[function(e){"use strict";var t=e("../../common/app");t.directive("linkToCatalog",e("./directives/index")),t.directive("linkToCatalogCms",e("./directives/cms/view")),t.directive("linkToCatalogCmsEdit",e("./directives/cms/edit"))},{"../../common/app":19,"./directives/cms/edit":345,"./directives/cms/view":346,"./directives/index":347}],349:[function(e,t){"use strict";function n(){return{restrict:"EA",template:angular.render("live-now/cms-view"),scope:{data:"=?"},controllerAs:"liveNowCtrl",controller:["$scope",function(e){this.data=e.data||e.$parent.data||{}}]}}t.exports=[n]},{}],350:[function(e,t){"use strict";function n(e,t,n){return{restrict:"AE",scope:{event:"=?"},template:angular.render("live-now/index"),controllerAs:"ctrl",controller:["$scope","$attrs",function(e,r){function i(){e.event&&(o.event=e.event,t.getEventUIData(o.event).then(function(e){o.course=e,o.courseUrl=n("linkToSource")(o.course),o.courseUrl=n("addQueryParams")(o.courseUrl,{autoplay:!0})}))}var o=this;"true"===r.watch?e.$watch("event",i):e.event&&i()}]}}t.exports=["$rootScope","EventService","$filter",n]},{}],351:[function(e){"use strict";var t=e("../../common/app");t.directive("clLiveNow",e("./directives/index")),t.directive("liveNowCms",e("./directives/cms/view"))},{"../../common/app":19,"./directives/cms/view":349,"./directives/index":350}],352:[function(e,t){"use strict";function n(e){return{restrict:"AE",link:function(t,n,i){t.modal=void 0;var o,a="cl-modal:show:"+i.id;t.$on(a,function(n,a){var s="";a&&a.attrs&&r.each(a.attrs,function(e,t){s+=" "+t+'="'+e+'"'}),i.clModalTemplate?o='":i.clModalContent&&(o=''),t.modal=e.open({template:o,windowClass:"cl-modal modal-"+i.id})})}}}var r=e("underscore");t.exports=["$modal",n]},{underscore:void 0}],353:[function(e){"use strict";var t=e("../../common/app");t.directive("clModal",e("./directives/index"))},{"../../common/app":19,"./directives/index":352}],354:[function(e,t){"use strict";function n(){return{restrict:"AE",scope:{courses:"=",type:"@",onSelect:"&",sortBy:"@",sortDir:"@"},template:angular.render("my-stuff/index"),transclude:!0,controllerAs:"MyStuffCtrl",controller:["$element","$scope",function(e,t){function n(e){e&&e.length&&(i("type"),t.sortBy&&o(t.sortBy,t.sortDir),a())}function i(e){t.courseList=r.filter(t.courses,function(n){return n[e]===t[e]})}function o(e,n){t.courseList=r.sortBy(t.courseList,e),"desc"===n&&t.courseList.reverse()}var a,s=this;a=t.$watch("courses",n),angular.extend(s,{selectCourse:t.onSelect()})}]}}var r=e("underscore");t.exports=[n]},{underscore:void 0}],355:[function(e){"use strict";var t=e("../../common/app");t.directive("clMyStuff",e("./directives/index"))},{"../../common/app":19,"./directives/index":354}],356:[function(e,t){"use strict";function n(e,t,n){return{restrict:"AE",scope:{onComplete:"&",onAbort:"&",modal:"="},template:angular.render("onboarding/index"),replace:!0,link:{pre:function(e,r){function i(){e.verifyAbort=!1}function o(){n.onboardingQuit()}function a(){n.onboardingFinishUp()}function s(t,r){n.onboardingX(),e.allDone()?r&&r():e.verifyAbort=!0}e.goBack=i,e.quit=o,e.finishUp=a,t(e,r.children()[0].children,{onAbort:s}),e.showView()}}}}t.exports=["$rootScope","flowControl","trackFactory",n]},{}],357:[function(e){"use strict";var t=e("../../common/app");t.service("clOnboardingModal",e("./services/modal")),t.directive("clOnboarding",e("./directives/index"))},{"../../common/app":19,"./directives/index":356,"./services/modal":358}],358:[function(e,t){"use strict"; function n(e,t){function n(n,r){r=r||{},e.open({backdrop:"static",keyboard:!1,template:'',windowClass:"cl-modal modal-onboarding",controller:["$scope","$modalInstance",function(e,n){t.onboardingModalShown(r.via),e.complete=n.dismiss,e.abort=n.dismiss,e.$on("user:login",n.dismiss),e.$on("user:register",n.dismiss),e.$on("user:reset-password",n.dismiss)}]})}return n}t.exports=["$modal","trackFactory",n]},{}],359:[function(e,t){"use strict";function n(e){function t(){["clOverflowTooltip:","https://github.com/creativelive/frontend/blob/f9b027248fd9e19b111b896692eb2e3f8a312c84/cl-angular/modules/overflow-tooltip.mod/directives/index.js","Params:"," * overflow-title [string] - the text for the tooltip"," * overflow-toggle [string] - the name of the $scope var to access"," * overflow-class [string] (optional) - className of the child element to check"].join("\n")}return{restrict:"EA",link:function(n,i,o){function a(){n[o.overflowToggle]=s()?o.overflowTitle:void 0}function s(){return l=l||c(),l.scrollWidth>l.offsetWidth}function c(){var e=o.overflowClass;return e?i[0].querySelector(e):i[0]}i.addClass("overflow-tooltip");var l;if(!o.overflowTitle||!o.overflowToggle)return t(),!1;var u=n.$watch("segment.title",function(){n.segment&&n.segment.title&&(a(),u())});e.addEventListener("resize",r.debounce(a,300)),n.onHover=a}}}var r=e("underscore");t.exports=["$window",n]},{underscore:void 0}],360:[function(e){"use strict";var t=e("../../common/app");t.directive("clOverflowTooltip",e("./directives/index"))},{"../../common/app":19,"./directives/index":359}],361:[function(e,t){"use strict";function n(e,t){return{restrict:"AE",scope:{},template:function(e,t){return""!==e.html()||t.disableTemplate?(this.replace=!1,void 0):angular.render("page-footer/view")},replace:!0,link:function(e){e.config=t,e.piClick=function(e){"prod"!==t.env&&e&&e.shiftKey&&(e.ctrlKey||e.metaKey)&&window.open("https://www.youtube.com/watch?v=pXPXMxsXT28")}}}}t.exports=["$sce","config",n]},{}],362:[function(e){"use strict";var t=e("../../common/app");t.directive("pageFooter",e("./directives/view"))},{"../../common/app":19,"./directives/view":361}],363:[function(e,t){"use strict";function n(e){return{restrict:"AE",template:angular.render("partner/button"),replace:!0,scope:{partner:"="},link:function(t,n,r){function i(){var n={};t.partner._id?n.id=t.partner._id:n.slug=t.partner.slug?t.partner.slug:t.partner,e.get(n,function(e){t.partner=e.data})}t.cta=r.cta;var o=t.$watch("partner",function(e){e&&(i(),o())})}}}t.exports=["partnerResource",n]},{}],364:[function(e,t){"use strict";function n(e,t){return{restrict:"AE",template:'
    ',replace:!0,scope:{partner:"=?",partnerSlug:"=?",campaignSlug:"=?"},link:function(n,i,o){function a(){var i={};n.partner?n.partner._id?i.id=n.partner._id:n.partner.slug&&(i.slug=n.partner.slug):i.slug=n.partnerSlug,t.get(i,function(t){n.partner=t.data,n.partner&&r.each(n.partner.campaigns,function(t){t.slug===n.campaignSlug&&(n.campaign=t,n.campaign.freeform&&(n.campaign.freeform=e.trustAsHtml(n.campaign.freeform)))})})}n.cta=o.cta;var s=n.$watch("partner",function(e){e&&(a(),s())}),c=n.$watch("partnerSlug",function(e){e&&(a(),s(),c())})}}}var r=e("underscore");t.exports=["$sce","partnerResource",n]},{underscore:void 0}],365:[function(e){"use strict";var t=e("../../common/app");t.directive("partnerCampaign",e("./directives/campaign")),t.directive("partnerButton",e("./directives/button"))},{"../../common/app":19,"./directives/button":363,"./directives/campaign":364}],366:[function(e,t){"use strict";function n(e,t,n){return{restrict:"AE",scope:{event:"=?"},template:angular.render("past-event/index"),controllerAs:"ctrl",controller:["$scope","$attrs",function(e,r){function i(){e.event&&(o.event=e.event,t.getEventUIData(o.event).then(function(e){o.course=e,o.course.display_date=n("date")(1e3*o.course.start_time,"MMMM d, yyyy")}))}var o=this;"true"===r.watch?e.$watch("event",i):e.event&&i()}]}}t.exports=["$rootScope","EventService","$filter",n]},{}],367:[function(e){"use strict";var t=e("../../common/app");t.directive("clPastEvent",e("./directives/index"))},{"../../common/app":19,"./directives/index":366}],368:[function(e,t){"use strict";function n(e){return{restrict:"E",scope:{current:"=",full:"=",sale:"="},template:angular.render("price/current"),replace:!0,link:function(t){t.$watch("sale.end",function(n){if(n){var r=1e3*n-Date.now();e(function(){t.sale=!1,t.current=t.full},r)}})}}}t.exports=["$timeout",n]},{}],369:[function(e){"use strict";var t=e("../../common/app");t.directive("priceCurrent",e("./directives/current"))},{"../../common/app":19,"./directives/current":368}],370:[function(e,t){"use strict";function n(e,t,n,o){return{restrict:"AE",template:function(e,t){return t.template?angular.render(t.template):angular.render("product-card/view")},replace:!0,scope:{productId:"=",eventId:"@"},link:function(a,s,c){function l(){e.findById({id:a.productId},function(e){a.product=e.data,a.source=a.product.source,u()})}function u(){n.findByContentId({id:a.source._id,time:"end_time",when:"after"},function(e){var t=o.organizeBroadcastsForSource(e.data,a.source),n=t.current,i=t.next;a.schedule=n||i,t.lives.length?a.broadcast=f(r.first(t.lives).start_time,r.last(t.lives).end_time):t.rebroadcasts.length?a.broadcast=f(r.first(t.rebroadcasts).start_time,r.last(t.rebroadcasts).end_time):a.schedule&&(a.broadcast=f(a.schedule.start_time,a.schedule.end_time)),a.title=a.schedule&&a.schedule.meta&&a.schedule.meta.title})}function d(){t.price({productId:a.productId},function(e){a.price=e.data,p()})}function p(){try{var e,t=r.find(a.price.discounts,function(e){return"discount"===e.actions[0].type});t.conditions&&(e=r.find(t.conditions,function(e){return e.start})||!0),a.onSale=e}catch(n){}}function f(e,t){var n={start:e,end:t};return i.unix(e).dayOfYear()===i.unix(t).dayOfYear()&&(n.singleDay=!0),i.unix(e).month()===i.unix(t).month()&&(n.singleMonth=!0),n}if(a.productTitle=c.productTitle,a.productId)l(),d();else var h=a.$watch("productId",function(e){e&&(l(),d(),h())})}}}var r=e("underscore"),i=e("moment");t.exports=["productResource","ecommerceResource","scheduleResource","EventService",n]},{moment:void 0,underscore:void 0}],371:[function(e){"use strict";var t=e("../../common/app");t.directive("productCard",e("./directives/index"))},{"../../common/app":19,"./directives/index":370}],372:[function(e,t){"use strict";function n(e,t){return{restrict:"EA",scope:{course:"="},template:angular.render("questions/ask"),replace:!0,link:function(n,r,i){angular.extend(n,{btnText:i.btnText||"Ask",rows:i.rows||4,placeholder:i.placeholder||"Type your Question Here.",onSubmit:function(r){e.askQuestion(r,function(){var e=new t;e.updateScores()}),n.question="";try{document.getElementById("ask-question-"+n.$id).focus()}catch(i){}}}),n.$watch("course",function(){e.reInit({course:n.course})})}}}t.exports=["QuestionsService","ScoresService",n]},{}],373:[function(e,t){"use strict";function n(e,t){return{restrict:"EA",scope:{course:"="},template:angular.render("questions/list"),replace:!0,link:function(n){function i(e){return r.indexOf(["flagged","doNotAsk","answered","asked"],e.moderation_state)<0}function o(e){return r.indexOf(["answered"],e.moderation_state)>=0}function a(){if(n.filteredQuestions&&n.filteredQuestions.length){var e=(n.page-1)*n.limit,t=e+n.limit;n.questions=n.filteredQuestions.slice(e,t)}else n.questions=[]}function s(e,r){var s=[];n.questionsList&&n.questionsList.length&&("newest"===n.tab?(s=n.questionsList.filter(i),c="asked"):"popular"===n.tab?(s=n.questionsList.filter(i),c=["votes","asked"]):"answered"===n.tab&&(s=n.questionsList.filter(o),c="asked"),e&&r&&e!==r&&(n.page=1),n.filteredQuestions=t("orderBy")(s,c,!0),n.totalQuestions=n.filteredQuestions.length,a())}var c="asked";angular.extend(n,{userCount:0,questions:[],filteredQuestions:[],tab:"newest",filter:i,filterQuestions:i,filterAnswered:o,upVote:e.upvoteQuestion,changePage:a,totalQuestions:0,limit:10,page:1}),n.$watch("tab",s),n.$watch("course",function(){n.userCount=0,n.questions=[],n.filteredQuestions=[],e.reInit({course:n.course,onConnect:function(){n.questionsList=e.questionsList,e.getContext(),s(),n.$apply()},onMessage:function(){s(),n.$apply()}}),e.initPubnub()});var l=n.$watchCollection("questionsList",function(e){e&&e.length&&(s(),l())})}}}var r=e("underscore");t.exports=["QuestionsService","$filter",n]},{underscore:void 0}],374:[function(e){"use strict";var t=e("../../common/app");t.directive("questionsList",e("./directives/list")),t.directive("questionsAsk",e("./directives/ask"))},{"../../common/app":19,"./directives/ask":372,"./directives/list":373}],375:[function(e,t){"use strict";function n(e,t,n,o,a,s){return{restrict:"AE",scope:{data:"=?"},template:angular.render("quick-watch/edit"),replace:!0,link:function(e){e.config=t,e.data||(e.data=e.$parent.data),e.data.segments||(e.data.segments=[]),e.segments=angular.copy(e.data.segments),e.addSegment=function(t){var n,c;i.series([function(e){return t.course?(o.getCompleteById({id:t.course},function(t){n=t.data,e()}),void 0):e()},function(e){a.get({id:t.media[0]},function(t){c=t,e()})},function(e){return c.data.token?e():(s.get({id:c.data.file._id||c.data.file},function(t){c.data.videoUrl="https://s3-us-west-2.amazonaws.com/"+t.data.bucket+"/"+t.data.key,e()}),void 0)}],function(){var i={_id:t._id,slug:t.slug,title:t.title,thumbnail_url:t.thumbnail_url,videoUrl:c.data.videoUrl,token:c.data.token};n&&(i.course={title:n.title,url:"/courses/"+n.slug,image:n.image.file.key,instructors:r.deepOmit(n.instructors,"courses profile.bio profile.short_bio"),primary_category:n.primary_category}),e.data.segments.push(i)})},e.removeSegment=function(t){e.data.segments.splice(t,1)},e.onDrop=function(t,r,i,o,a,s){n(t,s,o),e.$apply()};var c;e.freeWatch=0===e.data.freeWatchLength,e.$watch("freeWatch",function(){e.freeWatch?(c=e.data.freeWatchLength,e.data.freeWatchLength=0):c&&(e.data.freeWatchLength=c)})}}}var r=e("underscore"),i=e("async");t.exports=["$sce","config","arrayMove","courses","mediaResource","fileResource",n]},{async:497,underscore:void 0}],376:[function(e,t){"use strict";function n(e,t,n,r){return{restrict:"AE",scope:{data:"=?"},template:angular.render("quick-watch/view"),replace:!0,link:function(e){function i(t){e.video=t,s();try{a(e.data.segments[0])}catch(n){throw n}}function o(n,r,i){e.posterUrl=n.course&&n.course.image||n.thumbnail_url,e.currentSegment=n,e.$broadcast("video:queue",{playUrl:i&&i.data&&i.data.playUrl||n.videoUrl,posterUrl:e.posterUrl,segment:n}),r&&t(function(){e.$broadcast("video:send-command","play")})}function a(n,i){return e.showWall=!1,n.token?(r.token({token:n.token},function(e){o(n,i,e)}),void 0):t(function(){o(n,i)},300)}function s(){l>0&&e.video.on("play",function(){u&&t.cancel(u),u=t(function(){e.showWall=!0,e.$broadcast("video:send-command","pause")},l)})}function c(){try{a(e.data.segments[0],!1),d()}catch(t){}}e.config=n,e.video={},e.setSegment=a,e.onVideoPlayerReady=i;var l,u;e.data||(e.data=e.$parent.data),l=!isNaN(e.data.freeWatchLength)&&e.data.freeWatchLength>=0?1e3*e.data.freeWatchLength:9e4;var d=e.$watch("data.segments",c,!0)}}}t.exports=["$sce","$timeout","config","mediaResource",n]},{}],377:[function(e){"use strict";var t=e("../../common/app");t.directive("quickWatch",e("./directives/view")),t.directive("quickWatchEdit",e("./directives/edit"))},{"../../common/app":19,"./directives/edit":375,"./directives/view":376}],378:[function(e,t){"use strict";function n(e,t,n,r){function i(){n.cacheClear.clearReview(e.source)}e.cancel=t.dismiss,e.source=n.source,e.comment="",e.recommended=!0,e.submitReview=function(){n.resource.submitReviewBySlug({slug:e.source.slug},{subject:"",comment:e.comment,recommended:e.recommended},function(){e.reviewSubmitted=!0;var t=new r;t.updateScores(),i()},i)},e.enableSubmit=function(){return e.recommended!==!1||e.comment?e.recommended===!0||e.comment&&""!==e.comment:!1}}t.exports=["$scope","$modalInstance","args","ScoresService",n]},{}],379:[function(e,t){"use strict";function n(){return{restrict:"E",scope:{reviewCount:"="},template:angular.render("reviews/icon"),replace:!0}}t.exports=[n]},{}],380:[function(e,t){"use strict";function n(e){return{restrict:"A",scope:{source:"=reviewModalToggleSource",counts:"=reviewModalToggleCounts",onSubmit:"&reviewModalOnSubmit"},link:function(t,n){var r=new e(t.source,t.counts,t.onSubmit);n.bind("click",function(){r.toggleModal()})}}}t.exports=["ReviewModalService",n]},{}],381:[function(e,t){"use strict";function n(){return{restrict:"AE",scope:{review:"=reviewsReview"},replace:!0,template:angular.render("reviews/review")}}t.exports=[n]},{}],382:[function(e,t){"use strict";function n(e,t){return{restrict:"AE",scope:{slug:"@",review:"="},replace:!0,template:angular.render("reviews/submit"),link:function(n,r){n.writeReview=function(){n.writingReview=!0,e(function(){r[0].querySelector("textarea").focus()})},n.submitReview=function(){t.submitReviewBySlug({slug:n.slug},{subject:"",comment:n.review},function(){n.writingReview=!1})}}}}t.exports=["$timeout","courseResource",n]},{}],383:[function(e){"use strict";var t=e("../../common/app");t.controller("reviewModalController",e("./controllers/modal")),t.service("ReviewModalService",e("./services/modal")),t.directive("reviewsReview",e("./directives/review")),t.directive("reviewsIcon",e("./directives/icon")),t.directive("reviewSubmit",e("./directives/submit")),t.directive("reviewModalToggle",e("./directives/modal-toggle"))},{"../../common/app":19,"./controllers/modal":378,"./directives/icon":379,"./directives/modal-toggle":380,"./directives/review":381,"./directives/submit":382,"./services/modal":384}],384:[function(e,t){"use strict";function n(e,t,n,r,i,o){function a(e,t,n){this.set("source",e),this.set("counts",t),this.set("onSubmit",n)}function s(e,t){this[e]=t}function c(){var t=this;return t.source?(e.user.valid()?n.userReviewForCourse({courseId:t.source._id},function(e){0===e.data.length&&t.showReviewModal()}):(e.$broadcast("login:show"),d||(d=e.$on("user:login",function(){t.showReviewModal(),d()})),p||(p=e.$on("user:register",function(){t.showReviewModal(),p()}))),void 0):!1}function l(){var e=this,n=t.open({template:angular.render("reviews/submit-modal"),controller:"reviewModalController",resolve:{args:function(){return{resource:r,cacheClear:o,source:e.source}}}});i.reviewModal(e.source,e.counts),n.result.then(function(){e.onModalDismiss()},function(){e.onModalDismiss()})}function u(){d&&(d(),d=void 0),p&&(p(),p=void 0),"function"==typeof this.onSubmit&&this.onSubmit()}var d,p;return angular.extend(a.prototype,{source:void 0,counts:void 0,set:s,toggleModal:c,showReviewModal:l,onModalDismiss:u}),a}t.exports=["$rootScope","$modal","reviewResource","courseResource","trackFactory","cacheClear",n]},{}],385:[function(e,t){"use strict";function n(e){return{restrict:"A",link:function(t,n,r){var i=e.location.hash;n.attr("href",e.location.href.replace(i,"")+"#"+r.href)}}}t.exports=["$window",n]},{}],386:[function(e){"use strict";var t=e("../../common/app");t.directive("scrollToAnchor",e("./directive"))},{"../../common/app":19,"./directive":385}],387:[function(e,t){"use strict";function n(){return{restrict:"AE",replace:!0,template:angular.render("scrollbar/view"),scope:{containerId:"@",container:"=?"},controller:["$scope","$document","$element","$timeout",function(e,t,n,r){function i(){r.cancel(i),b=parseInt(getComputedStyle(g).height,10),y=parseInt(getComputedStyle(w[0]).height,10),M=b/y,v=b*M,v>=b?(o(u,"disabled"),o(g,"no-scrollbar")):(a(u,"disabled"),a(g,"no-scrollbar")),d.style.height=v+"px",s(0)}function o(e,t){e.classList?e.classList.add(t):e.className+=" "+t}function a(e,t){e.classList?e.classList.remove(t):e.className=u.className.replace(new RegExp("(^|\\b)"+t.split(" ").join("|")+"(\\b|$)","gi")," ")}function s(e){g.scrollTop+=e;var t=parseInt(g.scrollTop*M);d.style.top=t+"px",0>=t?a(h,"active"):o(h,"active"),t+v>=b-10?a(f,"active"):o(f,"active")}function c(e){var t=e.y||e.clientY;if(!m)return m=t,void 0;var n=t-m;m=t,s(n/M)}function l(){i(),s(0)}var u=n[0],d=n[0].querySelector(".scrollbar-thumb"),p=t[0].querySelector("body"),f=n[0].querySelector(".gradient-bottom"),h=n[0].querySelector(".gradient-top"),m=0;e.containerId&&(e.container=angular.element(t[0].querySelector("#"+e.containerId)));var g=e.container[0];e.container.addClass("scrollbar-container");var v,b,y,M,w=g.children;r(i,100),e.container.bind("wheel",function(e){u.classList.contains("disabled")||(e.stopPropagation(),e.preventDefault(),s(e.originalEvent.deltaY))}),d.addEventListener("mousedown",function(){t[0].addEventListener("mousemove",c),o(u,"active"),o(p,"noselect")}),t[0].addEventListener("mouseup",function(){t[0].removeEventListener("mousemove",c),m=0,a(u,"active"),a(p,"noselect")}),window.addEventListener("resize",function(){l()}),e.$on("video:scrollbar:refresh",function(){l()}),e.$on("video:queue",function(){r(function(){var e=g.querySelector(".playing");if(e){var t=e.getBoundingClientRect(),n=g.getBoundingClientRect();(t.bottom>=n.bottom||t.top<=n.top)&&(g.scrollTop=e.offsetTop-50,s(0))}},100)})}]}}t.exports=["$document",n]},{}],388:[function(e){"use strict";var t=e("../../common/app");t.directive("clScrollbar",e("./directives/index"))},{"../../common/app":19,"./directives/index":387}],389:[function(e,t){"use strict";function n(e,t,n,i,o,a,s,c,l){return{restrict:"AE",replace:!0,template:angular.render("search-autocomplete/dropdown"),scope:{query:"=",searchFocus:"=",onSearchInput:"=?",inputId:"@"},link:function(u,d){function p(e){e&&(u.keyboardNavigation.splice(0,u.keyboardNavigation.length),u.url=_+"?q="+e,v(e).then(function(t){t&&(t&&(t.length>k&&t.splice(k),m(t,!0)),z&&(u.instructors=f(e,t)))}),t.search(e,{limit:x}).then(function(e){u.channels=e.length?e:void 0;var t=r.chain(u.channels).pluck("topics").flatten().value();m(t)}),w(e),u.inputId===document.activeElement.id&&(u.searchFocus=!0))}function f(e,t){var n,i,o,a="",s=[];return o=h(t),i=e.split(" "),r.each(i,function(e){a+="(?=.*"+r.escape(e)+")"}),n=new RegExp(a,"i"),r.each(M,function(e){n.test(e.profile.name)&&s.push(e)}),r.union(o,s)}function h(e){var t,n=[];return r.each(e,function(e){r.each(e.instructors,function(i){t=r.findWhere(n,{_id:i._id}),t?t.popularity=t.popularity+e.popularity:n.push({_id:i._id,name:i.name,slug:i.slug,popularity:e.popularity})})}),n.sort(function(e,t){return t.popularity-e.popularity}),n}function m(e,t){t?(u.keyboardNavigation=r.union(e,u.keyboardNavigation),u.keyboardNavigation=r.flatten(u.keyboardNavigation)):(u.keyboardNavigation=r.union(u.keyboardNavigation,e),u.keyboardNavigation=r.flatten(u.keyboardNavigation))}function g(e){l.catalog("searchComplete",{term_entered:e,sort_method:"popular",src:"autocomplete",cta_name:A})}function v(t){var n=c.defer();return t&&e.searchAutocomplete({text:t}).then(function(i){i.length<3?e.searchAutocomplete({text:t,against:["description"]}).then(function(e){u.courses=r.union(i,e),n.resolve(u.courses)}):u.courses=i,u.selectedItem=-1,n.resolve(u.courses)}),n.promise}function b(e){u.query=e,s(function(){$("#"+u.inputId).focus()},1)}function y(e){function t(e){var t=u.keyboardNavigation[u.selectedItem];t&&(t.active=e?!1:!0)}var n=40,r=38,i=13;if(u.searchFocus)switch(t(!0),e.keyCode){case n:e.preventDefault(),u.selectedItem++,u.selectedItem>=u.keyboardNavigation.length&&(u.endOfList=!0,u.selectedItem=u.keyboardNavigation.length),t();break;case r:e.preventDefault(),u.endOfList=!1,u.selectedItem--,u.selectedItem<0&&(u.selectedItem=-1),t();break;case i:if(-1===u.selectedItem)return;if(e.preventDefault(),u.selectedItem===u.keyboardNavigation.length)return u.onSearchInput(e,"submit"),void 0;var a=u.keyboardNavigation[u.selectedItem];a&&(a.slug?o.location.href=S+a.slug:a.path&&(o.location.href=a.path))}}var M,w,A,x=3,k=3,_="/catalog",S="/courses/",z=!1;angular.extend(u,{updateQuery:b,selectedItem:-1,keyboardNavigation:[],popularSearches:[a("i18n")("search-autcomplete-popular-search-1","Lightroom"),a("i18n")("search-autcomplete-popular-search-2","Wedding Photography"),a("i18n")("search-autcomplete-popular-search-3","Marketing"),a("i18n")("search-autcomplete-popular-search-4","Illustrator"),a("i18n")("search-autcomplete-popular-search-5","Etsy"),a("i18n")("search-autcomplete-popular-search-6","Fundamentals")]}),t.get(),z&&n.getInstructors().then(function(e){M=[],r.each(e,function(e){M.push({_id:e._id,profile:e.profile,slug:e.slug})})}),w=r.debounce(g,1500),u.$watch("query",r.debounce(p,100)),i.keydown(y);var T=document.getElementById("siteHeader"),C=T.getElementsByClassName("dropdown-autocomplete")[0];A=C===d[0]?"nav":"catalog"}}}var r=e("underscore");t.exports=["CatalogService","ChannelTopicService","InstructorService","$document","$window","$filter","$timeout","$q","trackFactory",n]},{underscore:void 0}],390:[function(e,t){"use strict";function n(e,t,n){return{restrict:"AE",replace:!0,template:angular.render("search-autocomplete/view"),scope:{prequery:"=?",onSearchInput:"=?",displayClose:"=?",focusInput:"=?",value:"@",useSubmitBtn:"@",inputClass:"@",inputId:"@"},link:function(e,r,i){function o(i){e.focusInput=!0,e.onSearchInput(i,"focus"),t.cancel(l),rind.context.ua.mobile&&window.scrollTo(0,r[0].getBoundingClientRect().top-10),n.catalog("searchStart",{})}function a(n){e.onSearchInput(n,"blur"),e.focusInput=!1,l=t(function(){e.displayClose=!1},300)}function s(t){$.contains(r[0],t.target)||$(t.target).hasClass("fa-search")?e.focusInput=!0:a(t)}function c(t){e.prequery="",e.displayClose=!1,e.onSearchInput(t,"clear")}var l;i.inputId||(i.inputId="q"),angular.extend(e,{onFocus:o,clearSearch:c,focusInput:!1}),e.$on("CatalogSearch:submit",function(){e.focusInput=!1}),$(document.body).mousedown(s)}}}t.exports=["$document","$timeout","trackFactory",n]},{}],391:[function(e){"use strict";var t=e("../../common/app");t.directive("clSearchAutocomplete",e("./directives/index")),t.directive("clSearchAutocompleteDropdown",e("./directives/dropdown"))},{"../../common/app":19,"./directives/dropdown":389,"./directives/index":390}],392:[function(e,t){"use strict";function n(e,t){return{restrict:"E",scope:{course:"="},template:angular.render("segment/index"),replace:!0,link:function(n){function r(){e.findById({id:n.course._id},function(e){n.course=e.data,n.videoPlayer=t.getVideoPlayer(n.course._id),n.videoPlayer.segments.getCourseToken(n.course.slug,i)})}function i(){n.segments=n.videoPlayer.segments.getSegments(n.course),n.segments=n.videoPlayer.segments.setMediaPermission(n.segments),n.currentSegment=n.videoPlayer.segments.currentSegment}var o=n.$watch("course",function(e){e&&(r(),o())})},controller:["$scope",function(e){angular.extend(e,{play:function(t){e.videoPlayer.segments.play(t)},isVideo:function(t){e.videoPlayer.segments.isVideo(t)}}),e.$on("video:queue",function(t,n){var r=n.segment||{};e.currentSegment=r})}]}}t.exports=["courseResource","videoPlayerFactory",n]},{}],393:[function(e,t){"use strict";function n(e){return{restrict:"E",scope:{segments:"=",currentSegment:"=",onPlay:"&",onDownload:"&",courseId:"="},template:function(e,t){return t.template?angular.render("segment/"+t.template):angular.render("segment/list")},replace:!0,link:function(t,n,i){function o(){angular.forEach(t.segments,function(e){if(e.title){var t=e.title.split(" with ");t.length>1&&(e.mainTitle=t[0],e.subtitle="with "+t[1])}})}function a(e){try{return null!==e.media[0].type.match(/(hd|low|mp4|video)/i)}catch(t){return!1}}function s(e){return"Low"===e.type?'':'hd '}function c(e){var t=r[e.type];return t?"fa-file-"+t+"-o":"fa-file-o"}angular.extend(t,{showSegmentTitle:"false"!==i.showSegmentTitle,isVideo:a,videoIcon:s,fileIcon:c,play:t.onPlay(),download:t.onDownload()}),o(),t.downloadItem=function(n,r,i){n.preventDefault(),n.stopPropagation(),e.downloadItem(i,r,t.courseId),t.download(r)}}}}t.exports=["trackFactory","$sce",n];var r={pdf:"pdf",zip:"zip",doc:"word",docx:"word",xls:"excel",numbers:"excel",ppt:"powerpoint",txt:"text",mp3:"sound",gif:"image",jpg:"image",png:"image",svg:"image",html:"code",js:"code",css:"code",HD:"video",Low:"video"}},{}],394:[function(e){"use strict";var t=e("../../common/app");t.directive("segmentLesson",e("./directives/lesson")),t.directive("segmentList",e("./directives/list")),t.service("segmentService",e("./services/main"))},{"../../common/app":19,"./directives/lesson":392,"./directives/list":393,"./services/main":395}],395:[function(e,t){"use strict";function n(e){return function(t){function n(t,n){e.getCourseTokensBySlug({slug:t},function(e){m=e.data||{},n()})}function o(e){return r.chain(e.sessions).pluck("segments").flatten().flatten().value()}function a(){return f}function s(){var e=0,t=g.length;for(e;t-1>e;e++)if(f===g[e])return g[e+1]}function c(e){var t=r.chain(e).pluck("media").flatten().value();return r.each(t,function(e){e&&(e.permission=void 0!==m[e._id])}),g=e}function l(e){try{return null!==e.media[0].type.match(/(hd|low|mp4|video)/i)}catch(t){return!1}}function u(e){var t=e&&(e.media[0]||e.media),n=i[t.type];return n?"fa-file-"+n+"-o":"fa-file-o"}function d(t,n){var r,i=t&&(t.media[0]||t.media);return i&&i._id?(r=m[i._id],i.permission!==!1&&r?(e.token({token:r},n),void 0):!1):!1}function p(e){(!e.media[0]||e.media[0].permission||e.is_preview)&&(h.$scope.$broadcast("video:stream:pause"),d(e,function(t){t.data.playUrl&&(h.$scope.$broadcast("video:queue",{playUrl:t.data.playUrl,segment:e}),f=e,h.$scope.$broadcast("video:send-command","play"))}))}var f,h=this,m=[],g=[];h.$scope=t,angular.extend(this,{getCourseToken:n,getSegments:o,getCurrentSegment:a,getNextSegment:s,setMediaPermission:c,isVideo:l,fileIcon:u,play:p})}}var r=e("underscore");t.exports=["mediaResource",n];var i={pdf:"pdf",zip:"zip",doc:"word",docx:"word",xls:"excel",numbers:"excel",ppt:"powerpoint",txt:"text",mp3:"sound",gif:"image",jpg:"image",png:"image",svg:"image",html:"code",js:"code",css:"code",HD:"video",Low:"video"}},{underscore:void 0}],396:[function(e,t){"use strict";function n(e,t,n){return{restrict:"AE",scope:{data:"=?"},template:'
    ',replace:!0,link:function(r){r.config=t,r.data||(r.data=r.$parent.data),n.get(function(t){var n=t.data&&t.data.banner;n&&(r.banner=e.trustAsHtml(n))})}}}t.exports=["$sce","config","bannerResource",n]},{}],397:[function(e){"use strict";var t=e("../../common/app");t.directive("siteBanner",e("./directives/view"))},{"../../common/app":19,"./directives/view":396}],398:[function(e,t){"use strict";function n(){return{restrict:"EA",template:angular.render("student-snapshot/cms-view"),scope:{data:"=?"},controllerAs:"studentSnapshotCtrl",controller:["$scope","$attrs",function(e,t){this.data=e.data||e.$parent.data||{},e.isAdmin="true"===t.isAdmin}]}}t.exports=[n]},{}],399:[function(e,t){"use strict";function n(e,t,n){return{restrict:"AE",template:angular.render("student-snapshot/index"),controllerAs:"StudentSnapshotCtrl",controller:["$scope",function(){function o(e){e.short_title||(e.short_title=r(e,"swimlanes.0.broadcasts.0.meta.short_title")),e.instructors||(e.instructors=r(e,"swimlanes.0.broadcasts.0.meta.instructors")),l.addToSet(e,"_id")}function a(e){c.selectedCourse=_.find(c.courses,function(t){return t._id===e})}function s(e){e&&a(e._id),c.selectedCourse&&(_.each(c.courses,function(e){e.selected=!1}),c.selectedCourse.selected=!0,c.view=c.selectedCourse.type)}var c=this,l=new t;angular.extend(c,{onSelect:s,hasCourses:!0,courses:new t}),e.user&&e.user.recentInteractions&&e.user.recentInteractions().then(function(t){var r;i.each(t.courses,function(t,i){t.swimlanes?n.getEventUIData(t).then(function(n){n.type=t.type,r||!t.live||e.user.hasContent("purchased","course",n._id)||(r=n._id),o(n),i()},function(){i()}):(o(t),i())},function(){c.courses=l,r||c.courses.length?(a(r||c.courses[0]._id),s()):c.hasCourses=!1})})}]}}var r=e("deepval"),i=e("async");t.exports=["$rootScope","DataSet","EventService",n]},{async:497,deepval:504}],400:[function(e){"use strict";var t=e("../../common/app");t.directive("clStudentSnapshot",e("./directives/index")),t.directive("studentSnapshotCms",e("./directives/cms/view"))},{"../../common/app":19,"./directives/cms/view":398,"./directives/index":399}],401:[function(e,t){"use strict";function n(e,t,n){return{restrict:"AE",scope:{},template:angular.render("student-work/edit"),replace:!0,link:function(i){i.data=i.$parent.data,i.data.slides||(i.data.slides=[]),i.addImage=function(n){i.errorAddingImage=!1;var o={};r.series({getImage:function(t){e.findByIdWithImage({id:n},function(e){return e.success?(o.image=e.data[0]||e.data,t(null),void 0):t(new Error("Error getting image data for: "+n))})},getUserProfile:function(e){return o.image.owner&&o.image.owner.slug?(t.getBySlug({slug:o.image.owner.slug},function(t){return t.success?(o.profile=t.data.profile,e(null),void 0):e(new Error("Error getting user data for: "+o.image.owner.slug))}),void 0):e(null)}},function(e){e&&(i.errorAddingImage=!0),o.image&&i.data.slides.push(o),i.imageId=""})},i.removeImage=function(e){i.data.slides.splice(e,1)},i.onDrop=function(e,t,r,o,a,s){n(e,s,o),i.$apply()}}}}var r=e("async");t.exports=["galleryImage","user","arrayMove",n]},{async:497}],402:[function(e,t){"use strict";function n(e){return{restrict:"AE",scope:{data:"=?"},template:angular.render("student-work/view"),replace:!0,link:function(t){t.config=e,t.data||(t.data=t.$parent.data)}}}t.exports=["config",n]},{}],403:[function(e){"use strict";var t=e("../../common/app");t.directive("studentWork",e("./directives/view")),t.directive("studentWorkEdit",e("./directives/edit"))},{"../../common/app":19,"./directives/edit":401,"./directives/view":402}],404:[function(e,t){"use strict";function n(){return{restrict:"AE",scope:{},template:angular.render("swimlanes/cms-edit"),replace:!0,link:function(e){function t(t){e.data.event=e.data.event||{},e.data.event._id=t._id,e.data.event.title=t.title}e.data=e.$parent.data,angular.extend(e,{set:t})}}}t.exports=[n]},{}],405:[function(e,t){"use strict";function n(){return{restrict:"AE",scope:{data:"=?"},template:angular.render("swimlanes/cms-view"),replace:!0,link:function(e){e.data||(e.data=e.$parent.data)}}}t.exports=[n]},{}],406:[function(e,t){"use strict";function n(e,t,n){return{restrict:"AE",scope:{eventId:"@",broadcastType:"@",broadcastMatch:"@"},template:angular.render("swimlanes/view"),replace:!0,link:function(o,a,s){function c(e){angular.forEach(o.days,function(e){e.active=!1}),e.active=!0}function l(a){e.get({id:a,slim:!0}).then(function(e){var a=e.data,s={},c=[];r.each(a.swimlanes,function(e){-1===c.indexOf(e.name)&&c.push(e.name),r.each(e.broadcasts,function(n){var a=!1;if("equal"===o.broadcastMatch)a=n.broadcast_type===o.broadcastType;else if("regex"===o.broadcastMatch)try{var l=new RegExp(o.broadcastType);a=n.broadcast_type.match(l)}catch(u){}if(a){!n.meta&&n.content&&n.content.content_id&&t.getCourseById(n.content.content_id).then(function(e){n.meta=e});var d=i.unix(n.start_time).startOf("day"),p=d.format("ddd MM/DD"),f=i.unix(n.start_time).startOf("minute").format("HH:mm"),h=c.indexOf(e.name);s[p]=s[p]||{moment:d,timeslot:[],active:o.today.format(o.dateFormat)===p};var m=!1;if(r.each(s[p].timeslot,function(e){e.time===f&&(e.classes[h]=n,m=!0)}),!m){var g=[];g[h]=n,s[p].timeslot.push({time:f,timestamp:n.start_time,classes:g})}}})}),r.each(s,function(e,t){s[t].timeslot=r.sortBy(e.timeslot,function(e){return e.time})});var l=r.keys(s);if(l&&l.length){var u=s[l[0]]&&s[l[0]].moment;o.today.isBefore(u)&&(s[l[0]].active=!0)}o.days=s,o.laneNames=c,o.event=a,o.event.swimlanes.forEach(function(e){var t=new n({onBroadcastStart:function(t){e.broadcast=t,o.$applyAsync()}});t.setBroadcasts(e.broadcasts)})})}function u(e,t){return t?o.event.swimlanes[e].broadcast?o.event.swimlanes[e].broadcast._id===t._id?!0:!1:!1:!1 }function d(e,t,n){if(!o.days[e].timeslot[t+1])return!1;if(o.days[e].timeslot[t+1].classes[n])return!1;for(var r=o.days[e].timeslot[t].classes[n],i=o.days[e].timeslot[t],a=t;!r&&a>0;)a--,r=o.days[e].timeslot[a].classes[n];return r?r.end_time>i.timestamp:!0}var p=o.$watch("eventId",function(e){e&&(l(e),s.isAdmin||p())});angular.extend(o,{isPlaying:u,today:i().startOf("day"),dateFormat:"ddd MM/DD",hasBorderBottom:d,onSelect:c}),o.broadcastType||(o.broadcastType="live"),o.broadcastMatch||(o.broadcastMatch="equal")}}}var r=e("underscore"),i=e("moment");t.exports=["EventService","CatalogService","broadcastService",n]},{moment:void 0,underscore:void 0}],407:[function(e){"use strict";var t=e("../../common/app");t.directive("eventSwimlanes",e("./directives/view")),t.directive("swimlanes",e("./directives/cms/view")),t.directive("swimlanesEdit",e("./directives/cms/edit"))},{"../../common/app":19,"./directives/cms/edit":404,"./directives/cms/view":405,"./directives/view":406}],408:[function(e,t){"use strict";function n(){return{restrict:"AE",scope:{tags:"=?",autocomplete:"=?",placeholder:"@"},template:angular.render("tags-manager/view"),link:function(e){function t(t){angular.isString(t)&&(e.newTag=t),""!==e.newTag&&-1===e.tags.indexOf(e.newTag)&&e.tags.push(e.newTag),e.newTag=""}function n(t){e.tags.splice(t,1)}angular.extend(e,{newTag:"",add:t,remove:n,placeholder:e.placeholder||"Press to add tag"})}}}t.exports=n},{}],409:[function(e){"use strict";var t=e("../../common/app");t.directive("tagsManager",e("./directives/view"))},{"../../common/app":19,"./directives/view":408}],410:[function(e,t){"use strict";function n(e,t){return{restrict:"AE",scope:{data:"=?"},template:angular.render("testimonials/edit"),replace:!0,link:function(n){function r(e){var t={_id:e._id,testimonial:e.comment,studentName:e.user&&e.user.slug};n.data.testimonials.push(t)}function i(e){n.data.testimonials.splice(e,1)}function o(){var e={testimonial:"",studentName:""};n.data.testimonials.push(e)}function a(){n.data.noTitle&&(n.data.title="")}function s(e,r,i,o,a,s){t(e,s,o),n.$apply()}n.config=e,n.data||(n.data=n.$parent.data),n.data.testimonials||(n.data.testimonials=[]),angular.extend(n,{addReview:r,removeTestimonial:i,addTestimonial:o,removeTitle:a,onDrop:s})}}}t.exports=["config","arrayMove",n]},{}],411:[function(e,t){"use strict";function n(){return{restrict:"AE",scope:{data:"=?"},template:angular.render("testimonials/view"),replace:!0,link:function(e){e.data||(e.data=e.$parent.data),e.data.title||e.data.noTitle||(e.data.title="What our students are saying")}}}t.exports=[n]},{}],412:[function(e){"use strict";var t=e("../../common/app");t.directive("testimonials",e("./directives/view")),t.directive("testimonialsEdit",e("./directives/edit"))},{"../../common/app":19,"./directives/edit":410,"./directives/view":411}],413:[function(e,t){"use strict";function n(e,t,n,o){return{restrict:"E",template:angular.render("thank-you/view"),replace:!0,scope:{order:"=",debug:"="},link:function(e){function t(e){var t=r.chain(e).pluck("product").flatten().pluck("course_id").value(),i=t.join(","),o=r.chain(e).pluck("product").flatten().pluck("bundle_id").value();n.getTileData({ids:"["+i+"]"},function(e){e&&r.each(e.data,s)},function(){}),r.each(o,a)}function a(e){void 0!==e&&o.findById({id:e},function(e){e&&r.each(e.data.courses,s)},function(){})}function s(t){e.courses.push(t)}e.courses=[],e.freeClass=void 0;var c=e.$watch("order",function(n){n&&(e.freeClass="Free"===n.summaries.paymentMethod,t(n.line_items),c())});e.debug&&t(i),angular.extend(e,{getCourses:t})}}}t.exports=["$rootScope","$window","courseResource","bundleResource","$filter","$location","trackFactory",n];var r=e("underscore"),i=[{breakdown:[{course_id:"54fa2be82edec09f07081b1c"},{course_id:"54fa2bf42edec09f07082c16"},{course_id:"54fa2be92edec09f07082010"}]}]},{underscore:void 0}],414:[function(e){"use strict";var t=e("../../common/app");t.directive("clThankyou",e("./directives/index"))},{"../../common/app":19,"./directives/index":413}],415:[function(e,t){"use strict";function n(e){return{restrict:"EA",scope:{ngModel:"=",minDate:"@",onChange:"&"},template:angular.render("time/datetimeDropdown"),replace:!0,controllerAs:"ctrl",controller:["$scope",function(t){function n(e){return e&&(a.jsDate=1e3*e,a.date=e),""}function i(e,n){if(e){var r=Math.round(e/1e3);r>=a.minDate&&(a.date=r,t.ngModel=a.date,t.onChange&&t.onChange({date:e,previous:n,unixDate:a.date,unixPrevious:Math.round(new Date(n)/1e3)}))}}function o(t){t&&(t.preventDefault(),t.stopPropagation()),e(function(){a.dropdownOpen=!0})}var a=this;angular.extend(a,{displayFormat:"MMM Do, h:mma",minDate:t.minDate||r("2010-04-01T09:00:00").unix(),toView:n,toModel:i,keepOpen:o})}],link:function(e,t,n,r){n.displayFormat&&(r.displayFormat=n.displayFormat),e.$watch("ngModel",r.toView),e.$watch("ctrl.jsDate",r.toModel)}}}var r=e("moment");t.exports=["$timeout",n]},{moment:void 0}],416:[function(e,t){"use strict";function n(){return{scope:{dates:"=?",onChange:"="},template:angular.render("time/multiDatetimeDropdown"),controllerAs:"ctrl",controller:["$scope","$attrs",function(e,t){function n(){var e=s(r().startOf("day"));c.dates.addToSet(e.unix())}function o(e){c.dates.pull(e)}function a(t){t&&(c.dates.hasItem(t.unixDate)||(t.unixDate!==t.unixPrevious&&c.dates.pull(t.unixPrevious),c.dates.addToSet(t.unixDate),e.onChange(t.unixDate)))}function s(e){return c.dates.hasItem(e.unix())?s(e.add(1,"days")):e}var c=this,l=new i;angular.extend(c,{dates:e.dates?l.addEachToSet(e.dates):l,btnText:t.btnText,add:n,remove:o,onChange:a})}]}}var r=e("moment"),i=e("dataset.js");t.exports=n},{"dataset.js":500,moment:void 0}],417:[function(e){"use strict";var t=e("../../common/app");t.directive("clDatetimeDropdown",e("./directives/datetime-dropdown")),t.directive("clMultiDatetimeDropdown",e("./directives/multi-datetime-dropdown"))},{"../../common/app":19,"./directives/datetime-dropdown":415,"./directives/multi-datetime-dropdown":416}],418:[function(e,t){"use strict";function n(){return{restrict:"E",scope:{title:"@",subTitle:"@"},replace:!0,template:angular.render("title/section")}}t.exports=n},{}],419:[function(e){"use strict";var t=e("../../common/app");t.directive("titleSection",e("./directives/section"))},{"../../common/app":19,"./directives/section":418}],420:[function(e,t){"use strict";function n(e){return{restrict:"AE",replace:!0,template:angular.render("topic-editor/index"),link:function(t){e.getAllByCategory().then(function(e){t.categories=e})}}}t.exports=["topicService",n]},{}],421:[function(e,t){"use strict";function n(e,t,n){return{restrict:"AE",replace:!0,template:angular.render("topic-editor/page"),link:function(i,o){function a(){var e=30,t=n[0].body.scrollTop,r=o[0].querySelector(".header");t>=e?r.classList.add("fix"):e>=t&&r.classList.remove("fix")}function s(){i.$watchCollection(c,l)}function c(){return r(e.user.get("follows"),"topic")}function l(e){angular.isArray(e)&&(i.topicsFollowed=e&&e.length)}function u(){t.history.length>2?angular.isFunction(t.history.back)?t.history.back():t.history.go(-1):t.location.href="/"}var d=angular.element(t);e.$on("user:login",s),e.$on("user:register",s),angular.extend(i,{topicsFollowed:0,back:u}),e.user&&e.user._data&&e.user.valid()&&s(),d.on("scroll",a),i.$on("$$destroy",function(){d.off("scroll",a)})}}}var r=e("deepval");t.exports=["$rootScope","$window","$document",n]},{deepval:504}],422:[function(e){"use strict";var t=e("../../common/app");t.directive("topicEditor",e("./directives/index")),t.directive("topicEditorPage",e("./directives/page"))},{"../../common/app":19,"./directives/index":420,"./directives/page":421}],423:[function(e,t){"use strict";function n(e,t,n){return{restrict:"EA",template:angular.render("topic-hero/cms-edit"),link:function(r){function i(e){t.indexOf(r.data.topics,e.topic._id)<0&&r.data.topics.push(e.topic._id)}function o(e){var n=t.indexOf(r.data.topics,e.topic._id);n>=0&&r.data.topics.splice(n,1)}function a(e){n.findBySlug({slug:e.slug},function(e){r.data.image=e.data.image.file})}angular.extend(r,{config:e,setImageFromCourse:a,themes:{white:"Light Text",black:"Dark Text"},addFollow:i,removeFollow:o,topics:[],tags:[]}),r.data.topics||(r.data.topics=[]),!r.data.header&&r.data.topic&&(r.data.header=r.data.topic),r.data.category=r.page&&r.page.primary_category,r.data.theme||(r.data.theme="white"),r.$watch("data.theme",function(e){r.page.theme=e})}}}t.exports=["config","_","courseResource",n]},{}],424:[function(e,t){"use strict";function n(){return{restrict:"EA",template:angular.render("topic-hero/cms-view"),scope:{data:"=?"},controllerAs:"topicHeroCtrl",controller:["$scope",function(e){this.data=e.data||e.$parent.data||{}}]}}t.exports=[n]},{}],425:[function(e,t){"use strict";function n(e,t,n,i){return{restrict:"E",template:angular.render("topic-hero/view"),replace:!0,transclude:!0,scope:{categorySlug:"@",categoryId:"@",backgroundImage:"@",header:"@",lead:"@",theme:"@",topics:"=?",isPrimary:"=?"},link:function(o,a,s,c,l){function u(e){o.category=e.data;var t=new i,n={categories:[r(o,"category._id")],topics:o.topics};t.pageView(n)}if(o.categorySlug?t.getCategoryBySlug({slug:o.categorySlug}).$promise.then(u):o.categoryId&&t.getCategoryById({id:o.categoryId}).$promise.then(u),o.backgroundImage){var d=e("magick")(o.backgroundImage,{width:1600});a.css("background-image","url("+d+")")}o.data={HEADER:o.header,LEAD:o.lead},l(o,function(e){n(e,{$scope:o.data,compileScope:o.$parent.$parent})})}}}var r=e("deepval");t.exports=["$filter","categoryResource","parseTransclusions","ScoresService",n]},{deepval:504}],426:[function(e){"use strict";var t=e("../../common/app");t.directive("clTopicHero",e("./directives/index")),t.directive("topicHero",e("./directives/cms/view")),t.directive("topicHeroEdit",e("./directives/cms/edit"))},{"../../common/app":19,"./directives/cms/edit":423,"./directives/cms/view":424,"./directives/index":425}],427:[function(e,t){"use strict";function n(e,t,n,r,i,o){return{restrict:"AE",scope:{data:"=?"},template:angular.render("topic-list/cms-edit"),replace:!0,link:function(e){function a(t,n){e.data[n?"primaryTopics":"secondaryTopics"].splice(t,1)}function s(){var t=null,n=null!==e.selectedPrimaryTopic||""!==e.primaryTopic;n?null!==e.selectedPrimaryTopic?(t=e.data.primaryTopics[e.selectedPrimaryTopic.index],t&&t.title===e.selectedPrimaryTopic.topic.title&&(t.title=e.primaryTopic,e.selectedPrimaryTopic=null)):l(e.primaryTopic):null!==e.selectedSecondaryTopic?(t=e.data.secondaryTopics[e.selectedSecondaryTopic.index],t&&t.title===e.selectedSecondaryTopic.topic.title&&(t.title=e.secondaryTopic,e.selectedSecondaryTopic=null)):u(e.secondaryTopic)}function c(t,n,r){var o=8,a=16,s=e.data.primaryTopics.concat(e.data.secondaryTopics).filter(function(e){return e.title===t});return s.length>0?(i.warning("This topic already exists.","Topics Collection Module"),void 0):n&&e.data.primaryTopics.length>=o?(i.warning("There can only be a max of "+o+" primary topics.","Topics Collection Module"),void 0):e.data.primaryTopics.length+e.data.secondaryTopics.length>=a?(i.warning("There can only be a max of "+a+" total topics.","Topics Collection Module"),void 0):(r(),void 0)}function l(t){c(t,!0,function(){e.data.primaryTopics.push({title:t,primary:!0,link:null,image:null,follows:[],topics:[]}),e.primaryTopic=""})}function u(t){c(t,!1,function(){e.data.secondaryTopics.push({title:t,primary:!1,link:null,follows:[],topics:[]}),e.secondaryTopic=""})}function d(t,n){t.follows||(t.follows=[]),e.selectedSecondaryTopic=null,e.secondaryTopic="",e.primaryTopic=t.title,e.selectedPrimaryTopic={topic:t,index:n}}function p(t,n){t.follows||(t.follows=[]),e.selectedPrimaryTopic=null,e.primaryTopic="",e.secondaryTopic=t.title,e.selectedSecondaryTopic={topic:t,index:n}}function f(t){var n=e.selectedPrimaryTopic||e.selectSecondaryTopic,r=e.selectedPrimaryTopic?e.data.primaryTopics:e.data.secondaryTopics,i=r[n.index];i&&i.image&&(i.image=t)}function h(t,n){o.findBySlug({slug:t.slug},function(t){return t.data&&t.data.image?(e[n?"selectedPrimaryTopic":"selectedSecondaryTopic"].topic.image=t.data.image.file,void 0):i.error("There was no image returned from that course. Try another course")})}function m(e){h(e,!0)}function g(e){h(e,!1)}function v(e,t){n.indexOf(e.follows,t.topic._id)<0&&e.follows.push(t.topic._id)}function b(e,t){var r=n.indexOf(e.follows,t.topic._id);r>=0&&e.follows.splice(r,1)}function y(t){e.data.primaryTopics[t].image=null}function M(t,n,i,o,a,s){r(t,s,o),e.$apply()}e.data||(e.data=e.$parent.data),e.data.primaryTopics||(e.data.primaryTopics=[]),e.data.secondaryTopics||(e.data.secondaryTopics=[]),e.data.columns||(e.data.columns=3),e.data.showAll||(e.data.showAll=!1),angular.extend(e,{config:t,removeTopic:a,changeTopic:s,selectPrimaryTopic:d,selectSecondaryTopic:p,clear:y,setPrimaryImageFromCourse:m,setSecondaryImageFromCourse:g,onDrop:M,onUpload:f,primaryTopic:"",secondaryTopic:"",selectedPrimaryTopic:null,selectedSecondaryTopic:null,addFollow:v,removeFollow:b,topics:[],tags:[]})}}}t.exports=["$filter","config","_","arrayMove","toastr","courseResource",n]},{}],428:[function(e,t){"use strict";function n(){return{restrict:"AE",scope:{data:"=?",clModuleId:"@"},template:angular.render("topic-list/cms-view"),controllerAs:"topicListCtrl",controller:["$scope",function(e){this.data=e.data||e.$parent.data||{}}]}}t.exports=n},{}],429:[function(e,t){"use strict";function n(e,t){return{restrict:"AE",scope:{title:"@clTitle",sub:"@clSub",ctaText:"@",primaryTopics:"=?",secondaryTopics:"=?",showAll:"=?",columns:"=?",pageName:"@",moduleSlug:"@",clModuleId:"@"},template:angular.render("topic-list/view"),replace:!0,link:function(n){function r(){n.showingMore=!0,t.expandTopics(n.ctaText,"button","Topic List",n.clModuleId)}angular.extend(n,{config:e,showMore:r,showingMore:!1,activeIndex:null})}}}t.exports=["config","trackFactory",n]},{}],430:[function(e){"use strict";var t=e("../../common/app");t.directive("topicList",e("./directives/index")),t.directive("topicListCms",e("./directives/cms/view")),t.directive("topicListCmsEdit",e("./directives/cms/edit"))},{"../../common/app":19,"./directives/cms/edit":427,"./directives/cms/view":428,"./directives/index":429}],431:[function(e,t){"use strict";function n(e,t,n,d,p,f,h,m,g){function v(n){var r=n&&n._id;n.product&&(r=n.product._id||n.product);var i={content_type:"product",productID:r,content_ids:[r],nonInteraction:1},o=t.user&&t.user.get("primary_email");o&&o.address&&(i.email=e("md5")(o.address),i.hashed_email=e("md5")(o.address)),h.track("Product Page View",i)}function b(e,t,n){var r=ot(e);r.cta_label=t,r.cta_type=n,h.track("Starred",r)}function y(e,t,n){var r=ot(e);r.cta_label=t,r.cta_type=n,h.track("Unstar",r)}function M(e,t,n){var r=ot(e);r.cta_label=t,r.cta_type=n,h.track("Enrollment",r)}function w(e,t,n){var r=ot(e);r.cta_label=t,r.cta_type=n,h.track("Unenrollment",r)}function A(e,t,n){var r={value:0,nonInteraction:0};t?r.label=t:n&&(r.cta_label=n),e&&(r.category=e),h.track("Section View",r)}function x(e,t,n){d.findById({id:n},function(n){var r=ot(n.data);r.segment_id=e._id||null,r.required_access=e.is_preview?"none":e.required_access||null,r.itemType=t.type,r.segment_title=t.title,"HD"===t.type||"Low"===t.type?(r.itemType="video",r.videoDownloadType=t.type,r.video_length=t.duration):r.itemType="material",h.track("Download Item",r)})}function k(e,t){var n,r={search:"Catalog Page View"},i={searchStart:"search_start",searchComplete:"search_complete",filtering:"filtering",sorting:"sorting"};t||(t={}),r[e]?n=r[e]:i[e]&&(t.action=i[e],n="Search"),n&&h.track(n,t)}function _(e){var t=r.extend(e,{cta_type:e.cta_type||"button"});h.track("Cart",t)}function S(e,t,n,i){var o=e&&e.source,a=ot(o);r.extend(a,{cta_label:n,cta_type:i||"button",action:"add",offer_type:t||null,display_price:(e.pricing||{}).display_price||e.full_price,list_price:(e.pricing||{}).current_price,product_type:"course",product_id:e._id,course_id:o._id,course_cid:o.nid,bundle_id:null,bundle_bid:null}),o.type&&(a.product_type="course"===o.type?"bundle":"conference",a.bundle_id=o._id,a.bundle_bid=o.nid,a.course_id=null,a.course_cid=null),"cross"===t&&(e||{}).source&&(a.anchor_id=e.source._id),e&&(a.content_ids=[e._id]),a.content_type="product","gift"===t?h.track("Add Gift to Cart",a):h.track("Add to Cart",a)}function $(e,t,n,i){var o=e&&e.source,a=ot(o);if(r.extend(a,{cta_label:n,cta_type:i||"button",action:"remove",offer_type:t||null,product_type:"course",course_id:o._id,course_cid:o.nid,bundle_id:null,bundle_bid:null}),e){a.productID=e._id;var s=e.price||e.current_price||e.pricing&&e.pricing.price;angular.isNumber(s)&&(a.display_price=s)}o&&o.type&&(a.product_type="course"===o.type?"bundle":"conference",a.bundle_id=o._id,a.bundle_bid=o.nid,a.course_id=null,a.course_cid=null),h.track("Remove From Cart",a)}function z(e,t,n){var r=ot(e);if(r.cta_label=t,r.cta_type=n||"button",e){r.productId=e.nid,r.anchorId=e.source&&e.source.nid;var i=e.price||e.full_price;r.title=e.short_title||e.title,r.currentPrice=i/100,r.content_ids=[e.courseId],r.content_type="product"}h.track("Add Cross Cart",r)}function T(e){var t=ot(e.course);t.broadcast_type=e.course.broadcastStatus,h.track("Ask Question",t)}function C(e,t){var n=ot(e);n.counts=t,h.track("Review Modal",n)}function O(e){var t=ot(e);t.type="Low Free Preview",t.cta_item_id=e._id||null,t.cta_label="low_button",h.track("Low Free Preview",t)}function E(e,n){n=n||e.source||{};var i,o={type:"video_view",video_type:"on_demand",segment_id:n._id||null};t.user.valid()&&(i=t.user.hasContent("purchased","courses",e._id),i=i||t.user.hasRole("owns_all_courses"));var a="lesson";"promo"===n.type||n.media&&n.media[0]&&"promo"===n.media[0].type?a="promo":n.is_preview&&!i&&(a="preview"),o.access_type=a;var s=r.findWhere(n.media,{type:"HD"});s||(s=n.media&&n.media.length&&n.media[0]||n.media||{}),s&&(o.media_id=s._id,o.video_length=s.duration||null),B(o,e)}function L(e,t){B({type:"video_view",video_type:"on_air",segment_id:void 0,video_length:void 0,access_type:t},e),a&&n.cancel(a),at(s,0,e,t)}function B(n,i){o&&(clearInterval(o),u=0),n.action="play",n.ownership_type="free",i&&(n.course_id=i.courseId||i._id,n.product_id=i.product&&(i.product._id||i.product)),t.user&&t.user.valid()&&t.user.hasContent("purchased","course",i._id)&&(n.ownership_type="owned"),p.getPrimary().$promise.then(function(t){var a=r.findWhere(t&&t.data,{_id:i&&i.primary_category&&(i.primary_category._id||i.primary_category)});a&&(n.channel=e("titleCase")(a.title)),n.interval_seconds_watched=c,n.total_seconds_watched=0,g.reportVideoView(n),o=setInterval(function(){u++,n.total_seconds_watched=c*u,g.reportVideoView(n)},l)})}function N(e,t){return{"interface":"browser",account_type:e,action:t}}function q(e){var t={modal_id:e.modalId,modal_type:e.modalType,via:e.via};h.track("Account Modal Shown",t)}function I(e){var t={via:e};h.track("Account Modal Shown",t)}function P(e){var t=angular.extend(N(e.label,"start"),e.modalId);h.track("Login",t)}function R(e,t){var n=N(e,"complete");h.track("Login",n,{},t)}function D(e){var t=angular.extend(N(e.label,"start"),e.modalId);h.track("Registration Start",t)}function W(e,t){var n=rind&&rind.dump,r=n&&n.course&&n.course._id||n&&n.bundle&&n.bundle._id,i=N(e,"complete");r&&(i.productIDs=[r]),h.track("Registration Complete",i,{},t)}function j(e,t,n,r){var i=angular.extend({event_category:"onboarding",category:r||null,topic:n||null,cta_label:t,modal_type:"onboarding"},N(t,e));h.track("Onboarding",i)}function X(e){j("continue",e)}function F(e){j("quit",e)}function U(e){j("x",e)}function V(e){t.$broadcast("user:finish-onboarding"),j("finish",e)}function H(e){j("skip",e)}function G(e){j("skipX",e)}function K(e,t,n){j("add",e,t,n)}function Y(e,t,n){j("remove",e,t,n)}function J(e,t){var n={topic:e,action:t};h.track("Interest Topic Selected",n)}function Q(e,t){var n={category:e,action:t};h.track("Interest Category Selected",n)}function Z(e){var t={productIDs:[e]};h.track("Referral Start",t)}function et(e){var t={productIDs:[e.productNid],recipientEmail:[e.recipientEmail],noteAdded:!!e.note};h.track("Referral Submitted",t)}function tt(e,t,n,r){var i=h.getModuleLocation(r),o={cta_label:e,cta_type:t,cta_module:n||"NA",cta_location:i};h.track("Click External Link",o)}function nt(e,t,n,r){var i=h.getModuleLocation(r),o={cta_label:e,cta_type:t||"button",cta_module:n||"NA",cta_location:i};h.track("Expand Topics",o)}function rt(e,t,n,r,o){var a,s,c;"string"==typeof n&&(n=[n]),i.series([function(e){if("event"===t.follow_type){var r=n[0];f.get({id:r}).then(function(t){try{var n=t.data.swimlanes[0].broadcasts[0].meta}catch(r){}c=ot(n),s=c.category_ids,a=c.topic_ids,e()})}else"topic"===t.follow_type?m.get({id:n[0]}).then(function(){var t=m.getById(n[0]);s=[t.primary_category],a=n,e()}):e()}],function(){var i={action:e,follow_type:t.follow_type,follow_name:t.follow_name,follow_id:n[0],category_ids:s,topic_ids:a,cta_label:t.ctaLabel||"Follow",cta_type:o||"button",cta_module:"cta-follow",cta_location:r};h.track("Follow",i)})}function it(){var e={cta_type:"button"};h.track("Click My Courses CTA",e)}function ot(t){if(!t)return{};var n="object"==typeof t.product&&t.product||{},i=t.price||{},o=i.current_price||n.full_price,a=e("centsToDollars")(o,!1,2),s=r.chain(t.taxonomy).flatten().pluck("topic").pluck("_id").without(void 0).value(),c=r.chain(t.taxonomy).flatten().pluck("topic").without(void 0).value();return s=s.length?s:c,{ID:t.nid,title:t.title,channel:t.primary_category&&t.primary_category.title,product_type:n.source&&n.source.source_type,product_id:n._id,page_price:a,category_ids:[t.primary_category&&t.primary_category._id],topic_ids:s}}function at(e,t,r,i){a=n(function(){var n=ot(r);n.minutesWatched=e/1e3/60,n.intervalMinutesWatched=(e-t)/1e3/60,n.broadcast_type=i,delete n.ID,n.course_nid=r.nid,n.course_id=r._id,h.track("Broadcast Video View",n)},e),e===s?at(3*e,e,r):576e5>e&&at(2*e,e,r)}function st(e,t,n,r,i){var o=ot(t);o.cta_label=n,o.cta_type=r,o.cta_module="Product Card",o.cta_location=1,h.track("Free Class Opt-In "+e,o,{},i)}function ct(e){var t=r.extend({},ot(e),{type:"Chat CTA",cta_item_id:e._id||null,cta_label:"Chat"});h.track("Chat CTA",t)}function lt(e,t,n){var i={action:e,checkout_type:t};r.extend(i,n),h.track("Checkout",i)}function ut(e){angular.extend(e,{action:"start",checkout_type:"order"}),h.track("Checkout Order Start",e)}function dt(e){angular.extend(e,{action:"complete",checkout_type:"order"}),h.track("Completed Order",e)}function pt(e,t){var n={action:e};r.extend(n,t),h.track("Gifting",n)}return{productPageView:v,star:b,unStar:y,rsvp:M,unRsvp:w,tabSection:A,downloadItem:x,catalog:k,cart:_,addToCart:S,removeFromCart:$,addCrossCart:z,askQuestion:T,onDemandVideoView:E,liveOrRebroadcastPings:L,reviewModal:C,interestTopicSelected:J,interestCategorySelected:Q,accountModalShown:q,onboardingModalShown:I,signInStart:P,signInComplete:R,signUpStart:D,signUpComplete:W,referralComplete:et,referralStart:Z,onboardingContinue:X,onboardingQuit:F,onboardingX:U,onboardingFinishUp:V,onboardingSkip:H,onboardingSkipX:G,onboardingAddTopic:K,onboardingRemoveTopic:Y,lowFreePreview:O,clickExternalLink:tt,clickMoreMyCourses:it,expandTopics:nt,follow:rt,freeClassOptInComplete:st.bind(null,"Complete"),freeClassOptInStart:st.bind(null,"Start"),chatCTA:ct,checkout:lt,checkoutOrderStart:ut,checkoutOrderComplete:dt,gifting:pt}}var r=e("underscore"),i=e("async");t.exports=["$filter","$rootScope","$timeout","courseResource","categoryResource","EventService","AnalyticsService","TopicService","PipelineService",n];var o,a,s=3e5,c=60,l=1e3*c,u=0},{async:497,underscore:void 0}],432:[function(e){"use strict";var t=e("../../common/app");t.factory("trackFactory",e("./factories/main"))},{"../../common/app":19,"./factories/main":431}],433:[function(e,t){"use strict";function n(e){return{restrict:"E",template:angular.render("tutorial/index"),replace:!0,link:function(t){function n(){t.show=!1}angular.extend(t,{show:!1,onClose:n}),t.$on("tutorial:show",function(){e(function(){t.show=!0})}),t.$on("tutorial:hide",function(){e(function(){t.show=!1})})}}}t.exports=["$timeout",n]},{}],434:[function(e){"use strict";var t=e("../../common/app");t.directive("clTutorial",e("./directives/index"))},{"../../common/app":19,"./directives/index":433}],435:[function(e,t){"use strict";function n(e,t){return{restrict:"AE",scope:{data:"=?"},template:angular.render("upcoming-classes/edit"),replace:!0,link:function(e){function n(){e.data.filters=[],e.$broadcast("clearCategoryFilters")}function i(t){-1===e.data.filters.indexOf(t)?e.data.filters.push(t):e.data.filters=r.filter(e.data.filters,function(e){return e._id!==t._id})}angular.extend(e,{clearFilters:n,updateFilters:i,filterParams:["userTopics","userCategories","categories"]}),e.config=t,e.data||(e.data=e.$parent.data),e.data.limit||(e.data.limit=3),void 0===e.data.showButton&&(e.data.showButton=!0),e.data.filters||(e.data.filters=[]),e.data.filterParam||(e.data.filterParam="userTopics")}}}var r=e("underscore");t.exports=["$sce","config",n]},{underscore:void 0}],436:[function(e,t){"use strict";function n(){return{restrict:"AE",template:angular.render("upcoming-classes/frontrow-view"),scope:{data:"=?"},link:function(e,t,n){e.data||(e.data=e.$parent.data),e.isAdmin="true"===n.isAdmin}}}t.exports=[n]},{}],437:[function(e,t){"use strict";function n(){return{restrict:"AE",scope:{data:"=?"},template:angular.render("upcoming-classes/view"),replace:!0,link:function(e,t,n){e.data||(e.data=e.$parent.data),e.isAdmin="true"===n.isAdmin}}}t.exports=["$sce",n]},{}],438:[function(e,t){"use strict";function n(e,t){return{restrict:"AE",scope:{location:"@"},template:angular.render("upcoming-classes/frontrow"),link:function(n){n.locationMapping={sf:"San Francisco",seattle:"Seattle"},n.upcoming=[],e.get({broadcastType:"live",date:r.tz("America/Los_Angeles").unix(),time:"start_time",when:"after",slim:!0}).then(function(r){function o(t){var n;if(t&&t.swimlanes){var r=e.getEventBroadcastData(t),o=i.findLastIndex(r.all,{broadcast_type:"live"});o>=0&&(n=r.all[o].end_time)}return n}i.each(r.data,function(e){if(e.product&&e.product.source&&e.product.source.source_type&&e.product.source.source_id){var r="course"===e.product.source.source_type&&e.product.source.source_id;r&&t.getCourseById(r,null,{allow:"unpublished"}).then(function(t){t&&t.accepting_studio_audience&&(t.start_time=e.start_time,t.end_time=o(e),t.filming_location===n.locationMapping[n.location]&&n.upcoming.push(t))})}})})}}}var r=e("moment"),i=e("underscore");t.exports=["EventService","CatalogService",n]},{moment:void 0,underscore:void 0}],439:[function(e,t){"use strict";function n(e,t,n,s,c,l,u){return{restrict:"AE",scope:{filterParam:"=",passedFilters:"=filters",channelCount:"=",showButton:"=",showLive:"=",hideTitle:"=",limit:"=",copy:"=",slug:"=",clTitle:"=",subtitle:"="},template:angular.render("upcoming-classes/index"),replace:!0,link:function(e){function d(t){l.getPrimary().$promise.then(function(n){angular.forEach(n.data,function(e){e.upcoming=[]}),m()&&(e.sortedChannels=E.getSortedCategories(n.data),e.channels=_.indexBy(e.sortedChannels,function(e){return e.title})),p(t)})}function p(t){if("userTopics"===e.filterParam)E.fetchFilteredTopics(function(n){e.filters=n,t()});else if("userCategories"===e.filterParam){var n=e.sortedChannels.slice(0,e.channelCount);e.filters=_.filter(n,function(e){return e.score}),0===e.filters.length&&(e.filters=e.sortedChannels),t()}else t()}function f(t){"userTopics"!==e.filterParam||e.filters.length?s.get({date:i().tz("America/Los_Angeles").startOf("hour").unix(),sort:"start_time",time:"end_time",when:"after",slim:!0}).then(function(n){var i=r.upcomingEvents(n.data);o.series([function(e){h(i.onair,"watchNow",e)},function(e){h(i.upcoming,"upcoming",e)},function(e){x(),e()},function(t){e.showLive&&e.displayedCourses.length-1}function M(t,n){var r;r=void 0===n?w(t):n,k(t)&&r&&t.flagged.on_calendar&&e.displayedCourses.addToSet(t,"_id")}function w(t){return e.showLive&&A(t)||!e.showLive}function A(e){return"live"===e.broadcast_type}function x(){e.filterParam?angular.forEach(e.allUpcomingCourses,function(e){M(e)}):e.displayedCourses.addToSet(e.allUpcomingCourses,"_id")}function k(t){return e.filterParam&&y()?_.any(e.filters,function(n){var r=a[e.filterParam];return _.pluck(t.taxonomy,r).indexOf(n._id)>-1?(t.score=n.score,!0):!1}):void 0}function S(){"categories"===e.filterParam?z():("userCategories"===e.filterParam||"userTopics"===e.filterParam)&&($(),T(e.filterParam))}function $(){function t(e,t){var n=i.unix(e.start_time),r=i.unix(t.start_time),o=n.diff(r,"days");return 0!==o?o:t.score-e.score}e.displayedCourses.sort(t)}function z(){e.displayedCourses=_.sortBy(e.displayedCourses,"start_time")}function T(t){if(e.displayedCourses.length0)&&x()}),o.series([d,f],function(t){e.ready=!0,e.$applyAsync()})}}}var r=e("../../lib.mod/index"),i=e("moment-timezone"),o=e("async"),a={userTopics:"topic",userCategories:"primary_category",categories:"primary_category"};t.exports=["$sce","DataSet","deepval","EventService","CatalogService","categoryResource","ScoresService",n]},{"../../lib.mod/index":339,async:497,"moment-timezone":506}],440:[function(e,t){"use strict";function n(){return{restrict:"AE",scope:{upcoming:"=?clUpcoming"},template:angular.render("upcoming-classes/upcoming-class")}}t.exports=[n]},{}],441:[function(e,t){"use strict";function n(){return{restrict:"AE",scope:{watchNow:"=?clWatchNow"},template:angular.render("upcoming-classes/watch-now")}}t.exports=[n]},{}],442:[function(e){"use strict";var t=e("../../common/app");t.directive("upcomingClasses",e("./directives/index")),t.directive("upcomingClassesCms",e("./directives/cms/view")),t.directive("upcomingClassesCmsEdit",e("./directives/cms/edit")),t.directive("clWatchNow",e("./directives/tiles/watch-now")),t.directive("clUpcoming",e("./directives/tiles/upcoming")),t.directive("upcomingFrontrow",e("./directives/frontrow")),t.directive("upcomingFrontrowCms",e("./directives/cms/frontrow/view"))},{"../../common/app":19,"./directives/cms/edit":435,"./directives/cms/frontrow/view":436,"./directives/cms/view":437,"./directives/frontrow":438,"./directives/index":439,"./directives/tiles/upcoming":440,"./directives/tiles/watch-now":441}],443:[function(e,t){"use strict";function n(){return{restrict:"EA",template:angular.render("upcoming-event/cms-view"),scope:{data:"=?"},controllerAs:"upcomingEventCtrl",controller:["$scope",function(e){this.data=e.data||e.$parent.data||{}}]}}t.exports=[n]},{}],444:[function(e,t){"use strict";function n(e,t){return{restrict:"AE",scope:{event:"=?"},template:angular.render("upcoming-event/index"),controllerAs:"ctrl",controller:["$scope","$attrs",function(n,r){function i(){n.event&&(o.event=n.event,t.getEventUIData(o.event).then(function(e){o.course=e }))}var o=this;"true"===r.watch?n.$watch("event",i):n.event?i():e.user&&e.user.upcomingEvents&&e.user.upcomingEvents().then(function(e){n.event=t.getNearestEvent(e.events),i()})}]}}t.exports=["$rootScope","EventService",n]},{}],445:[function(e){"use strict";var t=e("../../common/app");t.directive("clUpcomingEvent",e("./directives/index")),t.directive("upcomingEventCms",e("./directives/cms/view"))},{"../../common/app":19,"./directives/cms/view":443,"./directives/index":444}],446:[function(e,t){"use strict";function n(e,t){return{restrict:"EA",template:angular.render("user-recommendations/view"),replace:!0,scope:{sort:"@?sortBy",categoryid:"@?",countTopics:"@?",category:"@?",categories:"@?",topics:"@?",courseid:"@?",limit:"@?"},link:function(n){var r={userid:e.user.get("_id"),sort:n.sort,category:n.category,categoryid:n.categoryid,categories:n.categories,topics:n.topics,courseid:n.courseid,countTopics:n.countTopics,limit:n.limit};t.getPopularRecommendations(r).then(function(e){n.recommendations=e},function(){})}}}t.exports=["$rootScope","RecommendationsService",n]},{}],447:[function(e){"use strict";var t=e("../../common/app");t.directive("userRecommendations",e("./directives/index"))},{"../../common/app":19,"./directives/index":446}],448:[function(e,t){"use strict";function n(e,t,n){return{restrict:"EA",template:angular.render("user-scores/view"),replace:!0,scope:{user:"=?"},link:function(e,t,i){function o(){d.fetchSortedCategories(function(t){e.categories=t})}function a(){d.fetchFilteredTopics(function(t){e.topics=t})}function s(){return d.getScores()?d.getScores().version:""}function c(){return d.getScores()?r.unix(d.getScores().timestamp).format("YYYY/MM/DD h:mm:ss a"):""}function l(){d.patchScores(u)}function u(){o(),a()}angular.extend(e,{updateScores:l,getVersion:s,getTime:c});var d=new n;"true"===i.disablePageViewScores&&d.disablePageViewScores();var p=e.$watch("user._id",function(){e.user&&e.user._id&&(p(),d.setUser(e.user),u())})}}}var r=e("moment");t.exports=["$rootScope","categoryResource","ScoresService",n]},{moment:void 0}],449:[function(e){"use strict";var t=e("../../common/app");t.directive("userScores",e("./directives/index"))},{"../../common/app":19,"./directives/index":448}],450:[function(e,t){"use strict";function n(e,t){return{restrict:"AE",scope:{},template:angular.render("vertical-featured/edit"),replace:!0,link:function(n){n.data=n.$parent.data,n.setCourse=function(t){e.getComplete({slug:t.slug},function(e){delete n.data.course,n.data.slug=e.data.slug,n.data.title=e.data.short_title,n.data.url="/courses/"+e.data.slug,n.data.image={file:e.data.image.file}})},n.config=t,n.onUpload=function(e){n.data.image={file:e}}}}}t.exports=["courses","config",n]},{}],451:[function(e,t){"use strict";function n(e,t){return{restrict:"AE",scope:{data:"=?"},template:angular.render("vertical-featured/view"),replace:!0,link:function(n){function r(){e.trustAsResourceUrl(n.data.courseUrl),e.trustAsResourceUrl(n.image)}n.config=t,n.data||(n.data=n.$parent.data),n.data&&r(),void 0!==n.$parent.edit&&n.$watch("data.image",r)}}}t.exports=["$sce","config",n]},{}],452:[function(e){"use strict";var t=e("../../common/app");t.directive("verticalFeatured",e("./directives/view")),t.directive("verticalFeaturedEdit",e("./directives/edit"))},{"../../common/app":19,"./directives/edit":450,"./directives/view":451}],453:[function(e,t){"use strict";function n(e,t,n,i,o,a){return{restrict:"AE",scope:{data:"=?"},template:angular.render("vertical-search/edit"),replace:!0,link:function(e){function i(t){!c&&t&&(e.data.vertical={_id:t._id,slug:t.slug,title:t.title},e.data.actionUrl=t.slug?"/catalog/"+t.slug:"/catalog/all"),c=!1}function s(t){n.getComplete({slug:t.slug},function(t){t.data&&(e.data.course={title:t.data.short_title,instructors:r.deepOmit(t.data.instructors,"courses profile.bio profile.short_bio"),slug:"/courses/"+t.data.slug},e.data.image=t.data.image.file.key,o.findBySlug({slug:t.data.primary_category.slug},function(t){e.vertical=t.data}))})}e.data||(e.data=e.$parent.data),angular.extend(e,{config:t,setCourse:s,vertical:{}}),e.$watch("data.customLinkURL",function(t){e.data.customLinkURL=t?a(t):void 0});var c=!0;e.$watch("vertical",i),e.data.vertical&&(e.vertical=e.data.vertical)}}}var r=e("underscore");t.exports=["$sce","config","courses","instructor","category","urlify",n]},{underscore:void 0}],454:[function(e,t){"use strict";function n(e,t){return{restrict:"AE",scope:{data:"=?"},template:angular.render("vertical-search/view"),replace:!0,link:function(n){n.config=t,n.data||(n.data=n.$parent.data),n.$watch("data.actionUrl",function(){if(n.data&&n.data.actionUrl){var t=n.data.actionUrl;n.actionUrl=e.trustAsResourceUrl(t)}})}}}t.exports=["$sce","config",n]},{}],455:[function(e){"use strict";var t=e("../../common/app");t.directive("verticalSearch",e("./directives/view")),t.directive("verticalSearchEdit",e("./directives/edit"))},{"../../common/app":19,"./directives/edit":453,"./directives/view":454}],456:[function(e,t){"use strict";function n(){return{restrict:"AE",replace:!0,template:angular.render("video-player/fullscreen"),scope:{container:"="},controller:["$scope","$document",function(e,t){function n(){var t="fullscreen",n=i[0];e.isFullScreen()?n.classList?n.classList.add(t):n.className+=" "+t:n.classList?n.classList.remove(t):n.className=n.className.replace(new RegExp("(^|\\b)"+t.split(" ").join("|")+"(\\b|$)","gi")," ")}var r=t[0],i=e.container;t.on("fullscreenchange webkitfullscreenchange mozfullscreenchange MSFullscreenChange",n),e.isFullScreen=function(){return r.fullScreen||r.webkitIsFullScreen||r.mozFullScreen||r.msFullscreenElement},e.toggleFullScreen=function(){e.isFullScreen()?r.exitFullscreen?r.exitFullscreen():r.webkitExitFullscreen?r.webkitExitFullscreen():r.mozExitFullScreen?r.mozExitFullScreen():r.mozCancelFullScreen?r.mozCancelFullScreen():r.msExitFullscreen&&r.msExitFullscreen():i[0].requestFullscreen?i[0].requestFullscreen():i[0].webkitRequestFullscreen?i[0].webkitRequestFullscreen():i[0].mozRequestFullScreen?i[0].mozRequestFullScreen():i[0].msRequestFullscreen&&i[0].msRequestFullscreen()}}]}}t.exports=n},{}],457:[function(e,t){"use strict";function n(){return{restrict:"AE",scope:{ctrl:"="},replace:!0,template:function(e,t){return t.template?angular.render(t.template):angular.render("video-player/index")},link:function(e,t){e.$on("ustream:ready",function(e,n){n.addListener("playing",function(){t.toggleClass("video-playing")})}),e.$on("video:event",function(t,n){e.playState=n,e.$applyAsync()}),e.$on("panel:event",function(e,n){"open"===n?t.addClass("panel-open"):t.removeClass("panel-open")}),t.ready(function(){e.$broadcast("video:register-command",["on","play",function(){t.addClass("video-playing")}]),e.$broadcast("video:register-command",["on","pause",function(){t.removeClass("video-playing")}])})},controller:["$scope","$element",function(e,t){e.element=t}]}}t.exports=n},{}],458:[function(e,t){"use strict";function n(e){return{restrict:"AE",replace:!0,template:angular.render("video-player/interstitial"),scope:{ctrl:"=",posterUrl:"@"},link:function(t,n,r){function i(){!t.ctrl.displayCountDown&&t.ctrl.owned&&t.ctrl.nextSegment?t.ctrl.playNextSegment():t.ctrl.playSegment(t.ctrl.currentSegment),t.ctrl.displayCountDown=!1,e.cancel(a)}function o(){t.sec--,0===t.sec&&i()}var a;angular.extend(t,{sec:5,onPlay:i,state:"open"===r.initialState}),(t.ctrl.owned&&t.ctrl.nextSegment||t.ctrl.displayCountDown)&&(a=e(function(){o()},1e3),o())},controller:["$scope","$element",function(e,t){e.container=angular.element(t[0].querySelector(".panel-segment"))}]}}t.exports=["$interval",n]},{}],459:[function(e,t){"use strict";function n(){return{restrict:"AE",replace:!0,transclude:!0,template:angular.render("video-player/overlay")}}t.exports=n},{}],460:[function(e,t){"use strict";function n(){return{restrict:"AE",replace:!0,scope:{posterUrl:"@"},template:angular.render("video-player/perfect-timing"),link:function(e){e.onClick=function(){e.$emit("video:stream:play"),e.clicked=!0}}}}t.exports=n},{}],461:[function(e,t){"use strict";function n(e){return{scope:{posterUrl:"=?",alt:"=?",course:"=?",streamId:"=?",height:"@",width:"@"},replace:!0,template:angular.render("video-player/dynamic"),link:function(t){function n(n){t.thumbnail=e("magick")(n.posterUrl,{raw:!0});var r=n.segment||{},i=n.media||r.media&&r.media[0]||{};t.videoTitle=n.title||r.title,t.duration=n.duration||i.duration,t.created=i.created,t.$applyAsync()}t.height=t.height||300,t.width=t.width||1600,t.$on("video:show-poster",function(){t.playState=""}),t.$on("video:stream",function(e,r){t.playState="stream",n(r)}),t.$on("video:queue",function(e,r){t.playState="video",n(r)}),t.$on("video:send-command",function(){t.playState="video"})}}}t.exports=["$filter",n]},{}],462:[function(e,t){"use strict";function n(e,t){return{scope:{playerId:"@",posterUrl:"=?",thumbnail:"=?",videoTitle:"=?",duration:"=?",autoplay:"@",html5Ui:"@",controls:"@",volume:"@"},template:angular.render("video-player/ustream"),link:function(n,i,o){function a(){var r=i[0].querySelector("iframe");t(function(){try{c=e.UstreamEmbed(r),c&&n.$emit("ustream:ready",c)}catch(t){}})}function s(e){c&&c.callMethod(e)}var c;angular.extend(n,{playerId:n.playerId||"ustreamVideoPlayer",autoplay:n.autoplay||"true",html5Ui:n.html5Ui||!0,controls:n.controls||!0,volume:n.volume||100,showTitle:n.showTitle||!1,width:o.width||"100%",height:o.height||300,streamId:null,init:a}),n.params={autoplay:n.autoplay,controls:n.controls,showtitle:n.showTitle},n.html5Ui&&(n.params.html5ui=1),n.$on("video:stream",function(e,t){n.autoplay=t.autoplay||!1,n.params.autoplay=n.autoplay,n.streamId=t.streamId,c&&c.callMethod("load","channel",t.streamId)}),n.$on("video:stream:play",r.bind(s,self,"play")),n.$on("video:stream:pause",r.bind(s,self,"pause")),n.$on("video:stream:stop",r.bind(s,self,"stop")),n.playerLoaded=!1,i.ready(function(){t(function(){n.playerLoaded=!0})})}}}var r=e("underscore");e("../../vendor/ustream-embedapi"),t.exports=["$window","$timeout",n]},{"../../vendor/ustream-embedapi":470,underscore:void 0}],463:[function(e,t){"use strict";function n(e,t,n){return{restrict:"AE",scope:{playerId:"@",posterUrl:"=",thumbnail:"=",videoTitle:"=",duration:"=",playUrl:"=?",onReady:"&"},template:angular.render("video-player/videojs"),replace:!0,link:function(i,o,a){function s(e,t){if(!c)return!0;angular.isArray(t)||(t=[t]);var n=t.shift(),r=c[n];try{r.apply(c,t)}catch(i){}}var c,l;i.playUrl=void 0,i.width=a.width||"100%",i.height=a.height||300,n(function(){o.ready(function(){c=r(i.playerId,{techOrder:["html5","flash"]}),c.poster(t("magick")(i.posterUrl,{width:1600,cdn:!0})),c.on("ended",function(){i.$emit("video:event","ended",l)}),c.on("play",function(){i.$emit("video:event","play",l),i.$emit("video:event:play","play",l)}),c.on("pause",function(e){i.$emit("video:event:pause",{currentVideo:l,e:e})}),c.on("timeupdate",function(e){i.$emit("video:event:timeupdate",{currentVideo:l,e:e})}),c.one("canplay",function(){i.lastWatchTime&&(c.currentTime(i.lastWatchTime),c.posterImage.hide(),i.lastWatchTime=void 0)});try{i.onReady()(c)}catch(e){}})}),i.$on("video:queue",function(n,r){l=r,i.playUrl=l.playUrl,c&&(l.posterUrl&&c.poster(t("magick")(l.posterUrl,{width:1600,cdn:!0})),r.currentTime&&(i.lastWatchTime=r.currentTime),c.src({type:"video/mp4",src:e.trustAsResourceUrl(i.playUrl)}))}),i.$on("video:register-command",s),i.$on("video:send-command",s)}}}var r=e("video.js");t.exports=["$sce","$filter","$timeout",n]},{"video.js":523}],464:[function(e,t){"use strict";function n(){return{restrict:"AE",replace:!0,transclude:!0,template:angular.render("video-player/side-panel"),scope:{segmentsCount:"@"},link:function(e,t,n){e.state="open"===n.initialState,e.$on("video:send-command",function(t,n){"play"===n&&(e.state=!1)}),e.$on("video:stream",function(){e.state=!1}),e.$watch("state",function(){e.$emit("panel:event",e.state?"open":"close")})},controller:["$scope","$element",function(e,t){e.container=angular.element(t[0].querySelector(".side-panel-content"))}]}}t.exports=n},{}],465:[function(e,t){"use strict";function n(){return{restrict:"A",link:function(e,t){e.$on("ustream:ready",function(e,n){n.addListener("playing",function(e,n){n?t.addClass("video-playing"):t.removeClass("video-playing")})}),e.$on("video:event",function(t,n){e.playState=n,e.$applyAsync()}),e.$on("panel:event",function(e,n){"open"===n?t.addClass("panel-open"):t.removeClass("panel-open")}),t.ready(function(){e.$broadcast("video:register-command",["on","play",function(){t.addClass("video-playing")}]),e.$broadcast("video:register-command",["on","pause",function(){t.removeClass("video-playing")}])})}}}t.exports=n},{}],466:[function(e,t){"use strict";function n(e,t,n){return{restrict:"AE",template:angular.render("video-player/swimlanes"),replace:!0,$scope:{event:"="},link:function(r){function i(){e.get({id:r.event._id,slim:!0}).then(function(e){r.event=e.data,r.videoPlayer=t.getVideoPlayer(r.event._id),r.videoPlayer||(r.videoPlayer=t.addVideoPlayer(r.event._id,r.$parent)),r.event.swimlanes.forEach(function(e){var t=new n({onBroadcastStart:function(){t.getUpdatedData().then(function(t){e.course=t.currentBroadcast,e.nextCourse=t.nextBroadcast,e.prevCourse=t.prevBroadcast,r.$applyAsync()})}});t.setBroadcasts(e.broadcasts)}),r.select(0)})}var o=r.$watch("event",function(e){e&&(i(),o())})},controller:["$rootScope","$scope",function(e,t){t.select=function(n){t.current=t.event.swimlanes[n],t.videoPlayer.broadcasts.setBroadcasts(t.current.broadcasts),e.$broadcast("swimlane:select",{index:n,swimlane:t.current,event:t.event,video:t.videoPlayer})}}]}}t.exports=["EventService","videoPlayerFactory","broadcastService",n]},{}],467:[function(e,t){"use strict";function n(e,t,n,r){function i(e,r){var i={$scope:r,broadcasts:new t({onBroadcastStart:function(t){a(e,t)}}),segments:new n(r)};return s[e]=i,i}function o(e){return s[e]}function a(t,n){e.get({id:t}).then(function(e){var i=e.data,o=s[t];if(!n||!n.channel)return o.$scope.$broadcast("video:stream:pause"),void 0;var a=n.channel.stream_config.stream_id,c=void 0===n.autoplay||n.autoplay,l={streamId:a,autoplay:c},u=n.meta||i&&i.product&&i.product.source.source_id;u&&(l.posterUrl=u.image,l.title=u.title),r.liveOrRebroadcastPings(u,n.broadcast_type),o.$scope.$broadcast("video:stream",l)})}var s={};return{addVideoPlayer:i,getVideoPlayer:o,playBroadcast:a}}t.exports=["EventService","broadcastService","segmentService","trackFactory",n]},{}],468:[function(e,t){"use strict";function n(e,t,n){return function(r,i){var o=n+r;if(i&&angular.isObject(i)){var a=t.stringify(i);o+=a}return e.trustAsResourceUrl(o)}}t.exports=["$sce","qs","ustreamUrl",n]},{}],469:[function(e){"use strict";var t=e("../../common/app");t.factory("ustreamUrl",["config",function(e){return e.hostname.protocol+"://www.ustream.tv/embed/"}]),t.directive("videoPlayer",e("./directives/index")),t.directive("videoPlayerStates",e("./directives/states")),t.directive("videoPlayerOverlay",e("./directives/overlay")),t.directive("videoPlayerFullscreen",e("./directives/fullscreen")),t.directive("videoPlayerSidePanel",e("./directives/side-panel")),t.directive("videoPlayerPerfectTiming",e("./directives/perfect-timing")),t.directive("videoPlayerInterstitial",e("./directives/interstitial")),t.directive("videoPlayerSwimlanes",e("./directives/swimlanes")),t.directive("videoPlayerVideojs",e("./directives/players/videojs")),t.directive("videoPlayerUstream",e("./directives/players/ustream")),t.directive("videoPlayerDynamic",e("./directives/players/dynamic")),t.factory("videoPlayerFactory",e("./factories/main")),t.filter("ustreamEmbedUrl",e("./filters/ustreamEmbedUrl"))},{"../../common/app":19,"./directives/fullscreen":456,"./directives/index":457,"./directives/interstitial":458,"./directives/overlay":459,"./directives/perfect-timing":460,"./directives/players/dynamic":461,"./directives/players/ustream":462,"./directives/players/videojs":463,"./directives/side-panel":464,"./directives/states":465,"./directives/swimlanes":466,"./factories/main":467,"./filters/ustreamEmbedUrl":468}],470:[function(){!function(){function e(e){return t(e)}function t(e){var t=n(e),p=function(e){function t(t){if("socialstream"!==t){if(!w)return x||(x=[]),x.push(arguments),void 0;var r=c(arguments).slice(1);r[0]&&"function"==typeof r[0]&&(k[t]||(k[t]=[]),k[t].push(r[0])),a(e,b,{cmd:t,args:r})}else if(l(window,"message",f),M=n(arguments[1]),y=s(M.getAttribute("src")),A=!0,S.length)for(var i=0,u=S.length;u>i;i++)o(S[i])}function p(){if(x){for(;x.length;)t.apply(this,x.shift());x=null}}function f(e){var t=M;t&&t.contentWindow&&t.contentWindow===e.source?v.onmessage(e):e.source===M.id&&v.onmessage(e)}function h(e){var n,r=JSON.parse(e.data);return r.cmd&&"ready"==r.cmd?(a(M,y,{cmd:"ready"}),void 0):(n=[r.cmd],n=n.concat(r.args),t.apply(this,n),void 0)}function m(){w=!0,a(e,b,{cmd:"apihandshake",args:[]}),p()}function g(){t.apply(this,arguments)}var v,b,y,M,w=!1,A=!1,x=[],k={},_={},S=[];return b=s(e.getAttribute("src")).toLowerCase(),a(e,b,{cmd:"ready"}),v={host:b,callMethod:g,getProperty:function(){g.apply(this,arguments)},addListener:function(e,t){_[e]||(_[e]=[]),_[e].push(t)},removeListener:function(e,t){if(t)for(var n=0,r=_[e].length;r>n;n++)_[e][n]===t&&_[e].splice(n,1);else _[e]=null},onmessage:function(e){var t;if(b||y||S.push({origin:e.origin,data:e.data}),e.origin.toLowerCase()==b){try{t=JSON.parse(e.data)}catch(n){return}if(t.sstream)return h(e),void 0;if(t.event&&t.event.ready&&(m(),r(_,"ready")),t.event&&t.event.live===!0)return r(_,"live"),void 0;if(t.event&&t.event.live===!1)return r(_,"offline"),void 0;if(t.event&&!t.event.ready)if(u)Object.keys(t.event).forEach(function(e){r(_,e,t.event[e])});else for(var o in t.event)t.event.hasOwnProperty(o)&&r(_,o,t.event[o]);if(t.property)if(u)Object.keys(t.property).forEach(function(e){i(k,e,t.property[e])});else for(var o in t.property)t.property.hasOwnProperty(o)&&i(k,o,t.property[o])}else if(A&&e.origin==y)return h(e),void 0},destroy:function(){w=!1,b="",A=!1,y="",M=null,x=[],k={},_={},S=[],d[e.id]&&(d[e.id]=null),e=null}}}(t);return t.id||(t.id="UstreamEmbed"+Math.ceil(1e5*Math.random())),p.id=t.id,d[t.id]=p,p}function n(e){return"string"==typeof e&&(e=document.getElementById(e)),e}function r(e,t,n){for(var r in e[t])e[t].hasOwnProperty(r)&&e[t][r].call(window,t,n)}function i(e,t,n){if(e[t]){var r=e[t];e[t]=null,delete e[t],r.forEach(function(e){e.call(window,n)})}}function o(e){var t,n;for(t in d)d.hasOwnProperty(t)&&d[t]&&(n=document.getElementById(t),n&&n.contentWindow?n.contentWindow===e.source&&d[t].onmessage(e):"string"==typeof e.source&&e.source==t&&d[t].onmessage(e))}function a(e,t,n){e.contentWindow.postMessage(JSON.stringify(n),t)}function s(e){return e.indexOf("http")<0&&(e=location.protocol+e),e.match(p)[1].toString()}function c(e){return Array.prototype.slice.call(e,0)}function l(e,t,n){e.addEventListener?e.addEventListener(t,n,!1):e.attachEvent("on"+t,n)}var u="undefined"!=typeof Object.keys,d={},p=new RegExp("^(http(?:s)?://[^/]+)","im");return l(window,"message",o),"function"==typeof define&&define.amd?(define([],function(){return e}),void 0):window.UstreamEmbed=e}()},{}],471:[function(e){"use strict";var t=e("../../common/app");t.service("WatchProgressService",e("./services/index"))},{"../../common/app":19,"./services/index":472}],472:[function(e,t){"use strict";function n(e,t,n,o){function a(t){if(e.user&&e.user.valid()){t||(t=Vault.Local.get("watchProgress")||{});for(var n in t){var r={segment:n,course:t[n].course,furthestIndex:t[n].furthestIndex,modified:t[n].modified};e.user.updateFurthestSegmentIndex(r),e.$emit("segment:watched",r),o.reportWatchProgress({course:t[n].course,segment:n,user:e.user.get("_id"),watched:t[n].watched}),delete t[n]}Vault.Local.remove("watchProgress")}}function s(){var t=Vault.Local.get("watchProgress")||{};d=d||new l(function(){a(t)},f);var i=r.bind(c,{},t);e.$on("video:event:timeupdate",r.throttle(i,999)),e.$on("video:event",h),e.$on("video:event:pause",function(){h(),d&&d.pause()}),e.$on("video:event:play",function(){d&&d.resume()}),e.$on("$locationChangeStart",h),n.onbeforeunload=h}function c(t,n,r){var o=i(r||{},"e.currentTarget.currentTime"),a=i(r||{},"currentVideo.segment._id");if(o){if(o=1e3*Math.floor(o),t[a]){var s=Math.floor(o/p);if(s!==u){var c=t[a];c.furthestIndex':"",T=x?"":'',C='",O=angular.element(C),E=n,L=O.find("colorpicker-hue"),B=O.find("colorpicker-saturation"),N=O.find("colorpicker-preview"),q=O.find("i");if(t(O)(o),O.css("min-width",parseInt($)+29+"px"),B.css({width:y,height:y}),L.css("height",y),S){var I=O.find("input");I.css("width",y),I.on("mousedown",function(e){e.stopPropagation()}).on("keyup",function(){var e=this.value;a.val(e),c&&c.$modelValue!==e&&(o.$apply(c.$setViewValue(e)),f(!0))})}"rgba"===w&&(O.addClass("alpha"),M=O.find("colorpicker-alpha"),M.css("height",y),M.on("click",function(e){r.setAlpha(e,k,$),d(e)}).on("mousedown",function(e){r.setAlpha(e,k,$),l()}).on("mouseup",function(){v("colorpicker-selected-alpha")})),L.on("click",function(e){r.setHue(e,k,$),d(e)}).on("mousedown",function(e){r.setHue(e,k,$),l()}).on("mouseup",function(){v("colorpicker-selected-hue")}),B.on("click",function(e){r.setSaturation(e,k,$),d(e),angular.isDefined(s.colorpickerCloseOnSelect)&&b()}).on("mousedown",function(e){r.setSaturation(e,k,$),l()}).on("mouseup",function(){v("colorpicker-selected-saturation")}),k&&O.addClass("colorpicker-fixed-position"),O.addClass("colorpicker-position-"+A),"true"===x&&O.addClass("colorpicker-inline"),_.append(O),c&&(c.$render=function(){a.val(c.$viewValue),f()}),a.on("blur keyup change",function(){f()}),a.on("$destroy",function(){O.remove()}),x===!1?a.on("click",g):g(),O.on("mousedown",function(e){e.stopPropagation(),e.preventDefault()}),O.find("button").on("click",function(){b()}),s.colorpickerIsOpen&&o.$watch(s.colorpickerIsOpen,function(e){e===!0?g():e===!1&&b()})}}}])},{}],480:[function(){!function(e,t,n){"use strict";function r(e,n,r){function i(e,r,i){var a,s;i=i||{},s=i.expires,a=t.isDefined(i.path)?i.path:o,t.isUndefined(r)&&(s="Thu, 01 Jan 1970 00:00:00 GMT",r=""),t.isString(s)&&(s=new Date(s));var c=encodeURIComponent(e)+"="+encodeURIComponent(r);c+=a?";path="+a:"",c+=i.domain?";domain="+i.domain:"",c+=s?";expires="+s.toUTCString():"",c+=i.secure?";secure":"";var l=c.length+1;return l>4096&&n.warn("Cookie '"+e+"' possibly not set or overflowed because it was too large ("+l+" > 4096 bytes)!"),c}var o=r.baseHref(),a=e[0];return function(e,t,n){a.cookie=i(e,t,n)}}t.module("ngCookies",["ng"]).provider("$cookies",[function(){function e(e){return e?t.extend({},r,e):r}var r=this.defaults={};this.$get=["$$cookieReader","$$cookieWriter",function(r,i){return{get:function(e){return r()[e]},getObject:function(e){var n=this.get(e);return n?t.fromJson(n):n},getAll:function(){return r()},put:function(t,n,r){i(t,n,e(r))},putObject:function(e,n,r){this.put(e,t.toJson(n),r)},remove:function(t,r){i(t,n,e(r))}}}]}]),t.module("ngCookies").factory("$cookieStore",["$cookies",function(e){return{get:function(t){return e.getObject(t)},put:function(t,n){e.putObject(t,n)},remove:function(t){e.remove(t)}}}]),r.$inject=["$document","$log","$browser"],t.module("ngCookies").provider("$$cookieWriter",function(){this.$get=r })}(window,window.angular)},{}],481:[function(e,t){e("./angular-cookies"),t.exports="ngCookies"},{"./angular-cookies":480}],482:[function(e,t,n){"undefined"!=typeof t&&"undefined"!=typeof n&&t.exports===n&&(t.exports="monospaced.elastic"),angular.module("monospaced.elastic",[]).constant("msdElasticConfig",{append:""}).directive("msdElastic",["$timeout","$window","msdElasticConfig",function(e,t,n){"use strict";return{require:"ngModel",restrict:"A, C",link:function(r,i,o,a){function s(){var e=v;f=u,M=getComputedStyle(u),angular.forEach(z,function(t){e+=t+":"+M.getPropertyValue(t)+";"}),y.setAttribute("style",e)}function c(){var t,n,i,o,a;f!==u&&s(),h||(h=!0,y.value=u.value+m,y.style.overflowY=u.style.overflowY,t=""===u.style.height?"auto":parseInt(u.style.height,10),n=getComputedStyle(u).getPropertyValue("width"),"px"===n.substr(n.length-2,2)&&(o=parseInt(n,10)-x.width,y.style.width=o+"px"),i=y.scrollHeight,i>$?(i=$,a="scroll"):S>i&&(i=S),i+=x.height,u.style.overflowY=a||"hidden",t!==i&&(r.$emit("elastic:resize",d,t,i),u.style.height=i+"px"),e(function(){h=!1},1,!1))}function l(){h=!1,c()}var u=i[0],d=i;if("TEXTAREA"===u.nodeName&&t.getComputedStyle){d.css({overflow:"hidden","overflow-y":"hidden","word-wrap":"break-word"});var p=u.value;u.value="",u.value=p;var f,h,m=o.msdElastic?o.msdElastic.replace(/\\n/g,"\n"):n.append,g=angular.element(t),v="position: absolute; top: -999px; right: auto; bottom: auto;left: 0; overflow: hidden; -webkit-box-sizing: content-box;-moz-box-sizing: content-box; box-sizing: content-box;min-height: 0 !important; height: 0 !important; padding: 0;word-wrap: break-word; border: 0;",b=angular.element('\n

    \n \n \n\n
    \n

    {{ "cl-gift-recipient-date-label" | i18n:"Delivery Date" }}

    \n
    \n
    \n Today\n (Immediately)\n
    \n
    \n \n \n
    \n
    \n\n
    \n
    \n\n \n\n
    \n \n \n
    \n\n
    \n \n
    \n\n
    \n
    \n
    \n\n
    \n
    \n \n
    \n
    \n\n \n \n
    \n
    \n
    \n
    \n
    \n
    \n
    \n
    \n

    {{ "cl-gift-recipient-max-date-error" | i18n:"Dates beyond six months cannot be selected." }}

    \n
    \n \n
    \n
    \n
    \n
    \n
    \n
    \n\n')}return dust.register("cl-gift/recipientDetails",e),e.__dustBody=!0,e}(),function(){function e(e){return e.w('
    \n
    \n
    \n\n
    \n

    {{ "cl-gift-sender-title" | i18n:"Make sure it all looks good." }}

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

    {{ "cl-gift-sender-name-error-required" | i18n:"All fields are required." }}

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

    {{ "cl-gift-sender-email-error-invalid" | i18n:"Whoops! That\'s not a valid email address." }}

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

    Edit

    \n
    \n\n
    \n

    To

    \n

    {{ gift.recipient.name }}

    \n

    {{ gift.recipient.email }}

    \n
    \n\n
    \n

    Message

    \n \n

    \n \n

    \n
    \n\n
    \n

    Delivery Date

    \n

    \n
    \n\n
    \n
    \n
    \n\n
    \n
    \n \n
    \n
    \n\n
    \n
    \n
    \n')}return dust.register("cl-gift/senderDetails",e),e.__dustBody=!0,e}(),function(){function e(e){return e.w('
    \n
    from
    \n

    {{ gift.sender.name }}

    \n

    {{ gift.sender.email }}

    \n
    to
    \n

    {{ gift.recipient.name }}

    \n

    {{ gift.recipient.email }}

    \n
    massage
    \n

    {{ gift.message }}

    \n
    delivery date
    \n

    {{ gift.delivery_date | unixDate:\'MMMM Do YYYY\':true }}

    \n
    ')}return dust.register("cl-gift/summary",e),e.__dustBody=!0,e}(),function(){function e(e){return e.w('
    \n
    \n
      \n
    • {{ i | stringToInt | add: 1 }}
    • \n
    \n
    \n
    \n')}return dust.register("cl-steps/view",e),e.__dustBody=!0,e}(),function(){function e(e){return e.w('
    \n \n
    \n')}return dust.register("class-list-collection/cms",e),e.__dustBody=!0,e}(),function(){function e(e){return e.w('
    \n\n
    \n
    \n
    \n \n \n
    \n\n
    \n \n \n
    \n\n \n
    \n
    \n \n \n
    \n\n
    \n \n \n \n
    \n
    \n \n
    \n
    \n \n \n
    \n
    \n \n \n \n
    \n
    \n
    \n\n
    \n
    \n \n \n
    \n Start by adding some classes.\n
    \n
    \n
      \n
    • \n \n \n \n
    • \n
    \n
    \n\n
    \n
    \n')}return dust.register("class-list-collection/edit",e),e.__dustBody=!0,e}(),function(){function e(e){return e.w('
    \n \n
    \n
    \n
    \n
    \n \n
    \n
    \n
    \n \n \n \n
    \n
    \n \n \n \n
    \n
    \n
    \n
    \n
    \n \n
    \n \n {{ cta }}\n
    \n
    \n')}return dust.register("class-list-collection/view",e),e.__dustBody=!0,e}(),function(){function e(e){return e.w('
    \n
    \n

    Class Recommendation Module

    \n
    \n \n
    \n')}return dust.register("class-recommendation/cms",e),e.__dustBody=!0,e}(),function(){function e(e){return e.w('
    \n\n
    \n
    \n
    \n \n \n
    \n
    \n \n \n
    \n\n
    \n \n \n
    \n\n
    \n \n
    \n
    \n
    \n
    \n Min\n \n
    \n
    \n
    \n
    \n \n Max\n
    \n
    \n
    \n
    \n\n
    \n
    \n')}return dust.register("class-recommendation/edit",e),e.__dustBody=!0,e}(),function(){function e(e){return e.w('
    \n
    \n \n \n
    \n
    ')}return dust.register("class-recommendation/view",e),e.__dustBody=!0,e}(),function(){function e(e){return e.w('
    \n \n\n
    \n
    \n
    \n
    \n Live\n \n \n
    \n
    \n
    \n
    \n
    \n

    On Air Now

    \n
    \n
    \n
    \n
    \n

    \n

    \n

    \n \n
    ')}return dust.register("class-tile/onair-small",e),e.__dustBody=!0,e}(),function(){function e(e){return e.w('
    \n
    \n Live\n \n \n
    \n
    \n

    On Air Now

    \n
    \n
    \n

    \n

    \n

    \n \n
    ')}return dust.register("class-tile/onair",e),e.__dustBody=!0,e}(),function(){function e(e){return e.w('
    \n
    \n
    \n \n
    \n
    \n
    \n

    \n \n
    \n
    \n')}return dust.register("class-tile/small",e),e.__dustBody=!0,e}(),function(){function e(e){return e.w('\n')}return dust.register("class-tile/upcoming-line",e),e.__dustBody=!0,e}(),function(){function e(e){return e.w('
    \n \n
    \n
    \n
    \n
    \n \n
    \n
    \n
    \n
    \n
    \n

    {{ course.day }}

    \n

    {{ course.month }}

    \n
    \n \n \n \n \n You\'re in!\n \n
    \n
    \n
    \n
    \n\n

    \n \n
    \n') }return dust.register("class-tile/upcoming-small",e),e.__dustBody=!0,e}(),function(){function e(e){return e.w('
    \n
    \n \n
    \n
    \n

    {{ course.day}}

    \n

    {{ course.month}}

    \n
    \n \n \n \n \n You\'re in!\n \n
    \n
    \n

    \n \n
    ')}return dust.register("class-tile/upcoming",e),e.__dustBody=!0,e}(),function(){function e(e){return e.w('
    \n \n
    \n\n
    \n
    \n
    \n
    \n \n

    \n

    \n

    \n \n\n')}return dust.register("class-tile/view",e),e.__dustBody=!0,e}(),function(){function e(e){return e.w('
    \n \n {{ addText }}\n
    \n
    \n \n
    =
    \n \n
    \n \n Add\n \n
    \n
    \n
    \n')}return dust.register("conditionals/edit",e),e.__dustBody=!0,e}(),function(){function e(e){return e.w('\n \n \n \n \n \n \n \n \n \n
    {{ condition.key }}={{ condition.value }}
    ')}return dust.register("conditionals/list",e),e.__dustBody=!0,e}(),function(){function e(e){return e.w('
    \n
    Sale Ends Soon!
    \n
    \n

    {{ wording }}

    \n
    \n
    \n \n {{ days | pad }}\n {{ \'day\' | pluralize:days }}\n
    \n
    \n {{ hours | pad }}\n {{ \'hour\' | pluralize:hours }}\n
    \n
    \n {{ minutes | pad }}\n {{ \'min\' | pluralize:minutes }}\n
    \n
    \n {{ seconds | pad }}\n {{ \'sec\' | pluralize:seconds }}\n
    \n
    \n
    \n \n
    \n
    \n
    \n')}return dust.register("countdown-timer/view",e),e.__dustBody=!0,e}(),function(){function e(e){return e.w('
    \n\n
    \n
    \n
    \n \n \n
    \n\n
    \n \n \n
    \n\n
    \n \n \n
    \n
    \n
    \n \n
    \n \n
    \n
    \n \n
    \n
    \n \n
    \n
    \n \n
    \n \n
    \n \n
    \n
    \n \n
    \n
    \n\n
    \n
    \n \n \n
    \n Start by adding some classes.\n
    \n
    \n
      \n
    • \n \n \n \n
    • \n
    \n
    \n\n
    \n
    \n')}return dust.register("course-collection/edit",e),e.__dustBody=!0,e}(),function(){function e(e){return e.w('\n')}return dust.register("course-collection/tile",e),e.__dustBody=!0,e}(),function(){function e(e){return e.w('
    \n
    \n {{ data.title }}\n
    \n
    \n
    \n
    \n
    \n
    \n
    \n
    \n
    \n
    \n
    \n
    \n
    \n
    \n
    \n
    \n
    \n
    \n
    \n
    \n
    \n
    \n
    \n
    \n
    \n
    \n
    \n
    \n
    \n
    \n
    \n
    \n
    \n \n
    \n
    \n')}return dust.register("course-collection/view",e),e.__dustBody=!0,e}(),function(){function e(e){return e.w('
    \n {{ counts.recommendPercentage }}%{{ \' Positive Review\' | pluralize:counts.reviews }}\n {{ counts.students | friendlyNumber:1 }}{{ \' Student\' | pluralize:counts.students }}\n
    \n')}return dust.register("course-stats/cross-sell",e),e.__dustBody=!0,e}(),function(){function e(e){return e.w('
    \n
    \n \n {{ counts.recommendPercentage }}%\n \n \n {{ counts.reviews | friendlyNumber }} {{ \'Review\' | pluralize:counts.reviews }}\n \n
    \n
    \n \n \n {{ counts.reviews | friendlyNumber }} {{ \'Review\' | pluralize:counts.reviews }}\n \n
    \n
    \n {{ counts.students | friendlyNumber:1 }} {{ \'Student\' | pluralize:counts.students }}\n
    \n
    \n {{ (gallery.count || 0) | friendlyNumber }} {{ \'Project\' | pluralize:gallery.count }}\n
    \n
    ')}return dust.register("course-stats/view",e),e.__dustBody=!0,e}(),function(){function e(e){return e.w('\n')}return dust.register("course-tile/view",e),e.__dustBody=!0,e}(),function(){function e(e){return e.w('
    \n
    \n\n
    \n
    \n \n \n
    \n Start by adding a course.\n
    \n
    \n
    \n \n

    \n
    \n
    \n\n
    \n
    \n')}return dust.register("course-video/edit",e),e.__dustBody=!0,e}(),function(){function e(e){return e.w('
    \n
    \n
    \n
    \n \n \n
    \n Add to Wishlist\n Share\n
    \n \n \n
    \n
    On Air Broadcast Watch now\n
    \n
    \n \n
    \n
    \n \n
    \n
    \n
    \n
    \n\n')}return dust.register("course-video/view",e),e.__dustBody=!0,e}(),function(){function e(e){return e.w('
    \n \n \n \n \n
    \n \n
    \n
    \n
    \n \n \n
    \n \n
    \n

    \n \n

    \n
    \n
    \n \n \n
    \n
    \n \n
    \n
    \n
    \n')}return dust.register("cross-sell-tile/cross-sell-large",e),e.__dustBody=!0,e}(),function(){function e(e){return e.w('\n')}return dust.register("cross-sell-tile/cross-sell-small",e),e.__dustBody=!0,e}(),function(){function e(e){return e.w('\n {{ buttonText }}\n')}return dust.register("cta/buy-new",e),e.__dustBody=!0,e}(),function(){function e(e){return e.w('\n {{ buttonText }}\n\n')}return dust.register("cta/buy",e),e.__dustBody=!0,e}(),function(){function e(e){return e.w('\n')}return dust.register("cta/gift",e),e.__dustBody=!0,e}(),function(){function e(e){return e.w('
    \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
    \n')}return dust.register("cta/share",e),e.__dustBody=!0,e}(),function(){function e(e){return e.w('\n {{ buttonLabel }}\n \n')}return dust.register("cta/star",e),e.__dustBody=!0,e}(),function(){function e(e){return e.w('
    \n
    \n \n
    \n Billing Info\n\n \n
    \n

    Saved Payment Info

    \n
    \n \n \n
    \n
    \n \n
    \n
    \n\n \n
    \n \n
    \n
    \n
    \n \n \n
    \n
    \n\n
    \n
    \n \n \n
    \n
    \n
    \n\n
    \n \n \n\n \n
    \n
    \n
    \n Expiration Date\n\n \n
    \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
    \n\n \n
    \n \n \n \n \n \n \n \n
    \n\n \n
    \n \n \n \n
    \n \n

    The last 3 digits on the back of your credit card. For American Express Cards, it is the 4-digit code on the front of your card.

    \n \n
    \n
    \n\n
    \n
    \n
    \n
    \n\n \n
    \n
    \n
    \n \n \n \n \n \n \n \n
    \n
    \n
    \n\n \n
    \n
    \n
    \n \n \n
    \n
    \n
    \n\n \n
    \n
    \n
    \n \n \n
    \n
    \n\n
    \n
    \n
    \n >\n \n \n \n \n \n
    \n
    \n \n \n
    \n
    \n
    \n\n
    \n
    \n \n \n
    \n
    \n
    \n\n \n
    \n
    \n

    {{ \'new-checkout-vat-code-label\' | i18n: \'VAT Code\' }}

    \n
    \n {{ billingAddress.vat }}\n \n
    \n
    \n
    \n
    \n
    \n \n \n
    \n \n
    \n
    \n \n
    \n
    \n
    \n\n
    \n
    \n
    \n
    ') }return dust.register("ecom/billingForm",e),e.__dustBody=!0,e}(),function(){function e(e){return e.w('
    \n\n \n
    \n {{ error.message }}\n
    \n\n
    \n
    \n
    \n

    Billing Info

    \n\n
    \n
    \n \n
    Please enter a first name
    \n \n
    \n\n
    \n \n
    Please enter a last name
    \n \n
    \n
    \n\n
    \n \n
    Please select a country
    \n \n \n \n
    \n\n
    \n \n
    Please enter a street address
    \n \n
    \n\n
    \n
    \n
    Please enter a city
    \n \n
    \n\n
    \n
    Please select a state
    \n \n \n \n \n
    \n\n
    \n
    Please enter a zipcode
    \n \n
    \n
    \n\n
    \n \n \n
    \n
    \n\n\n
    \n
    \n

    Payment

    \n\n\n
    \n
    \n\n \n \n \n \n \n \n
    \n
    \n \n \n
    \n
    \n \n \n
    \n
    \n\n
    \n \n
    \n
    \n\n
    \n
    \n \n
    Please enter a credit card number
    \n \n
    \n\n
    \n
    \n \n
    Please enter an expiration month
    \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
    \n\n
    \n \n
    Please enter an expiration year
    \n \n \n \n
    \n\n
    \n \n
    Please enter a CVV
    \n \n
    \n
    \n
    \n
    \n\n
    \n
    \n\n
    \n \n \n
    \n \n
    \n
    \n\n
    \n
    ')}return dust.register("ecom/billingFormOriginal",e),e.__dustBody=!0,e}(),function(){function e(e,n){return e.w(" 0, 'shopping-cart': !numLineItems }\"\n class=\"pull-left ").x(n.getPath(!1,["rind","context","session","user","_id"]),n,{block:t},{}).w(' hidden-xs hidden-sm"\n cl-via\n cl-module="cart-dropdown"\n cl-module-id="{{ $id }}">\n \n
    \n \n
    \n
    {{ numLineItems }}
    \n
    \n \n
    \n \n \n \n \n \n
    \n
    {{ \'new-checkout-dropdown-cart-heading\' | i18n: \'Your cart\' }}
    \n \n \n \n
    \n
    {{ \'new-checkout-dropdown-cart-paired-classes-discount\' | i18n: \'paired classes discount\' }}
    \n
    \n
    \n \n
    \n
    \n
    \n \n \n \n \n
    \n \n
    \n
    \n
    {{ \'new-checkout-dropdown-cart-heading\' | i18n: \'Your cart\' }}
    \n
    \n

    {{ \'new-checkout-dropdown-cart-empty-cart\' | i18n: \'Ohhh... so this is what an empty cart looks like!\' }}

    \n {{ \'new-checkout-dropdown-cart-find-classes\' | i18n: \'Let\\\'s fix that and find some good classes\' }}\n
    \n
    \n
    \n \n \n
    \n\n')}function t(e){return e.w("logged-in")}return dust.register("ecom/cart",e),e.__dustBody=!0,t.__dustBody=!0,e}(),function(){function e(e){return e.w('
    \n
    \n
    \n \n \n
    \n
    \n
    \n \n
    \n
    \n
    ')}return dust.register("ecom/ccFormatDetect",e),e.__dustBody=!0,e}(),function(){function e(e){return e.w('
    \n \n \n
    \n
    \n

    Your Purchase

    \n \n \n
    \n \n
    \n
    \n
    \n \n
    \n By proceeding you agree to the\n Gift Program Terms and Conditions\n
    \n \n \n
    \n
    \n\n \n
    \n
    \n \n \n

    Credit Card

    \n
    \n \n \n
    \n
    \n \n PayPal\n \n
    \n \n
    \n
    \n
    \n {{ paypal.details.email }}\n
    \n \n \n
    \n
    \n
    \n
    \n\n \n
    \n
    \n\n

    Apply a Coupon\n \n \n \n

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

    {{ \'new-checkout-coupon-code-label\' | i18n: \'Coupon Code\' }}

    \n
    \n {{ coupon.virtualCode || coupon.code }}\n \n
    \n
    \n
    \n
    \n

    Oh yeah, look at those savings!
    Your pricing has been updated.

    \n
    \n
    \n\n \n
    \n By proceeding you agree to the\n Gift Program Terms and Conditions\n
    \n \n \n
    \n
    \n
    \n')}return dust.register("ecom/checkout",e),e.__dustBody=!0,e}(),function(){function e(e){return e.w('
    \n \n
    \n
    \n\n
    \n
    \n \n
    \n
    \n
    \n\n \n
    \n \n
    Order Summary
    \n
    \n
    \n
    \n
    order number
    \n

    {{ order.oid }}

    \n
    \n
    \n
    billing date
    \n

    {{ order.modified | unixDate:\'MMM Do YYYY\':true }}

    \n
    \n
    \n
    vat exemption code
    \n

    {{ order.billingAddress.vat }}

    \n
    \n
    \n
    CreativeLive VAT
    \n

    {{ taxobject.clVAT }}

    \n
    \n
    \n
    \n
    \n
    Payment Info
    \n
    \n
    \n
    \n \n
    \n
    \n
    \n
    \n
    \n
    \n
    \n
    \n
    credit card
    \n

    {{ order.payee_details.method.card_mask }}

    \n
    \n
    \n
    exp.
    \n

    {{ order.payee_details.method.card_expiration }}

    \n
    \n
    \n \n
    \n PayPal\n
    \n
    \n \n
    \n
    redemption code
    \n
    coupon code
    \n
    \n

    {{ coupon.virtualCode || coupon.code }}

    \n
    \n
    \n
    \n
    \n \n
    \n
    Billing Info
    \n
    \n
    \n
    \n
    name
    \n

    {{ order.payee_details.billing_info.firstName }} {{ order.payee_details.billing_info.lastName }}

    \n
    \n
    \n \n

    {{ order.payee_details.email }}

    \n
    \n
    \n
    address
    \n

    {{ order.payee_details.billing_info.streetAddress }}

    \n

    {{ order.payee_details.billing_info.city }}, {{ order.payee_details.billing_info.selectedState.name }} {{ order.payee_details.billing_info.zipCode }}

    \n

    {{ order.payee_details.billing_info.country.name }}

    \n
    \n
    \n
    \n
    \n
    \n \n
    \n
    \n Your gift purchase\n Your purchase\n
    \n
    \n
    \n
    \n
    \n

    {{ lineItem.product.short_title }}

    \n \n
    \n
    \n

    {{ lineItem.pricing.display_price | centsToDollars:\'$\':2:true }}

    \n
    \n
    \n
    \n
    \n
    \n \n \n
    \n
    ')}return dust.register("ecom/orderDetail",e),e.__dustBody=!0,e}(),function(){function e(e){return e.w('
    \n \n
    \n
    \n
    \n
    Date
    \n
    Total
    \n
    Type
    \n
    Order ID Number
    \n
    \n
    \n
    \n {{ order.created | unixDate:\'MMM d, yyyy\' }}\n
    \n\n
    \n {{ order.total | centsToDollars:\'$\' }}\n Free Order\n
    \n
    -
    \n\n
    \n {{ order.order_type }}\n
    \n\n
    \n {{ order.oid }}\n
    \n\n \n
    \n
    \n Looks like you haven\'t made a purchase yet.\n
    \n
    ')}return dust.register("ecom/orderHistory",e),e.__dustBody=!0,e}(),function(){function e(e){return e.w('\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
    Subtotal:${{ subtotal | centsToDollars }}
    Coupon Savings:${{ discountedTotal | centsToDollars }}
    \n (VAT Exemption Code: {{ taxobject.userVAT }}) Tax:${{ taxtotal | centsToDollars }}$0
    Total:${{ total | centsToDollars }}
    Free Order
    ')}return dust.register("ecom/totals",e),e.__dustBody=!0,e}(),function(){function e(e){return e.w('
    \n Join the Class Chatroom\n

    Chat with other students in a live open forum to ask questions and have discussions with other students.

    \n Chat\n
    \n')}return dust.register("event/chat",e),e.__dustBody=!0,e}(),function(){function e(e){return e.w('
    \n \n
    \n')}return dust.register("event/materials",e),e.__dustBody=!0,e}(),function(){function e(e){return e.w('
    \n \n \n
    \n')}return dust.register("event/player",e),e.__dustBody=!0,e}(),function(){function e(e){return e.w('
    \n Ask {{ course.instructors[0].profile.name }} a question:\n \n \n
    \n')}return dust.register("event/questions",e),e.__dustBody=!0,e}(),function(){function e(e){return e.w('
    \n
    \n
    \n
    \n \n \n\n \n \n\n \n\n \n \n
    \n
    \n\n
    \n
      \n
    • \n \n {{ instructor.name }}\n \n
    • \n
    \n
    \n
    \n
    \n') }return dust.register("facepile/edit",e),e.__dustBody=!0,e}(),function(){function e(e){return e.w('\n')}return dust.register("facepile/view",e),e.__dustBody=!0,e}(),function(){function e(e){return e.w('\n')}return dust.register("follow-count/index",e),e.__dustBody=!0,e}(),function(){function e(e){return e.w('\n\n
    SORRY!
    This Person is already a CreativeLive Student.
    \n\n
    Invalid email format.
    \n\n
    \n
    \n \n
    \n
    \n
    \n\n\n')}return dust.register("form/message",e),e.__dustBody=!0,e}(),function(){function e(e){return e.w('
    \n
    \n
    \n\n \n \n
    \n \n \n \n \n \n\n
    \n
    \n\n')}return dust.register("freeform/edit",e),e.__dustBody=!0,e}(),function(){function e(e){return e.w('
    \n')}return dust.register("freeform/view",e),e.__dustBody=!0,e}(),function(){function e(e){return e.w('
    \n \n \n \n
    \n')}return dust.register("galleries/fileUpload",e),e.__dustBody=!0,e}(),function(){function e(e){return e.w('\n')}return dust.register("galleries/galleryActions",e),e.__dustBody=!0,e}(),function(){function e(e){return e.w('
    \n
    \n \n \n \n
    \n \n
    \n')}return dust.register("galleries/galleryComments",e),e.__dustBody=!0,e}(),function(){function e(e){return e.w('\n')}return dust.register("galleries/galleryDetail",e),e.__dustBody=!0,e}(),function(){function e(e){return e.w('
    \n \n
    \n')}return dust.register("galleries/galleryEditButton",e),e.__dustBody=!0,e}(),function(){function e(e){return e.w('
    \n \n
    \n')}return dust.register("galleries/galleryEditModal",e),e.__dustBody=!0,e}(),function(){function e(e){return e.w('\n')}return dust.register("galleries/galleryFlagging",e),e.__dustBody=!0,e}(),function(){function e(e){return e.w('
    \n \n \n \n\n \n \n\n
    \n
    {{ image.title }}
    \n
    \n \n
    \n \n
    \n
    \n')}return dust.register("galleries/galleryImage",e),e.__dustBody=!0,e}(),function(){function e(e){return e.w('
    \n
    \n')}return dust.register("galleries/galleryLikes",e),e.__dustBody=!0,e}(),function(){function e(e){return e.w('\n')}return dust.register("galleries/galleryList",e),e.__dustBody=!0,e}(),function(){function e(e){return e.w('\n')}return dust.register("galleries/galleryNav",e),e.__dustBody=!0,e}(),function(){function e(e){return e.w('\n')}return dust.register("galleries/gallerySharing",e),e.__dustBody=!0,e}(),function(){function e(e){return e.w('\n')}return dust.register("galleries/galleryUpload",e),e.__dustBody=!0,e}(),function(){function e(e){return e.w('\n')}return dust.register("galleries/galleryUploader",e),e.__dustBody=!0,e}(),function(){function e(e){return e.w('
    \n \n
    \n')}return dust.register("galleries/galleryUploaderModal",e),e.__dustBody=!0,e}(),function(){function e(e){return e.w('\n')}return dust.register("galleries/galleryUser",e),e.__dustBody=!0,e}(),function(){function e(e){return e.w('
    \n
    \n
    \n
    \n \n \n
    \n
    \n \n \n
    \n
    \n Text Format:\n \n \n \n
    \n
    \n Alignment:\n \n \n \n
    \n
    \n \n
    \n
    \n \n
    \n
    \n
    \n \n \n \n \n \n \n \n \n \n \n \n \n \n
    DisplayTag (for SEO)
    \n \n \n \n
    \n
    \n
    \n
    \n')}return dust.register("heading/_edit",e),e.__dustBody=!0,e}(),function(){function e(e){return e.w('
    \n
    \n
    \n

    Template

    \n\n \n \n \n
    \n
    \n
    \n \n \n
    \n
    \n \n \n
    \n
    \n \n
    \n\n
    \n \n \n \n
    \n \n \n \n \n \n
    \n
    \n
    \n\n')}return dust.register("heading/edit",e),e.__dustBody=!0,e}(),function(){function e(e){return e.w('
    \n {{ clTitle }}\n \n
    \n

    {{ subtitle }}

    \n
    \n\n
    \n {{ clTitle }}\n
    \n
    \n
    \n
    \n
    \n
    \n\n
    \n {{ clTitle }}\n
    \n
    \n
    \n
    \n
    \n
    \n\n\n
    \n
    {{ clTitle }} {{ subtitle }}
    \n \n
    \n')}return dust.register("heading/index",e),e.__dustBody=!0,e}(),function(){function e(e){return e.w('
    \n \n
    \n')}return dust.register("heading/view",e),e.__dustBody=!0,e}(),function(){function e(e){return e.w('
    \n
    \n
    \n

    Template

    \n\n \n \n
    \n \n \n
    \n
    \n \n \n \n
    \n \n \n \n \n \n
    \n
    \n
    \n\n')}return dust.register("home-hero/edit",e),e.__dustBody=!0,e}(),function(){function e(e){return e.w('
    \n
    \n
    \n
    \n
    \n

    Curated Classes
    by the World\'s Top Experts

    \n
    \n
    \n
    \n \n
    \n
    \n
    \n
    \n
    \n
    \n \n \n
    ') }return dust.register("home-hero/index",e),e.__dustBody=!0,e}(),function(){function e(e){return e.w('\n')}return dust.register("home-hero/small",e),e.__dustBody=!0,e}(),function(){function e(e){return e.w("
    \n \n
    \n")}return dust.register("home-hero/view",e),e.__dustBody=!0,e}(),function(){function e(e){return e.w('
    \n
    \n \n
    Default Image
    \n \n
    \n
      \n
    • \n
      \n

      Default Image

      \n
      \n
    • \n
    • \n
      \n
    • \n
    \n
    \n')}return dust.register("image-dropdown/view",e),e.__dustBody=!0,e}(),function(){function e(e){return e.w('\n')}return dust.register("instructors/facepile",e),e.__dustBody=!0,e}(),function(){function e(e){return e.w('

    \n

    \n')}return dust.register("instructors/list",e),e.__dustBody=!0,e}(),function(){function e(e){return e.w('
    \n \n
    \n
    \n {{ instructor.profile.name }}\n \n
    \n
    \n

    {{ instructor.profile.name }}

    \n \n
    \n
    \n
    \n
    \n')}return dust.register("instructors/profile-lg",e),e.__dustBody=!0,e}(),function(){function e(e){return e.w('
    \n
    \n \n
    \n
    \n
    \n

    {{ instructor.profile.name }}

    \n

    \n …\n \n

    \n
    \n
    \n
    \n')}return dust.register("instructors/profile-md",e),e.__dustBody=!0,e}(),function(){function e(e){return e}return dust.register("instructors/profile-sm",e),e.__dustBody=!0,e}(),function(){function e(e){return e.w('
    \n

    {{ \'cl-interest-title1\' | i18n:\'What inspires you?\' }}

    \n

    {{ \'cl-interest-subtitle1\' | i18n:\'Great! Tell us a bit more.\' }}

    \n
    \n
      \n
    • \n
      \n {{ category.title }}\n
    • \n
    \n\n
      \n
    • {{ topic.name }}
    • \n
    \n
    \n \n
    \n')}return dust.register("interest/index",e),e.__dustBody=!0,e}(),function(){function e(e){return e.w("\n")}return dust.register("keep-watching/cms-view",e),e.__dustBody=!0,e}(),function(){function e(e){return e.w('\n')}return dust.register("keep-watching/view",e),e.__dustBody=!0,e}(),function(){function e(e){return e.w('
    \n
    \n
    \n \n
    \n \n
    \n
    \n \n
    \n
    \n \n
    \n
    \n \n
    \n
    \n \n
    \n
    \n \n
    \n \n
    \n \n
    \n
    \n \n
    \n
    \n\n
    \n
    \n \n \n
    \n\n
    \n \n \n
    \n\n
    \n \n \n
    \n\n \n \n
    \n\n
    \n
      \n
    • \n \n \n \n
    • \n
    \n
    \n\n
    \n
    \n')}return dust.register("landing-page-collection/edit",e),e.__dustBody=!0,e}(),function(){function e(e){return e.w('\n')}return dust.register("landing-page-collection/tile",e),e.__dustBody=!0,e}(),function(){function e(e){return e.w('
    \n\n
    \n \n\n
    \n
    \n
    \n\n
    \n
    \n
    \n\n
    \n
    \n
    \n
    \n
    \n
    \n\n
    \n
    \n
    \n
    \n
    \n
    \n
    \n
    \n\n
    \n
    \n
    \n
    \n
    \n
    \n
    \n
    \n
    \n
    \n
    \n\n
    \n
    \n
    \n
    \n
    \n
    \n\n
    \n
    \n
    \n\n
    \n\n
    \n\n
    \n
    \n
    \n
    \n')}return dust.register("landing-page-collection/view",e),e.__dustBody=!0,e}(),function(){function e(e){return e.w('
    \n
    \n
    \n
    \n \n
    \n \n
    \n Key name cannot start with \'^\'\n
    \n
    \n\n \n\n \n\n \n \n
    \n
    \n\n
    \n
      \n
    • \n {{ kvp.key }} = {{ kvp.value }}\n \n
    • \n
    \n
    \n
    \n
    \n')}return dust.register("landing-tracking/edit",e),e.__dustBody=!0,e}(),function(){function e(e){return e.w('
    \n

    Tracking module is enabled. This text will not be shown to users.

    \n
    \n')}return dust.register("landing-tracking/view",e),e.__dustBody=!0,e}(),function(){function e(e){return e.w('
    \n
    \n
    \n
    \n \n
    \n \n
    \n Key name cannot start with \'^\'\n
    \n
    \n\n \n \n
    \n
    \n\n
    \n
      \n
    • \n {{ item }}\n \n
    • \n
    \n
    \n
    \n
    \n')}return dust.register("landing-traits/edit",e),e.__dustBody=!0,e}(),function(){function e(e){return e.w("
    \n

    Traits module is enabled. This text will not be shown to users.

    \n
    \n")}return dust.register("landing-traits/view",e),e.__dustBody=!0,e}(),function(){function e(e){return e.w('
    \n
    \n \n \n
    \n \n

    ${{ lineItem.pricing.display_price | centsToDollars }}

    \n

    Free

    \n \n
    \n
    \n
    \n
    \n')}return dust.register("line-item-tiles/view",e),e.__dustBody=!0,e}(),function(){function e(e){return e.w('
    \n
    \n
    \n

    Where would you like to create a link to?

    \n
    \n
    \n \n \n
    \n
    \n \n \n
    \n \n
    \n
    \n
    \n
    \n') }return dust.register("link-to-catalog/cms-edit",e),e.__dustBody=!0,e}(),function(){function e(e){return e.w('
    \n \n
    \n')}return dust.register("link-to-catalog/cms-view",e),e.__dustBody=!0,e}(),function(){function e(e){return e.w('\n')}return dust.register("link-to-catalog/view",e),e.__dustBody=!0,e}(),function(){function e(e){return e.w("\n")}return dust.register("live-now/cms-view",e),e.__dustBody=!0,e}(),function(){function e(e){return e.w('
    \n \n
    \n

    {{ ctrl.course.short_title }}

    \n
    \n
    \n
    \n')}return dust.register("live-now/index",e),e.__dustBody=!0,e}(),function(){function e(e){return e.w('
    \n

    \n
    \n
      \n \n

      \n

      \n \n
    \n
    ')}return dust.register("my-stuff/index",e),e.__dustBody=!0,e}(),function(){function e(e){return e.w('
    \n
    \n \n \n
    \n
    \n
    \n
    \n

    {{ \'onboarding-dont-quit-now\' | i18n:"Don\'t quit now!" }}

    \n

    {{ \'onboarding-youre-almost-finished\' | i18n:"You\'re almost finished!" }}

    \n
    \n
    \n \n
    \n
    \n \n
    \n
    \n
    \n
    \n
    \n')}return dust.register("onboarding/index",e),e.__dustBody=!0,e}(),function(){function e(e,t){return e.w('\n")}return dust.register("page-footer/view",e),e.__dustBody=!0,e}(),function(){function e(e){return e.w('\n')}return dust.register("partner/button",e),e.__dustBody=!0,e}(),function(){function e(e){return e.w('
    \n
    \n \n \n \n \n \n
    \n
    \n

    past class

    \n see class\n
    \n
    \n
    \n
    \n

    \n
    \n
    \n
    \n')}return dust.register("past-event/index",e),e.__dustBody=!0,e}(),function(){function e(e){return e.w('\n \n \n\n')}return dust.register("price/current",e),e.__dustBody=!0,e}(),function(){function e(e){return e.w('
    \n \n\n

    \n

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

    \n FREE Live Broadcast\n

    \n
    \n
    \n {{ broadcast.start | unixDate:\'MMMM Do\':true }}\n -\n \n {{ broadcast.end | unixDate:\'Do\':true }}\n \n \n {{ broadcast.end | unixDate:\'MMMM Do\':true }}\n \n \n
    \n
    \n
    \n \n \n \n \n You\'re in!\n \n
    \n
    \n\n
    \n\n \n
    \n
    \n

    \n Pre-Order On-Demand Access\n

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

    \n FREE Broadcast\n

    \n
    \n
    \n {{ broadcast.start | unixDate:\'MMMM Do\':true }}\n -\n \n {{ broadcast.end | unixDate:\'Do\':true }}\n \n \n {{ broadcast.end | unixDate:\'MMMM Do\':true }}\n \n \n
    \n
    \n
    \n \n \n \n \n You\'re in!\n \n
    \n
    \n\n
    \n\n
    \n
    \n

    On-Demand Access

    \n \n
    \n
    \n \n
    \n
    \n
    \n
    \n \n
    \n
    \n\n
    \n\n
    \n\n \n
    \n \n \n
    \n\n \n \n\n \n \n
    \n')}return dust.register("product-card/course",e),e.__dustBody=!0,e}(),function(){function e(e){return e.w('
    \n

    \n

    \n
    \n \n \n \n
    \n
    \n \n
    \n
    \n \n \n
    \n
    \n')}return dust.register("product-card/view",e),e.__dustBody=!0,e}(),function(){function e(e){return e.w('
    \n
    \n
    \n \n \n
    \n
    \n')}return dust.register("questions/ask",e),e.__dustBody=!0,e}(),function(){function e(e){return e.w('
    \n \n
      \n
    1. \n

      {{ question.user.profile.display_name }}: {{ question.text }}

      \n
      \n
      \n \n \n
      \n
      \n \n
      \n
      \n
    2. \n
    \n \n
    \n') }return dust.register("questions/list",e),e.__dustBody=!0,e}(),function(){function e(e){return e.w('
    \n
    \n\n
    \n
    \n \n \n
    \n\n
    \n\n \n
    \n\n
    \n
    \n \n \n
    \n Start by adding some segments.\n
    \n
    \n\n
    Edit titles and order
    \n
      \n
    • \n \n \n \n
    • \n
    \n\n
    \n\n \n
    \n \n seconds\n
    \n
    \n \n
    \n
    \n\n
    \n
    \n')}return dust.register("quick-watch/edit",e),e.__dustBody=!0,e}(),function(){function e(e){return e.w('
    \n \n
    \n
    \n
    \n
    \n
    \n \n
    \n
    \n

    Want to learn more?

    \n

    {{ currentSegment.course.title || currentSegment.title }}

    \n Go to Class\n
    \n
    \n
    \n
    \n
    \n
      \n
    • \n

      {{ segment.course.title }}

      \n
      {{ segment.title }}
      \n
    • \n
    \n
    \n
    \n
    \n
    \n
    \n')}return dust.register("quick-watch/view",e),e.__dustBody=!0,e}(),function(){function e(e){return e.w('
    \n \n
    \n {{ reviewCount }}\n Reviews\n
    \n
    \n')}return dust.register("reviews/icon",e),e.__dustBody=!0,e}(),function(){function e(e){return e.w('\n')}return dust.register("reviews/review",e),e.__dustBody=!0,e}(),function(){function e(e){return e.w('
    \n \n \n
    \n')}return dust.register("reviews/submit-modal",e),e.__dustBody=!0,e}(),function(){function e(e){return e.w('
    \n
    \n \n Tell us what you think\n \n Write a review\n \n \n
    \n \n \n
    \n
    \n
    \n')}return dust.register("reviews/submit",e),e.__dustBody=!0,e}(),function(){function e(e){return e.w('
    \n
    \n
    \n
    \n
    \n
    \n
    \n')}return dust.register("scrollbar/view",e),e.__dustBody=!0,e}(),function(){function e(e){return e.w('\n')}return dust.register("search-autocomplete/dropdown",e),e.__dustBody=!0,e}(),function(){function e(e,t){return e.w('
    \n \n \n \n \n \n \n \n \n \n \n \n
    \n')}return dust.register("search-autocomplete/view",e),e.__dustBody=!0,e}(),function(){function e(e){return e.w('
      \n
    1. \n
      \n \n
      \n \n
      \n
      \n\n {{ key + 1 }}.\n \n\n
        \n
      • \n {{ media.title }}\n
      • \n
      \n
    2. \n
    \n')}return dust.register("segment/downloads",e),e.__dustBody=!0,e}(),function(){function e(e){return e.w('
      \n
    1. \n
      \n {{ segment.media[0].duration | secondsToHours }}\n
      \n
      \n \n {{ key + 1 }}\n \n
    2. \n
    \n')}return dust.register("segment/index",e),e.__dustBody=!0,e}(),function(){function e(e){return e.w('
      \n
    1. \n {{ key + 1 }}\n\n \n \n\n \n \n\n \n\n
        \n
      • \n {{ media.title }}\n
      • \n
      \n
      \n {{ segment.media[0].duration | secondsToHours }}\n
      \n
    2. \n
    \n')}return dust.register("segment/lessons",e),e.__dustBody=!0,e}(),function(){function e(e){return e.w('
      \n
    1. \n
      \n {{ segment.media[0].duration | secondsToHours }}\n \n
      \n\n \n \n \n\n
        \n
      • \n {{ media.title }}\n
      • \n
      \n
    2. \n
    \n')}return dust.register("segment/list",e),e.__dustBody=!0,e}(),function(){function e(e){return e.w('
    \n
    \n \n
      \n
    • \n {{ media.title }}\n
    • \n
    \n
    \n
    \n')}return dust.register("segment/resources",e),e.__dustBody=!0,e}(),function(){function e(e){return e.w("
    \n
    \n

    Student Snapshot Module

    \n
    \n \n
    \n")}return dust.register("student-snapshot/cms-view",e),e.__dustBody=!0,e}(),function(){function e(e){return e.w('
    \n
    \n
    \n
    \n
    \n
    \n
    \n
    \n
    \n
    \n \n
    \n
    \n
    \n
    \n {{ \'student-snapshot-on-air\' | i18n:\'On Air Now\' }}\n {{ \'student-snapshot-owned-classes\' | i18n:\'Owned Classes\' }}\n {{ \'student-snapshot-upcoming-classes\' | i18n:\'Upcoming Classes\' }}\n {{ \'student-snapshot-wishlisted-classes\' | i18n:\'Wishlisted Classes\' }}\n {{ \'student-snapshot-past-classes\' | i18n:\'Past Classes\' }}\n
    \n
    \n \n
    \n
    \n \n
    \n
    \n')}return dust.register("student-snapshot/index",e),e.__dustBody=!0,e}(),function(){function e(e){return e.w('
    \n
    \n
    \n\n
    \n \n \n
    \n\n
    \n \n \n
    \n \n There was an error adding this image\n
    \n\n
    \n
      \n
    • \n \n {{ slide.image.courses[0].short_title }} - "{{ slide.image.title }}"\n \n
    • \n
    \n
    \n
    \n
    \n')}return dust.register("student-work/edit",e),e.__dustBody=!0,e}(),function(){function e(e){return e.w('
    \n\n \n\n
    \n {{ data.title || \'featured student work\' }}\n \n \n \n \n \n \n
    \n
    \n')}return dust.register("student-work/view",e),e.__dustBody=!0,e}(),function(){function e(e){return e.w('
    \n
    \n
    \n
    \n \n \n
    \n
    \n\n
    \n Current event: {{ data.event.title }}\n
    \n
    \n
    \n')}return dust.register("swimlanes/cms-edit",e),e.__dustBody=!0,e}(),function(){function e(e){return e.w('
    \n
    \n
    ')}return dust.register("swimlanes/cms-view",e),e.__dustBody=!0,e}(),function(){function e(e){return e.w('
    \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
    \n \n {{ laneName }}\n \n
    \n {{ row.timestamp | unixDate:\'hh:mm\':true }}\n
    \n {{ row.timestamp | unixDate:\'hh:mm\':true }}\n \n
    \n \n \n \n \n
    \n \n \n
    \n \n
    \n
    \n') }return dust.register("swimlanes/view",e),e.__dustBody=!0,e}(),function(){function e(e){return e.w('
    \n')}return dust.register("tags-manager/view",e),e.__dustBody=!0,e}(),function(){function e(e){return e.w('
    \n
    \n\n
    \n
    \n \n \n No Title\n
    \n\n
    \n \n
    \n\n
    \n
    \n \n \n
    \n Start by adding some reviews.\n
    \n
    \n\n
    Edit titles and order
    \n
      \n
    • \n \n \n \n \n
    • \n
    \n
    \n\n
    \n
    \n')}return dust.register("testimonials/edit",e),e.__dustBody=!0,e}(),function(){function e(e){return e.w('
    \n\n \n\n
    \n {{ data.title }}\n \n \n

    {{ t.testimonial | stripHtml }}

    \n

    {{ t.studentName }}

    \n
    \n
    \n
    \n
    \n')}return dust.register("testimonials/view",e),e.__dustBody=!0,e}(),function(){function e(e){return e.w('
    \n
    \n

    your purchase is complete

    \n

    Access your purchased class from the my classes section.

    \n\n \n

    Thank you for supporting CreativeLive.

    \n

    You will receive an email confirmation shortly.

    \n
    \n \n
    \n')}return dust.register("thank-you/view",e),e.__dustBody=!0,e}(),function(){function e(e){return e.w('
    \n {{ ctrl.date | unixDate:ctrl.displayFormat:true }} \n \n
    \n')}return dust.register("time/datetimeDropdown",e),e.__dustBody=!0,e}(),function(){function e(e){return e.w('
    \n Add New {{ ctrl.btnText || \'Date\' }}\n
    \n
    \n \n \n \n \n
    \n
    \n
    ')}return dust.register("time/multiDatetimeDropdown",e),e.__dustBody=!0,e}(),function(){function e(e){return e.w('

    {{ title }} {{ subTitle }}

    \n')}return dust.register("title/section",e),e.__dustBody=!0,e}(),function(){function e(e){return e.w('
    \n
    \n
    \n \n
    \n
    \n
    \n \n \n \n \n \n
    \n {{ topic.name }}\n \n \n \n Following\n \n \n Follow\n \n \n
    \n
    \n
    \n
    \n
    ')}return dust.register("topic-editor/index",e),e.__dustBody=!0,e}(),function(){function e(e){return e.w('
    \n
    \n
    \n
    \n
    \n \n
    \n Following {{ topicsFollowed }} {{ \'Topic\' | pluralize:topicsFollowed }}\n
    \n
    \n
    \n
    \n \n
    \n
    ')}return dust.register("topic-editor/page",e),e.__dustBody=!0,e}(),function(){function e(e){return e.w('
    \n
    \n\n
    \n \n\n \n \n \n \n \n \n Click or drag files here\n \n \n \n \n \n
    \n Select custom image\n \n
    \n\n
    \n
    \n \n \n
    \n
    \n \n \n
    \n
    \n \n
      \n
    • \n \n
    • \n
    \n
    \n
    \n\n
    \n
    \n \n \n
    \n
    \n\n
    \n
    \n')}return dust.register("topic-hero/cms-edit",e),e.__dustBody=!0,e}(),function(){function e(e){return e.w('
    \n \n \n
    \n')}return dust.register("topic-hero/cms-view",e),e.__dustBody=!0,e}(),function(){function e(e){return e.w('
    \n
    \n
    \n
    \n
    \n \n \n
    Back to
    \n
    \n
    \n {{ data.HEADER }}\n

    {{ data.LEAD }}

    \n \n
    \n
    \n
    \n
    \n
    \n
    \n')}return dust.register("topic-hero/view",e),e.__dustBody=!0,e}(),function(){function e(e){return e.w('
    \n
    \n
    \n
    \n \n \n
    \n
    \n \n \n
    \n
    \n
    \n \n \n
    \n
    \n \n \n
    \n
    \n
    \n \n
    \n \n \n
    \n
    \n \n \n
    \n
    \n
    \n
    \n
    \n \n \n
    \n Start by adding a topic.\n
    \n
    \n
    \n Click on a topic below to set the link and the image \n
    \n
      \n
    • \n \n \n \n
    • \n
    \n \n \n
    \n
    \n
    \n \n \n
    \n Add a secondary topic.\n
    \n
    \n
    \n Click on a topic below to set the link \n
    \n
      \n
    • \n \n \n \n
    • \n
    \n \n \n
    \n
    \n
    \n
    \n

    Editing {{ selectedPrimaryTopic.topic.title }}

    \n
    \n
    \n
    \n \n \n
    \n
    \n \n \n
    \n
    \n
    \n
    \n \n \n \n \n \n \n Click or drag files here\n \n \n \n \n \n
    \n Select custom image\n \n
    \n
    \n
    \n
    \n \n \n
    \n
    \n
    \n
    \n
    \n

    Editing {{ selectedSecondaryTopic.topic.title }}

    \n
    \n
    \n
    \n \n \n
    \n
    \n
    \n
    \n \n \n \n \n \n \n Click or drag files here\n \n \n \n \n \n
    \n Select custom image\n \n
    \n
    \n
    \n
    \n \n \n
    \n
    \n \n \n
    \n
    \n
    \n
    \n')}return dust.register("topic-list/cms-edit",e),e.__dustBody=!0,e}(),function(){function e(e){return e.w('
    \n \n \n
    \n')}return dust.register("topic-list/cms-view",e),e.__dustBody=!0,e}(),function(){function e(e){return e.w('
    \n \n
    \n \n
    \n
    \n

    \n
    \n
    \n
    \n
    \n')}return dust.register("topic-list/view",e),e.__dustBody=!0,e}(),function(){function e(e){return e.w('
    \n
    \n
    \n \n
    \n
    \n
    \n
    \n
    \n
    \n
    \n
    \n
    \n \n
    \n
    \n
    \n')}return dust.register("topic-snapshot/index",e),e.__dustBody=!0,e}(),function(){function e(e){return e.w('
    \n
    \n x\n
    \n Hi {{ $root.user.getProfile().first_name }}\n
    \n
    \n Welcome to CreativeLive!
    \n Here\'s where you\'ll find your profile and the classes you own.\n
    \n
    \n
    ')}return dust.register("tutorial/index",e),e.__dustBody=!0,e}(),function(){function e(e){return e.w('
    \n
    \n
    \n
    \n \n \n
    \n\n
    \n \n \n
    \n\n
    \n \n \n
    \n \n \n
    \n
    \n
    \n \n
    \n classes appear when a student is logged in\n
    \n \n
    \n (Number of a student\'s top channels to show )\n
    \n \n
    \n
    \n \n
    \n classes appear when a student is logged in\n
    \n
    \n
    \n \n Clear categories\n
    \n \n
    \n
    \n
    \n
    \n
    \n \n \n
    \n \n \n \n \n
    \n \n \n \n \n
    \n
    \n
    \n
    \n')}return dust.register("upcoming-classes/edit",e),e.__dustBody=!0,e}(),function(){function e(e){return e.w('
    \n
    \n \n

    upcoming classes

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

    San Francisco

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

    Seattle

    \n \n
    \n
    \n
    \n') }return dust.register("upcoming-classes/frontrow-view",e),e.__dustBody=!0,e}(),function(){function e(e){return e.w('
    \n
    \n
    {{ course.start_time | twoDateSplit: course.end_time: \'MMM d\': \' - \' }}
    \n
    \n
    \n {{ course.short_title }}\n
    {{ course.short_title }}
    \n
    \n with \n
    \n
    \n
    \n
    \n \n
    \n
    \n
    \n Looks like there aren\'t any {{ locationMapping[location] }} classes to enroll in.\n
    \n
    \n')}return dust.register("upcoming-classes/frontrow",e),e.__dustBody=!0,e}(),function(){function e(e){return e.w('\n \n \n \n
    \n
    \n \n \n \n \n \n \n \n \n \n
    \n
    \n
    \n \n \n \n \n \n \n \n
    \n
    \n
    \n \n
    \n \n\n')}return dust.register("upcoming-classes/index",e),e.__dustBody=!0,e}(),function(){function e(e){return e.w('\n
    \n
    \n
    \n

    {{ upcoming.day }}

    \n {{ upcoming.month }}\n
    \n
    \n ON AIR // {{ upcoming.day }} {{ upcoming.month }}\n
    \n
    \n
    \n \n \n \n \n You\'re in!\n \n
    \n
    \n
    \n
    \n
    \n

    {{ upcoming.short_title || upcoming.title }}

    \n \n
    \n
    \n')}return dust.register("upcoming-classes/upcoming-class",e),e.__dustBody=!0,e}(),function(){function e(e){return e.w('
    \n
    \n

    Upcoming Classes Module

    \n
    \n \n
    \n')}return dust.register("upcoming-classes/view",e),e.__dustBody=!0,e}(),function(){function e(e){return e.w('\n
    \n
    \n
    \n
    on air right now
    \n
    \n
    \n
    watch now
    \n
    \n
    \n
    \n
    \n

    {{ watchNow.short_title || watchNow.title }}

    \n

    {{ watchNow.instructors[0].profile.name }}

    \n
    \n\n')}return dust.register("upcoming-classes/watch-now",e),e.__dustBody=!0,e}(),function(){function e(e){return e.w("\n")}return dust.register("upcoming-event/cms-view",e),e.__dustBody=!0,e}(),function(){function e(e){return e.w('')}return dust.register("upcoming-event/index",e),e.__dustBody=!0,e}(),function(){function e(e){return e.w('
    \n
      \n
    1. {{ course.title }} is {{ course.primary_category.slug }}
    2. \n
    \n
    \n')}return dust.register("user-recommendations/view",e),e.__dustBody=!0,e}(),function(){function e(e){return e.w('
    \n

    Categories

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

    Topics

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

    last updated:

    \n

    version:

    \n\n \n
    ')}return dust.register("user-scores/view",e),e.__dustBody=!0,e}(),function(){function e(e){return e.w('
    \n
    \n
    \n\n
    \n \n \n
    \n
    \n
    \n \n \n \n \n \n \n Click or drag files here\n \n \n \n \n \n
    \n Select custom image\n \n
    \n
    \n
    \n\n
    \n
    \n \n \n
    \n\n
    \n \n \n
    \n\n
    \n \n \n
    \n
    \n\n
    \n
    \n \n
    \n \n \n \n
    \n
    \n \n \n \n
    \n
    \n \n \n \n
    \n
    \n\n
    \n
    \n
    \n \n %\n
    \n
    \n
    \n
    \n \n %\n
    \n
    \n
    \n
    \n
    \n
    \n')}return dust.register("vertical-featured/edit",e),e.__dustBody=!0,e}(),function(){function e(e){return e.w('\n')}return dust.register("vertical-featured/view",e),e.__dustBody=!0,e}(),function(){function e(e){return e.w('
    \n\n
    \n
    \n
    \n \n \n
    \n
    \n\n
    \n
    \n \n \n
    \n\n
    \n \n \n
    \n
    \n\n
    \n

    Optional Settings

    \n
    \n \n \n
    \n\n
    \n \n \n
    \n\n
    \n \n \n
    \n
    \n\n
    \n
    \n')}return dust.register("vertical-search/edit",e),e.__dustBody=!0,e}(),function(){function e(e){return e.w('
    \n
    \n {{ data.headline }}\n
    \n
    \n \n
    \n \n
    \n\n \n\n \n
    \n\n
    \n
    \n')}return dust.register("vertical-search/view",e),e.__dustBody=!0,e}(),function(){function e(e){return e.w('
    \n \n\n
    \n \n
    \n\n
    \n \n
    \n\n
    \n')}return dust.register("video-player/dynamic",e),e.__dustBody=!0,e}(),function(){function e(e){return e.w('
    \n')}return dust.register("video-player/fullscreen",e),e.__dustBody=!0,e}(),function(){function e(e){return e.w('
    \n \n
    \n')}return dust.register("video-player/index",e),e.__dustBody=!0,e}(),function(){function e(e){return e.w('
    \n
    \n
    \n
    {{ ctrl.currentSegment.title}}
    \n
    Next Lesson:
    {{ ctrl.nextSegment.title}}
    \n
    \n
    Playing in {{ sec }} sec
    \n
    \n
    \n
    \n \n
    \n \n
    \n')}return dust.register("video-player/interstitial",e),e.__dustBody=!0,e}(),function(){function e(e){return e.w('
    ')}return dust.register("video-player/overlay",e),e.__dustBody=!0,e}(),function(){function e(e){return e.w('
    \n \n
    \n
    \n

    Watch now

    \n

    \n
    \n')}return dust.register("video-player/perfect-timing",e),e.__dustBody=!0,e}(),function(){function e(e){return e.w('
    \n
    \n {{ segmentsCount }}\n Lessons\n
    \n
    \n
    \n
    \n
    \n
    \n Back\n
    LESSONS
    \n
    \n
    \n
    \n \n
    \n')}return dust.register("video-player/side-panel",e),e.__dustBody=!0,e}(),function(){function e(e){return e.w('
    \n
    \n
    \n {{ swimlane.name }}\n

    Playing: {{ swimlane.course.short_title }}

    \n

    Next: {{ swimlane.nextCourse.short_title }}

    \n

    Previously: {{ swimlane.prevCourse.short_title }}

    \n
    \n
    \n')}return dust.register("video-player/swimlanes",e),e.__dustBody=!0,e}(),function(){function e(e){return e.w('
    \n \n \n \n \n
    \n \n Loading player...\n
    \n
    \n
    \n')}return dust.register("video-player/ustream",e),e.__dustBody=!0,e}(),function(){function e(e){return e.w('
    \n \n \n \n \n \n
    \n')}return dust.register("video-player/videojs",e),e.__dustBody=!0,e}(),function(){function e(e){return e.w('
    \n
    \n
    \n
    \n \n %\n
    \n
    \n \n %\n
    \n
    \n
    \n
    \n')}return dust.register("welcome/cms-edit",e),e.__dustBody=!0,e}(),function(){function e(e){return e.w("\n")}return dust.register("welcome/cms-view",e),e.__dustBody=!0,e}(),function(){function e(e){return e.w('
    \n
    \n
    \n

    {{ \'welcome-salutation\' | i18n:"Hey " }},

    \n

    {{ \'welcome-welcome-to-creativelive\' | i18n:"Welcome to CreativeLive!" }}

    \n
    \n
    \n
    \n')}return dust.register("welcome/index",e),e.__dustBody=!0,e}(),function(){function e(e){return e.w("\n")}return dust.register("wishlisted/cms-view",e),e.__dustBody=!0,e}(),function(){function e(e){return e.w('
    \n
    \n \n \n \n \n \n
    \n
    \n

    wishlisted class

    \n see class\n
    \n
    \n
    \n
    \n

    \n
    \n
    \n
    \n')}return dust.register("wishlisted/index",e),e.__dustBody=!0,e}()},{}],768:[function(){!function(){function e(e){return e.w("
    \n

    oh hello

    \n

    We see you there. Log in to get to that page.

    \n
    \n\n\n")}return dust.register("error/401-content",e),e.__dustBody=!0,e}(),function(){function e(e){return e.w("

    oops

    \n

    This page can't be found. Try our home page.

    \n")}return dust.register("error/404-content",e),e.__dustBody=!0,e}(),function(){function e(e){return e.w("
    \n

    sorry

    \n

    Our system is having issues. We're working to fix it now.

    \n \n
    \n")}return dust.register("error/500-content",e),e.__dustBody=!0,e}()},{}],769:[function(){!function(){function e(e){return e.w('\n\n')}return dust.register("ui/pagination",e),e.__dustBody=!0,e}(),function(){function e(e){return e.w('
    \n \n
    \n \n
    \n
    \n \n
    \n
    \n\n') }return dust.register("ui/socialDefaultImage",e),e.__dustBody=!0,e}()},{}]},{},[6]);