@hippovideo/video-sdk 0.0.15 → 0.0.16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/app/hv_recorder.js +1 -1
- package/app/hv_recorder.js.gz +0 -0
- package/package.json +1 -1
package/app/hv_recorder.js
CHANGED
|
@@ -245,7 +245,7 @@ object-assign
|
|
|
245
245
|
* Copyright jQuery Foundation and other contributors
|
|
246
246
|
* Released under the MIT license.
|
|
247
247
|
* http://jquery.org/license
|
|
248
|
-
*/!function(s){"use strict";o=[i(2),i(722),i(723),i(40)],void 0===(a="function"==typeof(r=function(e){return e.effects={effect:{}},function(){var t,i=["add","remove","toggle"],r={border:1,borderBottom:1,borderColor:1,borderLeft:1,borderRight:1,borderTop:1,borderWidth:1,margin:1,padding:1};function o(e){var t,i,n,r=e.ownerDocument.defaultView?e.ownerDocument.defaultView.getComputedStyle(e,null):e.currentStyle,o={};if(r&&r.length&&r[0]&&r[r[0]])for(i=r.length;i--;)"string"==typeof r[t=r[i]]&&(o[(n=t,n.replace(/-([\da-z])/gi,(function(e,t){return t.toUpperCase()})))]=r[t]);else for(t in r)"string"==typeof r[t]&&(o[t]=r[t]);return o}e.each(["borderLeftStyle","borderRightStyle","borderBottomStyle","borderTopStyle"],(function(t,i){e.fx.step[i]=function(e){("none"!==e.end&&!e.setAttr||1===e.pos&&!e.setAttr)&&(n.style(e.elem,i,e.end),e.setAttr=!0)}})),e.fn.addBack||(e.fn.addBack=function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}),e.effects.animateClass=function(t,n,a,s){var l=e.speed(n,a,s);return this.queue((function(){var n,a=e(this),s=a.attr("class")||"",u=l.children?a.find("*").addBack():a;u=u.map((function(){return{el:e(this),start:o(this)}})),(n=function(){e.each(i,(function(e,i){t[i]&&a[i+"Class"](t[i])}))})(),u=u.map((function(){return this.end=o(this.el[0]),this.diff=function(t,i){var n,o,a={};for(n in i)o=i[n],t[n]!==o&&(r[n]||!e.fx.step[n]&&isNaN(parseFloat(o))||(a[n]=o));return a}(this.start,this.end),this})),a.attr("class",s),u=u.map((function(){var t=this,i=e.Deferred(),n=e.extend({},l,{queue:!1,complete:function(){i.resolve(t)}});return this.el.animate(this.diff,n),i.promise()})),e.when.apply(e,u.get()).done((function(){n(),e.each(arguments,(function(){var t=this.el;e.each(this.diff,(function(e){t.css(e,"")}))})),l.complete.call(a[0])}))}))},e.fn.extend({addClass:(t=e.fn.addClass,function(i,n,r,o){return n?e.effects.animateClass.call(this,{add:i},n,r,o):t.apply(this,arguments)}),removeClass:function(t){return function(i,n,r,o){return arguments.length>1?e.effects.animateClass.call(this,{remove:i},n,r,o):t.apply(this,arguments)}}(e.fn.removeClass),toggleClass:function(t){return function(i,n,r,o,a){return"boolean"==typeof n||void 0===n?r?e.effects.animateClass.call(this,n?{add:i}:{remove:i},r,o,a):t.apply(this,arguments):e.effects.animateClass.call(this,{toggle:i},n,r,o)}}(e.fn.toggleClass),switchClass:function(t,i,n,r,o){return e.effects.animateClass.call(this,{add:i,remove:t},n,r,o)}})}(),function(){var t;function i(t,i,n,r){return e.isPlainObject(t)&&(i=t,t=t.effect),t={effect:t},null==i&&(i={}),"function"==typeof i&&(r=i,n=null,i={}),("number"==typeof i||e.fx.speeds[i])&&(r=n,n=i,i={}),"function"==typeof n&&(r=n,n=null),i&&e.extend(t,i),n=n||i.duration,t.duration=e.fx.off?0:"number"==typeof n?n:n in e.fx.speeds?e.fx.speeds[n]:e.fx.speeds._default,t.complete=r||i.complete,t}function n(t){return!(t&&"number"!=typeof t&&!e.fx.speeds[t])||("string"==typeof t&&!e.effects.effect[t]||("function"==typeof t||"object"==typeof t&&!t.effect))}function r(e,t){var i=t.outerWidth(),n=t.outerHeight(),r=/^rect\((-?\d*\.?\d*px|-?\d+%|auto),?\s*(-?\d*\.?\d*px|-?\d+%|auto),?\s*(-?\d*\.?\d*px|-?\d+%|auto),?\s*(-?\d*\.?\d*px|-?\d+%|auto)\)$/.exec(e)||["",0,i,n,0];return{top:parseFloat(r[1])||0,right:"auto"===r[2]?i:parseFloat(r[2]),bottom:"auto"===r[3]?n:parseFloat(r[3]),left:parseFloat(r[4])||0}}e.expr&&e.expr.pseudos&&e.expr.pseudos.animated&&(e.expr.pseudos.animated=(t=e.expr.pseudos.animated,function(i){return!!e(i).data("ui-effects-animated")||t(i)})),!1!==e.uiBackCompat&&e.extend(e.effects,{save:function(e,t){for(var i=0,n=t.length;i<n;i++)null!==t[i]&&e.data("ui-effects-"+t[i],e[0].style[t[i]])},restore:function(e,t){for(var i,n=0,r=t.length;n<r;n++)null!==t[n]&&(i=e.data("ui-effects-"+t[n]),e.css(t[n],i))},setMode:function(e,t){return"toggle"===t&&(t=e.is(":hidden")?"show":"hide"),t},createWrapper:function(t){if(t.parent().is(".ui-effects-wrapper"))return t.parent();var i={width:t.outerWidth(!0),height:t.outerHeight(!0),float:t.css("float")},n=e("<div></div>").addClass("ui-effects-wrapper").css({fontSize:"100%",background:"transparent",border:"none",margin:0,padding:0}),r={width:t.width(),height:t.height()},o=document.activeElement;try{o.id}catch(e){o=document.body}return t.wrap(n),(t[0]===o||e.contains(t[0],o))&&e(o).trigger("focus"),n=t.parent(),"static"===t.css("position")?(n.css({position:"relative"}),t.css({position:"relative"})):(e.extend(i,{position:t.css("position"),zIndex:t.css("z-index")}),e.each(["top","left","bottom","right"],(function(e,n){i[n]=t.css(n),isNaN(parseInt(i[n],10))&&(i[n]="auto")})),t.css({position:"relative",top:0,left:0,right:"auto",bottom:"auto"})),t.css(r),n.css(i).show()},removeWrapper:function(t){var i=document.activeElement;return t.parent().is(".ui-effects-wrapper")&&(t.parent().replaceWith(t),(t[0]===i||e.contains(t[0],i))&&e(i).trigger("focus")),t}}),e.extend(e.effects,{version:"1.13.1",define:function(t,i,n){return n||(n=i,i="effect"),e.effects.effect[t]=n,e.effects.effect[t].mode=i,n},scaledDimensions:function(e,t,i){if(0===t)return{height:0,width:0,outerHeight:0,outerWidth:0};var n="horizontal"!==i?(t||100)/100:1,r="vertical"!==i?(t||100)/100:1;return{height:e.height()*r,width:e.width()*n,outerHeight:e.outerHeight()*r,outerWidth:e.outerWidth()*n}},clipToBox:function(e){return{width:e.clip.right-e.clip.left,height:e.clip.bottom-e.clip.top,left:e.clip.left,top:e.clip.top}},unshift:function(e,t,i){var n=e.queue();t>1&&n.splice.apply(n,[1,0].concat(n.splice(t,i))),e.dequeue()},saveStyle:function(e){e.data("ui-effects-style",e[0].style.cssText)},restoreStyle:function(e){e[0].style.cssText=e.data("ui-effects-style")||"",e.removeData("ui-effects-style")},mode:function(e,t){var i=e.is(":hidden");return"toggle"===t&&(t=i?"show":"hide"),(i?"hide"===t:"show"===t)&&(t="none"),t},getBaseline:function(e,t){var i,n;switch(e[0]){case"top":i=0;break;case"middle":i=.5;break;case"bottom":i=1;break;default:i=e[0]/t.height}switch(e[1]){case"left":n=0;break;case"center":n=.5;break;case"right":n=1;break;default:n=e[1]/t.width}return{x:n,y:i}},createPlaceholder:function(t){var i,n=t.css("position"),r=t.position();return t.css({marginTop:t.css("marginTop"),marginBottom:t.css("marginBottom"),marginLeft:t.css("marginLeft"),marginRight:t.css("marginRight")}).outerWidth(t.outerWidth()).outerHeight(t.outerHeight()),/^(static|relative)/.test(n)&&(n="absolute",i=e("<"+t[0].nodeName+">").insertAfter(t).css({display:/^(inline|ruby)/.test(t.css("display"))?"inline-block":"block",visibility:"hidden",marginTop:t.css("marginTop"),marginBottom:t.css("marginBottom"),marginLeft:t.css("marginLeft"),marginRight:t.css("marginRight"),float:t.css("float")}).outerWidth(t.outerWidth()).outerHeight(t.outerHeight()).addClass("ui-effects-placeholder"),t.data("ui-effects-placeholder",i)),t.css({position:n,left:r.left,top:r.top}),i},removePlaceholder:function(e){var t="ui-effects-placeholder",i=e.data(t);i&&(i.remove(),e.removeData(t))},cleanUp:function(t){e.effects.restoreStyle(t),e.effects.removePlaceholder(t)},setTransition:function(t,i,n,r){return r=r||{},e.each(i,(function(e,i){var o=t.cssUnit(i);o[0]>0&&(r[i]=o[0]*n+o[1])})),r}}),e.fn.extend({effect:function(){var t=i.apply(this,arguments),n=e.effects.effect[t.effect],r=n.mode,o=t.queue,a=o||"fx",s=t.complete,l=t.mode,u=[],c=function(t){var i=e(this),n=e.effects.mode(i,l)||r;i.data("ui-effects-animated",!0),u.push(n),r&&("show"===n||n===r&&"hide"===n)&&i.show(),r&&"none"===n||e.effects.saveStyle(i),"function"==typeof t&&t()};if(e.fx.off||!n)return l?this[l](t.duration,s):this.each((function(){s&&s.call(this)}));function d(i){var o=e(this);function a(){"function"==typeof s&&s.call(o[0]),"function"==typeof i&&i()}t.mode=u.shift(),!1===e.uiBackCompat||r?"none"===t.mode?(o[l](),a()):n.call(o[0],t,(function(){o.removeData("ui-effects-animated"),e.effects.cleanUp(o),"hide"===t.mode&&o.hide(),a()})):(o.is(":hidden")?"hide"===l:"show"===l)?(o[l](),a()):n.call(o[0],t,a)}return!1===o?this.each(c).each(d):this.queue(a,c).queue(a,d)},show:function(e){return function(t){if(n(t))return e.apply(this,arguments);var r=i.apply(this,arguments);return r.mode="show",this.effect.call(this,r)}}(e.fn.show),hide:function(e){return function(t){if(n(t))return e.apply(this,arguments);var r=i.apply(this,arguments);return r.mode="hide",this.effect.call(this,r)}}(e.fn.hide),toggle:function(e){return function(t){if(n(t)||"boolean"==typeof t)return e.apply(this,arguments);var r=i.apply(this,arguments);return r.mode="toggle",this.effect.call(this,r)}}(e.fn.toggle),cssUnit:function(t){var i=this.css(t),n=[];return e.each(["em","px","%","pt"],(function(e,t){i.indexOf(t)>0&&(n=[parseFloat(i),t])})),n},cssClip:function(e){return e?this.css("clip","rect("+e.top+"px "+e.right+"px "+e.bottom+"px "+e.left+"px)"):r(this.css("clip"),this)},transfer:function(t,i){var n=e(this),r=e(t.to),o="fixed"===r.css("position"),a=e("body"),s=o?a.scrollTop():0,l=o?a.scrollLeft():0,u=r.offset(),c={top:u.top-s,left:u.left-l,height:r.innerHeight(),width:r.innerWidth()},d=n.offset(),h=e("<div class='ui-effects-transfer'></div>");h.appendTo("body").addClass(t.className).css({top:d.top-s,left:d.left-l,height:n.innerHeight(),width:n.innerWidth(),position:o?"fixed":"absolute"}).animate(c,t.duration,t.easing,(function(){h.remove(),"function"==typeof i&&i()}))}}),e.fx.step.clip=function(t){t.clipInit||(t.start=e(t.elem).cssClip(),"string"==typeof t.end&&(t.end=r(t.end,t.elem)),t.clipInit=!0),e(t.elem).cssClip({top:t.pos*(t.end.top-t.start.top)+t.start.top,right:t.pos*(t.end.right-t.start.right)+t.start.right,bottom:t.pos*(t.end.bottom-t.start.bottom)+t.start.bottom,left:t.pos*(t.end.left-t.start.left)+t.start.left})}}(),function(){var t={};e.each(["Quad","Cubic","Quart","Quint","Expo"],(function(e,i){t[i]=function(t){return Math.pow(t,e+2)}})),e.extend(t,{Sine:function(e){return 1-Math.cos(e*Math.PI/2)},Circ:function(e){return 1-Math.sqrt(1-e*e)},Elastic:function(e){return 0===e||1===e?e:-Math.pow(2,8*(e-1))*Math.sin((80*(e-1)-7.5)*Math.PI/15)},Back:function(e){return e*e*(3*e-2)},Bounce:function(e){for(var t,i=4;e<((t=Math.pow(2,--i))-1)/11;);return 1/Math.pow(4,3-i)-7.5625*Math.pow((3*t-2)/22-e,2)}}),e.each(t,(function(t,i){e.easing["easeIn"+t]=i,e.easing["easeOut"+t]=function(e){return 1-i(1-e)},e.easing["easeInOut"+t]=function(e){return e<.5?i(2*e)/2:1-i(-2*e+2)/2}}))}(),e.effects})?r.apply(t,o):r)||(e.exports=a)}()}).call(this,i(2))},function(e,t){function i(e,t,i,n,r,o,a){try{var s=e[o](a),l=s.value}catch(e){return void i(e)}s.done?t(l):Promise.resolve(l).then(n,r)}e.exports=function(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var a=e.apply(t,n);function s(e){i(a,r,o,s,l,"next",e)}function l(e){i(a,r,o,s,l,"throw",e)}s(void 0)}))}},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t,i){i(137);var n=i(15),r=n.Service,o=n.apiLoader;o.services.firehose={},n.Firehose=r.defineService("firehose",["2015-08-04"]),Object.defineProperty(o.services.firehose,"2015-08-04",{get:function(){var e=i(512);return e.paginators=i(513).pagination,e},enumerable:!0,configurable:!0}),e.exports=n.Firehose},function(e,t,i){i(137);var n=i(15),r=n.Service,o=n.apiLoader;o.services.kinesis={},n.Kinesis=r.defineService("kinesis",["2013-12-02"]),Object.defineProperty(o.services.kinesis,"2013-12-02",{get:function(){var e=i(528);return e.paginators=i(529).pagination,e.waiters=i(530).waiters,e},enumerable:!0,configurable:!0}),e.exports=n.Kinesis},function(e,t){var i={init:function(e){e||(e="undefined"!=typeof window&&window._i18n&&window._i18n.locale?window._i18n.locale:"undefined"!=typeof document&&document.documentElement.lang?document.documentElement.lang:"undefined"!=typeof navigator&&(navigator.languages||navigator.language||navigator.userLanguage)?((e=navigator.languages&&navigator.languages[0]||navigator.language||navigator.userLanguage)||"root").toLowerCase():"root");var t=this["__"+e]||this.__root;if(t)for(var i in t)this[i]=t[i];for(var i in this.__root)void 0===this[i]&&(this[i]=this.__root[i])}};i.init(),e.exports=i},function(e,t){var i={init:function(e){e||(e="undefined"!=typeof window&&window._i18n&&window._i18n.locale?window._i18n.locale:"undefined"!=typeof document&&document.documentElement.lang?document.documentElement.lang:"undefined"!=typeof navigator&&(navigator.languages||navigator.language||navigator.userLanguage)?((e=navigator.languages&&navigator.languages[0]||navigator.language||navigator.userLanguage)||"root").toLowerCase():"root");var t=this["__"+e]||this.__root;if(t)for(var i in t)this[i]=t[i];for(var i in this.__root)void 0===this[i]&&(this[i]=this.__root[i])}};i.init(),e.exports=i},function(e,t){var i={init:function(e){e||(e="undefined"!=typeof window&&window._i18n&&window._i18n.locale?window._i18n.locale:"undefined"!=typeof document&&document.documentElement.lang?document.documentElement.lang:"undefined"!=typeof navigator&&(navigator.languages||navigator.language||navigator.userLanguage)?((e=navigator.languages&&navigator.languages[0]||navigator.language||navigator.userLanguage)||"root").toLowerCase():"root");var t=this["__"+e]||this.__root;if(t)for(var i in t)this[i]=t[i];for(var i in this.__root)void 0===this[i]&&(this[i]=this.__root[i])}};i.init(),e.exports=i},function(e,t){var i={init:function(e){e||(e="undefined"!=typeof window&&window._i18n&&window._i18n.locale?window._i18n.locale:"undefined"!=typeof document&&document.documentElement.lang?document.documentElement.lang:"undefined"!=typeof navigator&&(navigator.languages||navigator.language||navigator.userLanguage)?((e=navigator.languages&&navigator.languages[0]||navigator.language||navigator.userLanguage)||"root").toLowerCase():"root");var t=this["__"+e]||this.__root;if(t)for(var i in t)this[i]=t[i];for(var i in this.__root)void 0===this[i]&&(this[i]=this.__root[i])}};i.init(),e.exports=i},function(e,t){var i={init:function(e){e||(e="undefined"!=typeof window&&window._i18n&&window._i18n.locale?window._i18n.locale:"undefined"!=typeof document&&document.documentElement.lang?document.documentElement.lang:"undefined"!=typeof navigator&&(navigator.languages||navigator.language||navigator.userLanguage)?((e=navigator.languages&&navigator.languages[0]||navigator.language||navigator.userLanguage)||"root").toLowerCase():"root");var t=this["__"+e]||this.__root;if(t)for(var i in t)this[i]=t[i];for(var i in this.__root)void 0===this[i]&&(this[i]=this.__root[i])}};i.init(),e.exports=i},function(e,t){var i={init:function(e){e||(e="undefined"!=typeof window&&window._i18n&&window._i18n.locale?window._i18n.locale:"undefined"!=typeof document&&document.documentElement.lang?document.documentElement.lang:"undefined"!=typeof navigator&&(navigator.languages||navigator.language||navigator.userLanguage)?((e=navigator.languages&&navigator.languages[0]||navigator.language||navigator.userLanguage)||"root").toLowerCase():"root");var t=this["__"+e]||this.__root;if(t)for(var i in t)this[i]=t[i];for(var i in this.__root)void 0===this[i]&&(this[i]=this.__root[i])}};i.init(),e.exports=i},function(e,t){var i={init:function(e){e||(e="undefined"!=typeof window&&window._i18n&&window._i18n.locale?window._i18n.locale:"undefined"!=typeof document&&document.documentElement.lang?document.documentElement.lang:"undefined"!=typeof navigator&&(navigator.languages||navigator.language||navigator.userLanguage)?((e=navigator.languages&&navigator.languages[0]||navigator.language||navigator.userLanguage)||"root").toLowerCase():"root");var t=this["__"+e]||this.__root;if(t)for(var i in t)this[i]=t[i];for(var i in this.__root)void 0===this[i]&&(this[i]=this.__root[i])}};i.init(),e.exports=i},function(e,t){var i={init:function(e){e||(e="undefined"!=typeof window&&window._i18n&&window._i18n.locale?window._i18n.locale:"undefined"!=typeof document&&document.documentElement.lang?document.documentElement.lang:"undefined"!=typeof navigator&&(navigator.languages||navigator.language||navigator.userLanguage)?((e=navigator.languages&&navigator.languages[0]||navigator.language||navigator.userLanguage)||"root").toLowerCase():"root");var t=this["__"+e]||this.__root;if(t)for(var i in t)this[i]=t[i];for(var i in this.__root)void 0===this[i]&&(this[i]=this.__root[i])}};i.init(),e.exports=i},function(e,t){var i={init:function(e){e||(e="undefined"!=typeof window&&window._i18n&&window._i18n.locale?window._i18n.locale:"undefined"!=typeof document&&document.documentElement.lang?document.documentElement.lang:"undefined"!=typeof navigator&&(navigator.languages||navigator.language||navigator.userLanguage)?((e=navigator.languages&&navigator.languages[0]||navigator.language||navigator.userLanguage)||"root").toLowerCase():"root");var t=this["__"+e]||this.__root;if(t)for(var i in t)this[i]=t[i];for(var i in this.__root)void 0===this[i]&&(this[i]=this.__root[i])}};i.init(),e.exports=i},function(e,t){var i={init:function(e){e||(e="undefined"!=typeof window&&window._i18n&&window._i18n.locale?window._i18n.locale:"undefined"!=typeof document&&document.documentElement.lang?document.documentElement.lang:"undefined"!=typeof navigator&&(navigator.languages||navigator.language||navigator.userLanguage)?((e=navigator.languages&&navigator.languages[0]||navigator.language||navigator.userLanguage)||"root").toLowerCase():"root");var t=this["__"+e]||this.__root;if(t)for(var i in t)this[i]=t[i];for(var i in this.__root)void 0===this[i]&&(this[i]=this.__root[i])}};i.init(),e.exports=i},function(e,t){var i={init:function(e){e||(e="undefined"!=typeof window&&window._i18n&&window._i18n.locale?window._i18n.locale:"undefined"!=typeof document&&document.documentElement.lang?document.documentElement.lang:"undefined"!=typeof navigator&&(navigator.languages||navigator.language||navigator.userLanguage)?((e=navigator.languages&&navigator.languages[0]||navigator.language||navigator.userLanguage)||"root").toLowerCase():"root");var t=this["__"+e]||this.__root;if(t)for(var i in t)this[i]=t[i];for(var i in this.__root)void 0===this[i]&&(this[i]=this.__root[i])}};i.init(),e.exports=i},function(e,t){var i={init:function(e){e||(e="undefined"!=typeof window&&window._i18n&&window._i18n.locale?window._i18n.locale:"undefined"!=typeof document&&document.documentElement.lang?document.documentElement.lang:"undefined"!=typeof navigator&&(navigator.languages||navigator.language||navigator.userLanguage)?((e=navigator.languages&&navigator.languages[0]||navigator.language||navigator.userLanguage)||"root").toLowerCase():"root");var t=this["__"+e]||this.__root;if(t)for(var i in t)this[i]=t[i];for(var i in this.__root)void 0===this[i]&&(this[i]=this.__root[i])}};i.init(),e.exports=i},function(e,t){var i={init:function(e){e||(e="undefined"!=typeof window&&window._i18n&&window._i18n.locale?window._i18n.locale:"undefined"!=typeof document&&document.documentElement.lang?document.documentElement.lang:"undefined"!=typeof navigator&&(navigator.languages||navigator.language||navigator.userLanguage)?((e=navigator.languages&&navigator.languages[0]||navigator.language||navigator.userLanguage)||"root").toLowerCase():"root");var t=this["__"+e]||this.__root;if(t)for(var i in t)this[i]=t[i];for(var i in this.__root)void 0===this[i]&&(this[i]=this.__root[i])}};i.init(),e.exports=i},function(e,t){var i={init:function(e){e||(e="undefined"!=typeof window&&window._i18n&&window._i18n.locale?window._i18n.locale:"undefined"!=typeof document&&document.documentElement.lang?document.documentElement.lang:"undefined"!=typeof navigator&&(navigator.languages||navigator.language||navigator.userLanguage)?((e=navigator.languages&&navigator.languages[0]||navigator.language||navigator.userLanguage)||"root").toLowerCase():"root");var t=this["__"+e]||this.__root;if(t)for(var i in t)this[i]=t[i];for(var i in this.__root)void 0===this[i]&&(this[i]=this.__root[i])}};i.init(),e.exports=i},function(e,t){var i={init:function(e){e||(e="undefined"!=typeof window&&window._i18n&&window._i18n.locale?window._i18n.locale:"undefined"!=typeof document&&document.documentElement.lang?document.documentElement.lang:"undefined"!=typeof navigator&&(navigator.languages||navigator.language||navigator.userLanguage)?((e=navigator.languages&&navigator.languages[0]||navigator.language||navigator.userLanguage)||"root").toLowerCase():"root");var t=this["__"+e]||this.__root;if(t)for(var i in t)this[i]=t[i];for(var i in this.__root)void 0===this[i]&&(this[i]=this.__root[i])}};i.init(),e.exports=i},function(e,t){var i={init:function(e){e||(e="undefined"!=typeof window&&window._i18n&&window._i18n.locale?window._i18n.locale:"undefined"!=typeof document&&document.documentElement.lang?document.documentElement.lang:"undefined"!=typeof navigator&&(navigator.languages||navigator.language||navigator.userLanguage)?((e=navigator.languages&&navigator.languages[0]||navigator.language||navigator.userLanguage)||"root").toLowerCase():"root");var t=this["__"+e]||this.__root;if(t)for(var i in t)this[i]=t[i];for(var i in this.__root)void 0===this[i]&&(this[i]=this.__root[i])}};i.init(),e.exports=i},function(e,t){var i={init:function(e){e||(e="undefined"!=typeof window&&window._i18n&&window._i18n.locale?window._i18n.locale:"undefined"!=typeof document&&document.documentElement.lang?document.documentElement.lang:"undefined"!=typeof navigator&&(navigator.languages||navigator.language||navigator.userLanguage)?((e=navigator.languages&&navigator.languages[0]||navigator.language||navigator.userLanguage)||"root").toLowerCase():"root");var t=this["__"+e]||this.__root;if(t)for(var i in t)this[i]=t[i];for(var i in this.__root)void 0===this[i]&&(this[i]=this.__root[i])}};i.init(),e.exports=i},function(e,t){var i={init:function(e){e||(e="undefined"!=typeof window&&window._i18n&&window._i18n.locale?window._i18n.locale:"undefined"!=typeof document&&document.documentElement.lang?document.documentElement.lang:"undefined"!=typeof navigator&&(navigator.languages||navigator.language||navigator.userLanguage)?((e=navigator.languages&&navigator.languages[0]||navigator.language||navigator.userLanguage)||"root").toLowerCase():"root");var t=this["__"+e]||this.__root;if(t)for(var i in t)this[i]=t[i];for(var i in this.__root)void 0===this[i]&&(this[i]=this.__root[i])}};i.init(),e.exports=i},function(e,t){var i={init:function(e){e||(e="undefined"!=typeof window&&window._i18n&&window._i18n.locale?window._i18n.locale:"undefined"!=typeof document&&document.documentElement.lang?document.documentElement.lang:"undefined"!=typeof navigator&&(navigator.languages||navigator.language||navigator.userLanguage)?((e=navigator.languages&&navigator.languages[0]||navigator.language||navigator.userLanguage)||"root").toLowerCase():"root");var t=this["__"+e]||this.__root;if(t)for(var i in t)this[i]=t[i];for(var i in this.__root)void 0===this[i]&&(this[i]=this.__root[i])}};i.init(),e.exports=i},function(e,t){var i={init:function(e){e||(e="undefined"!=typeof window&&window._i18n&&window._i18n.locale?window._i18n.locale:"undefined"!=typeof document&&document.documentElement.lang?document.documentElement.lang:"undefined"!=typeof navigator&&(navigator.languages||navigator.language||navigator.userLanguage)?((e=navigator.languages&&navigator.languages[0]||navigator.language||navigator.userLanguage)||"root").toLowerCase():"root");var t=this["__"+e]||this.__root;if(t)for(var i in t)this[i]=t[i];for(var i in this.__root)void 0===this[i]&&(this[i]=this.__root[i])}};i.init(),e.exports=i},function(e,t){e.exports=function(e,t,i,n){var r=i?i.call(n,e,t):void 0;if(void 0!==r)return!!r;if(e===t)return!0;if("object"!=typeof e||!e||"object"!=typeof t||!t)return!1;var o=Object.keys(e),a=Object.keys(t);if(o.length!==a.length)return!1;for(var s=Object.prototype.hasOwnProperty.bind(t),l=0;l<o.length;l++){var u=o[l];if(!s(u))return!1;var c=e[u],d=t[u];if(!1===(r=i?i.call(n,c,d,u):void 0)||void 0===r&&c!==d)return!1}return!0}},function(e,t,i){"use strict";t.a=function(e){function t(e,t,n){var r=t.trim().split(f);t=r;var o=r.length,a=e.length;switch(a){case 0:case 1:var s=0;for(e=0===a?"":e[0]+" ";s<o;++s)t[s]=i(e,t[s],n).trim();break;default:var l=s=0;for(t=[];s<o;++s)for(var u=0;u<a;++u)t[l++]=i(e[u]+" ",r[s],n).trim()}return t}function i(e,t,i){var n=t.charCodeAt(0);switch(33>n&&(n=(t=t.trim()).charCodeAt(0)),n){case 38:return t.replace(g,"$1"+e.trim());case 58:return e.trim()+t.replace(g,"$1"+e.trim());default:if(0<1*i&&0<t.indexOf("\f"))return t.replace(g,(58===e.charCodeAt(0)?"":"$1")+e.trim())}return e+t}function n(e,t,i,o){var a=e+";",s=2*t+3*i+4*o;if(944===s){e=a.indexOf(":",9)+1;var l=a.substring(e,a.length-1).trim();return l=a.substring(0,e).trim()+l+";",1===P||2===P&&r(l,1)?"-webkit-"+l+l:l}if(0===P||2===P&&!r(a,1))return a;switch(s){case 1015:return 97===a.charCodeAt(10)?"-webkit-"+a+a:a;case 951:return 116===a.charCodeAt(3)?"-webkit-"+a+a:a;case 963:return 110===a.charCodeAt(5)?"-webkit-"+a+a:a;case 1009:if(100!==a.charCodeAt(4))break;case 969:case 942:return"-webkit-"+a+a;case 978:return"-webkit-"+a+"-moz-"+a+a;case 1019:case 983:return"-webkit-"+a+"-moz-"+a+"-ms-"+a+a;case 883:if(45===a.charCodeAt(8))return"-webkit-"+a+a;if(0<a.indexOf("image-set(",11))return a.replace(C,"$1-webkit-$2")+a;break;case 932:if(45===a.charCodeAt(4))switch(a.charCodeAt(5)){case 103:return"-webkit-box-"+a.replace("-grow","")+"-webkit-"+a+"-ms-"+a.replace("grow","positive")+a;case 115:return"-webkit-"+a+"-ms-"+a.replace("shrink","negative")+a;case 98:return"-webkit-"+a+"-ms-"+a.replace("basis","preferred-size")+a}return"-webkit-"+a+"-ms-"+a+a;case 964:return"-webkit-"+a+"-ms-flex-"+a+a;case 1023:if(99!==a.charCodeAt(8))break;return"-webkit-box-pack"+(l=a.substring(a.indexOf(":",15)).replace("flex-","").replace("space-between","justify"))+"-webkit-"+a+"-ms-flex-pack"+l+a;case 1005:return h.test(a)?a.replace(d,":-webkit-")+a.replace(d,":-moz-")+a:a;case 1e3:switch(t=(l=a.substring(13).trim()).indexOf("-")+1,l.charCodeAt(0)+l.charCodeAt(t)){case 226:l=a.replace(b,"tb");break;case 232:l=a.replace(b,"tb-rl");break;case 220:l=a.replace(b,"lr");break;default:return a}return"-webkit-"+a+"-ms-"+l+a;case 1017:if(-1===a.indexOf("sticky",9))break;case 975:switch(t=(a=e).length-10,s=(l=(33===a.charCodeAt(t)?a.substring(0,t):a).substring(e.indexOf(":",7)+1).trim()).charCodeAt(0)+(0|l.charCodeAt(7))){case 203:if(111>l.charCodeAt(8))break;case 115:a=a.replace(l,"-webkit-"+l)+";"+a;break;case 207:case 102:a=a.replace(l,"-webkit-"+(102<s?"inline-":"")+"box")+";"+a.replace(l,"-webkit-"+l)+";"+a.replace(l,"-ms-"+l+"box")+";"+a}return a+";";case 938:if(45===a.charCodeAt(5))switch(a.charCodeAt(6)){case 105:return l=a.replace("-items",""),"-webkit-"+a+"-webkit-box-"+l+"-ms-flex-"+l+a;case 115:return"-webkit-"+a+"-ms-flex-item-"+a.replace(S,"")+a;default:return"-webkit-"+a+"-ms-flex-line-pack"+a.replace("align-content","").replace(S,"")+a}break;case 973:case 989:if(45!==a.charCodeAt(3)||122===a.charCodeAt(4))break;case 931:case 953:if(!0===T.test(e))return 115===(l=e.substring(e.indexOf(":")+1)).charCodeAt(0)?n(e.replace("stretch","fill-available"),t,i,o).replace(":fill-available",":stretch"):a.replace(l,"-webkit-"+l)+a.replace(l,"-moz-"+l.replace("fill-",""))+a;break;case 962:if(a="-webkit-"+a+(102===a.charCodeAt(5)?"-ms-"+a:"")+a,211===i+o&&105===a.charCodeAt(13)&&0<a.indexOf("transform",10))return a.substring(0,a.indexOf(";",27)+1).replace(p,"$1-webkit-$2")+a}return a}function r(e,t){var i=e.indexOf(1===t?":":"{"),n=e.substring(0,3!==t?i:10);return i=e.substring(i+1,e.length-1),O(2!==t?n:n.replace(E,"$1"),i,t)}function o(e,t){var i=n(t,t.charCodeAt(0),t.charCodeAt(1),t.charCodeAt(2));return i!==t+";"?i.replace(_," or ($1)").substring(4):"("+t+")"}function a(e,t,i,n,r,o,a,s,u,c){for(var d,h=0,p=t;h<D;++h)switch(d=R[h].call(l,e,p,i,n,r,o,a,s,u,c)){case void 0:case!1:case!0:case null:break;default:p=d}if(p!==t)return p}function s(e){return void 0!==(e=e.prefix)&&(O=null,e?"function"!=typeof e?P=1:(P=2,O=e):P=0),s}function l(e,i){var s=e;if(33>s.charCodeAt(0)&&(s=s.trim()),s=[s],0<D){var l=a(-1,i,s,s,x,k,0,0,0,0);void 0!==l&&"string"==typeof l&&(i=l)}var d=function e(i,s,l,d,h){for(var p,f,g,b,_,S=0,E=0,T=0,C=0,R=0,O=0,L=g=p=0,M=0,F=0,B=0,U=0,V=l.length,z=V-1,H="",j="",q="",G="";M<V;){if(f=l.charCodeAt(M),M===z&&0!==E+C+T+S&&(0!==E&&(f=47===E?10:47),C=T=S=0,V++,z++),0===E+C+T+S){if(M===z&&(0<F&&(H=H.replace(c,"")),0<H.trim().length)){switch(f){case 32:case 9:case 59:case 13:case 10:break;default:H+=l.charAt(M)}f=59}switch(f){case 123:for(p=(H=H.trim()).charCodeAt(0),g=1,U=++M;M<V;){switch(f=l.charCodeAt(M)){case 123:g++;break;case 125:g--;break;case 47:switch(f=l.charCodeAt(M+1)){case 42:case 47:e:{for(L=M+1;L<z;++L)switch(l.charCodeAt(L)){case 47:if(42===f&&42===l.charCodeAt(L-1)&&M+2!==L){M=L+1;break e}break;case 10:if(47===f){M=L+1;break e}}M=L}}break;case 91:f++;case 40:f++;case 34:case 39:for(;M++<z&&l.charCodeAt(M)!==f;);}if(0===g)break;M++}switch(g=l.substring(U,M),0===p&&(p=(H=H.replace(u,"").trim()).charCodeAt(0)),p){case 64:switch(0<F&&(H=H.replace(c,"")),f=H.charCodeAt(1)){case 100:case 109:case 115:case 45:F=s;break;default:F=I}if(U=(g=e(s,F,g,f,h+1)).length,0<D&&(_=a(3,g,F=t(I,H,B),s,x,k,U,f,h,d),H=F.join(""),void 0!==_&&0===(U=(g=_.trim()).length)&&(f=0,g="")),0<U)switch(f){case 115:H=H.replace(w,o);case 100:case 109:case 45:g=H+"{"+g+"}";break;case 107:g=(H=H.replace(m,"$1 $2"))+"{"+g+"}",g=1===P||2===P&&r("@"+g,3)?"@-webkit-"+g+"@"+g:"@"+g;break;default:g=H+g,112===d&&(j+=g,g="")}else g="";break;default:g=e(s,t(s,H,B),g,d,h+1)}q+=g,g=B=F=L=p=0,H="",f=l.charCodeAt(++M);break;case 125:case 59:if(1<(U=(H=(0<F?H.replace(c,""):H).trim()).length))switch(0===L&&(p=H.charCodeAt(0),45===p||96<p&&123>p)&&(U=(H=H.replace(" ",":")).length),0<D&&void 0!==(_=a(1,H,s,i,x,k,j.length,d,h,d))&&0===(U=(H=_.trim()).length)&&(H="\0\0"),p=H.charCodeAt(0),f=H.charCodeAt(1),p){case 0:break;case 64:if(105===f||99===f){G+=H+l.charAt(M);break}default:58!==H.charCodeAt(U-1)&&(j+=n(H,p,f,H.charCodeAt(2)))}B=F=L=p=0,H="",f=l.charCodeAt(++M)}}switch(f){case 13:case 10:47===E?E=0:0===1+p&&107!==d&&0<H.length&&(F=1,H+="\0"),0<D*N&&a(0,H,s,i,x,k,j.length,d,h,d),k=1,x++;break;case 59:case 125:if(0===E+C+T+S){k++;break}default:switch(k++,b=l.charAt(M),f){case 9:case 32:if(0===C+S+E)switch(R){case 44:case 58:case 9:case 32:b="";break;default:32!==f&&(b=" ")}break;case 0:b="\\0";break;case 12:b="\\f";break;case 11:b="\\v";break;case 38:0===C+E+S&&(F=B=1,b="\f"+b);break;case 108:if(0===C+E+S+A&&0<L)switch(M-L){case 2:112===R&&58===l.charCodeAt(M-3)&&(A=R);case 8:111===O&&(A=O)}break;case 58:0===C+E+S&&(L=M);break;case 44:0===E+T+C+S&&(F=1,b+="\r");break;case 34:case 39:0===E&&(C=C===f?0:0===C?f:C);break;case 91:0===C+E+T&&S++;break;case 93:0===C+E+T&&S--;break;case 41:0===C+E+S&&T--;break;case 40:if(0===C+E+S){if(0===p)switch(2*R+3*O){case 533:break;default:p=1}T++}break;case 64:0===E+T+C+S+L+g&&(g=1);break;case 42:case 47:if(!(0<C+S+T))switch(E){case 0:switch(2*f+3*l.charCodeAt(M+1)){case 235:E=47;break;case 220:U=M,E=42}break;case 42:47===f&&42===R&&U+2!==M&&(33===l.charCodeAt(U+2)&&(j+=l.substring(U,M+1)),b="",E=0)}}0===E&&(H+=b)}O=R,R=f,M++}if(0<(U=j.length)){if(F=s,0<D&&(void 0!==(_=a(2,j,F,i,x,k,U,d,h,d))&&0===(j=_).length))return G+j+q;if(j=F.join(",")+"{"+j+"}",0!=P*A){switch(2!==P||r(j,2)||(A=0),A){case 111:j=j.replace(y,":-moz-$1")+j;break;case 112:j=j.replace(v,"::-webkit-input-$1")+j.replace(v,"::-moz-$1")+j.replace(v,":-ms-input-$1")+j}A=0}}return G+j+q}(I,s,i,0,0);return 0<D&&(void 0!==(l=a(-2,d,s,s,x,k,d.length,0,0,0))&&(d=l)),"",A=0,k=x=1,d}var u=/^\0+/g,c=/[\0\r\f]/g,d=/: */g,h=/zoo|gra/,p=/([,: ])(transform)/g,f=/,\r+?/g,g=/([\t\r\n ])*\f?&/g,m=/@(k\w+)\s*(\S*)\s*/,v=/::(place)/g,y=/:(read-only)/g,b=/[svh]\w+-[tblr]{2}/,w=/\(\s*(.*)\s*\)/g,_=/([\s\S]*?);/g,S=/-self|flex-/g,E=/[^]*?(:[rp][el]a[\w-]+)[^]*/,T=/stretch|:\s*\w+\-(?:conte|avail)/,C=/([^-])(image-set\()/,k=1,x=1,A=0,P=1,I=[],R=[],D=0,O=null,N=0;return l.use=function e(t){switch(t){case void 0:case null:D=R.length=0;break;default:if("function"==typeof t)R[D++]=t;else if("object"==typeof t)for(var i=0,n=t.length;i<n;++i)e(t[i]);else N=0|!!t}return e},l.set=s,void 0!==e&&s(e),l}},function(e,t,i){"use strict";t.a={animationIterationCount:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1}},function(e){e.exports=JSON.parse('{"a":"/api/v1/prompter"}')},function(e,t,i){var n,r;n=[i(14),i(16)],void 0===(r=function(e,t){return function(e){function t(e,t){return e.w('<div class="small-12 columns large-centered video-prompter-container"><ul class="tabs vpr-tab" data-tab id="scriptTypesId"><li class="tab-title active" id="allVideoScriptsTitle"><a href="#allVideoScripts">').f(t.getPath(!1,["videoPrompter","allScripts"]),t,"h").w('</a></li><li class="tab-title" id="myVideoScriptsTitle"><a href="#myVideoScripts">').f(t.getPath(!1,["videoPrompter","myScripts"]),t,"h").w('</a></li><li class="tab-title" id="sharedScriptsTitle"><a href="#sharedScripts">').f(t.getPath(!1,["videoPrompter","shared"]),t,"h").w('</a></li><a id="refreshPrompterPages" class="refresh"><img src="/svg/refresh.svg"></a>').x(t.get(["can_add_new_scripts"],!1),t,{block:i},{}).w('</ul><div class="tabs-content sf-tab-content" id="scriptListId"><div class="content active" id="allVideoScripts">').h("eq",t,{else:n,block:o},{key:t.getPath(!1,["all_scripts","length"]),value:0},"h").w('</div><div class="content" id="myVideoScripts">').h("eq",t,{else:s,block:u},{key:t.getPath(!1,["my_scripts","length"]),value:0},"h").w('</div><div class="content" id="sharedScripts">').h("eq",t,{else:d,block:p},{key:t.getPath(!1,["shared_scripts","length"]),value:0},"h").w('</div></div><div id="testelement"></div><div class="display-video-prompt hide" id="promptSettingsContainer"><div class="large-12 columns prompt-settings" id="promptPropertiesId"><div class="medium-3 columns font-size text-left right-bar" hv-tooltip="').f(t.getPath(!1,["videoPrompter","propertyHidden"]),t,"h").w('"><h6>').f(t.getPath(!1,["videoPrompter","textSizeChange"]),t,"h").w('</h6><label id="textSizeDecrease" class="minus').x(t.get(["inactive_minus"],!1),t,{block:f},{}).w('"><img src="/svg/minus-ico-white.svg" width="10"></label><label id="textSizeIncrease" class="plus').x(t.get(["inactive_plus"],!1),t,{block:g},{}).w('"><img src="/svg/plus-ico-white.svg" width="10"></label></div><div class="columns medium-3 right-bar linespace-container" hv-tooltip="').f(t.getPath(!1,["videoPrompter","propertyHidden"]),t,"h").w('"><h6>').f(t.getPath(!1,["videoPrompter","lineSpaceChange"]),t,"h").w('</h6><label id="lineSpaceDecrease" class="minus').x(t.get(["inactive_minus_linespace"],!1),t,{block:m},{}).w('"><img src="/svg/minus-ico-white.svg" width="10"></label><label id="lineSpaceIncrease" class="plus').x(t.get(["inactive_plus_linespace"],!1),t,{block:v},{}).w('"><img src="/svg/plus-ico-white.svg" width="10"></label></div><div class="medium-4 columns slider right-bar"><div class="small-5 columns"><h6>').f(t.getPath(!1,["videoPrompter","speedLabel"]),t,"h").w('</h6></div><div class="small-1 columns text-center speed-minus-container ').x(t.get(["inactive_minus_speed"],!1),t,{block:y},{}).w('"><img id="speedDecreaseId" class="minus" src="/svg/minus-ico-white.svg" width="10"></div><div class="small-4 columns text-center speed-slider-container"><span id="speedSliderId" data-min="1" data-max="10" data-value="5" ></span></div><div class="small-1 columns text-center speed-plus-container left ').x(t.get(["inactive_plus_speed"],!1),t,{block:b},{}).w('"><img id="speedIncreaseId" class="plus" src="/svg/plus-ico-white.svg" width="10"></div></div><div class="medium-2 columns"><a id="changeScriptId" class="change-script">').f(t.getPath(!1,["videoPrompter","changeScript"]),t,"h").w('</a></div></div><div class="large-12 columns telepromterColumnContainer" id="telepromterColumnContainer"><div id="teleprompterId" contentEditable="true" class="small-6 small-offset-3 columns video-teleprompter"></div><div id="teleprompterSiblingDiv"></div></div></div></div>')}function i(e,t){return e.w('<a id="addNewScriptFromPrompt" class="hp-border-btn">').f(t.getPath(!1,["videoPrompter","addNewScript"]),t,"h").w("</a>")}function n(e,t){return e.s(t.get(["all_scripts"],!1),t,{block:r},{})}function r(e,t){return e.w('<div class="script-list" id="').f(t.get(["id"],!1),t,"h").w('" data-text="').f(t.get(["script_text"],!1),t,"h").w('">').f(t.get(["title"],!1),t,"h").w("</div>")}function o(e,t){return e.w('<div class="large-12 columns text-center vpr-empty-state"><img class="empty-state-img" src="/svg/teleprompter.svg" width="60"><h4>').f(t.getPath(!1,["videoPrompter","allScriptEmptyStateText"]),t,"h").w("</h4>").x(t.get(["can_add_new_scripts"],!1),t,{block:a},{}).w("</div>")}function a(e,t){return e.w('<a id="addNewScriptFromAllScripts" class="button wiz-primary-btn">').f(t.getPath(!1,["videoPrompter","addNewScript"]),t,"h").w("</a>")}function s(e,t){return e.s(t.get(["my_scripts"],!1),t,{block:l},{})}function l(e,t){return e.w('<div class="script-list" id="').f(t.get(["id"],!1),t,"h").w('" data-text="').f(t.get(["script_text"],!1),t,"h").w('">').f(t.get(["title"],!1),t,"h").w("</div>")}function u(e,t){return e.w('<div class="large-12 columns text-center vpr-empty-state"><img class="empty-state-img" src="/svg/teleprompter.svg" width="60"><h4>').f(t.getPath(!1,["videoPrompter","myScriptEmptyStateText"]),t,"h").w("</h4>").x(t.get(["can_add_new_scripts"],!1),t,{block:c},{}).w("</div>")}function c(e,t){return e.w('<a id="addNewScriptFromMyScripts" class="button wiz-primary-btn">').f(t.getPath(!1,["videoPrompter","addNewScript"]),t,"h").w("</a>")}function d(e,t){return e.s(t.get(["shared_scripts"],!1),t,{block:h},{})}function h(e,t){return e.w('<div class="script-list" id="').f(t.get(["id"],!1),t,"h").w('" data-text="').f(t.get(["script_text"],!1),t,"h").w('">').f(t.get(["title"],!1),t,"h").w("</div>")}function p(e,t){return e.w('<div class="large-12 columns text-center vpr-empty-state"><img class="empty-state-img" src="/svg/teleprompter.svg" width="60"><h4>').f(t.getPath(!1,["videoPrompter","sharedEmptyStateText"]),t,"h").w("</h4></div>")}function f(e,t){return e.w(" in-active")}function g(e,t){return e.w(" in-active")}function m(e,t){return e.w(" in-active")}function v(e,t){return e.w(" in-active")}function y(e,t){return e.w(" in-active")}function b(e,t){return e.w(" in-active")}e.register("templates/wiz/video_prompter",t),t.__dustBody=!0,i.__dustBody=!0,n.__dustBody=!0,r.__dustBody=!0,o.__dustBody=!0,a.__dustBody=!0,s.__dustBody=!0,l.__dustBody=!0,u.__dustBody=!0,c.__dustBody=!0,d.__dustBody=!0,h.__dustBody=!0,p.__dustBody=!0,f.__dustBody=!0,g.__dustBody=!0,m.__dustBody=!0,v.__dustBody=!0,y.__dustBody=!0,b.__dustBody=!0}(e),function(t,i){var n;return e.render("templates/wiz/video_prompter",t,(function(e,t){if("function"==typeof i)try{i(e,t)}catch(e){}if(e)throw e;n=t})),n}}.apply(t,n))||(e.exports=r)},function(e,t,i){var n,r;n=[i(14),i(16)],void 0===(r=function(e,t){return function(e){function t(e,t){return e.w('<div class="small-12 columns large-centered video-prompter-container"><ul class="tabs vpr-tab" data-tab id="scriptTypesId"><li class="tab-title active" id="allVideoScriptsTitle"><a data-tab="allVideoScripts">').f(t.getPath(!1,["videoPrompter","allScripts"]),t,"h").w('</a></li><li class="tab-title" id="myVideoScriptsTitle"><a data-tab="myVideoScripts">').f(t.getPath(!1,["videoPrompter","myScripts"]),t,"h").w('</a></li><li class="tab-title" id="sharedScriptsTitle"><a data-tab="sharedScripts">').f(t.getPath(!1,["videoPrompter","shared"]),t,"h").w("</a></li>").x(t.get(["can_add_new_scripts"],!1),t,{block:i},{}).w('<a id="refreshPrompterPages" class="refresh"><img src="/svg/refresh.svg"></a></ul><div class="tabs-content sf-tab-content" id="scriptListId"><div class="content active" id="allVideoScripts">').h("eq",t,{else:n,block:o},{key:t.getPath(!1,["all_scripts","length"]),value:0},"h").w('</div><div class="content" id="myVideoScripts">').h("eq",t,{else:s,block:u},{key:t.getPath(!1,["my_scripts","length"]),value:0},"h").w('</div><div class="content" id="sharedScripts">').h("eq",t,{else:d,block:p},{key:t.getPath(!1,["shared_scripts","length"]),value:0},"h").w('</div></div><div id="testelement"></div><div class="display-video-prompt hide" id="promptSettingsContainer"><div class="large-12 columns prompt-settings" id="promptPropertiesId"><div class="medium-3 columns font-size text-center right-bar" hv-tooltip="').f(t.getPath(!1,["videoPrompter","propertyHidden"]),t,"h").w('"><h6>').f(t.getPath(!1,["videoPrompter","textSizeChange"]),t,"h").w('</h6><label id="textSizeDecrease" class="minus').x(t.get(["inactive_minus"],!1),t,{block:f},{}).w('"><img src="/svg/minusicon.svg" width="25"></label><label id="textSizeIncrease" class="plus').x(t.get(["inactive_plus"],!1),t,{block:g},{}).w('"><img src="/svg/plusicon.svg" width="25"></label></div><div class="columns medium-3 right-bar linespace-container text-center" hv-tooltip="').f(t.getPath(!1,["videoPrompter","propertyHidden"]),t,"h").w('"><h6>').f(t.getPath(!1,["videoPrompter","lineSpaceChange"]),t,"h").w('</h6><label id="lineSpaceDecrease" class="minus').x(t.get(["inactive_minus_linespace"],!1),t,{block:m},{}).w('"><img src="/svg/minusicon.svg" width="25"></label><label id="lineSpaceIncrease" class="plus').x(t.get(["inactive_plus_linespace"],!1),t,{block:v},{}).w('"><img src="/svg/plusicon.svg" width="25"></label></div><div class="medium-4 columns slider right-bar"><div class="small-5 columns"><h6>').f(t.getPath(!1,["videoPrompter","speedLabel"]),t,"h").w('</h6></div><div class="small-1 columns text-center speed-minus-container ').x(t.get(["inactive_minus_speed"],!1),t,{block:y},{}).w('"><img id="speedDecreaseId" class="minus" src="/svg/minusicon.svg" width="10"></div><div class="small-4 columns text-center speed-slider-container"><span id="speedSliderId" data-min="1" data-max="10" data-value="5" ></span></div><div class="small-1 columns text-center speed-plus-container left ').x(t.get(["inactive_plus_speed"],!1),t,{block:b},{}).w('"><img id="speedIncreaseId" class="plus" src="/svg/plusicon.svg" width="10"></div></div><div class="medium-2 columns text-center"><a id="changeScriptId" class="change-script">').f(t.getPath(!1,["videoPrompter","changeScript"]),t,"h").w('</a></div></div><div class="large-12 columns ').x(t.get(["newRecorderScreen"],!1),t,{else:w,block:_},{}).w(' custom-scroll" id="telepromterColumnContainer"><div id="teleprompterId" contentEditable="true" class="small-6 small-offset-3 columns video-teleprompter"></div><div id="teleprompterSiblingDiv"></div></div></div></div>')}function i(e,t){return e.w('<a id="addNewScriptFromPrompt" class="hp-border-btn">').f(t.getPath(!1,["videoPrompter","addNewScript"]),t,"h").w("</a>")}function n(e,t){return e.s(t.get(["all_scripts"],!1),t,{block:r},{})}function r(e,t){return e.w('<div class="script-list" id="').f(t.get(["id"],!1),t,"h").w('" data-text="').f(t.get(["script_text"],!1),t,"h").w('">').f(t.get(["title"],!1),t,"h").w("</div>")}function o(e,t){return e.w('<div class="large-12 columns text-center vpr-empty-state"><img class="empty-state-img" src="/svg/teleprompter_new.svg" width="60"><h4>').f(t.getPath(!1,["videoPrompter","allScriptEmptyStateText"]),t,"h").w("</h4>").x(t.get(["can_add_new_scripts"],!1),t,{block:a},{}).w("</div>")}function a(e,t){return e.w('<a id="addNewScriptFromAllScripts" class="button wiz-primary-btn">').f(t.getPath(!1,["videoPrompter","addNewScript"]),t,"h").w("</a>")}function s(e,t){return e.s(t.get(["my_scripts"],!1),t,{block:l},{})}function l(e,t){return e.w('<div class="script-list" id="').f(t.get(["id"],!1),t,"h").w('" data-text="').f(t.get(["script_text"],!1),t,"h").w('">').f(t.get(["title"],!1),t,"h").w("</div>")}function u(e,t){return e.w('<div class="large-12 columns text-center vpr-empty-state"><img class="empty-state-img" src="/svg/teleprompter_new.svg" width="60"><h4>').f(t.getPath(!1,["videoPrompter","myScriptEmptyStateText"]),t,"h").w("</h4>").x(t.get(["can_add_new_scripts"],!1),t,{block:c},{}).w("</div>")}function c(e,t){return e.w('<a id="addNewScriptFromMyScripts" class="button wiz-primary-btn">').f(t.getPath(!1,["videoPrompter","addNewScript"]),t,"h").w("</a>")}function d(e,t){return e.s(t.get(["shared_scripts"],!1),t,{block:h},{})}function h(e,t){return e.w('<div class="script-list" id="').f(t.get(["id"],!1),t,"h").w('" data-text="').f(t.get(["script_text"],!1),t,"h").w('">').f(t.get(["title"],!1),t,"h").w("</div>")}function p(e,t){return e.w('<div class="large-12 columns text-center vpr-empty-state"><img class="empty-state-img" src="/svg/teleprompter_new.svg" width="60"><h4>').f(t.getPath(!1,["videoPrompter","sharedEmptyStateText"]),t,"h").w("</h4></div>")}function f(e,t){return e.w(" in-active")}function g(e,t){return e.w(" in-active")}function m(e,t){return e.w(" in-active")}function v(e,t){return e.w(" in-active")}function y(e,t){return e.w(" in-active")}function b(e,t){return e.w(" in-active")}function w(e,t){return e.w("telepromterColumnContainer")}function _(e,t){return e.w("hvteleprompter-column-container")}e.register("templates/wiz/video_prompter_new",t),t.__dustBody=!0,i.__dustBody=!0,n.__dustBody=!0,r.__dustBody=!0,o.__dustBody=!0,a.__dustBody=!0,s.__dustBody=!0,l.__dustBody=!0,u.__dustBody=!0,c.__dustBody=!0,d.__dustBody=!0,h.__dustBody=!0,p.__dustBody=!0,f.__dustBody=!0,g.__dustBody=!0,m.__dustBody=!0,v.__dustBody=!0,y.__dustBody=!0,b.__dustBody=!0,w.__dustBody=!0,_.__dustBody=!0}(e),function(t,i){var n;return e.render("templates/wiz/video_prompter_new",t,(function(e,t){if("function"==typeof i)try{i(e,t)}catch(e){}if(e)throw e;n=t})),n}}.apply(t,n))||(e.exports=r)},function(e,t,i){var n,r;n=[i(14),i(16)],void 0===(r=function(e,t){return function(e){function t(e,t){return e.w('<div class="video-prompter-container"><ul class="tabs vpr-tab" data-tab id="scriptTypesId"><li class="tab-title active" id="allVideoScriptsTitle"><a href="#allVideoScripts">').f(t.getPath(!1,["videoPrompter","allScripts"]),t,"h").w('</a></li><li class="tab-title" id="myVideoScriptsTitle"><a href="#myVideoScripts">').f(t.getPath(!1,["videoPrompter","myScripts"]),t,"h").w('</a></li><li class="tab-title" id="sharedScriptsTitle"><a href="#sharedScripts">').f(t.getPath(!1,["videoPrompter","shared"]),t,"h").w('</a></li><a id="refreshPrompterPages" class="refresh"><img src="').f(t.get(["origin"],!1),t,"h").w('/svg/refresh.svg"></a>').x(t.get(["can_add_new_scripts"],!1),t,{block:i},{}).w('</ul><div class="tabs-content sf-tab-content" id="scriptListId"><div class="content active" id="allVideoScripts">').h("eq",t,{else:n,block:o},{key:t.getPath(!1,["all_scripts","length"]),value:0},"h").w('</div><div class="content" id="myVideoScripts">').h("eq",t,{else:s,block:u},{key:t.getPath(!1,["my_scripts","length"]),value:0},"h").w('</div><div class="content" id="sharedScripts">').h("eq",t,{else:d,block:p},{key:t.getPath(!1,["shared_scripts","length"]),value:0},"h").w('</div></div><div id="testelement"></div><div class="display-video-prompt hide" id="promptSettingsContainer"><div class="prompt-settings" id="promptPropertiesId"><div class="font-size text-left right-bar col-grid-3" hv-tooltip="').f(t.getPath(!1,["videoPrompter","propertyHidden"]),t,"h").w('"><div><h6>').f(t.getPath(!1,["videoPrompter","textSizeChange"]),t,"h").w('</h6></div><label id="textSizeDecrease" class="minus').x(t.get(["inactive_minus"],!1),t,{block:f},{}).w('"><img src="').f(t.get(["origin"],!1),t,"h").w('/svg/minus-ico-white.svg" width="10"></label><label id="textSizeIncrease" class="plus').x(t.get(["inactive_plus"],!1),t,{block:g},{}).w('"><img src="').f(t.get(["origin"],!1),t,"h").w('/svg/plus-ico-white.svg" width="10"></label></div><div class="right-bar linespace-container col-grid-3" hv-tooltip="').f(t.getPath(!1,["videoPrompter","propertyHidden"]),t,"h").w('"><div><h6>').f(t.getPath(!1,["videoPrompter","lineSpaceChange"]),t,"h").w('</h6></div><label id="lineSpaceDecrease" class="minus').x(t.get(["inactive_minus_linespace"],!1),t,{block:m},{}).w('"><img src="/svg/minus-ico-white.svg" width="10"></label><label id="lineSpaceIncrease" class="plus').x(t.get(["inactive_plus_linespace"],!1),t,{block:v},{}).w('"><img src="/svg/plus-ico-white.svg" width="10"></label></div><div class="slider right-bar"><div><h6>').f(t.getPath(!1,["videoPrompter","speedLabel"]),t,"h").w('</h6></div><div class="speed-minus-container"><img id="speedDecreaseId" class="minus" src="').f(t.get(["origin"],!1),t,"h").w('/svg/minus-ico-white.svg" width="10"></div><div class="speed-slider-container"><span id="speedSliderId" data-min="1" data-max="10" data-value="1" ></span></div><div class="speed-plus-container left"><img id="speedIncreaseId" class="plus" src="').f(t.get(["origin"],!1),t,"h").w('/svg/plus-ico-white.svg" width="10"></div></div><div class=""><a id="changeScriptId" class="change-script">').f(t.getPath(!1,["videoPrompter","changeScript"]),t,"h").w('</a></div></div><div class="telepromterColumnContainer" id="telepromterColumnContainer"><div id="teleprompterId" contentEditable="true" class="video-teleprompter"></div><div id="teleprompterSiblingDiv"></div></div></div></div>')}function i(e,t){return e.w('<a id="addNewScriptFromPrompt" class="hp-border-btn">').f(t.getPath(!1,["videoPrompter","addNewScript"]),t,"h").w("</a>")}function n(e,t){return e.s(t.get(["all_scripts"],!1),t,{block:r},{})}function r(e,t){return e.w('<div class="script-list" id="').f(t.get(["id"],!1),t,"h").w('" data-text="').f(t.get(["script_text"],!1),t,"h").w('">').f(t.get(["title"],!1),t,"h").w("</div>")}function o(e,t){return e.w('<div class="vpr-empty-state"><img class="empty-state-img" src="').f(t.get(["origin"],!1),t,"h").w('/svg/teleprompter.svg" width="60"><h4>').f(t.getPath(!1,["videoPrompter","allScriptEmptyStateText"]),t,"h").w("</h4>").x(t.get(["can_add_new_scripts"],!1),t,{block:a},{}).w("</div>")}function a(e,t){return e.w('<a id="addNewScriptFromAllScripts" class="button wiz-primary-btn">').f(t.getPath(!1,["videoPrompter","addNewScript"]),t,"h").w("</a>")}function s(e,t){return e.s(t.get(["my_scripts"],!1),t,{block:l},{})}function l(e,t){return e.w('<div class="script-list" id="').f(t.get(["id"],!1),t,"h").w('" data-text="').f(t.get(["script_text"],!1),t,"h").w('">').f(t.get(["title"],!1),t,"h").w("</div>")}function u(e,t){return e.w('<div class="vpr-empty-state"><img class="empty-state-img" src="').f(t.get(["origin"],!1),t,"h").w('/svg/teleprompter.svg" width="60"><h4>').f(t.getPath(!1,["videoPrompter","myScriptEmptyStateText"]),t,"h").w("</h4>").x(t.get(["can_add_new_scripts"],!1),t,{block:c},{}).w("</div>")}function c(e,t){return e.w('<a id="addNewScriptFromMyScripts" class="button wiz-primary-btn">').f(t.getPath(!1,["videoPrompter","addNewScript"]),t,"h").w("</a>")}function d(e,t){return e.s(t.get(["shared_scripts"],!1),t,{block:h},{})}function h(e,t){return e.w('<div class="script-list" id="').f(t.get(["id"],!1),t,"h").w('" data-text="').f(t.get(["script_text"],!1),t,"h").w('">').f(t.get(["title"],!1),t,"h").w("</div>")}function p(e,t){return e.w('<div class="vpr-empty-state"><img class="empty-state-img" src="').f(t.get(["origin"],!1),t,"h").w('/svg/teleprompter.svg" width="60"><h4>').f(t.getPath(!1,["videoPrompter","sharedEmptyStateText"]),t,"h").w("</h4></div>")}function f(e,t){return e.w(" in-active")}function g(e,t){return e.w(" in-active")}function m(e,t){return e.w(" in-active")}function v(e,t){return e.w(" in-active")}e.register("templates/wiz/sdk_video_prompter",t),t.__dustBody=!0,i.__dustBody=!0,n.__dustBody=!0,r.__dustBody=!0,o.__dustBody=!0,a.__dustBody=!0,s.__dustBody=!0,l.__dustBody=!0,u.__dustBody=!0,c.__dustBody=!0,d.__dustBody=!0,h.__dustBody=!0,p.__dustBody=!0,f.__dustBody=!0,g.__dustBody=!0,m.__dustBody=!0,v.__dustBody=!0}(e),function(t,i){var n;return e.render("templates/wiz/sdk_video_prompter",t,(function(e,t){if("function"==typeof i)try{i(e,t)}catch(e){}if(e)throw e;n=t})),n}}.apply(t,n))||(e.exports=r)},function(e,t,i){var n=i(616),r=0;e.exports=function(e){var t=++r;return n(e)+t}},function(e,t,i){var n,r;n=[i(627),i(632),i(634),i(8)],void 0===(r=function(e,t,i,n){return function(r){var o=!1,a=!1;try{o=HippoVideo.data.api.getProperty("isLessonly"),a=HippoVideo.data.api.getProperty("isPlayer2022")}catch(e){}return o=o||"lessonly"==n.getQueryParams().type||"lessonly"==n.getQueryParams().integration_type,r.isDelivery&&!o&&a?new i(r):r.isDelivery&&!o||r.isNewPlayer?new t(r):new e(r)}}.apply(t,n))||(e.exports=r)},function(e,t,i){"use strict";(function(e){i.d(t,"a",(function(){return C}));i(96),i(186),i(24),i(249),i(56),i(72),i(84),i(113),i(61),i(177),i(52),i(85),i(86),i(140),i(67),i(141);var n=i(99),r=i.n(n),o=i(98),a=i.n(o),s=i(1),l=i.n(s),u=i(0),c=i.n(u),d=i(393),h=i.n(d),p=i(398),f=i.n(p),g=i(7),m=i.n(g),v=i(31),y=i(101),b=i.n(y),w=i(399),_=i(6);function S(e,t){var i="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!i){if(Array.isArray(e)||(i=function(e,t){if(!e)return;if("string"==typeof e)return E(e,t);var i=Object.prototype.toString.call(e).slice(8,-1);"Object"===i&&e.constructor&&(i=e.constructor.name);if("Map"===i||"Set"===i)return Array.from(e);if("Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i))return E(e,t)}(e))||t&&e&&"number"==typeof e.length){i&&(e=i);var n=0,r=function(){};return{s:r,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){i=i.call(e)},n:function(){var e=i.next();return a=e.done,e},e:function(e){s=!0,o=e},f:function(){try{a||null==i.return||i.return()}finally{if(s)throw o}}}}function E(e,t){(null==t||t>e.length)&&(t=e.length);for(var i=0,n=new Array(t);i<t;i++)n[i]=e[i];return n}function T(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,n)}return i}function C(t){var i=this;console.log("SE INIT PROPS ",t.videoPlayerView);var n=t.videoPlayerView,o=t.token,s=t.tokenType,d=t.recorder,p=t.recorderApiModel,g=t.isPersonalisationEnabled,y=t.customColors,E=t.footageUrls,C=t.showSimpleEditor,k=t.projectJson,x=t.integrationType,A=t.onSimpleEditorInitialize,P=Object(u.useState)(d.recordDetails),I=P[0],R=P[1],D=Object(u.useContext)(v.a).recorderInitOptions.edit,O=Object(_.c)(),N=Object(u.useRef)(!1),L=Object(u.useRef)(),M=Object(u.useRef)(k),F=Object(u.useRef)();Object(u.useEffect)(function(){var e=this;if(l()(this,i),!I||!I.asset_id)return d.getRecordDetails().then(function(t){l()(this,e),R(t)}.bind(this)).catch(function(t){l()(this,e),console.log("ERROR IN GETTING RECORD DETAILS ",t)}.bind(this)),function(){l()(this,e),d.cancelGetRecordDetails()}.bind(this)}.bind(this),[d]);var B=function(){if(l()(this,i),I.asset_id){var e={el:L.current,fromSDK:!0,videoPlayerView:n,integration_type:x,assetId:I&&I.asset_id,token:o,tokenType:s,recorder:d,recorderApiModel:p,isBlurEnabled:!0,embeddedDigest:I&&I.delivery_token,isPersonalizationEnabled:g,customColors:y,authoringId:I&&I.authoring_id,footageUrls:E};console.log("SIMPLE EDIT OPTIONS ",e),F.current?(console.log("1"),F.current.initialize(e)):(console.log("2"),F.current=new h.a(e)),A&&A(F.current)}}.bind(this),U=function(){l()(this,i);try{var e={};if(D&&"object"===a()(D)&&null!==D)for(var t in D)!1!==D[t]&&"false"!==D[t]||(e[t]="false");return e}catch(e){return{}}}.bind(this);return Object(u.useEffect)(function(){l()(this,i),L.current&&(L.current.innerHTML+=f()(e.extend(b.a,function(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?T(Object(i),!0).forEach((function(t){r()(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):T(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}({shouldHideTrimTimer:"true",integrationType:x,isAddImageEnabled:!1,canShowPersonalization:g,mfValues:m.a.personalization.defaultMergeFields,origin:O},U()))),N.current=!0,console.log("CONTROLS ADDED >>>",L.current))}.bind(this),[L]),Object(u.useEffect)(function(){l()(this,i),n&&L.current&&I&&N.current&&B()}.bind(this),[n,L,I,N]),Object(u.useEffect)(function(){if(l()(this,i),F.current)if(C){F.current.enable();var e,t=S(L.current.getElementsByClassName("simple-edit-container"));try{for(t.s();!(e=t.n()).done;){e.value.classList.remove("hide")}}catch(e){t.e(e)}finally{t.f()}F.current.height="140px"}else{var n,r=S(L.current.getElementsByClassName("simple-edit-container"));try{for(r.s();!(n=r.n()).done;){n.value.classList.add("hide")}}catch(e){r.e(e)}finally{r.f()}F.current.height="0"}}.bind(this),[C]),Object(u.useEffect)(function(){var e=this;return l()(this,i),M.current=k,k&&F.current&&n&&(setTimeout(function(){l()(this,e),F.current.setProjectJson(k)}.bind(this),300),n.show()),function(){l()(this,e)}.bind(this)}.bind(this),[k]),Object(u.useEffect)(function(){var e=this;l()(this,i),F.current&&n&&M.current&&(setTimeout(function(){l()(this,e),console.log("PROJECT JSON 123",k),F.current.setProjectJson(k)}.bind(this),300),n.show())}.bind(this),[F,n]),c.a.createElement(w.a,{showSimpleEditor:!0,ref:L})}}).call(this,i(11))},function(e,t,i){var n,r;n=[i(2),i(11),i(35),i(8),i(12),i(330),i(649),i(650),i(7),i(48),i(189),i(188),i(117),i(651),i(238),i(652),i(726),i(120),i(115),i(116),i(68),i(713),i(714),i(715),i(357),i(718),i(719),i(97),i(721),i(724)],void 0===(r=function(e,t,i,n,r,o,a,s,l,u,c,d,h,p,f,g,m,v){var y;return d=d.default,r=r.default,a=a.default,m=m.default,s=s.default,i.View.extend({initialize:function(t){y=d.getVideoI18N_v2(),this.$el=t.$el||e(t.el),this.origin=t.fromSDK?window._HVDomain||"https://assets.hippovideo.io":"",this.videoPlayerView=t.videoPlayerView,this.assetId=t.assetId,this.token=t.token,this.tokenType=t.tokenType,this.recorder=t.recorder,this.recorderApiModel=t.recorderApiModel,this.digest=t.digest,this.integrationType=t.integration_type,this.embeddedDigest=t.embeddedDigest,this.isPersonalizationEnabled=t.isPersonalizationEnabled,this.customColors=t.customColors,this.overrideWarnOnExit=t.overrideWarnOnExit,this.isPPR=t.isPPR,this.enabled=!1,this.askReloadConfirmation=!1,this.onBoardRequired=this.isOnBoardRequired(),this.currentSelectedText=void 0,this.currentSelectedSticker=void 0,this.currentSelectedCallout=void 0,this.currentSelectedBlur=void 0,this.showingColorPicker=!1,this.blurPlayInterval=void 0,this.isBlurEnabled=t.isBlurEnabled,this.authoringId=t.authoringId,this.footageUrls=t.footageUrls||{},this.closeImportCallback=t.closeImportCallback||function(){},this.openImportCallback=t.openImportCallback||function(){},this.defaultTextAreaValue=y.simpleEdit.enterTextHere,this.isMac=window.navigator.userAgent.indexOf("Mac")>=0,this.isTicketVideoPreview=t.isTicketViewPreview,this.isAssignmentVideoPreview=t.isAssignmentVideoPreview,this.isTestimonialVideoPreview=t.isTestimonialVideoPreview,this.isGuestRecording=t.isGuestRecording,this.fromQuickRecord=t.fromQuickRecord,this.canInitializeUI=t.initEditUI,this.initSettingModel(),this.brand_colors=[],this.defaultFontValue="timesnewroman",this.brand_font_color="#000000",this.colorPaletteEnabled=t.colorPaletteEnabled,this.isPPR=t.isPPR,this.fontCache={},this.sessionDetails={addedClips:[],primaryVideo:void 0,secondaryVideo:void 0,trimSliderStart:0,trimSliderEnd:0,totalAddedEffects:0},this.stickerSize=[],this.stickers={1:{name:"Smileys",mainId:1124,startId:945,endId:1935},2:{name:"Animals&Nature",mainId:315,startId:286,endId:434},3:{name:"Food&Drink",mainId:932,startId:854,endId:944},4:{name:"Objects",mainId:1947,startId:1936,endId:2134},5:{name:"Travel&Places",mainId:435,startId:435,endId:547},6:{name:"Activity",mainId:829,startId:547,endId:853},7:{name:"Symbols",mainId:2340,startId:2135,endId:2428},8:{name:"Flags",mainId:25,startId:2,endId:285}},this.callouts=n.getAvailableCallouts(),this.calloutsDisplayorder=n.getCalloutDisplayorder(),this.selectPrimaryVideo=this.selectPrimaryVideo.bind(this),this.selectSecondaryVideo=this.selectSecondaryVideo.bind(this),this.userEventStart=this.userEventStart.bind(this),this.userEventStop=this.userEventStop.bind(this),this.selectTrim=this.selectTrim.bind(this),this.selectCrop=this.selectCrop.bind(this),this.selectAddText=this.selectAddText.bind(this),this.selectAddCallouts=this.selectAddCallouts.bind(this),this.selectAddStickers=this.selectAddStickers.bind(this),this.selectAddImage=this.selectAddImage.bind(this),this.hanldeImageAspectRatioChange=this.hanldeImageAspectRatioChange.bind(this),this.deleteImage=this.deleteImage.bind(this),this.changeImageOpacity=this.changeImageOpacity.bind(this),this.addImage=this.addImage.bind(this),this.addPersonalizedImage=this.addPersonalizedImage.bind(this),this.processSelectedImage=this.processSelectedImage.bind(this),this.createNewImage=this.createNewImage.bind(this),this.addWebsiteImageBtn=this.addWebsiteImageBtn.bind(this),this.applyCrop=this.applyCrop.bind(this),this.resetCrop=this.resetCrop.bind(this),this.addEnteredText=this.addEnteredText.bind(this),this.textPropertyChanged=this.textPropertyChanged.bind(this),this.textEditableChanged=this.textEditableChanged.bind(this),this.deleteText=this.deleteText.bind(this),this.addNewSticker=this.addNewSticker.bind(this),this.deleteSticker=this.deleteSticker.bind(this),this.stickerPropertyChanged=this.stickerPropertyChanged.bind(this),this.calloutPropertyChanged=this.calloutPropertyChanged.bind(this),this.deleteCallout=this.deleteCallout.bind(this),this.playerTimeUpdate=this.playerTimeUpdate.bind(this),this.makeVideoResizeableDraggable=this.makeVideoResizeableDraggable.bind(this),this.selectBlur=this.selectBlur.bind(this),this.selectAddBlur=this.selectAddBlur.bind(this),this.deleteBlur=this.deleteBlur.bind(this),this.addNewBlur=this.addNewBlur.bind(this),this.blurPropertyChanged=this.blurPropertyChanged.bind(this),this.blurAreaChanged=this.blurAreaChanged.bind(this),this.handleVideoPlay=this.handleVideoPlay.bind(this),this.handleVideoPause=this.handleVideoPause.bind(this),this.handleVideoSeeked=this.handleVideoSeeked.bind(this),this.newComponentDragged=this.newComponentDragged.bind(this),this.newComponentDropped=this.newComponentDropped.bind(this),this.getReloadConfirmationState=this.getReloadConfirmationState.bind(this),this.checkAndPopulateMf=this.checkAndPopulateMf.bind(this),this.playerResized=this.playerResized.bind(this),this.textBoxResized=this.textBoxResized.bind(this),this.initializeAtwho=this.initializeAtwho.bind(this),this.fontLoaded=this.fontLoaded.bind(this),this.markerSelected=this.markerSelected.bind(this),this.globalKeypress=this.globalKeypress.bind(this),this.initSettingModel=this.initSettingModel.bind(this),this.getBrandingInfoSuccess=this.getBrandingInfoSuccess.bind(this),this.cropResizable=this.videoPlayerView.$el.find(".se-crop-resizable"),this.primaryVideoContainer=this.videoPlayerView.$el.find(".primary-video-container"),this.primaryVideoOverflowContainer=this.videoPlayerView.$el.find(".primary-video-overflow-container"),this.secondaryVideoContainer=this.videoPlayerView.$el.find(".secondary-video-container"),this.secondaryVideoOverflowContainer=this.videoPlayerView.$el.find(".secondary-video-overflow-container"),this.infoText=this.$el.find(".default-control-detail .info-text"),r.initializeJQueryTouchPunch(),this.$el.find(".se-text-properties").unbind("change").bind("change",this.textPropertyChanged),0!=this.canInitializeUI&&this.initializeUI(),e(document).bind("mousedown",{that:this},this.globalClick),this.$el.find(".trim-btn").unbind("click").bind("click",this.selectTrim),this.$el.find(".crop-btn").unbind("click").bind("click",this.selectCrop),this.$el.find(".add-text-btn").unbind("click").bind("click",this.selectAddText),this.$el.find(".add-callouts-btn").unbind("click").bind("click",this.selectAddCallouts),this.$el.find(".add-stickers-btn").unbind("click").bind("click",this.selectAddStickers),this.$el.find(".add-image-btn").unbind("click").bind("click",this.selectAddImage),this.$el.find(".apply-crop").unbind("click").bind("click",this.applyCrop),this.$el.find(".reset-crop").unbind("click").bind("click",this.resetCrop),this.$el.find(".add-text").unbind("click").bind("click",this.addEnteredText),this.videoPlayerView.$el.find(".se-text-editable").unbind("keypress").bind("keypress",this.textEditableChanged),this.videoPlayerView.$el.find(".se-clip-time").unbind("click").bind("click",{that:this},this.showClipTimePop),this.videoPlayerView.$el.find(".timer-input-btn").unbind("click").bind("click",{that:this},this.clipInputButtonClicked),this.videoPlayerView.$el.find(".timer-start-input, .timer-stop-input").unbind("keyup").bind("keyup",{that:this},this.clipInputtyped),this.$el.find(".se-sticker-btn").unbind("click").bind("click",{that:this},this.stickerBtnClicked),this.$el.find(".delete-sticker").unbind("click").bind("click",this.deleteSticker),this.$el.find(".sticker-control").unbind("change").bind("change",{that:this},this.stickerPropertyChanged),this.$el.find(".se-callout-btn").unbind("click").bind("click",{that:this},this.calloutBtnClicked),this.$el.find(".delete-callout").unbind("click").bind("click",this.deleteCallout),this.$el.find(".callout-control").unbind("change").bind("change",{that:this},this.calloutPropertyChanged),this.$el.find(".lock-aspect-ratio").unbind("click").bind("click",{that:this},this.lockAspectRatio),this.$el.find(".sticker-family-container").unbind("click").bind("click",{that:this},this.showStickerFamily),this.$el.find(".callout-scroll-right, .callout-scroll-left").unbind("click").bind("click",{that:this},this.scrollCallouts),this.$el.find(".addtext-input-text").unbind("keyup").bind("keyup",{that:this},this.addTextChanged),this.$el.find(".trim-input-btn").unbind("click").bind("click",{that:this},this.trimInputButtonClicked),this.$el.find(".trim-before-input, .trim-after-input").unbind("keyup").bind("keyup",{that:this},this.trimInputTyped),this.$el.find(".trim-before-time").unbind("click").bind("click",{that:this},this.showTrimBeforePop),this.$el.find(".trim-after-time").unbind("click").bind("click",{that:this},this.showTrimAfterPop),this.$el.find("#blurBtn").unbind("click").bind("click",this.selectAddBlur),this.$el.find("#resizeDragBtn").unbind("click").bind("click",this.makeVideoResizeableDraggable),this.$el.find(".delete-blur").unbind("click").bind("click",this.deleteBlur),this.$el.find("#applyBlur").unbind("click").bind("click",{that:this},this.addNewBlur),this.$el.find(".blur-control").unbind("click").bind("click",this.blurPropertyChanged),this.$el.find("#imageOpacitySlider").unbind("change").bind("change",this.changeImageOpacity),this.$el.find("#imageOpacityInput").unbind("change keyup").bind("change keyup",this.changeImageOpacity),this.$el.find("#imageArLock").unbind("change").bind("change",this.hanldeImageAspectRatioChange),this.$el.find("#deleteImage").unbind("click").bind("click",this.deleteImage),this.$el.find("#addImageBtn").unbind("click").bind("click",this.addImage),this.$el.find("#addPersonalizedImageBtn").unbind("click").bind("click",this.addPersonalizedImage),this.$el.find("#addWebsiteImageBtn").unbind("click").bind("click",this.addWebsiteImageBtn),this.$el.find("#imageOpacitySlider").val(100),!(this.isGuestRecording||this.isTicketVideoPreview||this.isAssignmentVideoPreview||this.isTestimonialVideoPreview||"true"!=e("#isAddImageInVideoEnabled").val())||this.$el.find("#addImageMenuBtn").remove(),this.isTicketVideoPreview&&this.$el.find(".merge-field-container").remove(),document.fonts&&(document.fonts.onloadingdone=this.fontLoaded),this.videoPlayerView.setUpdateHandler(this.playerTimeUpdate),this.videoPlayerView.setPlayPauseHandler(this.handleVideoPlay,!0),this.videoPlayerView.setPlayPauseHandler(this.handleVideoPause,!1),this.videoPlayerView.setSeekedHandler(this.handleVideoSeeked),this.videoPlayerView.setPlayerResizeHandler(this.playerResized),this.userEmail=e("#userEmail").val(),e(document).bind("keydown",{that:this},this.globalKeypress),this.applyCustomColors(),this.addCustomFontStyles(),HippoVideo&&HippoVideo.AppRegistry&&HippoVideo.AppRegistry.isDeepIntg&&HippoVideo.AppRegistry.isPersonalizationEnabled&&e("#addTextBtn").hide()},initSettingModel:function(){var e=this;this.settingModel=new c({settingTabName:l.wizSetting.BRANDING});var t={};try{if(HippoVideo&&HippoVideo.data&&HippoVideo.data.api&&HippoVideo.data.api.getProperty&&""!=HippoVideo.data.api.getProperty("userEmail"))t={authentication_token:HippoVideo.data.api.getProperty("authToken"),email:encodeURIComponent(HippoVideo.data.api.getProperty("userEmail"))},this.settingModel.fetch({data:t,success:function(t){e.brand_colors=t.get("info").brand_colors,t.get("info").brand_font&&(e.defaultFontValue=t.get("info").brand_font.toLowerCase().replace(/\s/g,""),e.$el.find(".se-font-selector").val(e.defaultFontValue)),t.get("info").brand_font_color&&(e.brand_font_color=t.get("info").brand_font_color),e.setupSpectrum()}});else if(this.digest||this.recorderApiModel){var i=e.getPageSource();this.recorderApiModel?this.recorderApiModel.getBrandingInfo().then((function(t){e.getBrandingInfoSuccess(t,e)})).catch((function(e){console.error(e)})):this.settingModel.getDigestInfo(this.digest,i,(function(t){e.getBrandingInfoSuccess(t,e)}))}}catch(e){console.error(e)}},getBrandingInfoSuccess:function(e,t){t.brand_colors=e.brand_colors,e.brand_font&&(t.defaultFontValue=e.brand_font.toLowerCase().replace(/\s/g,""),t.$el.find(".se-font-selector").val(t.defaultFontValue)),e.brand_font_color&&(t.brand_font_color=e.brand_font_color),t.setupSpectrum()},getPageSource:function(){return"true"==e("#isTestimonial").val()?"testimonial":e("#isGuestRecording").val()?"guest":"lessonly"==n.getQueryParams().type?"lessonly":"generic_embed"==n.getQueryParams().type?"generic_embed":this.integrationType?this.integrationType:""},resizeHandler:function(){this.mediaContainerResized(this.primaryVideoContainer),this.mediaContainerResized(this.secondaryVideoContainer)},initializeUI:function(){var t=this;this.defaultFontValue="timesnewroman",this.$el.find(".trim-slider").slider({range:!0,min:0,max:1e3,step:1,values:[0,1e3],start:function(){t.unselectAllComponents()},slide:function(e,i){t.$el.find(".trim-control-detail input.sliderValue[data-index=0]").val(i.values[0]),t.$el.find(".trim-control-detail input.sliderValue[data-index=1]").val(1e3-i.values[1]),t.trimChanged(),t.trimSliding(i)},stop:function(e){t.$el.find(".trim-before-container, .trim-after-container").removeClass("trim-hovered"),t.trimChanged()}}),this.cropResizable.resizable({containment:t.videoPlayerView.$el.find(".se-crop-scale"),handles:"n, e, w, s, ne, nw, se, sw",resize:function(e,i){t.cropResized(!0)},stop:function(){t.cropStopped()}}),this.makeVideoContainerResizable(this.primaryVideoContainer,this.$el.find(".primaryvid-control-detail .lock-aspect-ratio").is(":checked")),this.primaryVideoContainer.draggable({scroll:!1,opacity:.9,snap:".hippo-video-player, .se-crop-highlighter",snapMode:"both",snapTolerance:10,start:this.userEventStart,stop:function(){t.unselectAllComponents(),t.userEventStop()}}),this.makeVideoContainerResizable(this.secondaryVideoContainer,this.$el.find(".secondaryvid-control-detail .lock-aspect-ratio").is(":checked")),this.secondaryVideoContainer.draggable({scroll:!1,opacity:.9,snap:".hippo-video-player, .primary-video-container, .se-crop-highlighter",snapMode:"both",snapTolerance:10,start:this.userEventStart,stop:function(){t.unselectAllComponents(),t.userEventStop()}}),e(".primary-video-container, .secondary-video-container").hover((function(){e(".se-components-hover").removeClass("se-components-hover"),e(this).addClass("se-components-hover")}),(function(){e(this).removeClass("se-components-hover")}));var i=n.getFontMap(),r=[];for(var o in i)r.push(o);r=r.sort();for(var a=0;a<r.length;a++){o=r[a];this.$el.find(".se-font-selector").append(e("<option>",{value:o,text:i[o].family,style:"font-family: "+i[o].family+";"})),this.defaultFontValue=i[o].isDefault?o:this.defaultFontValue}this.$el.find(".se-font-selector").val(this.defaultFontValue),this.$el.find(".sticker-btn-container").empty();for(var s in this.stickers){var l=this.stickers[s];this.$el.find(".sticker-btn-container").append(p({i:s,mainImg:"https://s3.amazonaws.com/hippolms-wiz-static/stickers-preview/s"+l.mainId+".png?v=2"})),this.downloadAndSetStickers(this,s,l.startId,l.endId)}for(var u in this.$el.find(".callout-btn-container").empty(),this.calloutsDisplayorder){s=this.calloutsDisplayorder[u];var c=document.createElement("img");e(c).addClass("se-callout-btn"),c.id="se-callout-btn-"+s,c.src="https://s3.amazonaws.com/hippolms-wiz-static/callouts/c"+s+".png?v=2",c.crossOrigin="Anonymous",this.$el.find(".callout-btn-container").append(c),this.findCalloutSize(s)}this.$el.find(".se-callout-btn").draggable({scroll:!1,helper:"clone",revert:"invalid",revertDuration:100,start:this.newComponentDragged,stop:this.newComponentDropped}),this.$el.find(".se-sticker-btn").draggable({scroll:!1,appendTo:"body",stack:".se-sticker-btn",helper:"clone",revert:"invalid",revertDuration:100,start:this.newComponentDragged,stop:this.newComponentDropped}),this.videoPlayerView.$el.find(".se-crop-resizable").droppable({accept:".se-sticker-btn, .se-callout-btn",drop:function(e,i){t.componentDropped(i.draggable[0].id,e.pageX-t.videoPlayerView.$el.find(".se-crop-scale").offset().left-40,e.pageY-t.videoPlayerView.$el.find(".se-crop-scale").offset().top-40)}}),this.videoPlayerView.$el.find(".se-clip-time").resizable({containment:e(".components-time-container"),handles:"e, w",resize:function(e,t){},stop:function(){t.onClipTimeChangeHandler(),t.updateTimeFromClipToPopup(t)}});var d=this.$el.find(".addtext-control-detail .color-picker .sp-replacer"),h=document.createElement("div");e(h).addClass("text-color-picker"),e(h).text("A"),e(d).prepend(h),this.$el.find(".se-font-selector").select2({minimumResultsForSearch:-1,theme:"hippocategory",width:"element",dropdownCssClass:"et-dropdown-css",templateResult:function(t,i){return t.element&&e(i)[0].style.setProperty("font-family",e(t.element).css("font-family"),"important"),t.text}}),this.$el.find(".se-fontsize-selector").select2({minimumResultsForSearch:-1,theme:"hippocategory"}),this.isPersonalizationEnabled&&(this.$el.find("#seMfSelector").select2({tags:!0,multiple:!1,theme:"hippocategory",templateResult:function(t,i){return t.element&&e(i).addClass("selection-in-blue"),t.text}}),this.mfValues=["{Email}","{First Name}","{Last Name}","{Country}","{City}","{Phone Number}","{Company Name}","{Title}","{State}","{Address}"],this.$el.find("#seMfSelector").on("change",{that:this},this.handleMfChange)),this.$el.find(".se-textalign-selector").select2({minimumResultsForSearch:-1,dropdownAutoWidth:!0,theme:"hippocategory",templateSelection:function(e){return'<img width="10" src="'+(this.origin+"/svg/text-"+e.id+"-align.svg")+'"/>'},templateResult:function(e){return e.id||(e.id="center"),'<img width="10" style="margin-right:5px" src="'+(this.origin+"/svg/text-"+e.id+"-align.svg")+'"/>'+e.text},escapeMarkup:function(e){return e}}).next(".select2-container").addClass("textalign-select2"),this.$el.find(".select2-selection__rendered").removeAttr("title"),this.disable(),this.cropResized(!1),this.enableBlurForPlayer()},setupSpectrum:function(){e(".sp-container").remove();var t=this,i={showInput:!0,preferredFormat:"rgb",clickoutFiresChange:!0,chooseText:"set",color:t.brand_font_color,show:function(){t.showingColorPicker=!0,e(".seColorContainer").length>0&&e(".seColorContainer")[0].scrollIntoView({block:"end",behavior:"smooth"})},hide:function(){t.showingColorPicker=!1},move:function(){t._previewColorChange()},change:function(){t._handleColorChange(),t.showingColorPicker=!1},containerClassName:"seColorContainer"};if(this.brand_colors&&this.brand_colors.length>0){var n=s.getPaletteConfig(this.brand_colors,"seColorContainer",this.colorPaletteEnabled);i=Object.assign(i,n)}this.$el.find(".se-color-selector").spectrum(i)},_previewColorChange:function(){if(this.currentSelectedText){var t=this.$el.find(".addtext-control-detail .se-color-choose").spectrum("get").toHexString();e("#se-component-"+this.currentSelectedText+" .text-el-line").css("color",t)}},_handleColorChange:function(){this.setTextColorInClip()},setTextColorInClip:function(){if(this.currentSelectedText){var e=this.getClipOf(this.currentSelectedText);e&&(e.properties.color=this.$el.find(".addtext-control-detail .se-color-choose").spectrum("get").toHexString(),this.updateProjectJson(),this.reconstructUI())}},downloadAndSetStickers:function(t,i,n,r){if(!(n>=r)){var o=document.createElement("img");e(o).addClass("se-sticker-btn"),o.id="se-sticker-btn-"+n,o.src="https://s3.amazonaws.com/hippolms-wiz-static/stickers-all/transparent.png?v=2";var a=(n-2)%50*-20,s=-20*Math.floor((n-2)/50);o.style.background="url('https://s3.amazonaws.com/hippolms-wiz-static/stickers-all/stickers_all.png?v=2') "+a+"px "+s+"px",t.$el.find(".sticker-family-container-"+i+" .sticker-family-all").append(o),t.findStickerSize(n),e(o).unbind("click").bind("click",{that:t},t.stickerBtnClicked),setTimeout((function(){t.downloadAndSetStickers(t,i,n+1,r)}),10)}},enable:function(){this.enabled=!0;try{HippoVideo.data.api.getProperty("isTrimEnabled")&&this.$el.find(".simple-edit-buttons-box").hide()}catch(e){}this.primaryVideoContainer.css("z-index","100"),this.secondaryVideoContainer.css("z-index","101"),this.videoPlayerView.setSimpleEditMode(!0),this.unselectAllControls(),this.videoPlayerView.$el.find(".se-crop-highlighter").css({background:"rgba(72, 72, 72, 0.97)","z-index":"108"}),this.videoPlayerView.$el.css("overflow","visible"),this.videoPlayerView.$el.find(".se-crop-scale").css({top:"0px",left:"0px"}),this.scaleElement(this.videoPlayerView.$el.find(".se-crop-scale"),1,1,0,0),e("#previewPageLeft").addClass("simple-edit-top-pad"),e(".body-wiz").addClass("tmp-body-wiz").removeClass("body-wiz"),e(".tmp-body-wiz").css("margin-top","105px"),e(".tmp-body-wiz").animate({marginTop:"0px"},200),this.videoPlayerView.$el.find(".thumbnail-container").hide(),this.videoPlayerView.$el.find(".play-btn-container").fadeOut(100),this.videoPlayerView.$el.find(".player-touch-guard").hide(),this.snapshot={},this.snapshot.projectJson=n.naiveClone(this.projectJson),this.snapshot.trimSliderStart=this.sessionDetails.trimSliderStart,this.snapshot.trimSliderEnd=this.sessionDetails.trimSliderEnd,this.snapshot.addedClips=n.naiveClone(this.sessionDetails.addedClips),this.cropResizable.removeClass("disp-none").addClass("disp-show"),this.snapshot.crop={x:this.cropResizable.position().left,y:this.cropResizable.position().top,w:this.cropResizable.width(),h:this.cropResizable.height()},this.cropResizable.removeClass("disp-show").addClass("disp-none"),this.onBoardRequired?(this.onBoardRequired=!1,this.onBoardUser()):(this.$el.find(".default-control-detail").show(),this.infoText.html(" ")),this.reconstructUI(),this.videoPlayerView.resizePlayerForWindow(),this.$el.find("#trimBtn").length>0?this.selectTrim():this.$el.find(".simple-edit-buttons-box .wiz-simple-edit-btn").first().click(),!1===this.overrideWarnOnExit&&(window.onbeforeunload=function(){return"Please save before you close!!"}),this.prefetchAssetsForSimpleEdit()},save:function(){this.disable(),this.disabled(),this.projectJson.simpleEdit=!0,this.projectJson.seSessionDetails=this.sessionDetails,this.renderVideo()},renderVideo:function(){var e=this;this.recorder?this.recorder.renderVideo({assetId:this.assetId,projectJson:this.getIOAdjustedProjectJSON(),renderFrom:"simple_edit"}).then((function(){n.trackInDB("SE-Save",e.userEmail),e.isPPR&&e._getVideoModel().urgent_videos([e.assetId],(function(){o.trigger("remountCtaActions")}))})).catch((function(e){console.error(err)})):this._getVideoModel().mergeAndRender(this.assetId,this.getIOAdjustedProjectJSON(),"simple_edit",this.digest,(function(t){n.trackInDB("SE-Save",e.userEmail),e.isPPR&&e._getVideoModel().urgent_videos([e.assetId],(function(){o.trigger("remountCtaActions")}))}),(function(e){console.log("error ",e)}))},cancel:function(){this.cancelCrop(),this.disable(),this.projectJson=this.snapshot.projectJson,this.sessionDetails.trimSliderStart=this.snapshot.trimSliderStart,this.sessionDetails.trimSliderEnd=this.snapshot.trimSliderEnd,this.sessionDetails.addedClips=this.snapshot.addedClips;var e=this;this.reconstructUI(!0,(function(){e.disabled()}))},disable:function(){this.enabled=!1,this.unselectAllComponents(),this.unselectAllControls(),this.primaryVideoContainer.css("z-index","0"),this.primaryVideoContainer.resizable({disabled:!0}),this.primaryVideoContainer.draggable({disabled:!0}),this.secondaryVideoContainer.css("z-index","0"),this.secondaryVideoContainer.resizable({disabled:!0}),this.secondaryVideoContainer.draggable({disabled:!0}),this.videoPlayerView.setSimpleEditMode(!1),this.videoPlayerView.$el.find(".player-border").fadeOut(),this.videoPlayerView.$el.find(".player-touch-guard").show(),e(".tmp-body-wiz").animate({marginTop:"0px"},200,(function(){e(".tmp-body-wiz").addClass("body-wiz").removeClass("tmp-body-wiz")})),this.askReloadConfirmation=!1,!1===this.overrideWarnOnExit&&(window.onbeforeunload=void 0)},disabled:function(){this.cropResizable.removeClass("disp-none").addClass("disp-show"),null!=this.projectJson.crop&&this.cropResizable.css({left:this.getValueForPlayer(this.projectJson.crop.x,!0)+"px",top:this.getValueForPlayer(this.projectJson.crop.y,!1)+"px",width:this.getValueForPlayer(this.projectJson.crop.w,!0)+"px",height:this.getValueForPlayer(this.projectJson.crop.h,!1)+"px"}),this.cropResizable.removeClass("disp-show").addClass("disp-none"),this.reconstructUI(),this.cropResized(!1,!1),this.cropResizable.removeClass("disp-none").addClass("disp-show"),this.videoPlayerView.$el.find(".se-text-component, .se-image-component").draggable({disabled:!0}),this.videoPlayerView.$el.find(".se-text-component").unbind("click"),this.videoPlayerView.$el.find(".se-text-component").css({"user-select":"none",cursor:"default"}),this.videoPlayerView.$el.find(".se-crop-highlighter").css({background:"black","z-index":"200"}),this.videoPlayerView.$el.css("overflow","hidden");var e=this.cropResizable.height(),t=this.cropResizable.width(),i=this.videoPlayerView.$el.width(),n=this.videoPlayerView.$el.height(),r=i/t,o=n/e;if(r*e>n){var a=this.cropResizable.position().top,s=i/2-t*o/2-this.cropResizable.position().left;this.videoPlayerView.$el.find(".se-crop-scale").css("top",-a+"px"),this.scaleElement(this.videoPlayerView.$el.find(".se-crop-scale"),o,o,this.cropResizable.position().left,a),this.videoPlayerView.$el.find(".se-crop-scale").css("left",s+"px")}else{a=n/2-e*r/2-this.cropResizable.position().top,s=this.cropResizable.position().left;this.videoPlayerView.$el.find(".se-crop-scale").css("left",-s+"px"),this.scaleElement(this.videoPlayerView.$el.find(".se-crop-scale"),r,r,s,this.cropResizable.position().top),this.videoPlayerView.$el.find(".se-crop-scale").css("top",a+"px")}this.cropResizable.removeClass("disp-show").addClass("disp-none")},setProjectJson:function(e){if(this.projectJson=e,window.projectJson=this.projectJson,this.projectJson.simpleEdit=!0,null!=this.projectJson.seSessionDetails)this.sessionDetails=this.projectJson.seSessionDetails;else{this.sessionDetails.totalCreatedClips=this.projectJson.clips.length;for(var t=!1,i=0;i<this.projectJson.clips.length;i++){"webcam"==(s=this.projectJson.clips[i]).footage.type&&!0,"screenrecord"==s.footage.type&&(t=!0)}var n=-1,r=[],o=JSON.parse(JSON.stringify(this.projectJson.clips||[]));for(i=0;i<this.projectJson.clips.length;i++){(s=o[i]).properties.xposRaw=this.getValueForPlayer(s.properties.xpos,!0),s.properties.yposRaw=this.getValueForPlayer(s.properties.ypos,!1),s.properties.widthRaw=this.getValueForPlayer(s.properties.width,!0),s.properties.heightRaw=this.getValueForPlayer(s.properties.height,!1),"screenrecord"!=s.footage.type&&"webcam"!=s.footage.type||(n=-1==n?s.footage.duration:Math.min(n,s.footage.duration),r.push(s.footage)),s.footage.containsVideo&&("screenrecord"==s.footage.type||"webcam"==s.footage.type&&!t?(this.sessionDetails.primaryVideo=s.id,this.sessionDetails.totalAddedEffects=(s.effects||[]).length):"webcam"==s.footage.type&&(this.sessionDetails.secondaryVideo=s.id))}for(var i in r)r[i].duration=n}for(i=0;i<this.projectJson.clips.length;i++){var s=this.projectJson.clips[i];this.isImageComponent(s.id)&&("image"==s.footage.type?s.footage.src=this.footageUrls[Number(s.footage.id)]:s.footage.src=a.getMfImage(s.footage.image_id?s.footage.image_id:s.footage.id,s.footage.is_website?"website":"image"))}this.cropResizable.removeClass("disp-none").addClass("disp-show"),null!=this.projectJson.crop&&this.cropResizable.css({left:this.getValueForPlayer(this.projectJson.crop.x,!0)+"px",top:this.getValueForPlayer(this.projectJson.crop.y,!1)+"px",width:this.getValueForPlayer(this.projectJson.crop.w,!0)+"px",height:this.getValueForPlayer(this.projectJson.crop.h,!1)+"px"}),this.cropResizable.removeClass("disp-show").addClass("disp-none"),null==this.sessionDetails.secondaryVideo&&this.secondaryVideoContainer.hide(),this.reconstructUI(),this.cropResized(!1,!1),this.enabled||this.disabled()},mediaContainerResized:function(e){var t=e.find("video");0==t.length&&(t=e.find("img"));var i=e.width()/t.width(),n=e.height()/t.height();t.css("height",""),this.scaleElement(t,i,n)},scaleElement:function(e,t,i,n,r){e.css({"-ms-transform":"scale("+t+","+i+")","-webkit-transform":"scale("+t+","+i+")",transform:"scale("+t+","+i+")","-ms-transform-origin:":null==n?"top left":n+"px "+r+"px","-webkit-transform-origin":null==n?"top left":n+"px "+r+"px","transform-origin":null==n?"top left":n+"px "+r+"px"})},globalClick:function(t){HippoVideo&&HippoVideo.AppRegistry&&HippoVideo.AppRegistry.isDeepIntg&&("saveTextEdit"!==t.target.id&&"cancelTextEdit"!==t.target.id||e("#"+t.target.id).is(":visible")&&e("#"+t.target.id).click());var i=t.data.that;i.enabled&&(i.currentSelectedText,0!=i.videoPlayerView.$el.find(".se-text-editable").has(e(t.target)).length||0!=i.videoPlayerView.$el.find(".se-text-component").has(e(t.target)).length||e(t.target).hasClass("se-text-component")||e(t.target).hasClass("se-text-editable")||null==i.currentSelectedText||e(t.target).parent().hasClass("atwho-view-ul")||(i.textEditableChanged(),i.videoPlayerView.$el.find(".se-text-editable").is(":visible")?i.closeTextEditable():0==i.$el.find(".addtext-control-detail").has(e(t.target)).length&&0==i.videoPlayerView.$el.find(".player-controls-container").has(e(t.target)).length&&0==e(".sp-picker-container").has(e(t.target)).length&&0==e(".sp-palette-container").has(e(t.target)).length&&(console.log("HERE!!!!!!!!"),i.unselectText())),0!=i.$el.has(e(t.target)).length||0!=i.videoPlayerView.$el.has(e(t.target)).length||i.showingColorPicker||e(t.target).parent().hasClass("atwho-view-ul")||i.unselectAllComponents(),0==i.$el.find(".sticker-family-container").has(e(t.target)).length&&i.$el.find(".sticker-family-all").hide(),!e(t.target).hasClass("trim-before-pop")&&0==i.$el.find(".trim-before-pop").has(e(t.target)).length&&i.$el.find(".trim-before-pop").is(":visible")&&i.$el.find(".trim-before-pop").fadeOut(100),!e(t.target).hasClass("trim-after-pop")&&0==i.$el.find(".trim-after-pop").has(e(t.target)).length&&i.$el.find(".trim-after-pop").is(":visible")&&i.$el.find(".trim-after-pop").fadeOut(100))},selectPrimaryVideo:function(){this.enabled&&(this.primaryVideoOverflowContainer.css("overflow","visible"),this.primaryVideoContainer.addClass("edit-video-selected").css("z-index","105").resizable("enable"),this.secondaryVideoContainer.removeClass("edit-video-selected").css("z-index","106").resizable("disable"),this.$el.find(".primaryvid-control-detail").show(),this.$el.find(".secondaryvid-control-detail").hide())},selectSecondaryVideo:function(){this.enabled&&(this.secondaryVideoOverflowContainer.css("overflow","visible"),this.secondaryVideoContainer.addClass("edit-video-selected").css("z-index","105").resizable("enable"),this.primaryVideoContainer.removeClass("edit-video-selected").css("z-index","105").resizable("disable"),this.$el.find(".primaryvid-control-detail").hide(),this.$el.find(".secondaryvid-control-detail").show())},makeVideoResizeableDraggable:function(){this.enabled&&(this.isPPR?n.trackInThirdPartyTools("video_preview_Resize_save_isPPR",{email:this.userEmail}):n.trackInThirdPartyTools("video_preview_Resize_save",{email:this.userEmail}),this.unselectAllControls(),this.userEventStart(),this.unselectAllComponents(),this.selectPrimaryVideo(),this.selectControl("resize-draggable-btn"),this.primaryVideoContainer.unbind("mousedown",this.selectPrimaryVideo).bind("mousedown",this.selectPrimaryVideo).draggable("enable"),this.secondaryVideoContainer.unbind("mousedown",this.selectSecondaryVideo).bind("mousedown",this.selectSecondaryVideo).draggable("enable"),this.$el.find(".se-resize-control-detail").show())},unselectClips:function(){this.primaryVideoContainer.unbind("mousedown",this.selectPrimaryVideo).resizable({disabled:!0}).draggable({disabled:!0}),this.secondaryVideoContainer.unbind("mousedown",this.selectSecondaryVideo).resizable({disabled:!0}).draggable({disabled:!0}),this.$el.find(".se-resize-control-detail, .primaryvid-control-detail, .secondaryvid-control-detail").hide(),this.primaryVideoOverflowContainer.css("overflow","hidden"),this.secondaryVideoOverflowContainer.css("overflow","hidden"),this.primaryVideoContainer.css("z-index","100"),this.secondaryVideoContainer.css("z-index","101"),e(".edit-video-selected").removeClass("edit-video-selected")},userEventStart:function(){this.videoPlayerView.$el.find(".player-border").fadeIn()},userEventStop:function(){this.videoPlayerView.$el.find(".player-border").fadeOut(),this.updateProjectJson()},playerResized:function(e){if(null!=this.projectJson&&(this.enabled||(this.videoPlayerView.$el.find(".se-crop-scale").css({top:"0px",left:"0px"}),this.scaleElement(this.videoPlayerView.$el.find(".se-crop-scale"),1,1,0,0)),this.cropResizable.removeClass("disp-none").addClass("disp-show"),null!=this.projectJson.crop&&this.cropResizable.css({left:this.getValueForPlayer(this.projectJson.crop.x,!0)+"px",top:this.getValueForPlayer(this.projectJson.crop.y,!1)+"px",width:this.getValueForPlayer(this.projectJson.crop.w,!0)+"px",height:this.getValueForPlayer(this.projectJson.crop.h,!1)+"px"}),this.cropResizable.removeClass("disp-show").addClass("disp-none"),this.reconstructUI(),this.cropResized(!1,!1),!this.enabled)){this.videoPlayerView.$el.find(".se-crop-resizable").removeClass("disp-none").addClass("disp-show");var t=this.cropResizable.height(),i=this.cropResizable.width(),n=this.videoPlayerView.$el.width(),r=this.videoPlayerView.$el.height(),o=n/i,a=r/t;if(o*t>r){var s=this.cropResizable.position().top,l=n/2-i*a/2-this.cropResizable.position().left;this.videoPlayerView.$el.find(".se-crop-scale").css("top",-s+"px"),this.scaleElement(this.videoPlayerView.$el.find(".se-crop-scale"),a,a,this.cropResizable.position().left,s),this.videoPlayerView.$el.find(".se-crop-scale").css("left",l+"px")}else{s=r/2-t*o/2-this.cropResizable.position().top,l=this.cropResizable.position().left;this.videoPlayerView.$el.find(".se-crop-scale").css("left",-l+"px"),this.scaleElement(this.videoPlayerView.$el.find(".se-crop-scale"),o,o,l,this.cropResizable.position().top),this.videoPlayerView.$el.find(".se-crop-scale").css("top",s+"px")}this.videoPlayerView.$el.find(".se-crop-resizable").removeClass("disp-show").addClass("disp-none"),this.videoPlayerView.resizeFitThumnbail()}},updateProjectJson:function(){if(this.enabled){var t=n.map(this.sessionDetails.trimSliderStart,0,1e3,0,this.videoPlayerView.mediaPlayer.duration),i=n.map(this.sessionDetails.trimSliderEnd,0,1e3,0,this.videoPlayerView.mediaPlayer.duration);if(n.isNumber(t)&&n.isNumber(i))for(var r=0;r<this.projectJson.clips.length;r++){var o=this.projectJson.clips[r];if(this.updateClipPropertiesForProjectJSON(o,t,i),o.id===this.sessionDetails.primaryVideo)for(var a=o.effects||[],s=0;s<a.length;s++)this.updateClipPropertiesForProjectJSON(a[s],t,i)}var l=this.cropResizable.is(":visible");this.cropResizable.removeClass("disp-none").addClass("disp-show"),this.projectJson.crop={x:this.getValueForProject(this.cropResizable.position().left,!0),y:this.getValueForProject(this.cropResizable.position().top,!1),w:Math.min(this.getValueForProject(this.cropResizable.width(),!0),this.projectJson.canvasWidth),h:Math.min(this.getValueForProject(this.cropResizable.height(),!1),this.projectJson.canvasHeight)},l||this.cropResizable.removeClass("disp-show").addClass("disp-none");for(r=0;r<this.projectJson.clips.length;r++){a=(o=this.projectJson.clips[r]).effects||[];null!=this.sessionDetails.primaryVideo&&o.id==this.sessionDetails.primaryVideo&&(o.properties.widthRaw=this.primaryVideoContainer.width(),o.properties.heightRaw=this.primaryVideoContainer.height(),o.properties.xposRaw=this.primaryVideoContainer.position().left,o.properties.yposRaw=this.primaryVideoContainer.position().top,o.properties.width=this.getValueForProject(o.properties.widthRaw,!0),o.properties.height=this.getValueForProject(o.properties.heightRaw,!1),o.properties.xpos=this.getValueForProject(o.properties.xposRaw,!0),o.properties.ypos=this.getValueForProject(o.properties.yposRaw,!1)),null!=this.sessionDetails.secondaryVideo&&o.id==this.sessionDetails.secondaryVideo&&(o.properties.widthRaw=this.secondaryVideoContainer.width(),o.properties.heightRaw=this.secondaryVideoContainer.height(),o.properties.xposRaw=this.secondaryVideoContainer.position().left,o.properties.yposRaw=this.secondaryVideoContainer.position().top,o.properties.width=this.getValueForProject(o.properties.widthRaw,!0),o.properties.height=this.getValueForProject(o.properties.heightRaw,!1),o.properties.xpos=this.getValueForProject(o.properties.xposRaw,!0),o.properties.ypos=this.getValueForProject(o.properties.yposRaw,!1)),-1!==this.sessionDetails.addedClips.indexOf(o.id)&&o.footage.containsImage&&(e("#se-component-"+o.id).length>0?(o.properties.xposRaw=e("#se-component-"+o.id).position().left,o.properties.yposRaw=e("#se-component-"+o.id).position().top,o.properties.widthRaw=e("#se-component-"+o.id).width(),o.properties.heightRaw=e("#se-component-"+o.id).height(),o.properties.xpos=this.getValueForProject(o.properties.xposRaw,!0),o.properties.ypos=this.getValueForProject(o.properties.yposRaw,!1),o.properties.width=this.getValueForProject(o.properties.widthRaw,!0),o.properties.height=this.getValueForProject(o.properties.heightRaw,!1)):console.warn("not drawn#se-component-"+o.id)),o.footage.containsText&&(null==o.properties.fontSizeProject&&(o.properties.fontSizeProject=this.getValueForProject(o.properties.fontSize,!0)),o.properties.boundingBoxRaw&&(o.properties.boundingBox=this.getBoundingBoxForProject(o.properties.boundingBoxRaw)))}}},updateClipPropertiesForProjectJSON:function(e,t,i){null!=e.startFrom&&null!=e.endAt?(e.position=e.startFrom-t,0==e.position&&(e.position=.001),e.position>this.videoPlayerView.mediaPlayer.duration-i?e.deleted=!0:e.deleted=!1,e.end=e.endAt-e.startFrom,e.endAt>this.videoPlayerView.mediaPlayer.duration-i&&(e.end=this.videoPlayerView.mediaPlayer.duration-i-e.startFrom),e.end=Math.max(.02,e.end),e.start=0):(e.start=t,e.end=(e.footage?e.footage.duration:e.duration)-i,e.end<e.start&&(e.end=e.start))},reconstructUI:function(t,i){if(this.projectJson){var r=this.videoPlayerView.$el.width()/this.projectJson.canvasWidth,o=this.videoPlayerView.$el.height()/this.projectJson.canvasHeight,a=this,s=!1,l=this.videoPlayerView.$el.find(".se-components-container");l.empty();var u=function(){a.resizeHandler(),i&&!s&&(s=!0,i())};void 0===this.sessionDetails.primaryVideo&&void 0===this.sessionDetails.secondaryVideo&&this.updateProjectJson();var c=n.map(this.sessionDetails.trimSliderStart,0,1e3,0,this.videoPlayerView.mediaPlayer.duration),d=n.map(this.sessionDetails.trimSliderEnd,0,1e3,0,this.videoPlayerView.mediaPlayer.duration);n.isNumber(c)&&n.isNumber(d)&&this.videoPlayerView.trim(c,d,!0);for(var h=JSON.parse(JSON.stringify(this.projectJson.clips||[])),p=0;p<this.projectJson.clips.length;p++){var f=h[p];if(null!=this.sessionDetails.primaryVideo&&f.id==this.sessionDetails.primaryVideo&&this.primaryVideoContainer.animate({width:f.properties.width*r+"px",height:f.properties.height*o+"px",left:f.properties.xpos*r+"px",top:f.properties.ypos*o+"px"},t?200:10,u),null!=this.sessionDetails.secondaryVideo&&f.id==this.sessionDetails.secondaryVideo&&this.secondaryVideoContainer.animate({width:f.properties.width*r+"px",height:f.properties.height*o+"px",left:f.properties.xpos*r+"px",top:f.properties.ypos*o+"px"},t?200:10,u),-1!=this.sessionDetails.addedClips.indexOf(f.id)){a=this;if(f.footage.containsText){(m=document.createElement("div")).id="se-component-"+f.id,e(m).addClass("se-text-component"),f.properties.boundingBox?(f.properties.boundingBoxRaw={x:f.properties.boundingBox.x*r,y:f.properties.boundingBox.y*o,w:f.properties.boundingBox.w*r,h:f.properties.boundingBox.h*o},e(m).css({left:f.properties.boundingBoxRaw.x+"px",top:f.properties.boundingBoxRaw.y+"px",width:f.properties.boundingBoxRaw.w+"px",height:f.properties.boundingBoxRaw.h+"px"})):e(m).css({left:f.properties.xpos*r+"px",top:f.properties.ypos*o+"px"}),this.setTextDraggableContainerSize(m,f,!1);var g=document.createElement("div");e(g).addClass("se-text-container"),this.checkAndPopulateMf(f.properties.text),this.newlineTextToHtml(g,f),e(m).append(g),e(m).append('<span class="se-text-delete">x</span>'),e(m).find(".se-text-delete").bind("click",this.deleteText),e(m).draggable({scroll:!1,opacity:.9,snap:".hippo-video-player, .se-crop-highlighter",snapMode:"both",snapTolerance:10,start:function(e){a.selectText(e.target.id.split("se-component-")[1]),a.userEventStart()},stop:function(){a.textBoxResized(),a.textPropertyChanged(),a.userEventStop()}}),f.footage.calloutId&&e(m).draggable("option","containment","#se-component-"+f.footage.calloutId),e(m).click((function(e){if(!((new Date).getTime()-a.lastTextResizeTime<100)){var t=a.currentSelectedText==e.currentTarget.id.split("se-component-")[1];a.selectText(e.currentTarget.id.split("se-component-")[1]),t&&a.showTextEditable(e.currentTarget.id.split("se-component-")[1])}})),e(m).hover((function(t){a.currentSelectedText!=t.currentTarget.id.split("se-component-")[1]&&(e(".se-components-hover").removeClass("se-components-hover"),e(this).addClass("se-components-hover"))}),(function(t){a.currentSelectedText!=t.currentTarget.id.split("se-component-")[1]&&e(this).removeClass("se-components-hover")})),l.append(m),f.id==this.currentSelectedText&&this.selectText(f.id,!0),this.setLineHeight(f)}else if(f.footage.containsImage){var m=document.createElement("div"),v=document.createElement("img");v.crossOrigin="Anonymous",m.id="se-component-"+f.id,e(m).addClass("se-image-component"),f.footage.id<=-1e4?v.src="https://s3.amazonaws.com/hippolms-wiz-static/callouts/c"+(-f.footage.id-1e4)+".png?v=2":this.isImageComponent(f.id)?v.src=f.footage.src:v.src="https://s3.amazonaws.com/hippolms-wiz-static/stickers/s"+(-f.footage.id-100)+".png?v=2",e(m).css({left:f.properties.xpos*r+"px",top:f.properties.ypos*o+"px",width:f.properties.width*r+"px",height:f.properties.height*o+"px",opacity:f.properties.opacity}),e(m).draggable({scroll:!1,opacity:.9,snap:".hippo-video-player, .se-crop-highlighter",snapMode:"both",snapTolerance:10,drag:function(t){var i=t.target.id.split("se-component-")[1];null==i&&(i=e(t.target).parent()[0].id.split("se-component-")[1]),a.isCalloutImage(i)&&a.calloutDragged()},start:function(t){var i=t.target.id.split("se-component-")[1];if(null==i&&(i=e(t.target).parent()[0].id.split("se-component-")[1]),a.isCalloutImage(i)){a.selectCallout(i);var r=a.getClipOf(i),o=a.getClipOf(r.footage.textId);o&&o.properties.boundingBoxRaw&&(a.calloutTextBoxSpread={x:n.map(o.properties.boundingBoxRaw.x,r.properties.xposRaw,r.properties.xposRaw+r.properties.widthRaw,0,1),y:n.map(o.properties.boundingBoxRaw.y,r.properties.yposRaw,r.properties.yposRaw+r.properties.heightRaw,0,1),w:o.properties.boundingBoxRaw.w/r.properties.widthRaw})}else a.selectSticker(i);a.userEventStart()},stop:function(t){var i=t.target.id.split("se-component-")[1];null==i&&(i=e(t.target).parent()[0].id.split("se-component-")[1]),a.isCalloutImage(i)?(a.calloutDragged(),a.calloutPropertyChanged()):a.stickerPropertyChanged(),a.userEventStop(),a.isCalloutImage(i)?a.unselectCallout():a.unselectSticker()}}),e(m).resizable({handles:"n, e, w, s, ne, nw, se, sw",aspectRatio:f.properties.lockAspectRatio,resize:function(t,i){a.mediaContainerResized(e(t.target));var n=t.target.id.split("se-component-")[1];null==n&&(n=e(t.target).parent()[0].id.split("se-component-")[1]),a.isCalloutImage(n)&&a.calloutResized(n)},start:function(t){var i=t.target.id.split("se-component-")[1];if(null==i&&(i=e(t.target).parent()[0].id.split("se-component-")[1]),a.isCalloutImage(i)){a.selectCallout(i);var r=a.getClipOf(i),o=a.getClipOf(r.footage.textId);o&&o.properties.boundingBoxRaw&&(a.calloutTextBoxSpread={x:n.map(o.properties.boundingBoxRaw.x,r.properties.xposRaw,r.properties.xposRaw+r.properties.widthRaw,0,1),y:n.map(o.properties.boundingBoxRaw.y,r.properties.yposRaw,r.properties.yposRaw+r.properties.heightRaw,0,1),w:o.properties.boundingBoxRaw.w/r.properties.widthRaw})}else a.selectSticker(i);a.userEventStart()},stop:function(t){var i=t.target.id.split("se-component-")[1];null==i&&(i=e(t.target).parent()[0].id.split("se-component-")[1]),a.isCalloutImage(i)?(a.calloutResized(i),a.calloutPropertyChanged()):a.stickerPropertyChanged(),a.userEventStop(),a.setAdaptiveBorderForTarget(e(t.target))}}),this.currentSelectedSticker!=f.id&&this.currentSelectedCallout!=f.id&&e(m).resizable({disabled:!0}),e(m).find(".ui-resizable-handle").css("display",""),e(m).find(".ui-resizable-handle").removeClass("ui-icon ui-icon-gripsmall-diagonal-se"),e(m).click((function(t){var i=t.target.id.split("se-component-")[1];null==i&&(i=e(t.target).parent()[0].id.split("se-component-")[1]),a.isCalloutImage(i)?a.selectCallout(i):a.selectSticker(i)})),e(m).hover((function(){e(".se-components-hover").removeClass("se-components-hover"),e(this).addClass("se-components-hover")}),(function(){e(this).removeClass("se-components-hover")})),e(m).append(v),l.append(m),this.currentSelectedSticker!=f.id&&this.currentSelectedCallout!=f.id||this.setAdaptiveBorderForTarget(e("#se-component-"+f.id)),a.mediaContainerResized(e(m))}}}this.initializeAtwho(),this.applyEffects(),this.resizeHandler(),this.playerTimeUpdate()}},checkAndPopulateMf:function(t){if(this.isPersonalizationEnabled)for(var i,n=0,r=t.indexOf("${",0);-1!=r&&-1!=n;){-1!=(n=t.indexOf("}",r))&&(i=t.substring(r+2,n),this.mfValues.includes("{"+i+"}")||(this.mfValues.push("{"+i+"}"),this.$el.find("#seMfSelector").append(e("<option>"+i+"</option>"))),r=t.indexOf("${",n))}},applyEffects:function(){var t,i=this.getClipOf(this.sessionDetails.primaryVideo),n=this;if(i){var r=i.effects||[],o=this.videoPlayerView.$el.find(".se-effects-components-container");o.empty();for(var a=0;a<r.length;a++){(t=r[a]).xposRaw=this.getValueFromClipPercent(t.xpos,i,!0),t.yposRaw=this.getValueFromClipPercent(t.ypos,i,!1),t.widthRaw=this.getValueFromClipPercent(t.width,i,!0),t.heightRaw=this.getValueFromClipPercent(t.height,i,!1);var s=document.createElement("div");s.id="se-effects-"+t.id,s.className="se-effects",s.style.left=t.xposRaw+"px",s.style.top=t.yposRaw+"px",s.style.width=t.widthRaw+"px",s.style.height=t.heightRaw+"px",e(s).draggable({scroll:!1,opacity:.9,snap:".hippo-video-player, .se-crop-highlighter",snapMode:"both",snapTolerance:10,containment:".primary-video-container",start:function(e){n.selectBlur(e.target.id.split("se-effects-")[1]),n.userEventStart()},stop:function(e){n.blurAreaChanged(),n.userEventStop()}}).resizable({handles:"n, e, w, s, ne, nw, se, sw",aspectRatio:t.lockAspectRatio,containment:".primary-video-container",start:function(t){var i=t.target.id.split("se-effects-")[1];i||(i=e(t.target).parent()[0].id.split("se-effects-")[1]),n.selectBlur(i),n.userEventStart()},stop:function(t){n.blurAreaChanged(),n.userEventStop(),n.setAdaptiveBorderForTarget(e(t.target))}}).mousedown((function(e){n.selectBlur(e.target.id.split("se-effects-")[1]),e.stopPropagation()})),this.currentSelectedBlur!=t.id&&e(s).resizable({disabled:!0}),e(s).find(".ui-resizable-handle").css("display",""),e(s).find(".ui-resizable-handle").removeClass("ui-icon ui-icon-gripsmall-diagonal-se"),o.append(s)}}this.drawBlurLayer()},getValueForPlayer:function(e,t){var i=this.videoPlayerView.$el.width(),r=this.videoPlayerView.$el.height(),o=this.projectJson.canvasWidth,a=this.projectJson.canvasHeight;return t?n.roundNumber(e*(i/o),3):n.roundNumber(e*(r/a),3)},getValueForProject:function(e,t){var i=this.videoPlayerView.$el.width(),r=this.videoPlayerView.$el.height(),o=this.projectJson.canvasWidth,a=this.projectJson.canvasHeight;return t?n.roundNumber(e*(o/i),3):n.roundNumber(e*(a/r),3)},getBoundingBoxForProject:function(e){var t={x:this.getValueForProject(e.x,!0),y:this.getValueForProject(e.y,!1),w:this.getValueForProject(e.w,!0),h:this.getValueForProject(e.h,!1)};return null!=e.topPadding&&(t.topPadding=this.getValueForProject(e.topPadding,!1)),t},getValueForClip:function(e,t,i){var r=t.properties.widthRaw,o=t.properties.heightRaw;return i?n.roundNumber(n.map(e,0,r,0,1),5):n.roundNumber(n.map(e,0,o,0,1),5)},getValueFromClipPercent:function(e,t,i){var r=t.properties.widthRaw,o=t.properties.heightRaw;return i?n.roundNumber(e*r,5):n.roundNumber(e*o,5)},onBoardUser:function(){var t=this;this.unselectAllControls(),this.$el.find(".default-control-detail").show(),this.infoText.html("Resize and Move videos.."),this.secondaryVideoOverflowContainer.css("overflow","visible"),this.secondaryVideoContainer.find(".ui-resizable-handle").hide(),e.when(this.secondaryVideoContainer.find(".ui-resizable-handle").delay(200).fadeIn(300)).done((function(){e.when(t.secondaryVideoContainer.find(".ui-resizable-handle").fadeOut(300)).done((function(){t.secondaryVideoOverflowContainer.css("overflow","hidden"),t.primaryVideoOverflowContainer.css("overflow","visible"),t.primaryVideoContainer.find(".ui-resizable-handle").hide(),e.when(t.primaryVideoContainer.find(".ui-resizable-handle").delay(500).fadeIn(300)).done((function(){e.when(t.primaryVideoContainer.find(".ui-resizable-handle").fadeOut(300)).done((function(){t.secondaryVideoContainer.find(".ui-resizable-handle").css("display",""),t.primaryVideoContainer.find(".ui-resizable-handle").css("display",""),t.unselectClips(),t.onBoardControls()}))}))}))}))},onBoardControls:function(){var e=this;e.highlightControl(".trim-btn","Trim Video to change start and end points..",(function(){e.highlightControl(".crop-btn","Crop video..",(function(){e.highlightControl(".add-text-btn","Add text to video.",(function(){e.highlightControl(".add-callouts-btn","Add callouts to video",(function(){e.highlightControl(".add-stickers-btn","Add your favourite stickers",(function(){e.infoText.html("Lets go!!"),setTimeout((function(){e.infoText.html(" ")}),1500)}))}))}))}))}))},highlightControl:function(e,t,i){var n=this;n.infoText.delay(300).html(t),n.$el.find(e).animate({opacity:.5},200,(function(){n.$el.find(e).delay(700).animate({opacity:1},200,(function(){i&&i()}))}))},unselectAllControls:function(){this.$el.find(".se-control-detail").hide(),this.unselectCrop(),this.unselectClips(),this.videoPlayerView.$el.find(".components-marker-container").empty()},unselectAllComponents:function(){console.log("HERE!!!!!!!! 2"),this.unselectText(),this.unselectSticker(),this.unselectCallout(),this.unselectBlur(),this.primaryVideoOverflowContainer.css("overflow","hidden"),this.secondaryVideoOverflowContainer.css("overflow","hidden")},selectTrim:function(e){null!=e&&(this.askReloadConfirmation=!0),this.isPPR?n.trackInThirdPartyTools("video_preview_Trim_save_isPPR",{email:this.userEmail}):n.trackInThirdPartyTools("video_preview_Trim_save",{email:this.userEmail}),this.unselectAllControls(),this.$el.find(".trim-slider").slider("values",[this.sessionDetails.trimSliderStart,1e3-this.sessionDetails.trimSliderEnd]),this.$el.find(".trim-control-detail").fadeIn(100),this.$el.find(".trim-preview-container, .preview-trim-arrow").hide(),this.updateTrimInput(),this.selectControl("trim-btn"),isFinite(this.videoPlayerView.mediaPlayer.duration)||this.$el.find(".trim-before-container, .trim-after-container").hide()},trimInputButtonClicked:function(t){var i=t.data.that,r=t.target,o=n.map(i.sessionDetails.trimSliderStart,0,1e3,0,i.videoPlayerView.mediaPlayer.duration),a=i.videoPlayerView.mediaPlayer.duration-n.map(i.sessionDetails.trimSliderEnd,0,1e3,0,i.videoPlayerView.mediaPlayer.duration);e.contains(i.$el.find(".trim-before-container")[0],r)?e(r).hasClass("trim-input-btn-minus")?o=Math.max(o-1,0):e(r).hasClass("trim-input-btn-plus")&&(o=Math.min(o+1,i.videoPlayerView.mediaPlayer.duration)):e.contains(i.$el.find(".trim-after-container")[0],r)&&(e(r).hasClass("trim-input-btn-minus")?a=Math.max(a-1,0):e(r).hasClass("trim-input-btn-plus")&&(a=Math.min(a+1,i.videoPlayerView.mediaPlayer.duration))),Math.floor(o)>=Math.floor(a)||(i.$el.find(".trim-before-input").val(n.strToTime(o)),i.$el.find(".trim-after-input").val(n.strToTime(a)),i.trimInputChanged())},trimInputTyped:function(t){var i=t.data.that,r=e(t.target),o=n.map(i.sessionDetails.trimSliderStart,0,1e3,0,i.videoPlayerView.mediaPlayer.duration),a=i.videoPlayerView.mediaPlayer.duration-n.map(i.sessionDetails.trimSliderEnd,0,1e3,0,i.videoPlayerView.mediaPlayer.duration);if(38==t.keyCode||40==t.keyCode){if(t.preventDefault(),38==t.keyCode?r.hasClass("trim-before-input")?o=Math.min(o+1,i.videoPlayerView.mediaPlayer.duration):r.hasClass("trim-after-input")&&(a=Math.min(a+1,i.videoPlayerView.mediaPlayer.duration)):40==t.keyCode&&(r.hasClass("trim-before-input")?o=Math.max(o-1,0):r.hasClass("trim-after-input")&&(a=Math.max(a-1,0))),Math.floor(o)>=Math.floor(a))return;i.$el.find(".trim-before-input").val(n.strToTime(o)),i.$el.find(".trim-after-input").val(n.strToTime(a)),i.trimInputChanged()}else{i=t.data.that;clearTimeout(i.trimInputTypedTimeout),i.trimInputTypedTimeout=setTimeout((function(){i.trimInputChanged()}),500)}},trimInputChanged:function(){var e=n.timeToIntWithMillisecond(this.$el.find(".trim-before-input").val()),t=n.timeToIntWithMillisecond(this.$el.find(".trim-after-input").val()),i=n.map(e,0,this.videoPlayerView.mediaPlayer.duration,0,1e3),r=n.map(t,0,this.videoPlayerView.mediaPlayer.duration,0,1e3);parseInt(i)>=parseInt(r)||(this.$el.find(".trim-slider").slider("values",[i,r]),this.$el.find(".trim-control-detail input.sliderValue[data-index=0]").val(i),this.$el.find(".trim-control-detail input.sliderValue[data-index=1]").val(1e3-r)),this.trimChanged()},updateTrimInput:function(){var e=n.map(this.sessionDetails.trimSliderStart,0,1e3,0,this.videoPlayerView.mediaPlayer.duration),t=this.videoPlayerView.mediaPlayer.duration-n.map(this.sessionDetails.trimSliderEnd,0,1e3,0,this.videoPlayerView.mediaPlayer.duration);if(!isFinite(e)||!isFinite(t))return this.$el.find(".trim-before-time").html("-"),void this.$el.find(".trim-after-time").html("-");e=parseFloat(e).toFixed(3),t=parseFloat(t).toFixed(3),this.$el.find(".trim-before-time").html(n.strToTime(e)),this.$el.find(".trim-after-time").html(n.strToTime(t)),this.$el.find(".trim-before-input").val(n.strToTime(e)),this.$el.find(".trim-after-input").val(n.strToTime(t)),this.$el.find(".ruler-dynamic").is(":visible")||(this.drawDynamicRuler(),this.$el.find(".ruler-static").hide(),this.$el.find(".ruler-dynamic").show())},drawDynamicRuler:function(){for(var e=this.$el.find(".ruler-dynamic")[0].width,t=this.$el.find(".ruler-dynamic")[0].height,i=e/this.videoPlayerView.mediaPlayer.duration,n=i,r=2;n<15;r++)n=i*r;var o,a=this.$el.find(".ruler-dynamic")[0],s=a.getContext("2d");s.clearRect(0,0,a.width,a.height),s.lineWidth=1;for(r=0;r<e;r+=n){o=r,s.beginPath(),s.moveTo(r,0),s.lineTo(r,t/2);for(var l=0;l<4;l++)o+=n/5,s.moveTo(o,0),s.lineTo(o,t/3);s.stroke(),s.closePath()}},showTrimBeforePop:function(e){e.data.that.$el.find(".trim-before-pop").fadeIn(100)},showTrimAfterPop:function(e){e.data.that.$el.find(".trim-after-pop").fadeIn(100)},trimSliding:function(t){if(this.$el.find(".trim-preview-video")[0].src.length<=0&&(this.$el.find(".trim-preview-video")[0].src=this.videoPlayerView.mediaPlayer.currentSrc),t.handle==this.$el.find(".trim-slider .ui-slider-handle")[0]){this.$el.find(".trim-before-container").addClass("trim-hovered");var i=n.map(this.sessionDetails.trimSliderStart,0,1e3,0,this.videoPlayerView.mediaPlayer.duration);this.$el.find(".trim-preview-video")[0].currentTime=i,this.$el.find(".trim-preview-container").css("left",e(this.$el.find(".trim-slider .ui-slider-handle")[0]).position().left-e(".trim-preview-container").width()/2+"px"),this.$el.find(".preview-trim-arrow").css("left",e(this.$el.find(".trim-slider .ui-slider-handle")[0]).position().left)}else{this.$el.find(".trim-after-container").addClass("trim-hovered");var r=n.map(this.sessionDetails.trimSliderEnd,0,1e3,0,this.videoPlayerView.mediaPlayer.duration);this.$el.find(".trim-preview-video")[0].currentTime=this.videoPlayerView.mediaPlayer.duration-r,this.$el.find(".trim-preview-container").css("left",e(this.$el.find(".trim-slider .ui-slider-handle")[1]).position().left-+e(".trim-preview-container").width()/2+"px"),this.$el.find(".preview-trim-arrow").css("left",e(this.$el.find(".trim-slider .ui-slider-handle")[1]).position().left)}this.$el.find(".trim-preview-container, .preview-trim-arrow").show(),clearTimeout(this.trimFadeoutTimeout);var o=this;this.trimFadeoutTimeout=setTimeout((function(){o.$el.find(".trim-preview-container, .preview-trim-arrow").fadeOut(200)}),2e3)},trimChanged:function(){this.trimLeadGenerated=!0,this.sessionDetails.trimSliderStart=this.$el.find(".trim-control-detail input.sliderValue[data-index=0]").val(),this.sessionDetails.trimSliderEnd=this.$el.find(".trim-control-detail input.sliderValue[data-index=1]").val(),this.updateTrimInput(),this.updateProjectJson(),this.reconstructUI()},disableTrim:function(){e(".trim-btn").addClass("disabled")},selectCrop:function(){this.askReloadConfirmation=!0,this.isPPR?n.trackInThirdPartyTools("video_preview_Crop_save_isPPR",{email:this.userEmail}):n.trackInThirdPartyTools("video_preview_Crop_save",{email:this.userEmail}),this.unselectAllControls(),this.unselectAllComponents(),this.$el.find(".crop-control-detail").fadeIn(100),this.cropResizable.resizable("enable"),this.cropResizable.removeClass("disp-none").addClass("disp-show"),this.selectControl("crop-btn")},cropResized:function(t,i){var n=this.cropResizable.is(":visible");if(this.cropResizable.removeClass("disp-none").addClass("disp-show"),this.videoPlayerView.$el.find(".se-crop-highlighter").show(),this.videoPlayerView.$el.find(".se-crop-highlighter-right").css("left",this.cropResizable.position().left+this.cropResizable.width()+"px"),this.videoPlayerView.$el.find(".se-crop-highlighter-left").css("right",this.videoPlayerView.$el.width()-this.cropResizable.position().left+"px"),this.videoPlayerView.$el.find(".se-crop-highlighter-bottom").css({top:this.cropResizable.position().top+this.cropResizable.height()+"px",width:this.cropResizable.width()+2+"px",left:this.cropResizable.position().left-1+"px"}),this.videoPlayerView.$el.find(".se-crop-highlighter-top").css({bottom:this.videoPlayerView.$el.height()-this.cropResizable.position().top+"px",width:this.cropResizable.width()+2+"px",left:this.cropResizable.position().left-1+"px"}),null!=this.projectJson&&(null==i&&e(".reposition-webcam").is(":checked")||1==i)){var r=this.webcamSnappedLayoutOnCrop();this.secondaryVideoContainer.css({left:r.x+"px",top:r.y+"px"})}null!=this.projectJson&&t&&this.updateProjectJson(),0==n&&this.cropResizable.removeClass("disp-show").addClass("disp-none")},cropStopped:function(){this.cropResizable.position().left<0&&this.cropResizable.css("left","0"),this.cropResizable.position().top<0&&this.cropResizable.css("top","0"),this.cropResizable.position().left+this.cropResizable.width()>this.videoPlayerView.$el.width()&&this.cropResizable.css("width",this.videoPlayerView.$el.width()-this.cropResizable.position().left+"px"),this.cropResizable.position().top+this.cropResizable.height()>this.videoPlayerView.$el.height()&&this.cropResizable.css("height",this.videoPlayerView.$el.height()-this.cropResizable.position().top+"px"),this.cropResized(!0)},applyCrop:function(){this.unselectCrop(),this.$el.find(".default-control-detail").show()},resetCrop:function(){this.cropResizable.css({left:"0",top:"0",width:"100%",height:"100%"}),this.cropResizable.removeClass("disp-none").addClass("disp-show"),this.cropResized(!0),this.unselectCrop(),this.$el.find(".default-control-detail").show()},cancelCrop:function(){this.cropResizable.css({left:this.snapshot.crop.x+"px",top:this.snapshot.crop.y+"px",width:this.snapshot.crop.w+"px",height:this.snapshot.crop.h+"px"}),this.cropResizable.removeClass("disp-none").addClass("disp-show"),this.cropResized(!0,!1),this.unselectCrop(),this.$el.find(".default-control-detail").show()},unselectCrop:function(){this.cropResizable.resizable({disabled:!0}),this.cropResizable.removeClass("disp-show").addClass("disp-none"),this.$el.find(".crop-control-detail").hide()},disableCrop:function(){e(".crop-btn").addClass("disabled")},handleMfChange:function(t){var i=t.data.that,r=i.$el.find("#seMfSelector").find(":selected").val();if("Merge Fields"!==r){if(i.mfValues.includes("{"+r+"}")){if(i.currentSelectedText){var o=i.getClipOf(i.currentSelectedText);o?(o.properties.textUnwrapped!=this.defaultTextAreaValue?o.properties.textUnwrapped+=" ${"+r+"} ":o.properties.textUnwrapped=" ${"+r+"} ",i.showTextEditable(o.id)):i.addEnteredText("${"+r+"} ")}else i.addEnteredText("${"+r+"} ");i.$el.find("#seMfSelector").val("Merge Fields").trigger("change")}else i.mfValues.push("{"+r+"}"),i.$el.find("#seMfSelector").append(e("<option selected>"+r+"</option>")).trigger("change"),e("#select2-seMfSelector-results").find(".select2-results__option--highlighted").remove(),i.initializeAtwho();n.trackInThirdPartyTools(l.PERSONALIZATION_ACTIONS.PA122,{assetId:this.assetId,email:this.userEmail})}},initializeAtwho:function(){this.isPersonalizationEnabled&&e("#seTextEditable").atwho({at:"$",data:this.mfValues,limit:this.mfValues.length})},selectAddText:function(){this.askReloadConfirmation=!0,n.trackInThirdPartyTools("video_preview_Text_save",{email:this.userEmail}),this.unselectAllControls(),this.$el.find(".addtext-control-detail").fadeIn(100),this.showMarkers("text"),this.selectControl("add-text-btn"),this.isTextClipExist()||this.$el.find(".addtext-control-detail").find("#addTextLink").click()},isTextClipExist:function(){if(this.projectJson&&this.projectJson.clips)for(var e=0;e<this.projectJson.clips.length;e++)if("text"==this.projectJson.clips[e].footage.type)return!0;return!1},addEnteredText:function(t){e(".addimage-control-detail").css("margin","0px"),(!t||t instanceof e.Event)&&(t=this.defaultTextAreaValue);var i=this.getMaxDuration(),r=this.sessionDetails.totalCreatedClips;this.projectJson.trackNames.push("Text - "+t.substring(0,10));var o={containsAudio:!1,containsVideo:!1,containsText:!0,duration:i,type:"text"},a=this.$el.find(".se-font-selector").val(),s=this.$el.find(".se-fontsize-selector").val();null==s&&(s=40);var l=this.$el.find(".se-bold-toggle").is(":checked"),u=this.$el.find(".se-italic-toggle").is(":checked"),c=this;this.getFont(a,l,u,(function(n){var l=c.getMetrics(t,s,n),u={w:l.actualWidth+Math.min(100,Math.max(20,l.actualWidth/10)),h:l.fontHeight+Math.min(100,Math.max(20,l.fontHeight/10))};u.x=c.videoPlayerView.$el.find(".se-crop-highlighter-left").width(),u.x+=(c.videoPlayerView.$el.find(".se-crop-highlighter-right").position().left-c.videoPlayerView.$el.find(".se-crop-highlighter-left").width()-u.w)/2,u.y=c.videoPlayerView.$el.find(".se-crop-highlighter-top").height(),u.y+=(c.videoPlayerView.$el.find(".se-crop-highlighter-bottom").position().top-c.videoPlayerView.$el.find(".se-crop-highlighter-top").height()-u.h)/2;var d={color:"#000000",font:a,fontSize:s,fontSizeProject:c.getValueForProject(s,!0),fadein:0,fadeout:0,opacity:1,text:t,textUnwrapped:t,textAlign:"center",xposRaw:u.x,yposRaw:u.y,xpos:c.getValueForProject(u.x,!0),ypos:c.getValueForProject(u.y,!1),boundingBoxRaw:u,boundingBox:c.getBoundingBoxForProject(u)},h=Math.max(c.videoPlayerView.getCurrentTime(),.001);c.getLuminanceForClip(d.boundingBoxRaw.x,d.boundingBoxRaw.y,d.boundingBoxRaw.w,d.boundingBoxRaw.h)<128&&(d.color="#FFFFFF");var p={deleted:!1,end:3,footage:o,id:r,position:Math.max(h-c.videoPlayerView.trimStart,.001),properties:d,start:0,track:c.projectJson.totalVideoTracks+1,startFrom:h,endAt:Math.min(c.videoPlayerView.getCurrentTime()+3,i)};c.projectJson.totalVideoTracks++,c.projectJson.clips.push(p),c.sessionDetails.addedClips.push(p.id),c.reconstructUI(),c.currentSelectedText=r,c.videoPlayerView.$el.find(".se-text-editable").val(p.properties.text),c.selectText(r),c.sessionDetails.totalCreatedClips++,c.$el.find(".addtext-control-detail .se-color-choose").spectrum("set",c.brand_font_color||p.properties.color),c.$el.find(".addtext-control-detail .color-picker .sp-replacer .text-color-picker").css("color",p.properties.color),c.textPropertyChanged(!0),e("#se-component-"+r).click()})),n.trackInThirdPartyTools("Add text clicked")},getLuminanceForClip:function(e,t,i,n){if(null==e||null==t||null==i||null==n)return null;var r=this.videoPlayerView.$el.find(".primary-video")[0],o=document.createElement("canvas"),a=this.videoPlayerView.$el.width(),s=this.videoPlayerView.$el.height();o.width=a,o.height=s;var l=o.getContext("2d");l.clearRect(0,0,a,s),l.rect(0,0,a,s),l.globalAlpha=1,l.drawImage(r,0,0,a,s),console.log("draw context ",l,a,s,r);for(var u=l.getImageData(e,t,i,n),c=u.data.length/4,d=0,h=0,p=0,f=0;f<c;f++)d+=u.data[4*f+0],h+=u.data[4*f+1],p+=u.data[4*f+2];return.2126*(d/=c)+.7152*(h/=c)+.0722*(p/=c)},selectText:function(t,i){if(this.enabled){this.currentSelectedText==t||this.fromQuickRecord||(this.unselectAllControls(),this.unselectAllComponents()),this.$el.find("#textPropertiesTab").show(),this.currentSelectedText=t,this.currentSelectedClip=this.getClipOf(t),this.$el.find(".addtext-control-detail").show();var r=this.getClipOf(t);this.videoPlayerView.$el.find(".se-text-editable").val(r.properties.textUnwrapped?r.properties.textUnwrapped:r.properties.text),this.videoPlayerView.$el.find(".se-text-editable").css({"font-family":null!=n.getFontMap()[r.properties.font]?n.getFontMap()[r.properties.font].css:"","font-size":r.properties.fontSize+"px","font-style":r.properties.italic?"italic":"normal","font-weight":r.properties.bold?"bold":"normal",color:r.properties.color}),this.$el.find(".addtext-input-text").val(r.properties.text),this.$el.find(".se-font-selector").val(this.getFontIfAvailable(r.properties.font)).trigger("change.select2"),this.$el.find(".se-fontsize-selector").val(r.properties.fontSize).trigger("change.select2"),this.$el.find(".se-bold-toggle").prop("checked",r.properties.bold),this.$el.find(".se-italic-toggle").prop("checked",r.properties.italic),this.$el.find(".addtext-control-detail .se-color-choose").spectrum("set",r.properties.color||this.brand_font_color),this.$el.find(".addtext-control-detail .se-shadow-toggle").spectrum("set",r.properties.shadow),this.$el.find(".addtext-control-detail .color-picker .sp-replacer .text-color-picker").css("color",r.properties.color),this.$el.find(".se-textalign-selector").val(r.properties.textAlign?r.properties.textAlign:"left").trigger("change.select2"),e("#se-component-"+this.currentSelectedText).addClass("se-text-component-selected"),this.setAdaptiveBorderForTarget(e("#se-component-"+this.currentSelectedText)),e(".se-components-hover").removeClass("se-components-hover"),this.setTextDraggableContainerSize(e("#se-component-"+this.currentSelectedText)[0],r,!0),i||this.showClipTime(r),this.selectControl("add-text-btn"),this.showMarkers("text")}},getFontIfAvailable:function(e){if(null==e)return this.defaultFontValue;for(var t in n.getFontMap())if(t==e)return e;return this.defaultFontValue},setAdaptiveBorderForTarget:function(t){0!=t.length&&(this.getLuminanceForClip(t.position().left,t.position().top,t.width(),t.height())<128?e(t).addClass("white"):e(t).addClass("black"))},unselectText:function(t){if(null!=this.currentSelectedText){this.$el.find("#textPropertiesTab").hide(),t=void 0===t?"callouttext"==this.getClipOf(this.currentSelectedText).footage.type:t,this.closeTextEditable();var i=e("#se-component-"+this.currentSelectedText);this.currentSelectedText=void 0,this.videoPlayerView.$el.find(".se-text-editable").val(""),this.videoPlayerView.$el.find(".se-text-editable").hide(),i&&e(i).removeClass("se-text-component-selected black white").resizable("destroy"),this.$el.find(".se-text-component").show(),t?this.showMarkers("calloutimage"):this.showMarkers("text"),this.videoPlayerView.$el.find(".se-clip-time").hide()}},textEditableChanged:function(t){var i=this.getClipOf(this.currentSelectedText);i.properties.textUnwrapped=this.videoPlayerView.$el.find(".se-text-editable").val().trim(),i.properties.textUnwrapped.trim().length||(i.properties.text=""),this.newlineTextToHtml(e("#se-component-"+this.currentSelectedText+" .se-text-container")[0],i),t&&13==t.keyCode&&!t.shiftKey&&(this.closeTextEditable(),console.log("HERE!!!!!!!! 2"),this.unselectText())},addTextChanged:function(e){var t=e.data.that;13==e.keyCode&&t.addEnteredText()},textPropertyChanged:function(t){if(this.currentSelectedText){var i=this.getClipOf(this.currentSelectedText);i&&(i.properties.text=this.getTextFromTextEl(e("#se-component-"+this.currentSelectedText)).trim(),i.properties.font=this.$el.find(".se-font-selector").val(),i.properties.fontSize=this.$el.find(".se-fontsize-selector").val(),(null==i.properties.fontSizeProject||t&&t.target&&e(t.target).hasClass("se-fontsize-selector"))&&(i.properties.fontSizeProject=this.getValueForProject(i.properties.fontSize,!0)),i.properties.bold=this.$el.find(".se-bold-toggle").is(":checked"),i.properties.italic=this.$el.find(".se-italic-toggle").is(":checked"),t&&(i.properties.color=this.$el.find(".addtext-control-detail .se-color-choose").spectrum("get").toHexString()),this.$el.find(".addtext-control-detail .color-picker .sp-replacer .text-color-picker").css("color",i.properties.color),i.properties.textAlign=this.$el.find(".se-textalign-selector").val(),i.properties.xposRaw=e("#se-component-"+this.currentSelectedText).position().left,i.properties.yposRaw=e("#se-component-"+this.currentSelectedText).position().top,i.properties.xpos=this.getValueForProject(i.properties.xposRaw,!0),i.properties.ypos=this.getValueForProject(i.properties.yposRaw,!1),i.footage.calloutId&&(i.properties.offsetX=e("#se-component-"+this.currentSelectedText).position().left-e("#se-component-"+i.footage.calloutId).position().left,i.properties.offsetY=e("#se-component-"+this.currentSelectedText).position().top-e("#se-component-"+i.footage.calloutId).position().top),this.updateProjectJson(),this.reconstructUI())}},showTextEditable:function(e){var t=this.getClipOf(e),i=this.getClipElOf(e);this.videoPlayerView.$el.find(".se-text-editable").css({left:i.position().left+"px",top:i.position().top+"px",width:i.width()+"px",height:i.height()+"px","text-align":t.properties.textAlign}),i.fadeOut();var n=this,r=t.properties.textUnwrapped?t.properties.textUnwrapped:t.properties.text;r=r==this.defaultTextAreaValue?"":r,this.videoPlayerView.$el.find(".se-text-editable").val(r),this.videoPlayerView.$el.find(".se-text-editable").fadeIn(150,(function(){n.videoPlayerView.$el.find(".se-text-editable").focus()}))},closeTextEditable:function(){var t=this.getClipOf(this.currentSelectedText);t&&this.setLineHeight(t),this.videoPlayerView.$el.find(".se-text-editable").hide(),this.videoPlayerView.$el.find(".se-text-component").show(),t&&!t.properties.text.trim().length&&e("#se-component-"+this.currentSelectedText).find(".se-text-delete").click()},deleteText:function(){var e="callouttext"==this.getClipOf(this.currentSelectedText).footage.type;this.removeClip(this.currentSelectedText),this.unselectText(e),this.reconstructUI()},selectAddStickers:function(){this.askReloadConfirmation=!0,this.isPPR?n.trackInThirdPartyTools("video_preview_Emoji_save_isPPR",{email:this.userEmail}):n.trackInThirdPartyTools("video_preview_Emoji_save",{email:this.userEmail}),this.unselectAllControls(),this.$el.find(".addsticker-selected").hide(),this.$el.find(".addsticker-initial").show(),this.$el.find(".addsticker-control-detail").fadeIn(100),this.showMarkers("sticker"),this.selectControl("add-stickers-btn")},selectAddImage:function(){this.askReloadConfirmation=!0,this.unselectAllControls(),this.$el.find(".addimage-selected").hide(),this.$el.find(".addimage-initial").show(),this.$el.find(".addimage-control-detail").fadeIn(100),this.selectControl("add-image-btn"),this.isPPR?n.trackInThirdPartyTools("video_preview_Image_save_isPPR",{email:this.userEmail}):n.trackInThirdPartyTools(l.PERSONALIZATION_ACTIONS.PA41,{email:this.userEmail})},hanldeImageAspectRatioChange:function(){this.stickerPropertyChanged(),n.trackInThirdPartyTools(l.PERSONALIZATION_ACTIONS.PA413,{email:this.userEmail})},deleteImage:function(){this.deleteSticker(),n.trackInThirdPartyTools(l.PERSONALIZATION_ACTIONS.PA415,{email:this.userEmail})},changeImageOpacity:function(t){this.$el.find("#imageOpacitySlider").val(""===e(t.currentTarget).val()?0:e(t.currentTarget).val()),this.$el.find("#imageOpacityInput").val(""===e(t.currentTarget).val()?"":parseInt(e(t.currentTarget).val())>100?100:e(t.currentTarget).val()),this.stickerPropertyChanged(),n.trackInThirdPartyTools(l.PERSONALIZATION_ACTIONS.PA414,{email:this.userEmail})},addImage:function(){this.openImportCallback(),new m({type:"image",maximumFilesAllowed:1,maximumPerFileSize:5,isMultiple:!1,showAddMoreTemplate:!1,callbackMethodToHandleFiles:this.processSelectedImage,closeImportCallback:this.closeImportCallback}),n.trackInThirdPartyTools(l.PERSONALIZATION_ACTIONS.PA411,{email:this.userEmail})},addPersonalizedImage:function(){var e={component_type:"image-mf"},t=a.getNewImageMfId(this.projectJson,"image");e.id=t.footageId,e.image_id=t.imageId,e.is_website=!1,e.url=a.getMfImage(e.image_id,"image"),e.addToFootageList=!1,this.createNewImage(e),n.trackInThirdPartyTools(l.PERSONALIZATION_ACTIONS.PA412,{email:this.userEmail})},addWebsiteImageBtn:function(){var e={component_type:"image-mf"},t=a.getNewImageMfId(this.projectJson,"website");e.id=t.footageId,e.image_id=t.imageId,e.is_website=!0,e.url=a.getMfImage(e.image_id,"website"),e.addToFootageList=!1,this.createNewImage(e),n.trackInThirdPartyTools(l.PERSONALIZATION_ACTIONS.PA416,{email:this.userEmail})},processSelectedImage:function(e,t){var i=e[0],n=a.getImportedImageInfo(i),o=[n],s=this;this.$el.find("#imageUploadProgessContainer").show(),this.$el.find("#imageUploadProgressText").text(y.simpleEdit.prepareToImport),(new u).importAssetForSlideShow(JSON.stringify(o),this.assetId,void 0,(function(e){var t=e.video[0];"local_file"==n.upload_type?new v({acl:"private",bucket:t.bucket,key:t.key}).uploadFile(i,void 0,(function(e){s.$el.find("#imageUploadProgessContainer").hide(),s.closeImportCallback(),t.component_type="image",t.addToFootageList=!0,s.createNewImage(t)}),(function(e){r.showBannerAlert(y.simpleEdit.errorMessage,3e3,"error"),r.postErrorsToLog({error:"Error while uploading media to S3 for user.",stackTrace:JSON.stringify(e)}),s.$el.find("#imageUploadProgessContainer").hide(),s.closeImportCallback()})):(s.$el.find("#imageUploadProgessContainer").hide(),s.closeImportCallback(),t.component_type="image",t.addToFootageList=!0,s.createNewImage(t))}),(function(e){r.showBannerAlert(y.simpleEdit.errorMessage,3e3,"error"),r.postErrorsToLog({error:"Error while importing slideshow for user.",stackTrace:JSON.stringify(e)}),s.$el.find("#imageUploadProgessContainer").hide(),s.closeImportCallback()}))},createNewImage:function(e){var t=this.sessionDetails.totalCreatedClips,i=this.getMaxDuration();this.projectJson.trackNames.push("Image");var n={containsAudio:!1,containsVideo:!1,containsText:!1,containsImage:!0,id:e.id.toString(),duration:i,type:e.component_type};"image-mf"===e.component_type&&(n.is_website=e.is_website,n.image_id=e.image_id);var r=this.videoPlayerView.$el.find(".se-crop-highlighter-left").width();r+=(this.videoPlayerView.$el.find(".se-crop-highlighter-right").position().left-this.videoPlayerView.$el.find(".se-crop-highlighter-left").width())/2;var o=this.videoPlayerView.$el.find(".se-crop-highlighter-top").height();o+=(this.videoPlayerView.$el.find(".se-crop-highlighter-bottom").position().top-this.videoPlayerView.$el.find(".se-crop-highlighter-top").height())/2;var a=new Image;a.crossOrigin="Anonymous",a.src=e.url;var s=this;a.onload=function(){var l,u=a.width,c=a.height;a.width>s.videoPlayerView.$el.width()?(l=s.videoPlayerView.$el.width()/a.width,u=s.videoPlayerView.$el.width()/3,c=l*a.height/3):a.height>s.videoPlayerView.$el.height()?(l=s.videoPlayerView.$el.height()/a.height,c=s.videoPlayerView.$el.height()/3,u=l*a.width/3):(u=a.width/3,c=a.height/3);var d={fadein:0,fadeout:0,heightRaw:c,widthRaw:u,height:s.getValueForProject(c,!1),width:s.getValueForProject(u,!0),xposRaw:r,yposRaw:o,xpos:s.getValueForProject(r,!0),ypos:s.getValueForProject(o,!1),opacity:1,lockAspectRatio:!0,containsAlpha:!0},h=Math.max(s.videoPlayerView.getCurrentTime(),.001),p={deleted:!1,end:3,footage:n,id:t,position:Math.max(h-s.videoPlayerView.trimStart,.001),properties:d,start:0,track:s.projectJson.totalVideoTracks+1,startFrom:h,endAt:Math.min(s.videoPlayerView.getCurrentTime()+3,i)};s.projectJson.totalVideoTracks++,s.projectJson.clips.push(p),e.addToFootageList&&s.projectJson.footageList.push(e.id),n.src=e.url,s.sessionDetails.addedClips.push(p.id),s.reconstructUI(),s.selectSticker(t),s.sessionDetails.totalCreatedClips++}},isImageComponent:function(e){return"image"==this.getClipOf(e).footage.type||"image-mf"==this.getClipOf(e).footage.type},componentDropped:function(e,t,i){-1!==e.indexOf("se-sticker-btn-")?this.addNewSticker(e.split("se-sticker-btn-")[1],t,i):-1!==e.indexOf("se-callout-btn-")&&this.addNewCallout(e.split("se-callout-btn-")[1],t,i)},stickerBtnClicked:function(e){e.data.that.addNewSticker(e.target.id.split("se-sticker-btn-")[1])},addNewSticker:function(e,t,i){var n=this.sessionDetails.totalCreatedClips,r=this.getMaxDuration();this.projectJson.trackNames.push("Sticker");var o={containsAudio:!1,containsVideo:!1,containsText:!1,containsImage:!0,id:-e-100,duration:r,type:"sticker"};null!=t&&null!=i||(t=this.videoPlayerView.$el.find(".se-crop-highlighter-left").width(),t+=(this.videoPlayerView.$el.find(".se-crop-highlighter-right").position().left-this.videoPlayerView.$el.find(".se-crop-highlighter-left").width())/2,i=this.videoPlayerView.$el.find(".se-crop-highlighter-top").height(),i+=(this.videoPlayerView.$el.find(".se-crop-highlighter-bottom").position().top-this.videoPlayerView.$el.find(".se-crop-highlighter-top").height())/2);var a={fadein:0,fadeout:0,heightRaw:this.stickerSize[e].height/1.5,widthRaw:this.stickerSize[e].width/1.5,height:this.getValueForProject(this.stickerSize[e].height/1.5,!1),width:this.getValueForProject(this.stickerSize[e].width/1.5,!0),xposRaw:t,yposRaw:i,xpos:this.getValueForProject(t,!0),ypos:this.getValueForProject(i,!1),opacity:1,lockAspectRatio:!0},s=Math.max(this.videoPlayerView.getCurrentTime(),.001),l={deleted:!1,end:3,footage:o,id:n,position:Math.max(s-this.videoPlayerView.trimStart,.001),properties:a,start:0,track:this.projectJson.totalVideoTracks+1,startFrom:s,endAt:Math.min(this.videoPlayerView.getCurrentTime()+3,r)};this.projectJson.totalVideoTracks++,this.projectJson.clips.push(l),this.sessionDetails.addedClips.push(l.id),this.reconstructUI(),this.selectSticker(n),this.sessionDetails.totalCreatedClips++},selectSticker:function(t){if(this.enabled){this.unselectAllControls(),this.unselectAllComponents(),this.currentSelectedSticker=t,this.currentSelectedClip=this.getClipOf(t);var i=this.getClipOf(this.currentSelectedSticker);this.isImageComponent(i.id)?(this.$el.find(".addimage-selected #imageOpacitySlider").val(100*i.properties.opacity),this.$el.find(".addimage-selected #imageOpacityInput").val(parseInt(100*i.properties.opacity)),this.$el.find(".addimage-selected #imageArLock").prop("checked",i.properties.lockAspectRatio),this.$el.find(".addimage-control-detail").show(),this.$el.find(".addimage-initial").hide(),this.$el.find(".addimage-selected").show()):(this.$el.find(".addsticker-selected .opacity-val").val(100*i.properties.opacity),this.$el.find(".addsticker-selected .lock-aspect-ratio").prop("checked",i.properties.lockAspectRatio),this.$el.find(".addsticker-control-detail").show(),this.$el.find(".addsticker-initial").hide(),this.$el.find(".addsticker-selected").show());var n=e("#se-component-"+t);n.resizable("enable"),n.addClass("edit-video-selected"),this.setAdaptiveBorderForTarget(e("#se-component-"+t)),this.isImageComponent(i.id)?(this.showMarkers("image"),this.selectControl("add-image-btn")):(this.showMarkers("sticker"),this.selectControl("add-stickers-btn")),this.showClipTime(i)}},unselectSticker:function(){null!=this.currentSelectedSticker&&(this.isImageComponent(this.currentSelectedSticker)?(this.currentSelectedSticker=void 0,this.$el.find(".addimage-initial").show(),this.$el.find(".addimage-selected").hide(),this.showMarkers("image")):(this.currentSelectedSticker=void 0,this.$el.find(".addsticker-initial").show(),this.$el.find(".addsticker-selected").hide(),this.showMarkers("sticker")),e(".se-image-component").resizable({disabled:!0}),e(".se-image-component").removeClass("edit-video-selected white black"),this.videoPlayerView.$el.find(".se-clip-time").hide())},stickerPropertyChanged:function(){var e=this.getClipOf(this.currentSelectedSticker);this.isImageComponent(this.currentSelectedSticker)?(e.properties.opacity=this.$el.find(".addimage-selected #imageOpacitySlider").val()/100,e.properties.lockAspectRatio=this.$el.find(".addimage-selected #imageArLock").is(":checked")):(e.properties.opacity=this.$el.find(".addsticker-selected .opacity-val").val()/100,e.properties.lockAspectRatio=this.$el.find(".addsticker-selected .lock-aspect-ratio").is(":checked")),this.updateProjectJson(),this.reconstructUI()},deleteSticker:function(){var e=this.currentSelectedSticker;this.unselectSticker(),this.removeClip(e),this.reconstructUI()},findStickerSize:function(e){this.stickerSize[e]={width:128,height:128}},showStickerFamily:function(t){t.data.that.$el.find(".sticker-family-all").hide(),e(t.target).closest(".sticker-family-container").find(".sticker-family-all").show()},selectAddBlur:function(){"true"===e("#isBlurEnabled").val()||this.isBlurEnabled?(this.askReloadConfirmation=!0,this.isPPR?n.trackInThirdPartyTools("video_preview_Blur_save_isPPR",{email:this.userEmail}):n.trackInThirdPartyTools("video_preview_Blur_save",{email:this.userEmail}),this.unselectAllControls(),this.$el.find("#blurSelected").hide(),this.$el.find("#blurInitial").show(),this.$el.find(".blur-control-detail").fadeIn(100),this.showMarkers("effects"),this.selectControl("add-blur-btn"),e(".new").hide()):(n._upgradeAlertPopup(y,h),e(".new").hide())},addNewBlur:function(e,t){if(void 0!==this.sessionDetails.primaryVideo||void 0!==this.sessionDetails.secondaryVideo){var i=this.getMaxDuration(),r=this.getClipOf(this.sessionDetails.primaryVideo)||{},o=Math.max(this.videoPlayerView.getCurrentTime(),.001);null==this.sessionDetails.totalAddedEffects&&(this.sessionDetails.totalAddedEffects=0);var a=this.sessionDetails.totalAddedEffects++,s={id:a,type:"blur",opacity:1,strength:10,widthRaw:this.getValueFromClipPercent(.3,r,!0),heightRaw:this.getValueFromClipPercent(.3,r,!1),xposRaw:this.getValueFromClipPercent(.3,r,!0),yposRaw:this.getValueFromClipPercent(.3,r,!1),lockAspectRatio:!1,start:0,end:3,width:.3,height:.3,xpos:.3,ypos:.3,startFrom:o,endAt:Math.min(this.videoPlayerView.getCurrentTime()+3,i),position:Math.max(o-this.videoPlayerView.trimStart,.001)};r.effects?r.effects.push(s):r.effects=[s],this.reconstructUI(),this.selectBlur(a),n.trackInThirdPartyTools("SE - Add New Blur",{email:this.userEmail})}},enableBlurForPlayer:function(){var e=this;this.$el.find("#blurStrength").slider({min:0,max:100,step:1,value:50,slide:e.blurPropertyChanged}),this.$el.find("#blurStrengthText").bind("change",(function(){e.blurPropertyChanged({},{},!0)}))},blurPropertyChanged:function(e,i,r){var o=this.getClipOf(this.sessionDetails.primaryVideo)||{},a=t.where(o.effects,{id:Number(this.currentSelectedBlur)})[0]||{};if(r){var s=this.$el.find("#blurStrengthText").val();this.$el.find("#blurStrength").slider("option","value",s)}else{s=this.$el.find("#blurStrength").slider("option","value");this.$el.find("#blurStrengthText").val(s)}a.strength=n.map(s,0,100,0,20),a.lockAspectRatio=this.$el.find(".blur-selected .lock-aspect-ratio").is(":checked"),this.updateProjectJson(),this.reconstructUI()},blurAreaChanged:function(){var i=this.getClipOf(this.sessionDetails.primaryVideo)||{},n=t.where(i.effects,{id:Number(this.currentSelectedBlur)})[0]||{},r=e("#se-effects-"+n.id);n.xpos=this.getValueForClip(r.position().left,i,!0),n.ypos=this.getValueForClip(r.position().top,i,!1),n.width=this.getValueForClip(r.width(),i,!0),n.height=this.getValueForClip(r.height(),i,!1),this.reconstructUI()},selectBlur:function(i){if(this.enabled){var r=this.getClipOf(this.sessionDetails.primaryVideo)||{},o=t.where(r.effects,{id:Number(i)})[0]||{},a=Math.ceil(n.map(o.strength,0,20,0,100));this.unselectAllControls(),this.unselectAllComponents(),this.currentSelectedBlur=i,this.currentSelectedClip=o,this.$el.find("#blurStrengthText").val(a),this.$el.find("#blurStrength").slider("option","value",a),this.$el.find(".blur-selected .lock-aspect-ratio").prop("checked",o.lockAspectRatio),this.$el.find(".blur-control-detail").show(),this.$el.find(".blur-initial").hide(),this.$el.find(".blur-selected").show(),this.showMarkers("effects"),e("#se-effects-"+i+" .ui-resizable-handle").show(),e("#se-effects-"+i).resizable("enable").addClass("edit-video-selected"),this.setAdaptiveBorderForTarget(e("#se-effects-"+i)),this.selectControl("add-blur-btn"),void 0!==o.id&&this.showClipTime(o,!0)}},unselectBlur:function(){null!=this.currentSelectedBlur&&(this.currentSelectedBlur=void 0,this.$el.find(".blur-initial").show(),this.$el.find(".blur-selected").hide(),e(".se-effects .ui-resizable-handle").hide(),e(".se-effects").resizable({disabled:!0}).removeClass("edit-video-selected white black"),this.showMarkers("effects"),this.videoPlayerView.$el.find(".se-clip-time").hide())},deleteBlur:function(){for(var e=this.getClipOf(this.sessionDetails.primaryVideo)||{},t=e.effects||[],i=0;i<e.effects.length&&e.effects[i].id!=this.currentSelectedBlur;i++);i!=e.effects.length&&(t.splice(i,1),this.unselectBlur(),this.reconstructUI(),n.trackInThirdPartyTools("SE - Delete Blur",{email:this.userEmail}))},drawBlurLayer:function(){if(this.projectJson){var t=this.videoPlayerView.$el.find(".primary-video")[0],i=this.videoPlayerView.$el.find(".se-effects-canvas")[0],r=i.getContext("2d"),o=this.primaryVideoContainer.width(),a=this.primaryVideoContainer.height(),s=(this.getClipOf(this.sessionDetails.primaryVideo)||{}).effects||[];i.width=o,i.height=a,r.clearRect(0,0,o,a);for(var l=0;l<s.length;l++){var u=s[l];if(u&&!(this.videoPlayerView.getCurrentTime()-this.videoPlayerView.trimStart<u.position-.1||this.videoPlayerView.getCurrentTime()-this.videoPlayerView.trimStart>u.position+(u.end-u.start))){r.save(),r.rect(u.xposRaw,u.yposRaw,u.widthRaw,u.heightRaw),r.clip(),r.filter="blur("+u.strength+"px)";var c=n.map(u.xposRaw,0,o,0,t.videoWidth),d=n.map(u.yposRaw,0,a,0,t.videoHeight),h=n.map(u.widthRaw,0,o,0,t.videoWidth),p=n.map(u.heightRaw,0,a,0,t.videoHeight);r.drawImage(t,c,d,h,p,u.xposRaw,u.yposRaw,u.widthRaw,u.heightRaw),r.restore(),e("#se-effects-"+u.id).css({opacity:"1","z-index":"106"})}else e("#se-effects-"+u.id).css({opacity:"0","z-index":"-1"})}}},getMaxDuration:function(){for(var e=0,t=0;t<this.projectJson.clips.length;t++)e=Math.max(e,this.projectJson.clips[t].end);return e},selectAddCallouts:function(){this.askReloadConfirmation=!0,this.isPPR?n.trackInThirdPartyTools("video_preview_Callout_save_isPPR",{email:this.userEmail}):n.trackInThirdPartyTools("video_preview_Callout_save",{email:this.userEmail}),this.unselectAllControls(),this.$el.find(".addcallout-selected").hide(),this.$el.find(".addcallout-initial").show(),this.$el.find(".addcallout-control-detail").fadeIn(100),this.showMarkers("calloutimage"),this.selectControl("add-callouts-btn")},calloutBtnClicked:function(e){e.data.that.addNewCallout(e.target.id.split("se-callout-btn-")[1])},addNewCallout:function(e,t,i){var n=this.sessionDetails.totalCreatedClips,r=this.getMaxDuration();this.projectJson.trackNames.push("Callout-Image");var o={containsAudio:!1,containsVideo:!1,containsText:!1,containsImage:!0,id:-e-1e4,baseId:-e-1e4,duration:r,type:"calloutimage"};null!=t&&null!=i||(t=this.videoPlayerView.$el.find(".se-crop-highlighter-left").width(),t+=(this.videoPlayerView.$el.find(".se-crop-highlighter-right").position().left-this.videoPlayerView.$el.find(".se-crop-highlighter-left").width())/2,i=this.videoPlayerView.$el.find(".se-crop-highlighter-top").height(),i+=(this.videoPlayerView.$el.find(".se-crop-highlighter-bottom").position().top-this.videoPlayerView.$el.find(".se-crop-highlighter-top").height())/2);var a={fadein:0,fadeout:0,heightRaw:this.callouts[e].height/2,widthRaw:this.callouts[e].width/2,height:this.getValueForProject(this.callouts[e].height/2,!1),width:this.getValueForProject(this.callouts[e].width/2,!0),xposRaw:t,yposRaw:i,xpos:this.getValueForProject(t,!0),ypos:this.getValueForProject(i,!1),opacity:1,lockAspectRatio:!0},s=3,l=Math.max(this.videoPlayerView.getCurrentTime(),.001),u={deleted:!1,end:s,footage:o,id:n,position:Math.max(l-this.videoPlayerView.trimStart,.001),properties:a,start:0,track:this.projectJson.totalVideoTracks+1,startFrom:l,endAt:Math.min(this.videoPlayerView.getCurrentTime()+s,r)};if(this.projectJson.totalVideoTracks++,this.projectJson.clips.push(u),this.sessionDetails.addedClips.push(u.id),this.sessionDetails.totalCreatedClips++,this.callouts[e].hasText){var c=this.sessionDetails.totalCreatedClips;this.projectJson.trackNames.push("Callout-Text"),o.textId=c;var d={containsAudio:!1,containsVideo:!1,containsText:!0,containsImage:!1,duration:r,calloutId:n,type:"callouttext"};t+=0;var h={x:a.xposRaw,y:i+=50,w:a.widthRaw,h:a.heightRaw/4},p={text:this.defaultTextAreaValue,textUnwrapped:this.defaultTextAreaValue,font:this.defaultFontValue,fontSize:15,fontSizeProject:this.getValueForProject(15,!0),color:"black",bold:!1,italic:!1,opacity:1,xposRaw:t,yposRaw:i,xpos:this.getValueForProject(t,!0),ypos:this.getValueForProject(i,!1),offsetX:0,offsetY:50,textAlign:"center",boundingBoxRaw:h,boundingBox:this.getBoundingBoxForProject(h)};this.getLuminanceForClip(p.boundingBoxRaw.x,p.boundingBoxRaw.y,p.boundingBoxRaw.w,p.boundingBoxRaw.h)<128&&(p.color="#FFFFFF");s=3,l=Math.max(this.videoPlayerView.getCurrentTime(),.001);var f={deleted:!1,end:s,footage:d,id:c,position:Math.max(l-this.videoPlayerView.trimStart,.001),properties:p,start:0,track:this.projectJson.totalVideoTracks+1,startFrom:l,endAt:Math.min(this.videoPlayerView.getCurrentTime()+s,r)};this.projectJson.totalVideoTracks++,this.projectJson.clips.push(f),this.sessionDetails.addedClips.push(f.id),this.sessionDetails.totalCreatedClips++}this.reconstructUI(),this.selectCallout(n)},selectCallout:function(t){if(this.enabled){this.unselectAllControls(),this.unselectAllComponents(),this.currentSelectedCallout=t,this.currentSelectedClip=this.getClipOf(t),this.$el.find(".addcallout-control-detail").show(),this.$el.find(".addcallout-initial").hide(),this.$el.find(".addcallout-selected").show();var i=this.getClipOf(this.currentSelectedCallout);this.$el.find(".addcallout-selected .opacity-val").val(100*i.properties.opacity),this.$el.find(".addcallout-selected .lock-aspect-ratio").prop("checked",i.properties.lockAspectRatio),this.$el.find(".addcallout-selected .callout-variation").val(i.footage.baseId-i.footage.id);var n=e("#se-component-"+t);n.resizable("enable"),n.addClass("edit-video-selected"),this.setAdaptiveBorderForTarget(e("#se-component-"+t)),this.showMarkers("calloutimage"),this.showClipTime(i),this.selectControl("add-callouts-btn")}},unselectCallout:function(){null!=this.currentSelectedCallout&&(this.currentSelectedCallout=void 0,this.$el.find(".addcallout-initial").show(),this.$el.find(".addcallout-selected").hide(),e(".se-image-component").resizable({disabled:!0}),e(".se-image-component").removeClass("edit-video-selected white black"),this.showMarkers("calloutimage"),this.videoPlayerView.$el.find(".se-clip-time").hide())},calloutDragged:function(){var t=this.getClipOf(this.currentSelectedCallout),i=this.getClipOf(t.footage.textId);if(null!=i){var r=this.getClipElOf(t.footage.textId);i.properties.boundingBoxRaw?r.css({left:n.map(this.calloutTextBoxSpread.x,0,1,t.properties.xposRaw,t.properties.xposRaw+t.properties.widthRaw)+"px",top:n.map(this.calloutTextBoxSpread.y,0,1,t.properties.yposRaw,t.properties.yposRaw+t.properties.heightRaw)+"px"}):e("#se-component-"+t.footage.textId).css({left:e("#se-component-"+t.id).position().left+i.properties.offsetX+"px",top:e("#se-component-"+t.id).position().top+i.properties.offsetY+"px"}),i.properties.xposRaw=r.position().left,i.properties.yposRaw=r.position().top,i.properties.xpos=this.getValueForProject(i.properties.xposRaw,!0),i.properties.ypos=this.getValueForProject(i.properties.yposRaw,!1),i&&i.properties.boundingBoxRaw&&(i.properties.boundingBoxRaw.x=i.properties.xposRaw,i.properties.boundingBoxRaw.y=i.properties.yposRaw,i.properties.boundingBox=this.getBoundingBoxForProject(i.properties.boundingBoxRaw))}this.updateProjectJson()},calloutResized:function(e){var t=this.getClipOf(e),i=this.getClipOf(t.footage.textId);i&&i.properties.boundingBoxRaw&&this.calloutTextBoxSpread&&(this.getClipElOf(i.id).css({left:n.map(this.calloutTextBoxSpread.x,0,1,t.properties.xposRaw,t.properties.xposRaw+t.properties.widthRaw)+"px",top:n.map(this.calloutTextBoxSpread.y,0,1,t.properties.yposRaw,t.properties.yposRaw+t.properties.heightRaw)+"px",width:this.calloutTextBoxSpread.w*t.properties.widthRaw+"px"}),this.textBoxResized(i.id)),this.updateProjectJson()},calloutPropertyChanged:function(){var e=this.getClipOf(this.currentSelectedCallout);e.properties.opacity=this.$el.find(".addcallout-selected .opacity-val").val()/100,e.properties.lockAspectRatio=this.$el.find(".addcallout-selected .lock-aspect-ratio").is(":checked"),e.footage.id=e.footage.baseId-parseInt(this.$el.find(".callout-variation").val()),this.updateProjectJson(),this.reconstructUI()},deleteCallout:function(){var e=this.getClipOf(this.currentSelectedCallout),t=this.getClipOf(e.footage.textId);null!=t&&this.removeClip(t.id),this.removeClip(this.currentSelectedCallout),this.unselectCallout(),this.reconstructUI()},findCalloutSize:function(e){var t=document.createElement("img");t.src="https://s3.amazonaws.com/hippolms-wiz-static/callouts/c"+e+".png?v=2",t.crossOrigin="Anonymous";var i=this;this.callouts[e]&&(this.callouts[e].width=300,this.callouts[e].height=300),t.onload=function(){i.callouts[e]&&(i.callouts[e].width=t.width,i.callouts[e].height=t.height)}},isCalloutImage:function(e){return this.getClipOf(e).footage.id<=-1e4},scrollCallouts:function(t){var i=e(t.target).hasClass("callout-scroll-left"),n=t.data.that;n.$el.find(".callout-btn-scroll-container").animate({scrollLeft:n.$el.find(".callout-btn-scroll-container").scrollLeft()+200*(i?-1:1)},200)},newComponentDragged:function(){this.videoPlayerView.$el.find(".se-crop-resizable").removeClass("disp-none").addClass("disp-show"),this.videoPlayerView.$el.find(".se-components-droppable").fadeIn(200),this.videoPlayerView.$el.find(".se-components-droppable").css({"z-index":1e3,width:this.videoPlayerView.$el.find(".se-crop-resizable").width()+"px",height:this.videoPlayerView.$el.find(".se-crop-resizable").height()+"px",left:this.videoPlayerView.$el.find(".se-crop-resizable").position().left+"px",top:this.videoPlayerView.$el.find(".se-crop-resizable").position().top+"px"})},newComponentDropped:function(){this.videoPlayerView.$el.find(".se-crop-resizable").removeClass("disp-show").addClass("disp-none"),this.videoPlayerView.$el.find(".se-components-droppable").hide(),this.videoPlayerView.$el.find(".se-components-droppable").css("z-index",0)},getClipOf:function(e){for(var t=void 0,i=0;i<this.projectJson.clips.length;i++)if(this.projectJson.clips[i].id==e){t=this.projectJson.clips[i];break}return t},getClipElOf:function(t){return e("#se-component-"+t)},removeClip:function(e){e=parseInt(e);for(var t=0;t<this.projectJson.clips.length;t++)if(this.projectJson.clips[t].id==e){this.projectJson.clips.splice(t,1);break}-1!==this.sessionDetails.addedClips.indexOf(e)&&this.sessionDetails.addedClips.splice(this.sessionDetails.addedClips.indexOf(e),1)},lockAspectRatio:function(t){var i=t.data.that;e(t.target).hasClass("primary-vid-control")?(i.primaryVideoContainer.resizable("destroy"),i.makeVideoContainerResizable(i.primaryVideoContainer,e(t.target).is(":checked"))):e(t.target).hasClass("secondary-vid-control")&&(i.secondaryVideoContainer.resizable("destroy"),i.makeVideoContainerResizable(i.secondaryVideoContainer,e(t.target).is(":checked")))},opacityChanged:function(t){var i=t.data.that;e(t.target).hasClass("primary-vid-control")?(i.primaryVideoContainer.resizable("destroy"),i.makeVideoContainerResizable(i.primaryVideoContainer,e(t.target).is(":checked"))):e(t.target).hasClass("secondary-vid-control")&&(i.secondaryVideoContainer.resizable("destroy"),i.makeVideoContainerResizable(i.secondaryVideoContainer,e(t.target).is(":checked")))},showClipTime:function(t,i){var r=t.footage?t.footage.type:"blur";this.videoPlayerView.$el.find(".se-clip-time").show();var o=Math.max(n.map(t.startFrom,this.videoPlayerView.trimStart,this.videoPlayerView.mediaPlayer.duration-this.videoPlayerView.trimEnd,0,this.videoPlayerView.$el.find(".components-time-container").width()),0),a=Math.min(n.map(t.endAt,this.videoPlayerView.trimStart,this.videoPlayerView.mediaPlayer.duration-this.videoPlayerView.trimEnd,0,this.videoPlayerView.$el.find(".components-time-container").width()),this.videoPlayerView.$el.find(".components-time-container").width());this.videoPlayerView.$el.find(".se-clip-time").resizable("enable"),this.videoPlayerView.$el.find(".se-clip-time").css({left:o+"px",width:a-o+"px"}),this.videoPlayerView.$el.find(".se-clip-time .se-selected-type").html(r.substring(0,1).toUpperCase()),i||this.updateTimeFromClipToPopup(this),e(".timer-pop-up").show()},playerTimeUpdate:function(){for(var e=0;e<this.sessionDetails.addedClips.length;e++){var t=this.getClipOf(this.sessionDetails.addedClips[e]);null!=t&&(this.videoPlayerView.getCurrentTime()-this.videoPlayerView.trimStart<t.position-.1||this.videoPlayerView.getCurrentTime()-this.videoPlayerView.trimStart>t.position+(t.end-t.start)?this.videoPlayerView.$el.find("#se-component-"+t.id).css({opacity:"0","z-index":"0"}):this.videoPlayerView.$el.find("#se-component-"+t.id).css({opacity:null!=t.properties.opacity?t.properties.opacity:1,"z-index":"107"}))}},handleVideoPlay:function(){var e=this;this.blurPlayInterval=setInterval((function(){e.drawBlurLayer()}),15)},handleVideoPause:function(){clearInterval(this.blurPlayInterval)},handleVideoSeeked:function(){this.drawBlurLayer(),this.setBorderForClipOnVideoSeek()},showMarkers:function(t){var i,r,o=this.videoPlayerView.$el.find(".player-progress").width()+parseInt(e(".player-progress").css("marginRight"))+parseInt(e(".player-progress").css("marginLeft"));if(this.videoPlayerView.$el.find(".components-time-container, .components-marker-container").css("width",o+"px"),this.videoPlayerView.$el.find(".components-marker-container").empty(),"effects"===t){i=(this.getClipOf(this.sessionDetails.primaryVideo)||{}).effects||[];for(var a=0;a<i.length;a++)r=Math.max(n.map(i[a].startFrom,this.videoPlayerView.trimStart,this.videoPlayerView.mediaPlayer.duration-this.videoPlayerView.trimEnd,0,this.videoPlayerView.$el.find(".components-time-container").width()),0),this.videoPlayerView.$el.find(".components-marker-container").append('<span class="se-selected-type" id="effect-'+i[a].id+'" style = "left:'+r+'px">'+i[a].type.substring(0,1).toUpperCase()+"</span>")}else for(a=0;a<this.projectJson.clips.length;a++){var s=this.projectJson.clips[a];s.footage.type==t&&(r=Math.max(n.map(s.startFrom,this.videoPlayerView.trimStart,this.videoPlayerView.mediaPlayer.duration-this.videoPlayerView.trimEnd,0,this.videoPlayerView.$el.find(".components-time-container").width()),0),this.videoPlayerView.$el.find(".components-marker-container").append('<span class="se-selected-type" id="clip-'+s.id+'" style = "left:'+r+'px">'+s.footage.type.substring(0,1).toUpperCase()+"</span>"))}this.videoPlayerView.$el.find(".se-selected-type").bind("click",{that:this},this.markerSelected)},markerSelected:function(e){var i,n=e.target.id,r=0;if(n.includes("clip"))i=n.split("-")[1],r=this.getClipOf(i).startFrom;else{if(!n.includes("effect"))return;i=n.split("-")[1],effects=(this.getClipOf(this.sessionDetails.primaryVideo)||{}).effects||[],r=(t.where(effects,{id:Number(i)})[0]||{}).startFrom}this.videoPlayerView.goToTime(Math.min(Math.max(r,this.videoPlayerView.trimStart),this.videoPlayerView.mediaPlayer.duration-this.videoPlayerView.trimEnd)),this.reconstructUI(),this.selectComponentFromId(i,n.includes("effect"))},selectComponentFromId:function(e,t){t?this.selectBlur(e):(type=this.getClipOf(e).footage.type,"sticker"===type?this.selectSticker(e):"text"===type?this.selectText(e):"calloutimage"===type&&this.selectCallout(e))},makeVideoContainerResizable:function(t,i){var n=this;t.resizable({aspectRatio:i,handles:"n, e, w, s, ne, nw, se, sw",resize:function(t,i){n.mediaContainerResized(e(t.target))},start:this.userEventStart,stop:function(){n.userEventStop(),n.reconstructUI()}}),this.videoPlayerView.$el.find(".ui-resizable-handle").removeClass("ui-icon ui-icon-gripsmall-diagonal-se")},isOnBoardRequired:function(){return!1},getFont:function(e,t,i,n){var r=this;this.fontCache[e+":"+t+":"+i]?n(this.fontCache[e+":"+t+":"+i]):(e||(console.warn("fontname not set"),e=r.defaultFontValue),g.load(this.getFontURL(e,t,i),(function(o,a){if(o){var s;for(var l in console.error("error loading font "+e+":"+t+":"+i),r.fontCache)s=r.fontCache[l];s?n(s):(console.warn("trying to load default font"),g.load(r.getFontURL("montserrat",t,i),(function(e,t){o?console.error("loading default font also failed"):n(t)})))}else r.fontCache[e+":"+t+":"+i]=a,n(a)})))},setLineHeight:function(t){var i=this;null==t.properties.fontSizeProject&&(t.properties.fontSizeProject=this.getValueForProject(t.properties.fontSize));var n=this.getValueForPlayer(t.properties.fontSizeProject,!0);this.getFont(t.properties.font,t.properties.bold,t.properties.italic,(function(r){var o=i.getMetrics(t.properties.text,n,r),a=0;e("#se-component-"+t.id+" div").each((function(){var t=i.getMetrics(e(this).text(),n,r);a=Math.max(a,t.actualBoundingBoxAscent-t.actualBoundingBoxDescent)})),a+=(o.fontBoundingBoxAscent-o.fontBoundingBoxDescent)/10,t.properties.lineHeight=i.getValueForProject(a,!1);var s=0,l=0,u=a*e("#se-component-"+t.id+" .text-el-line").length,c=Math.min(Math.max(10,u/2),40);t.properties.boundingBoxRaw&&(c=(t.properties.boundingBoxRaw.h-u)/2);var d=t.properties.textAlign?t.properties.textAlign:"left";e("#se-component-"+t.id+" .text-el-line").each((function(){var t=i.getMetrics(e(this).text(),n,r);l=Math.max(l,t.actualWidth)})),null==t.properties.boundingBoxRaw&&(c=Math.min(Math.max(10,u/2),40),t.properties.boundingBoxRaw={x:t.properties.xposRaw,y:t.properties.yposRaw-c,w:l+2*c,h:u+2*c},t.properties.textAlign=d,i.setTextDraggableContainerSize(e("#se-component-"+t.id)[0],t,!1)),t.properties.boundingBoxRaw.topPadding=c,t.properties.boundingBox=i.getBoundingBoxForProject(t.properties.boundingBoxRaw),e("#se-component-"+t.id+" .text-el-line").each((function(){var o=i.getMetrics(e(this).text(),n,r),l=0;"center"==d?l=(t.properties.boundingBoxRaw.w-o.actualWidth)/2:"right"==d&&(l=t.properties.boundingBoxRaw.w-o.actualWidth),e(this).css({"line-height":o.fontBoundingBoxAscent-o.fontBoundingBoxDescent+"px",top:s+(o.actualBoundingBoxAscent-o.fontBoundingBoxAscent)+c+"px",left:l+"px"}),s+=a}))}))},setTextDraggableContainerSize:function(t,i,n){var r=this;i.properties.boundingBoxRaw&&(e(t).css({width:i.properties.boundingBoxRaw.w+"px",height:i.properties.boundingBoxRaw.h+"px"}),n&&(e(t).resizable({handles:"se",aspectRatio:!1,containment:".primary-video-container",create:function(){e(this).find(".ui-resizable-handle").removeClass("ui-icon ui-icon-gripsmall-diagonal-se")},stop:function(){r.lastTextResizeTime=(new Date).getTime()},resize:r.textBoxResized}),i.footage.calloutId&&e(t).resizable("option","containment","#se-component-"+i.footage.calloutId)))},selectControl:function(e){this.$el.find(".se-control-selected").removeClass("se-control-selected"),this.$el.find("."+e).addClass("se-control-selected")},computedDuration:function(){this.resizeHandler(),this.$el.find(".trim-before-container, .trim-after-container").show(),this.reconstructUI(),this.updateTrimInput()},_getVideoModel:function(){if(this.embeddedDigest&&this.embeddedDigest.length>0)var e=new u({embedded_digest:this.embeddedDigest});else if(this.digest)e=new u({digest:this.digest});else e=new u;return e},getReloadConfirmationState:function(){return this.askReloadConfirmation},prefetchAssetsForSimpleEdit:function(){try{var e=new Image;e.src="https://s3.amazonaws.com/hippolms-wiz-static/stickers-all/stickers_all.png?v=2",e.crossOrigin="Anonymous"}catch(e){console.log("Image constructor - Browser not supported!")}},showClipTimePop:function(t){var i=e(t.target);(i.hasClass("se-clip-time")||i.hasClass("se-selected-type"))&&(t.data.that.updateTimeFromClipToPopup(t.data.that),e(".timer-pop-up").toggle())},clipInputButtonClicked:function(e){e.stopPropagation();var t=e.data.that,i=t.currentSelectedClip||{},n=e.target.className.indexOf("timer-start-btn")>-1,r=e.target.className.indexOf("plus")>-1;t.calculateTimeAndUpdateClip(n,r,i,t),t.reconstructUI()},clipInputtyped:function(t){t.stopPropagation();var i=t.data.that,r=t.keyCode,o=e(t.target).hasClass("timer-start-input");if(38===r||40===r)i.calculateTimeAndUpdateClip(o,38===r,i.currentSelectedClip||{},i);else{var a=n.timeToInt(e(".timer-start-input").val()),s=n.timeToInt(e(".timer-stop-input").val());clearTimeout(i.clipTimeInputTimeout),i.isValidClipTime(a,s)?i.setClipTimeAndUpdateValues(a,s,i):i.clipTimeInputTimeout=setTimeout((function(){i.updateTimeFromClipToPopup()}),1e3)}i.reconstructUI()},isValidClipTime:function(e,t){var i=this.videoPlayerView,n=i.mediaPlayer.duration-i.trimEnd;return!(e>=t||e<i.trimStart||t>n||isNaN(e)||isNaN(t))},updateTimeFromClipToPopup:function(t){var i=(t=t||this).currentSelectedClip||{};e(".timer-start-input").val(n.strToTime(i.startFrom)),e(".timer-stop-input").val(n.strToTime(i.endAt))},calculateTimeAndUpdateClip:function(t,i,r,o){var a=r.startFrom,s=r.endAt,l=o.videoPlayerView,u=l.mediaPlayer.duration-l.trimEnd;t?a=i?Math.min(a+1,u):Math.max(a-1,l.trimStart):s=i?Math.min(s+1,u):Math.max(s-1,l.trimStart),a>=s||(e(".timer-start-input").val(n.strToTime(a)),e(".timer-stop-input").val(n.strToTime(s)),o.setClipTimeAndUpdateValues(a,s,o))},setClipTimeAndUpdateValues:function(e,t,i){var n=i.currentSelectedClip||{},r=n.footage?n.footage.type:"blur";n.startFrom=e,n.endAt=t,("calloutimage"===r||"sticker"===r||"text"===r||"blur"===r)&&this.showClipTime(n,!0),this.updateCalloutClipTime(n),this.updateProjectJson()},updateCalloutClipTime:function(e){if(null!=e&&null!=e.footage&&null!=e.footage.type){var t;if("callouttext"==e.footage.type)t=this.getClipOf(e.footage.calloutId);else{if("calloutimage"!=e.footage.type||null==e.footage.textId)return;t=this.getClipOf(e.footage.textId)||{}}t.startFrom=e.startFrom,t.endAt=e.endAt}},onClipTimeChangeHandler:function(){var e=n.map(this.videoPlayerView.$el.find(".se-clip-time").position().left,0,this.videoPlayerView.$el.find(".components-time-container").width(),this.videoPlayerView.trimStart,this.videoPlayerView.mediaPlayer.duration-this.videoPlayerView.trimEnd),t=n.map(this.videoPlayerView.$el.find(".se-clip-time").width(),0,this.videoPlayerView.$el.find(".components-time-container").width(),0,this.videoPlayerView.mediaPlayer.duration-this.videoPlayerView.trimStart-this.videoPlayerView.trimEnd),i=this.getSelectedClipOrEffect();null!=i&&(i.startFrom=e,i.endAt=i.startFrom+t,this.updateCalloutClipTime(i),this.updateProjectJson(),this.reconstructUI())},getTextFromTextEl:function(t){for(var i=t.find(".text-el-line").toArray(),n="",r=0;r<i.length;r++)n+=e(i[r]).text()+(r+1<i.length?"\n":"");return n},newlineTextToHtml:function(t,i){var r=this,o=i.properties.text.split(/[\r\n]+/);for(var a in i.properties.textUnwrapped&&(o=i.properties.textUnwrapped.split(/[\r\n]+/),i.properties.boundingBoxRaw&&i.properties.textUnwrapped&&this.getFont(i.properties.font,i.properties.bold,i.properties.italic,(function(e){for(var t=0;t<o.length;t++){for(var n=o[t].split(/(\$[\s]*\{.*\}|\S+|\s+)/).filter((function(e){return 0!=e.length})),a=[{first:o[t]}],s=n.length-1;s>0;s--)a.push({first:n.slice(0,s).join(""),second:n.slice(s,n.length).join("")});var l=a[a.length-1].first;if(!l.replace(/\s/g,"").startsWith("${"))for(s=l.length-1;s>0;s--)a.push({first:l.slice(0,s),second:[l.slice(s,l.length),n.slice(1,n.length).join("")].join("")});for(var u=0;u<a.length;u++){if(r.getMetrics(a[u].first,r.getValueForPlayer(i.properties.fontSizeProject,!0),e).actualWidth<=i.properties.boundingBoxRaw.w)break}u=Math.min(a.length-1,u),o[t]=a[u].first,a[u].second&&o.splice(t+1,0,a[u].second)}})),i.properties.text=o.join("\n")),e(t).empty(),o){var s=document.createElement("div");e(s).append(o[a]),e(s).addClass("text-el-line"),e(s).css({"font-family":null!=n.getFontMap()[i.properties.font]?n.getFontMap()[i.properties.font].css:"","font-size":this.getValueForPlayer(i.properties.fontSizeProject,!0)+"px","font-style":i.properties.italic?"italic":"normal","font-weight":i.properties.bold?"bold":"normal",color:i.properties.color,position:"absolute","line-height":"0.7em"}),e(t).append(s)}this.setLineHeight(i)},fontLoaded:function(e){if(null!=this.currentSelectedText){var t=this.getClipOf(this.currentSelectedText),i=this.getClipElOf(this.currentSelectedText);this.newlineTextToHtml(i.find(".se-text-container")[0],t)}},textBoxResized:function(t){(t instanceof e.Event||null==t)&&(t=this.currentSelectedText);var i=this.getClipOf(t),n=this.getClipElOf(t);i.properties.boundingBoxRaw={x:n.position().left,y:n.position().top,w:n.width(),h:n.height()},i.properties.boundingBox=this.getBoundingBoxForProject(i.properties.boundingBoxRaw),this.newlineTextToHtml(n.find(".se-text-container")[0],i)},webcamSnappedLayoutOnCrop:function(){var e="bottom-left";return this.projectJson&&null!=this.projectJson.webcamPosition&&(e=this.projectJson.webcamPosition),"bottom-left"==e?{x:this.cropResizable.position().left,y:this.cropResizable.position().top+this.cropResizable.height()-this.secondaryVideoContainer.height()}:"bottom-right"==e?{x:this.cropResizable.position().left+this.cropResizable.width()-this.secondaryVideoContainer.width(),y:this.cropResizable.position().top+this.cropResizable.height()-this.secondaryVideoContainer.height()}:"top-right"==e?{x:this.cropResizable.position().left+this.cropResizable.width()-this.secondaryVideoContainer.width(),y:this.cropResizable.position().top}:"top-left"==e?{x:this.cropResizable.position().left,y:this.cropResizable.position().top}:void 0},getProjectJSON:function(){return this.projectJson},getIOAdjustedProjectJSON:function(){var e=n.naiveClone(this.projectJson);if(null!=e.ioDetails)try{if(e.ioDetails.intro&&e.ioDetails.intro.theme>0){for(var t=e.ioDetails.intro,i=t.duration,r=i,o=0;o<e.clips.length;o++)e.clips[o].deleted||e.clips[o].properties.isPlaceHolder||(e.clips[o].position=parseInt(e.clips[o].position)+i,r=Math.min(r,e.clips[o].position));var a=e.totalVideoTracks;for(o=0;o<t.clips.length;o++){if(!(c=t.clips[o]).deleted&&!c.properties.isPlaceHolder){var s=o+1;r<i&&(s+=a),s>e.totalVideoTracks&&(e.totalVideoTracks++,e.trackNames.push(c.properties.text)),c.track=s,e.clips.push(c)}}}if(e.ioDetails.outro&&e.ioDetails.outro.theme>0){var l=e.ioDetails.outro,u=0;for(o=0;o<e.clips.length;o++)e.clips[o].deleted||e.clips[o].properties.isPlaceHolder||(u=Math.max(u,parseInt(e.clips[o].position)+e.clips[o].end-e.clips[o].start));for(o=0;o<l.clips.length;o++){var c;if(!(c=l.clips[o]).deleted&&!c.properties.isPlaceHolder)(s=o+1)>=e.totalVideoTracks&&(e.totalVideoTracks++,e.trackNames.push(c.properties.text)),c.position=u,c.track=s,e.clips.push(c)}}}catch(e){console.error(e)}return e},overrideStyle:function(e,t,i){e.each((function(){this.style.setProperty(t,i,"important")}))},applyCustomColors:function(){this.customColors&&(this.customColors.primaryColor&&(this.overrideStyle(this.$el.find(".trim-slider .ui-slider-handle"),"background",this.customColors.primaryColor),this.overrideStyle(this.$el.find(".trim-slider .ui-slider-range"),"border-color",this.customColors.primaryColor)),this.customColors.secondaryColor&&this.overrideStyle(this.$el.find(".trim-slider .ui-slider-range"),"background",this.customColors.secondaryColor),this.customColors.bgColor&&this.overrideStyle(this.$el.find(".trim-slider"),"background",this.customColors.bgColor))},addCustomFontStyles:function(){var e=document.createElement("style");for(var t in n.getFontMap()){var i=n.getFontMap()[t];e.appendChild(document.createTextNode("@font-face { font-family: '"+i.family+"'; font-style: normal; font-weight: 400; src: url('"+this.getFontURL(t,!1,!1)+"') format('truetype'); }")),e.appendChild(document.createTextNode("@font-face { font-family: '"+i.family+"'; font-style: normal; font-weight: bold; src: url('"+this.getFontURL(t,!0,!1)+"') format('truetype'); }")),e.appendChild(document.createTextNode("@font-face { font-family: '"+i.family+"'; font-style: italic; font-weight: 400; src: url('"+this.getFontURL(t,!1,!0)+"') format('truetype'); }")),e.appendChild(document.createTextNode("@font-face { font-family: '"+i.family+"'; font-style: italic; font-weight: bold; src: url('"+this.getFontURL(t,!0,!0)+"') format('truetype'); }"))}document.head.appendChild(e)},getFontURL:function(e,t,i){var n=e;return t&&i?n+="bi":t?n+="bd":i&&(n+="i"),"https://fontstatic.s3-accelerate.amazonaws.com/"+e+"/"+n+".ttf"},getMetrics:function(e,t,i){for(var n=0,r=0,o=0,a=1/i.unitsPerEm*t,s=i.stringToGlyphs(e.replace(/\s/g,"")),l=0;l<s.length;l++){var u=s[l];u.advanceWidth&&(o+=u.advanceWidth*a),l<s.length-1&&(kerningValue=i.getKerningValue(u,s[l+1]),o+=kerningValue*a),n=Math.max(n,u.yMax),r=Math.min(r,u.yMin)}var c=i.getPath(e,0,0,t);return{actualWidth:c.getBoundingBox().x2-c.getBoundingBox().x1,width:o,actualBoundingBoxAscent:n*a,actualBoundingBoxDescent:r*a,actualHeight:n*a-r*a,fontBoundingBoxAscent:i.ascender*a,fontBoundingBoxDescent:i.descender*a,fontHeight:i.ascender*a-i.descender*a}},globalKeypress:function(t){var i=t.keyCode;0==this.videoPlayerView.$el.find(".timer-pop-up").find(e(t.target)).length&&(!this.isMac&&46===i||this.isMac&&8===i)&&this.deleteClipOrEffectSelected()},deleteClipOrEffectSelected:function(){null!=this.currentSelectedBlur?this.deleteBlur():null!=this.currentSelectedSticker?this.deleteSticker():null!=this.currentSelectedCallout?this.deleteCallout():null!=this.currentSelectedText&&(this.videoPlayerView.$el.find(".se-text-editable").is(":visible")||this.deleteText())},setBorderForClipOnVideoSeek:function(){var e=this.getSelectedClipOrEffect();null!=e&&(null!=this.currentSelectedBlur?(this.videoPlayerView.$el.find("#se-effects-"+e.id).removeClass("black white"),this.setAdaptiveBorderForTarget(this.videoPlayerView.$el.find("#se-effects-"+e.id))):(this.videoPlayerView.$el.find("#se-component-"+e.id).removeClass("black white"),this.setAdaptiveBorderForTarget(this.videoPlayerView.$el.find("#se-component-"+e.id))))},getSelectedClipOrEffect:function(){var e=null!=this.currentSelectedText?this.currentSelectedText:null!=this.currentSelectedSticker?this.currentSelectedSticker:null!=this.currentSelectedCallout?this.currentSelectedCallout:void 0;if(null!=e)return this.getClipOf(e);if(null!=this.currentSelectedBlur){e=this.currentSelectedBlur;var i=(this.getClipOf(this.sessionDetails.primaryVideo)||{}).effects||[];return t.where(i,{id:Number(e)})[0]||{}}}})}.apply(t,n))||(e.exports=r)},function(e,t,i){var n,r;n=[i(14),i(16)],void 0===(r=function(e,t){return function(e){function t(e,t){return e.x(t.get(["showAsModal"],!1),t,{else:i,block:s},{})}function i(e,t){return e.w('<center class="hippo-progress-loader"><div class="hippo-progress-text" id="progressText"> Preparing File... </div>').x(t.get(["showHippoIcon"],!1),t,{else:n,block:r},{}).w("</center>")}function n(e,t){return e.w('<div class="hippo-branding-loader"><span></span><span></span><span></span><span></span><span></span></div>')}function r(e,t){return e.x(t.get(["isVirtualBg"],!1),t,{else:o,block:a},{}).w('<div class="hippo-progress-container text-left"><div class="hippo-progress-strip"></div><div class="hippo-progress-fill-strip" id="progressFillStrip"></div></div>')}function o(e,t){return e.w('<img class="hippo-progress-gif" src="/img/hippo-yoga.gif">')}function a(e,t){return e.w('<img class="hippo-progress-gif virtualbg-notify-img" src="/img/virtualbg-notify.png">')}function s(e,t){return e.w('<div class="modal-backdrop" id="progressBackdrop"><div class="large-4 large-offset-4 medium-6 medium-offset-3 hippo-progress"><center class="hippo-progress-loader"><div class="hippo-progress-text" id="progressText"> Preparing File... </div>').x(t.get(["showHippoIcon"],!1),t,{else:l,block:u},{}).w("</center></div></div>")}function l(e,t){return e.w('<div class="hippo-branding-loader"><span></span><span></span><span></span><span></span><span></span></div>')}function u(e,t){return e.x(t.get(["isVirtualBg"],!1),t,{else:c,block:d},{}).w('<div class="hippo-progress-container text-left"><div class="hippo-progress-strip"></div><div class="hippo-progress-fill-strip" id="progressFillStrip"></div></div>')}function c(e,t){return e.w('<img class="hippo-progress-gif" src="/img/hippo-yoga.gif">')}function d(e,t){return e.w('<img class="hippo-progress-gif virtualbg-notify-img" src="/img/virtualbg-notify.png">')}e.register("templates/component/hippo_yoga",t),t.__dustBody=!0,i.__dustBody=!0,n.__dustBody=!0,r.__dustBody=!0,o.__dustBody=!0,a.__dustBody=!0,s.__dustBody=!0,l.__dustBody=!0,u.__dustBody=!0,c.__dustBody=!0,d.__dustBody=!0}(e),function(t,i){var n;return e.render("templates/component/hippo_yoga",t,(function(e,t){if("function"==typeof i)try{i(e,t)}catch(e){}if(e)throw e;n=t})),n}}.apply(t,n))||(e.exports=r)},function(e,t,i){var n,r;n=[i(2),i(11),i(35),i(69),i(20)],void 0===(r=function(e,t,i,n,r){"use strict";return r=r.default,i.Model.extend({idAttribute:"id",defaults:{id:null},initialize:function(e){},url:function(){var e=this.attributes.id?this.attributes.id:"";return JSON.parse(n).getVideoCategories+(e?"/"+e:"")},parse:function(e){return e},getVideoCategories:function(e,t){r.call({url:JSON.parse(n).getAllVideoCategories,method:"GET",success:e,error:t})},getMultipleVideoCategories:function(e,t,i,o){r.call({url:JSON.parse(n).getMultipleCategoryVideos+e,method:"POST",data:t,success:i,error:o})},setDefaultVideoCategory:function(e,t,i,o,a){var s={set_default:i,from:t};r.call({url:JSON.parse(n).setDefaultVideoCategory+"/"+e,method:"PUT",data:s,success:o,error:a})},getVideoCategoriesWithToken:function(e,t,i){r.call({url:JSON.parse(n).getVideoCategoriesWithToken+"/"+e,method:"GET",success:t,error:i})},getCategoryDetails:function(e,t,i){r.call({url:JSON.parse(n).getVideoCategories+"/details/"+e,method:"GET",success:t,error:i})},getVideoGroups:function(e,t,i){r.call({url:JSON.parse(n).getVideoGroups+"?asset_id="+e,method:"GET",success:t,error:i})},getVideoCategoriesAndSelected:function(e,t,i){r.call({url:JSON.parse(n).selectedVideoCategories+"/"+e,method:"GET",success:t,error:i})},getVideosOfCategory:function(e,t,i,o){r.call({url:JSON.parse(n).getCategoryVideos+"/"+e+"/"+t,method:"GET",success:i,error:o})},getVideosOfCategoryWithToken:function(e,t,i,o,a){r.call({url:JSON.parse(n).getCategoryVideosWithToken+"/"+e+"/"+t+"/"+i,method:"GET",success:o,error:a})},assignCategories:function(e,t,i,o){var a=new FormData;a.append("asset_id",e),a.append("cat_ids",t),r.call({url:JSON.parse(n).assignCategories,method:"POST",data:a,contentType:!1,processData:!1,success:i,error:o})},assignGroups:function(e,t,i){r.call({url:JSON.parse(n).assignGroups,method:"POST",data:e,success:t,error:i})},assignVideos:function(e,t,i,o){var a=new FormData;a.append("asset_ids",e),a.append("cat_ids",t),r.call({url:JSON.parse(n).assignVideos,method:"POST",data:a,contentType:!1,processData:!1,success:i,error:o})},searchCategories:function(e,t,i,o,a){var s=new FormData;t&&s.append("search_token",e),s.append("is_search",t),s.append("order_type",i);var l=JSON.parse(n).createVideo+"/1/search_category";r.call({url:l,method:"POST",data:s,contentType:!1,processData:!1,success:o,error:a})},assignToTeacher:function(e,t,i,o){var a="asset_id="+e+"&token="+t;r.call({url:JSON.parse(n).createVideo+"/assign_to_teacher",method:"POST",data:a,success:i,error:o})},deleteVideoCategory:function(e,t,i){r.call({url:JSON.parse(n).deleteVideoCategory+"/"+e,method:"DELETE",success:t,error:i})},saveDocumentInfo:function(e,t,i){r.call({url:JSON.parse(n).saveDocumentInfo,method:"POST",data:e,success:t,error:i})},getUsersAndGroups:function(e,t){r.call({url:"/api/internal/get_user_and_group_list",method:"GET",success:e,error:t})},updatePinFolder:function(e,t,i){r.call({url:JSON.parse(n).updatePinFolder,method:"POST",data:e,success:t,error:i})}})}.apply(t,n))||(e.exports=r)},function(e,t,i){var n,r;n=[i(14),i(16)],void 0===(r=function(e,t){return function(e){function t(e,t){return e.w('<div class="container"><div class="row"><div class="large-8 large-offset-2 medium-10 medium-offset-1 small-12 import-media-container"><div class="import-header clearfix"><div class="pull-left"> ').h("eq",t,{else:i,block:n},{key:t.get(["type"],!1),value:"doc"},"h").w(' </div><div class="pull-right"> <img src="/svg/close-gray.svg" alt="close" id="closeImport"/> </div></div><div class="tab-container" id="tabContainer">').x(t.get(["fromVideoPages"],!1),t,{block:r},{}).x(t.get(["canShowImportFromLocal"],!1),t,{block:a},{}).x(t.get(["canShowVideoLibrary"],!1),t,{block:s},{}).x(t.get(["canShowRecentlyUsed"],!1),t,{block:l},{}).nx(t.get(["fromVideoPages"],!1),t,{block:u},{}).x(t.get(["canShowAudioLibrary"],!1),t,{block:d},{}).x(t.get(["canShowGdriveImport"],!1),t,{block:h},{}).x(t.get(["canImportImageFromLibrary"],!1),t,{block:p},{}).x(t.get(["canShowImageWebSearch"],!1),t,{block:f},{}).x(t.get(["canShowTestimonial"],!1),t,{block:g},{}).x(t.get(["canShowShopify"],!1),t,{block:m},{}).x(t.get(["canShowAddViaLink"],!1),t,{block:v},{}).x(t.get(["canShowCreateVideoOption"],!1),t,{block:y},{}).x(t.get(["canShowWebLink"],!1),t,{block:b},{}).w('</div><div class="import-body no-box-shadow">').p("templates/partials/import_from_local",t,t,{}).p("templates/partials/import_recently_used",t,t,{}).p("templates/partials/import_from_web",t,t,{}).p("templates/partials/import_from_library",t,t,{}).p("templates/partials/import_from_drive",t,t,{}).p("templates/partials/import_from_video_library",t,t,{}).p("templates/partials/import_from_shopify",t,t,{}).p("templates/partials/import_from_custom_link",t,t,{}).p("templates/partials/import_from_website_link",t,t,{}).nx(t.get(["handleOneFileUpload"],!1),t,{block:w},{}).w('<div id="importVideoFormContainer" class="hide"></div></div><div class="import-footer text-right clearfix"><div class="powered-by pull-left hide" id="footerPoweredBy"><span class="powered-by-label"> Powered by </span><img src="/svg/flickr-logo.svg" alt="Flickr" /><img src="/img/pexels-logo.png" alt="Pexels" /></div><div class="pull-left foot-note" id="footnote">').x(t.get(["handleOneFileUpload"],!1),t,{block:_},{}).w("<div>").h("eq",t,{else:T,block:C},{key:t.get(["type"],!1),value:"doc"},"h").w('</div></div><div class="pull-right"><button class="button wiz-secondary-btn wiz-new-secondary-btn radius" id="cancelImport"> ').f(t.get(["cancel"],!1),t,"h").w(' </button><button class="button wiz-primary-btn" id="import" disabled>').h("eq",t,{block:k},{key:t.get(["type"],!1),value:"video"},"h").h("eq",t,{block:x},{key:t.get(["type"],!1),value:"doc"},"h").w(" ").h("ne",t,{block:A},{key:t.get(["type"],!1),value:"video"},"h").w('</button><button class="button wiz-secondary-btn wiz-new-secondary-btn radius hide" id="cancelVideoForm"> ').f(t.get(["changeFile"],!1),t,"h").w(' </button><button class="button wiz-primary-btn hide" id="submitVideoForm"> ').f(t.get(["import"],!1),t,"h").w(" </button></div></div></div></div></div>")}function i(e,t){return e.w(" ").f(t.get(["title"],!1),t,"h").w(" ")}function n(e,t){return e.w(" ").f(t.get(["importDocument"],!1),t,"h").w(" ")}function r(e,t){return e.x(t.get(["canShowVideoLibraryMulti"],!1),t,{block:o},{})}function o(e,t){return e.w('<div class="tab" id="importVideoLibraryTabMulti" data-panel-id="importVideoLibraryl"> ').f(t.get(["importFromVideoLibraryMulti"],!1),t,"h").w(" </div>")}function a(e,t){return e.w('<div class="tab active" id="importLocalTab" data-panel-id="importFromLocal"> ').f(t.get(["importFromLocal"],!1),t,"h").w(" </div>")}function s(e,t){return e.w('<div class="tab" id="importVideoLibrarylTab" data-panel-id="importVideoLibraryl"> ').f(t.get(["importFromVideoLibrary"],!1),t,"h").w(" </div>")}function l(e,t){return e.w('<div class="tab" id="recentlyUsedTab" data-panel-id="importRecentlyUsed"> ').f(t.get(["recentlyUsed"],!1),t,"h").w(" </div>")}function u(e,t){return e.x(t.get(["canShowVideoLibraryMulti"],!1),t,{block:c},{})}function c(e,t){return e.w('<div class="tab" id="importVideoLibraryTabMulti" data-panel-id="importVideoLibraryl"> ').f(t.get(["importFromVideoLibraryMulti"],!1),t,"h").w(" </div>")}function d(e,t){return e.w('<div class="tab" id="importLibraryTab" data-panel-id="importFromLibrary"> ').f(t.get(["importFromLibrary"],!1),t,"h").w(" </div>")}function h(e,t){return e.w('<div class="tab" id="importDriveTab" data-panel-id="importFromDrive"> ').f(t.get(["importFromDrive"],!1),t,"h").w(" </div>")}function p(e,t){return e.w('<div class="tab" id="importImgLibTab" data-panel-id="importImageFromLibrary"> ').f(t.get(["importImageFromLib"],!1),t,"h").w(" </div>")}function f(e,t){return e.w('<div class="tab" id="importWebTab" data-panel-id="importFromWeb"> ').f(t.get(["searchFromWeb"],!1),t,"h").w(" </div>")}function g(e,t){return e.w('<div class="tab" id="importTestimonial" data-panel-id="importVideoLibraryl"> ').f(t.get(["importTestimonial"],!1),t,"h").w(" </div>")}function m(e,t){return e.w('<div class="tab" id="importShopifyTab" data-panel-id="importFromShopify"> ').f(t.get(["shopifyTitle"],!1),t,"h").w(" </div>")}function v(e,t){return e.w('<div class="tab" id="importViaLinkTab" data-panel-id="importFromLink"> ').f(t.get(["addViaLinkTitle"],!1),t,"h").w(" </div>")}function y(e,t){return e.w('<div class="additional-options-block"><a id="libraryRefresh" class="button wiz-border-button create-video-btn no-margin hide"><img class="reload-img" src="/svg/retake-orange.svg"></a><a id="createVideoFromImportBtn" class="button wiz-border-button create-video-btn no-margin" target="_blank" href="/video/record">').f(t.get(["createVideo"],!1),t,"h").w("</a></div>")}function b(e,t){return e.w('<div class="tab" id="importViaWebLink" data-panel-id="importFromWebLink"> ').f(t.get(["WebLinkTitle"],!1),t,"h").w(" </div>")}function w(e,t){return e.p("templates/partials/import_selected_drawer",t,t,{}).w('<div class="drawer-handle" id="openDrawHandle"><img src="/svg/arrow-inactive.svg" alt="Left" class="arrow-marker" /></div>')}function _(e,t){return e.w(" <span> ").f(t.get(["note"],!1),t,"h").w(": </span> ").h("eq",t,{else:S,block:E},{key:t.get(["type"],!1),value:"doc"},"h").w(" ")}function S(e,t){return e.w(" ").f(t.get(["importHelp"],!1),t,"h").w(" ")}function E(e,t){return e.w(" ").f(t.get(["importPDFOnly"],!1),t,"h").w("<b>").f(t.get(["videoLandingPages"],!1),t,"h").w("</b> ")}function T(e,t){return e.w(" ").f(t.get(["supports"],!1),t,"h").w(" ").f(t.get(["formatsList"],!1),t,"h").w(" ").f(t.get(["formatsWithMaxSize"],!1),t,"h").w(" ").f(t.get(["maxFileSize"],!1),t,"h").w(" MB")}function C(e,t){return e.f(t.get(["canBeUsedOnly"],!1),t,"h").w("<br>").f(t.get(["canBeUsedOnlyImage"],!1),t,"h")}function k(e,t){return e.f(t.get(["proceed"],!1),t,"h")}function x(e,t){return e.f(t.get(["proceed"],!1),t,"h")}function A(e,t){return e.h("ne",t,{block:P},{key:t.get(["type"],!1),value:"doc"},"h")}function P(e,t){return e.f(t.get(["import"],!1),t,"h")}e.register("templates/component/import_media",t),t.__dustBody=!0,i.__dustBody=!0,n.__dustBody=!0,r.__dustBody=!0,o.__dustBody=!0,a.__dustBody=!0,s.__dustBody=!0,l.__dustBody=!0,u.__dustBody=!0,c.__dustBody=!0,d.__dustBody=!0,h.__dustBody=!0,p.__dustBody=!0,f.__dustBody=!0,g.__dustBody=!0,m.__dustBody=!0,v.__dustBody=!0,y.__dustBody=!0,b.__dustBody=!0,w.__dustBody=!0,_.__dustBody=!0,S.__dustBody=!0,E.__dustBody=!0,T.__dustBody=!0,C.__dustBody=!0,k.__dustBody=!0,x.__dustBody=!0,A.__dustBody=!0,P.__dustBody=!0}(e),function(t,i){var n;return e.render("templates/component/import_media",t,(function(e,t){if("function"==typeof i)try{i(e,t)}catch(e){}if(e)throw e;n=t})),n}}.apply(t,n))||(e.exports=r)},function(e,t,i){var n,r;n=[i(14),i(16)],void 0===(r=function(e,t){return function(e){function t(e,t){return e.w('<div class="import-body-container import-video-form" id="importVideoForm"><div class="import-web-content image-gallery main-gallery custom-scroll"><form name="importVideoDetails" id="importVideoDetails"><div class="row"><div class="small-12 clearfix"><label class="small-3 inline cat-form-la pull-left"> ').x(t.get(["isMultipleImageImport"],!1),t,{else:i,block:n},{}).w(' </label><div class="small-8 pull-left image-gallery"><div class="image pull-left import-video-form-preview">').x(t.get(["thumbnail_url"],!1),t,{else:r,block:d},{}).w('</div><div class="pull-left desc-container"><label class="import-file-name"> ').x(t.get(["isMultipleImageImport"],!1),t,{else:h,block:p},{}).w("</label>").x(t.get(["isMultipleImageImport"],!1),t,{else:f,block:m},{}).w("</div></div></div>").x(t.get(["askVideoDetails"],!1),t,{block:v},{}).w('</div></form><div id="videoImportStatusLoading" class="hide"></div></div></div>')}function i(e,t){return e.w(" ").f(t.get(["selectedFile"],!1),t,"h").w(" ")}function n(e,t){return e.w(" ").f(t.get(["selectedFiles"],!1),t,"h").w(" ")}function r(e,t){return e.x(t.get(["isImagePreview"],!1),t,{else:o,block:c},{})}function o(e,t){return e.x(t.get(["isAudioPreview"],!1),t,{else:a,block:u},{})}function a(e,t){return e.x(t.get(["isVideoPreview"],!1),t,{else:s,block:l},{})}function s(e,t){return e.w('<img src="/img/film-hippo.png" alt="Video Thumbnail" class="gallery-view" />')}function l(e,t){return e.w('<video autoplay muted play><source src="').f(t.get(["preview_url"],!1),t,"h").w('" type="').f(t.get(["type"],!1),t,"h").w('"></video>')}function u(e,t){return e.w('<audio controls><source src="').f(t.get(["preview_url"],!1),t,"h").w('" type="').f(t.get(["type"],!1),t,"h").w('"></audio>')}function c(e,t){return e.w('<img src="').f(t.get(["preview_url"],!1),t,"h").w('" alt="Video Thumbnail" class="gallery-view" />')}function d(e,t){return e.w('<img src="').f(t.get(["thumbnail_url"],!1),t,"h").w('" alt="Video Thumbnail" class="gallery-view" />')}function h(e,t){return e.w(" ").f(t.get(["name"],!1),t,"h").w(" ")}function p(e,t){return e.w(" ").f(t.get(["totalFileNamesText"],!1),t,"h").w(" ")}function f(e,t){return e.x(t.get(["sizeFormatted"],!1),t,{block:g},{})}function g(e,t){return e.w('<label class="import-file-size"> ').f(t.get(["sizeFormatted"],!1),t,"h").w(" </label>")}function m(e,t){return e.w('<label class="import-file-size"> ').f(t.get(["totalFileCount"],!1),t,"h").w(" files </label>")}function v(e,t){return e.nx(t.get(["isMultipleImageImport"],!1),t,{block:y},{}).x(t.get(["isCategoryAvailable"],!1),t,{block:_},{}).w('<div class="small-12 clearfix"><label class="small-3 inline cat-form-la pull-left"> ').f(t.get(["addTags"],!1),t,"h").w(' </label><div class="small-8 pull-left"><div id="importVideoTags"></div></div></div>').nx(t.get(["isMultipleImageImport"],!1),t,{block:T},{})}function y(e,t){return e.w('<div class="small-12 clearfix"><label class="small-3 inline cat-form-la pull-left required-mark"> ').x(t.get(["isVideo"],!1),t,{else:b,block:w},{}).w(' </label><div class="small-8 pull-left"><input type="text" name="importVideoTitle" id="importVideoTitle" value="').f(t.get(["name"],!1),t,"h").w('"/></div></div>')}function b(e,t){return e.w(" ").f(t.get(["docTitle"],!1),t,"h").w(" ")}function w(e,t){return e.w(" ").f(t.get(["videoTitle"],!1),t,"h").w(" ")}function _(e,t){return e.w('<div class="small-12 clearfix"><label class="small-3 inline cat-form-la pull-left"> ').f(t.get(["addToCategory"],!1),t,"h").w(' </label><div class="small-8 pull-left"><select name="categories" multiple="multiple" id="importVideoCategories">').s(t.get(["categories"],!1),t,{block:S},{}).w("</select></div></div>")}function S(e,t){return e.w('<option value="').f(t.get(["id"],!1),t,"h").w('"').x(t.get(["is_default_category"],!1),t,{block:E},{}).w("> ").f(t.get(["name"],!1),t,"h").w(" </option>")}function E(e,t){return e.w(" selected")}function T(e,t){return e.w('<div class="small-12 clearfix"><label class="small-3 inline cat-form-la pull-left"> ').f(t.get(["description"],!1),t,"h").w(' </label><div class="small-8 pull-left"><textarea rows="5" name="importVideoDesc" id="importVideoDesc" placeholder="Add Description"></textarea></div></div>').x(t.get(["showPreserveTransparency"],!1),t,{block:C},{})}function C(e,t){return e.w('<div class="small-12 clearfix" id="preserveTransparencyContainer"><label class="small-3 inline cat-form-la pull-left"> ').f(t.get(["preserveTransparency"],!1),t,"h").w(' </label><div class="small-8 pull-left"><input class="wiz-checkbox-blue" type="checkbox" id="preserveTransparency"><label class="" for="preserveTransparency"></label></div></div>')}e.register("templates/partials/import_video_form",t),t.__dustBody=!0,i.__dustBody=!0,n.__dustBody=!0,r.__dustBody=!0,o.__dustBody=!0,a.__dustBody=!0,s.__dustBody=!0,l.__dustBody=!0,u.__dustBody=!0,c.__dustBody=!0,d.__dustBody=!0,h.__dustBody=!0,p.__dustBody=!0,f.__dustBody=!0,g.__dustBody=!0,m.__dustBody=!0,v.__dustBody=!0,y.__dustBody=!0,b.__dustBody=!0,w.__dustBody=!0,_.__dustBody=!0,S.__dustBody=!0,E.__dustBody=!0,T.__dustBody=!0,C.__dustBody=!0}(e),function(t,i){var n;return e.render("templates/partials/import_video_form",t,(function(e,t){if("function"==typeof i)try{i(e,t)}catch(e){}if(e)throw e;n=t})),n}}.apply(t,n))||(e.exports=r)},function(e,t,i){var n,r;n=[i(14),i(16)],void 0===(r=function(e,t){return function(e){function t(e,t){return e.w('<div class="simple-edit-container hide ').x(t.get(["integrationType"],!1),t,{block:i},{}).w('"><div class="simple-edit-controls"><div class="se-control-detail default-control-detail clearfix hide"><span class="info-text"></span></div>').h("ne",t,{block:n},{key:t.get(["trim"],!1),value:"false"},"h").h("ne",t,{block:o},{key:t.get(["crop"],!1),value:"false"},"h").h("ne",t,{block:a},{key:t.get(["image"],!1),value:"false"},"h").h("ne",t,{block:h},{key:t.get(["text"],!1),value:"false"},"h").h("ne",t,{block:v},{key:t.get(["stickers"],!1),value:"false"},"h").h("ne",t,{block:y},{key:t.get(["callout"],!1),value:"false"},"h").h("ne",t,{block:E},{key:t.get(["blur"],!1),value:"false"},"h").h("ne",t,{block:T},{key:t.get(["resize"],!1),value:"false"},"h").w('<div class="simple-edit-buttons-box ').x(t.get(["integrationType"],!1),t,{block:C},{}).w('">').h("ne",t,{block:k},{key:t.get(["trim"],!1),value:"false"},"h").h("ne",t,{block:A},{key:t.get(["crop"],!1),value:"false"},"h").nx(t.get(["fromQuickRecord"],!1),t,{block:I},{}).h("ne",t,{block:N},{key:t.get(["stickers"],!1),value:"false"},"h").h("ne",t,{block:M},{key:t.get(["callouts"],!1),value:"false"},"h").h("ne",t,{block:B},{key:t.get(["blur"],!1),value:"false"},"h").h("ne",t,{block:V},{key:t.get(["resize"],!1),value:"false"},"h").w('</div></div></div><div class="modal-backdrop image-upload-progress-container" id="imageUploadProgessContainer"><div class="text-center loading-container"><div class="progress-text" id="imageUploadProgressText"> </div></div></div>')}function i(e,t){return e.f(t.get(["integrationType"],!1),t,"h").w("-simple-edit")}function n(e,t){return e.w('<div class="se-control-detail clearfix trim-control-detail hide"><img class="ruler ruler-static" src="').f(t.get(["origin"],!1),t,"h").w('/img/ruler-two.png"><canvas class="ruler ruler-dynamic hide" width="1000" height="15"></canvas><input type="text" class="sliderValue" style="display:none" data-index="0" value="0" /><input type="text" class="sliderValue" style="display:none" data-index="1" value="0" /><div class="trim-slider" id="trimSlider"></div>').h("ne",t,{block:r},{key:t.get(["shouldHideTrimTimer"],!1),value:"true"},"h").w('<div class="trim-preview-container"><video class="trim-preview-video"></video></div><div class="preview-trim-arrow"></div></div>')}function r(e,t){return e.w('<div class="trim-before-container"><div class="trim-before-time-element"><div class="arrow right-arrow"></div><span class="trim-before-time"></span></div><div class="trim-before-pop"><span>').f(t.getPath(!1,["simpleEdit","trimStartTime"]),t,"h").w('</span><input type="text" class="trim-before-input"><div class="before-trim-div"><div class="arrow up-arrow trim-input-btn trim-input-btn-plus"></div><div class="arrow down-arrow trim-input-btn trim-input-btn-minus"></div></div><div class="trim-arrow"></div></div></div><div class="trim-after-container"><div class="trim-after-time-element"><div class="arrow left-arrow"></div><span class="trim-after-time"></span></div><div class="trim-after-pop"><span>').f(t.getPath(!1,["simpleEdit","trimEndTime"]),t,"h").w('</span><input type="text" class="trim-after-input"><div class="after-trim-div"><div class="arrow up-arrow trim-input-btn trim-input-btn-plus"></div><div class="arrow down-arrow trim-input-btn trim-input-btn-minus"></div></div><div class="trim-arrow"></div></div></div>')}function o(e,t){return e.w('<div class="se-control-detail clearfix crop-control-detail hide"><div class="pull-left reposition-webcam-container"><input type="checkbox" class="reposition-webcam wiz-checkbox-blue" id="move" checked /><label for="move">').f(t.getPath(!1,["simpleEdit","moveWebcam"]),t,"h").w('</label></div><div class="pull-right text-right"><a class="apply-crop apply-btn" id="cropApplyBtn">').f(t.getPath(!1,["simpleEdit","apply"]),t,"h").w('</a><a class="reset-crop reset-btn" id="cropResetBtn">').f(t.getPath(!1,["simpleEdit","reset"]),t,"h").w("</a></div></div>")}function a(e,t){return e.x(t.get(["isAddImageEnabled"],!1),t,{block:s},{})}function s(e,t){return e.w('<div class="se-control-detail clearfix addimage-control-detail hide">').nx(t.get(["fromQuickRecord"],!1),t,{else:l,block:c},{}).w('<div class="addimage-selected hide"><div class="left"><input type="checkbox" class="wiz-checkbox-blue" id="imageArLock" checked /><label for="imageArLock" class="image-ar-lock">').f(t.getPath(!1,["simpleEdit","lockAspectRatioResize"]),t,"h").w('</label></div><div class="left opacity-container"><span class="left">').f(t.getPath(!1,["simpleEdit","opacity"]),t,"h").w('</span><input class="left slider" type="range" min="0" max="100" id="imageOpacitySlider"><input class="left slider-ip" type="number" min="0" max="100" value="100" id="imageOpacityInput"></div><div class="right delete-btn-container"><div id="deleteImage" class="delete-btn">').f(t.getPath(!1,["simpleEdit","delete"]),t,"h").w("</div></div></div></div>")}function l(e,t){return e.w('\x3c!-- new quick record flow personalization --\x3e<div class="addimage-initial cpv-personalization hide"><div class="add-image-action left add-text hide">\t<img src="').f(t.get(["origin"],!1),t,"h").w('/svg/plus-ico-blue.svg"/><span id="addTextLink">\t').f(t.getPath(!1,["simpleEdit","addText"]),t,"h").w('\t</span>\t</div><div class="add-image-action left" id="addImageBtn"><img src="').f(t.get(["origin"],!1),t,"h").w('/svg/plus-ico-blue.svg"/><span>').f(t.getPath(!1,["simpleEdit","addImage"]),t,"h").w("</span></div>").x(t.get(["canShowPersonalization"],!1),t,{block:u},{}).w("</div>\x3c!-- end of new quick record flow personalization --\x3e")}function u(e,t){return e.w('<div class="add-image-action left" id="addPersonalizedImageBtn"><img src="').f(t.get(["origin"],!1),t,"h").w('/svg/plus-ico-blue.svg"/><span>').f(t.getPath(!1,["simpleEdit","addPersonalizedImage"]),t,"h").w('</span></div><div class="add-image-action left" id="addWebsiteImageBtn"><img src="').f(t.get(["origin"],!1),t,"h").w('/svg/plus-ico-blue.svg"/><span>').f(t.getPath(!1,["simpleEdit","addWebsiteImage"]),t,"h").w("</span></div>")}function c(e,t){return e.w('<div class="addimage-initial hide"><div class="add-image-action left add-text hide">\t<span id="addTextLink">\t').f(t.getPath(!1,["simpleEdit","addText"]),t,"h").w('\t</span>\t</div><div class="add-image-action left" id="addImageBtn"><span>').f(t.getPath(!1,["simpleEdit","addImage"]),t,"h").w("</span></div>").x(t.get(["canShowPersonalization"],!1),t,{block:d},{}).w("</div>")}function d(e,t){return e.w('<div class="add-image-action left" id="addPersonalizedImageBtn"><span>').f(t.getPath(!1,["simpleEdit","addPersonalizedImage"]),t,"h").w('</span></div><div class="left add-image-tooltip"><img src="').f(t.get(["origin"],!1),t,"h").w('/img/help.png"><div class="add-image-tooltip-content">').f(t.getPath(!1,["simpleEdit","addImageInfo"]),t,"h").w('<a href="https://help.hippovideo.io/support/solutions/articles/19000100178-image-personalization" target="_blank">').f(t.getPath(!1,["simpleEdit","learnMore"]),t,"h").w('</a></div></div><div class="add-image-action left" id="addWebsiteImageBtn"><span>').f(t.getPath(!1,["simpleEdit","addWebsiteImage"]),t,"h").w('</span></div><div class="left add-image-tooltip"><img src="').f(t.get(["origin"],!1),t,"h").w('/img/help.png"><div class="add-image-tooltip-content">').f(t.getPath(!1,["simpleEdit","addWebsiteImageInfo"]),t,"h").w('<a href="https://help.hippovideo.io/support/solutions/articles/19000100178-image-personalization" target="_blank">').f(t.getPath(!1,["simpleEdit","learnMore"]),t,"h").w("</a></div></div>")}function h(e,t){return e.w('<div class="se-control-detail clearfix addtext-control-detail hide"><div class="addtext-container"><div id="textPropertiesTab" style="display:none" class="sdk-top-wrap"><div class="sdk-text-wrap"><div class="padding-face se-font mf-custom-selector"><select class="se-text-properties se-font-selector"></select></div><div class="padding-face se-fontsize mf-custom-selector"><select class="se-text-properties se-fontsize-selector"><option value="15">15px</option><option value="17">17px</option><option value="20">20px</option><option value="25">25px</option><option value="35">35px</option><option value="40" selected>40px</option><option value="50">50px</option><option value="60">60px</option><option value="70">70px</option><option value="90">90px</option><option value="110">110px</option></select></div><div class="padding-face alignment-selector"><select class="se-text-properties se-textalign-selector"><option value="left">').f(t.getPath(!1,["simpleEdit","left"]),t,"h").w('</option><option value="center" selected>').f(t.getPath(!1,["simpleEdit","center"]),t,"h").w('</option><option value="right">').f(t.getPath(!1,["simpleEdit","right"]),t,"h").w('</option></select></div></div><div class="sdk-textstyle-wrap"><div class="se-bold-face"><input type="checkbox" id="c1" class="se-text-properties se-bold-toggle chk-btn" /><label for=\'c1\'><b>B</b></label></div><div class="italic-face"><input type="checkbox" id="c2" class="se-text-properties se-italic-toggle chk-btn" /><label for=\'c2\'><i>I</i></label></div><div class=""><div class="padding-face color-picker"><input type = "color" class="se-text-properties se-color-choose se-color-selector"/></div></div></div></div><div class="padding-face for-merge-field"><div class="mf-custom-selector mf-custom-selector-button merge-field-container">').x(t.get(["canShowPersonalization"],!1),t,{block:p},{}).w('</div><div class="padding-face se-add-text-btn text-right"><a class="add-text" id="addTextLink"><img src="').h("eq",t,{else:g,block:m},{key:t.get(["integrationType"],!1),value:"lessonly"},"h").w('" alt="plus" />').f(t.getPath(!1,["simpleEdit","addText"]),t,"h").w("</a></div></div></div></div>")}function p(e,t){return e.w('<div class="mf-selector"><select id="seMfSelector"><option selected>').f(t.getPath(!1,["simpleEdit","mergeFields"]),t,"h").w("</option>").s(t.get(["mfValues"],!1),t,{block:f},{}).w('</select></div><div class="text-right mf-label"><label><div><span class="mf-info-tooltip">').f(t.getPath(!1,["simpleEdit","mfInfoTooltip"]),t,"h").w('</span><img src="').f(t.get(["origin"],!1),t,"h").w('/svg/help1.svg" /></div></label></div>')}function f(e,t){return e.w("<option>").f(t.get(["mf"],!1),t,"h").w("</option>")}function g(e,t){return e.f(t.get(["origin"],!1),t,"h").w("/img/small-plus.png")}function m(e,t){return e.w("/img/small-plus-4a90e2.png")}function v(e,t){return e.w('<div class="se-control-detail clearfix addsticker-control-detail hide"><div class="addsticker-initial hide"><div class="sticker-btn-container clearfix"></div></div><div class="addsticker-selected hide"><div class=""><input type="checkbox" class="lock-aspect-ratio sticker-control wiz-checkbox-blue" id="sticker-lock" checked /><label for="sticker-lock">').f(t.getPath(!1,["simpleEdit","lockAspectRatioResize"]),t,"h").w('</label></div><div class=""><div class="text-right"><span>').f(t.getPath(!1,["simpleEdit","opacity"]),t,"h").w('</span></div><div class=""><select class="opacity-val sticker-control"><option value="0">0</option><option value="25">25</option><option value="50">50</option><option value="75">75</option><option value="100">100</option></select></div></div><div class="text-right"><a class="delete-sticker delete-label" id="deleteSticker">').f(t.getPath(!1,["simpleEdit","delete"]),t,"h").w("</a></div></div></div>")}function y(e,t){return e.w('<div class="se-control-detail clearfix addcallout-control-detail hide"><div class="addcallout-initial clearfix hide"><img class="callout-scroll-left pull-left" src="').h("eq",t,{else:b,block:w},{key:t.get(["integrationType"],!1),value:"lessonly"},"h").w('"><div class="callout-btn-scroll-container pull-left"><div class="callout-btn-container"></div></div><img class="callout-scroll-right pull-right" src="').h("eq",t,{else:_,block:S},{key:t.get(["integrationType"],!1),value:"lessonly"},"h").w('"><div class="callout-scroll-hide-layer"></div></div><div class="addcallout-selected hide"><div class=""><input type="checkbox" class="lock-aspect-ratio callout-control wiz-checkbox-blue" id="callout-lock" checked /><label for="callout-lock">').f(t.getPath(!1,["simpleEdit","lockAspectRatioResize"]),t,"h").w('</label></div><div class="se-callout-internal"><div class=""><span>').f(t.getPath(!1,["simpleEdit","opacity"]),t,"h").w('</span></div><div class=""><select class="opacity-val callout-control"><option value="0">0</option><option value="25">25</option><option value="50">50</option><option value="75">75</option><option value="100" selected>100</option></select></div></div><div class="se-callout-internal"><div class=""><span>').f(t.getPath(!1,["simpleEdit","color"]),t,"h").w('</span></div><div class=""><select class="callout-control callout-variation"><option value="0">').f(t.getPath(!1,["simpleEdit","default"]),t,"h").w('</option><option value="1">').f(t.getPath(!1,["simpleEdit","yellow"]),t,"h").w('</option><option value="2">').f(t.getPath(!1,["simpleEdit","orange"]),t,"h").w('</option><option value="3">').f(t.getPath(!1,["simpleEdit","green"]),t,"h").w('</option><option value="4">').f(t.getPath(!1,["simpleEdit","violet"]),t,"h").w('</option><option value="5">').f(t.getPath(!1,["simpleEdit","blue"]),t,"h").w('</option><option value="6">').f(t.getPath(!1,["simpleEdit","dark"]),t,"h").w('</option><option value="7">').f(t.getPath(!1,["simpleEdit","white"]),t,"h").w('</option></select></div></div><div class="text-right"><a class="delete-callout delete-label" id="deleteCallout">').f(t.getPath(!1,["simpleEdit","delete"]),t,"h").w("</a></div></div></div>")}function b(e,t){return e.f(t.get(["origin"],!1),t,"h").w("/img/sli-aro-left.png")}function w(e,t){return e.w("/img/sli-aro-left-4a90e2.png")}function _(e,t){return e.f(t.get(["origin"],!1),t,"h").w("/img/sli-aro-right.png")}function S(e,t){return e.w("/img/sli-aro-right-4a90e2.png")}function E(e,t){return e.w('<div class="se-control-detail clearfix blur-control-detail text-left hide"><div class="blur-initial hide" id="blurInitial">').f(t.getPath(!1,["simpleEdit","blurDescription"]),t,"h").w('<div class="outline-btn pull-right" id="applyBlur"> ').f(t.getPath(!1,["simpleEdit","addNewBlur"]),t,"h").w(' </div></div><div class="blur-selected clearfix hide" id="blurSelected"><div class="pull-left"><input type="checkbox" class="lock-aspect-ratio blur-control wiz-checkbox-blue" id="blurLock" /><label for="blurLock">').f(t.getPath(!1,["simpleEdit","lockAspectRatioResize"]),t,"h").w('</label></div><div class="pull-left content-box"><div class="props-label pull-left"><span> ').f(t.getPath(!1,["simpleEdit","strength"]),t,"h").w(' </span></div><div class="pull-left"><div class="blur-control" id="blurStrength"></div></div><div class="pull-left"><input type="number" step="1" min="0" max="100" value="25" class="blur-input" id="blurStrengthText" /></div></div><div class="pull-right text-right content-box"><a class="delete-blur delete-label" id="deleteblur">').f(t.getPath(!1,["simpleEdit","delete"]),t,"h").w("</a></div></div></div>")}function T(e,t){return e.w('<div class="se-resize-control-detail hide"><div class="se-control-detail clearfix primaryvid-control-detail hide"><input type="checkbox" class="lock-aspect-ratio primary-vid-control wiz-checkbox-blue" id="lock-three" checked /><label for="lock-three" class="cursor-pointer" >').f(t.getPath(!1,["simpleEdit","lockAspectRatioResize"]),t,"h").w('</label></div><div class="se-control-detail clearfix secondaryvid-control-detail hide"><input type="checkbox" class="lock-aspect-ratio secondary-vid-control wiz-checkbox-blue" id="lock-four" checked /><label for="lock-four">').f(t.getPath(!1,["simpleEdit","lockAspectRatioResize"]),t,"h").w("</label></div></div>")}function C(e,t){return e.f(t.get(["integrationType"],!1),t,"h").w("-se-icon-sprite")}function k(e,t){return e.w('<div class="wiz-simple-edit-btn trim-btn ').x(t.get(["isHideTrim"],!1),t,{block:x},{}).w('" id="trimBtn" tooltip="').f(t.getPath(!1,["simpleEdit","trim"]),t,"h").w('" tooltip-position="bottom"><span class="simple-edit-trim"></span></div>')}function x(e,t){return e.w(" disp-none ")}function A(e,t){return e.w('<div class="wiz-simple-edit-btn crop-btn ').x(t.get(["isHideCorp"],!1),t,{block:P},{}).w('" id="cropBtn" tooltip="').f(t.getPath(!1,["simpleEdit","crop"]),t,"h").w('" tooltip-position="bottom"><span class="simple-edit-crop"></span></div>')}function P(e,t){return e.w(" disp-none ")}function I(e,t){return e.h("ne",t,{block:R},{key:t.get(["text"],!1),value:"false"},"h").x(t.get(["isAddImageEnabled"],!1),t,{block:D},{})}function R(e,t){return e.w('<div class="wiz-simple-edit-btn add-text-btn" id="addTextBtn" tooltip="').f(t.getPath(!1,["simpleEdit","text"]),t,"h").w('" tooltip-position="bottom"><span class="simple-edit-text"></span></div>')}function D(e,t){return e.h("ne",t,{block:O},{key:t.get(["image"],!1),value:"false"},"h")}function O(e,t){return e.w('<div class="wiz-simple-edit-btn add-image-btn" id="addImageMenuBtn" tooltip="').f(t.getPath(!1,["simpleEdit","image"]),t,"h").w('" tooltip-position="bottom"><span class="simple-edit-image-personalisation"></span></div>')}function N(e,t){return e.w('<div class="wiz-simple-edit-btn add-stickers-btn ').x(t.get(["isHideStickers"],!1),t,{block:L},{}).w('" id="addStickersBtn" tooltip="').f(t.getPath(!1,["simpleEdit","emoji"]),t,"h").w('" tooltip-position="bottom"><span class="simple-edit-sticker"></span></div>')}function L(e,t){return e.w(" disp-none ")}function M(e,t){return e.w('<div class="wiz-simple-edit-btn add-callouts-btn ').x(t.get(["isHideCallouts"],!1),t,{block:F},{}).w('" id="addCalloutsBtn" tooltip="').f(t.getPath(!1,["simpleEdit","callout"]),t,"h").w('" tooltip-position="bottom"><span class="simple-edit-callout"></span></div>')}function F(e,t){return e.w(" disp-none ")}function B(e,t){return e.w('<div class="wiz-simple-edit-btn add-blur-btn ').x(t.get(["isHideBlur"],!1),t,{block:U},{}).w('" id="blurBtn" tooltip="').f(t.getPath(!1,["simpleEdit","blur"]),t,"h").w('" tooltip-position="bottom"><span class="simple-edit-blur"></span></div>')}function U(e,t){return e.w(" disp-none ")}function V(e,t){return e.w('<div class="wiz-simple-edit-btn resize-draggable-btn ').x(t.get(["isResizableNotAllowed"],!1),t,{block:z},{}).w('" id="resizeDragBtn" tooltip="').f(t.getPath(!1,["simpleEdit","resize"]),t,"h").w('" tooltip-position="bottom"><span class="simple-edit-resize"></span></div>')}function z(e,t){return e.w(" disp-none ")}e.register("templates/simple_edit/sdk_controls",t),t.__dustBody=!0,i.__dustBody=!0,n.__dustBody=!0,r.__dustBody=!0,o.__dustBody=!0,a.__dustBody=!0,s.__dustBody=!0,l.__dustBody=!0,u.__dustBody=!0,c.__dustBody=!0,d.__dustBody=!0,h.__dustBody=!0,p.__dustBody=!0,f.__dustBody=!0,g.__dustBody=!0,m.__dustBody=!0,v.__dustBody=!0,y.__dustBody=!0,b.__dustBody=!0,w.__dustBody=!0,_.__dustBody=!0,S.__dustBody=!0,E.__dustBody=!0,T.__dustBody=!0,C.__dustBody=!0,k.__dustBody=!0,x.__dustBody=!0,A.__dustBody=!0,P.__dustBody=!0,I.__dustBody=!0,R.__dustBody=!0,D.__dustBody=!0,O.__dustBody=!0,N.__dustBody=!0,L.__dustBody=!0,M.__dustBody=!0,F.__dustBody=!0,B.__dustBody=!0,U.__dustBody=!0,V.__dustBody=!0,z.__dustBody=!0}(e),function(t,i){var n;return e.render("templates/simple_edit/sdk_controls",t,(function(e,t){if("function"==typeof i)try{i(e,t)}catch(e){}if(e)throw e;n=t})),n}}.apply(t,n))||(e.exports=r)},function(e,t,i){"use strict";i.d(t,"a",(function(){return u}));var n,r=i(1),o=i.n(r),a=i(4),s=i.n(a),l=i(3),u=l.c.div(n||(n=s()(["\n margin-top: ",";\n margin-left: auto;\n margin-right: auto;\n\n /* Because the css of image-upload-progress-container is not defined properly and you will need to import entire wiz-delivery.scss file for this to work */\n .image-upload-progress-container {\n display: none;\n }\n"])),function(e){var t=e.showSimpleEditor;return o()(this,void 0),t?"0":"38px"}.bind(void 0))},function(e,t,i){"use strict";i.d(t,"a",(function(){return x}));var n,r,o=i(1),a=i.n(o),s=i(0),l=i.n(s),u=i(57),c=i.n(u),d=i(3),h=i(4),p=i.n(h),f=d.c.div(n||(n=p()(["\n .progress-widget-header {\n position: relative;\n display: flex;\n align-items: center;\n width: 80%;\n border-bottom: 1px solid #E6E6E6;\n margin: 0 auto;\n &-progress-warpper {\n position: relative;\n }\n &-status-text {\n color: #000000;\n font: normal normal 600 14px/19px Open Sans;\n }\n &-percent-text {\n font: normal normal 600 14px/19px Open Sans;\n color: #000000;\n position: absolute;\n right: 0;\n }\n img {\n position: absolute;\n top: 11px;\n left: 10px;\n }\n }\n .progress-widget-content {\n width: 80%;\n margin: 0 auto;\n padding: 10px 10px;\n font: normal normal normal 12px/17px Open Sans;\n color: #6F6F6F;\n }\n"]))),g=d.c.div(r||(r=p()(["\n svg {\n width: 30px;\n height: 28px;\n .bg {\n fill: none;\n stroke-width: 2px;\n stroke: #E6E6E6;\n }\n .progress {\n fill: none;\n stroke-width: 2px;\n stroke: #F47A58;\n stroke-linecap: round;\n stroke-dasharray: 62.36;\n transform: rotate(-90deg);\n transform-origin: 50% 50%;\n stroke-dashoffset: ",";\n transition: stroke-dashoffset 1s ease-in;\n }\n }\n"])),function(e){return a()(this,void 0),isNaN(e.progress)?"62":e.progress}.bind(void 0));function m(e){var t=this,i=e.progressPercent,n=void 0===i?0:i,r=Object(s.useMemo)(function(){return a()(this,t),62-n/100*62}.bind(this),[n]);return l.a.createElement(g,{progress:r},l.a.createElement("svg",null,l.a.createElement("circle",{className:"bg",cx:"15",cy:"15",r:"10"}),l.a.createElement("circle",{className:"progress two",cx:"15",cy:"15",r:"10"})))}var v,y=i(6),b={completedPercent:0,type:"upload"};function w(e){var t=this,i=e.recorder,n=e.onUploadComplete,r=e.onUploadError,o=Object(s.useState)(b),u=o[0],c=o[1],d=Object(s.useRef)(),h=Object(y.a)(u);return Object(s.useEffect)(function(){var e=this;a()(this,t),console.log("progressFetchInterval.current ",d.current),d.current||(d.current=setInterval(function(){var t=this;a()(this,e);try{i.getUploadDetails().then(function(e){return a()(this,t),e&&e.completed?(n&&n(),clearInterval(d.current),void(d.current=null)):e&&e.error?(clearInterval(d.current),d.current=null,void r(e.errorType)):void c(e)}.bind(this)).catch(function(e){a()(this,t),console.error("UPLOAD STATUS FETCH ERROR ",e),clearInterval(d.current),d.current=null}.bind(this))}catch(e){console.error("UPLOAD PROGRESS EX ",e),clearInterval(d.current),d.current=null}}.bind(this),1e3),function(){a()(this,e),clearInterval(d.current),d.current=null}.bind(this))}.bind(this)),l.a.createElement(f,null,l.a.createElement("div",{className:"progress-widget-header"},l.a.createElement("div",{className:"progress-widget-header-progress-warpper"},l.a.createElement(m,{progressPercent:u.completedPercent}),l.a.createElement("img",{src:Object(y.e)("/svg/rapi/webcam-icon.svg")})),l.a.createElement("div",{className:"progress-widget-header-status-text"},"Uploading video"),l.a.createElement("div",{className:"progress-widget-header-percent-text"},u.completedPercent,"%")),l.a.createElement("div",{className:"progress-widget-content"},l.a.createElement("div",null,h)))}var _,S=d.c.div(v||(v=p()(["\n margin: 0 auto;\n width: 90%;\n .hv-upload-error-screen-header {\n display: flex;\n align-items: center;\n padding-bottom: 10px;\n padding-top: 20px;\n border-bottom: 1px solid #e6e6e6;\n img {\n margin-right: 5px;\n }\n div {\n font: normal normal 600 14px/19px Open Sans;\n }\n }\n\n .hv-upload-error-screen-content {\n &-text {\n font: normal normal normal 12px/17px Open Sans;\n color: #212121;\n padding-top: 10px;\n }\n &-options-wrapper {\n text-align: center;\n padding: 20px 0px;\n }\n }\n"]))),E=i(18);function T(e){var t=this,i=e.downloadSources,n=e.onRetryUpload,r=function(){a()(this,t);var e=[];if(i)for(var n in i){var r=i[n];e.push({link:r,linkType:"download",downloadName:"Testing the name",linkName:"Download ".concat(n," source")})}return e}.bind(this);return l.a.createElement(S,null,l.a.createElement("div",{className:"hv-upload-error-screen-header"},l.a.createElement("img",{src:Object(y.e)("/svg/rapi/error-circle-red.svg")}),l.a.createElement("div",null,"Upload Failed")),l.a.createElement("div",{className:"hv-upload-error-screen-content"},l.a.createElement("div",null,l.a.createElement("div",{className:"hv-upload-error-screen-content-text"},"Your video upload has failed! Below are the few options you can try."),l.a.createElement("div",{className:"hv-upload-error-screen-content-options-wrapper"},l.a.createElement(E.f,{style:{marginRight:"10px"},icon:Object(y.e)("/svg/rapi/download-icon.svg"),text:"Download Video",options:r(),buttonFeature:E.b.DROPDOWN,dropdownPosition:E.e.TOP}),l.a.createElement(E.f,{text:"Retry Upload",onClickHandler:n})))))}var C=d.c.div(_||(_=p()(["\n max-width: 400px;\n min-width: 300px;\n border: 1px solid #E6E6E6;\n background-color: #ffffff;\n box-shadow: 0px 8px 12px #0000001A;\n border-radius: 8px;\n"])));function k(e){var t=this,i=e.recorder,n=e.onUploadComplete,r=Object(s.useState)(!1),o=r[0],u=r[1],c=Object(s.useRef)(),d=function(e){a()(this,t),console.log("SETTING UPLOAD ERROR >>> ",e),c.current=i.getRecordingObjectUrls(),console.log("SETTING UPLOAD ERROR >>> ",c.current),u(e)}.bind(this),h=function(){a()(this,t),i.retryUpload(),u(!1)}.bind(this);return l.a.createElement(C,null,o?l.a.createElement(T,{downloadSources:c.current,onRetryUpload:h}):l.a.createElement(w,{recorder:i,onUploadComplete:n,onUploadError:d}))}function x(e,t){var i=P();c.a.render(l.a.createElement(d.a,{theme:t},l.a.createElement(k,{recorder:e,onUploadComplete:A})),i)}var A=function(){a()(this,void 0),c.a.unmountComponentAtNode(document.getElementsByClassName("hv-upload-progress-widget")[0])}.bind(void 0),P=function(){if(a()(this,void 0),document.getElementsByClassName("hv-upload-progress-widget").length>0)return document.getElementsByClassName("hv-upload-progress-widget")[0];var e=document.createElement("div");return e.className="hv-upload-progress-widget",e.style="position: fixed;bottom: 20px;right: 20px;",document.body.appendChild(e),e}.bind(void 0)},function(e,t,i){"use strict";i.d(t,"a",(function(){return m}));var n,r=i(1),o=i.n(r),a=i(0),s=i.n(a),l=i(57),u=i.n(l),c=i(194),d=i(195),h=i(4),p=i.n(h),f=i(3).c.div(n||(n=p()(["\n position: fixed;\n width: 320px;\n bottom: 0;\n left: 5px;\n z-index: 100;\n"])));function g(e){var t=e.stream,i=Object(a.useRef)(),n=Object(a.useRef)();return window.videoPreviewRef=i,window.lightingCanvasRef=n,s.a.createElement(f,null,s.a.createElement(c.a,{stream:t,ref:i}),t&&s.a.createElement(d.a,{ref:n}))}function m(e){var t=v();console.log("ROOT ELEMENT ",t),u.a.render(s.a.createElement(g,{stream:e}),t)}var v=function(){if(o()(this,void 0),document.getElementsByClassName("hv-rapi-webcam-preview").length>0)return document.getElementsByClassName("hv-rapi-webcam-preview")[0];var e=document.createElement("div");return e.className="hv-rapi-webcam-preview",document.body.appendChild(e),e}.bind(void 0)},function(e,t,i){"use strict";i.r(t),function(e){i.d(t,"removeWidget",(function(){return F})),i.d(t,"initialize",(function(){return B})),i.d(t,"availableRecordingSupport",(function(){return V})),i.d(t,"RecorderWidget",(function(){return H})),i.d(t,"ImportWidget",(function(){return j}));i(24),i(77);var n=i(49),r=i.n(n),o=i(54),a=i.n(o),s=i(41),l=i.n(s),u=i(37),c=i.n(u),d=i(38),h=i.n(d),p=i(360),f=i.n(p),g=i(1),m=i.n(g),v=i(254),y=i.n(v),b=(i(66),i(52),i(106),i(221),i(0)),w=i.n(b),_=i(57),S=i.n(_),E=i(26),T=i(5),C=i(190),k=i(208),x=i(401),A=i(400),P=i(6);function I(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var i,n=l()(e);if(t){var r=l()(this).constructor;i=Reflect.construct(n,arguments,r)}else i=n.apply(this,arguments);return a()(this,i)}}var R,D=["sdk_loaded","record_initiated","record_started","record_details","record_paused","record_resumed","record_stopped","record_aborted","record_error","video_cancelled","video_submitted","import_progress","import_complete","import_failed","source_uploaded"],O=!1,N={},L={screen:"screenRecord",webcam:"webCam",system_audio:"systemAudio",tab_recording:"tabRecording",separate_layer:"separateLayer",from_popup:"fromPopup",aspect_ratio:"aspectRatio",record_config:"recordConfig"};function M(){var e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",t="";window&&window.performance&&(t="".concat(Math.round(window.performance.now())));for(var i=e.length,n=0;n<10;n++)t+=e.charAt(Math.floor(Math.random()*i));return t}var F=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document.getElementById("recorder1");m()(this,void 0);try{S.a.unmountComponentAtNode(e)}catch(e){}}.bind(void 0);function B(e,t){return U.apply(this,arguments)}function U(){return(U=f()(y.a.mark((function e(t,i){var n,r,o,a,s,l,u,c,d,h,p,f,g,m;return y.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t){e.next=3;break}return i&&i(null,{error:"INVALID_CONFIGURATION",message:"The configuration passed is invalid"}),e.abrupt("return");case 3:if(n=t.token,r=t.token_type,o=void 0===r?T.e.RECORDER_SDK_TOKEN:r,a=t.environment,s=t.integration_type,l=void 0===s?"generic_recorder":s,n){e.next=7;break}return i&&i(null,{error:"TOKEN_NOT_FOUND",message:"The token was not passed in the method"}),e.abrupt("return");case 7:return u=new C.a({token:n,tokenType:o}),e.next=10,u.authenticateToken();case 10:if(c=e.sent,d=c[0],h=c[1],!d){e.next=25;break}if(p=d.data,f=p.user_id,console.log("SUCCESS ",d),!p.error){e.next=20;break}return i&&i(null,p),e.abrupt("return");case 20:g=M(),N[g]={token:n,userId:f,environment:a,initialized:!0,tokenType:o},J(l),K(n),i&&i({key:g},null);case 25:if(!h){e.next=30;break}return console.log("ERROR ",h),m={error:"NETWORK_ERROR",message:"There was a network error. Please check network connection and try again"},i&&i(null,m),e.abrupt("return");case 30:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function V(){var e=Object(E.f)();return e.recording&&delete e.recording.system_audio,console.log("Recording capabilities ",e.recording,e.constraints),e}var z=function(){function t(e,i){var n=this,r=i.type,o=i.settings,a=void 0===o?{}:o;i.recorder_events;if(c()(this,t),!N.hasOwnProperty(e))throw new Error("INVALID_KEY");var s=a.extensionless,l=a.inline;if(this.recordingInProgress=!1,this.recorderSettings=a,this.eventCallbackMap={},N[e].initialized){if(window.HippoVideo||(window.HippoVideo={}),this.eventListenerClass="hvr-evl-".concat((new Date).getTime()),this.recorderClassName="hv-recorder-".concat((new Date).getTime()),this.targetElement,this.extensionless=s,l){var u=l.element_id,d=l.element;if(u&&(this.targetElement=document.getElementById(u)),d&&(this.targetElement=d),!this.targetElement&&document.getElementsByTagName("hippo-video-recorder")[0]&&(this.targetElement=document.getElementsByTagName("hippo-video-recorder")[0]),!this.targetElement)return void Y(this.eventCallbackMap,"record_error",{error:"inline_element_not_provided",message:'Parent element for adding recorder not found. Please pass the element id or element or set config "popup" as true.'})}else this.targetElement=(h="hvr-popup-".concat((new Date).getTime()),(p=document.createElement("div")).setAttribute("id",h),p.style.cssText="display:none;z-index: 100;position: absolute;width: 100%;height: 100%;top: 0;left: 0;justify-content: center;align-items: center;background: rgba(0,0,0,0.72);",document.body.appendChild(p),p),this.popupElement=this.targetElement;var h,p;console.log("ELEMENT ",this.targetElement,this.popupElementId),F(this.targetElement),this.targetElement.innerHTML="",S.a.render(w.a.createElement(k.b,{settings:a,userId:N[e].userId,type:r,token:N[e].token,recorderClassName:this.recorderClassName,eventListenerClass:this.eventListenerClass,eventCallback:function(e){return m()(this,n),this._cb(e)}.bind(this)}),this.targetElement)}else Y(this.eventCallbackMap,"record_error",{error:"recorder_not_initialized",message:"Recorder not initialized. Please call initialize method first."})}return h()(t,[{key:"open",value:function(){ee(this.eventListenerClass,"open_widget"),this.popupElement&&(this.popupElement.style.display="flex")}},{key:"remove",value:function(){F(this.targetElement),this.popupElement&&(this.popupElement.style.display="none")}},{key:"on",value:function(e,t){D.includes(e)&&(this.eventCallbackMap[e]=t),"sdk_loaded"===e&&this.sdkLoaded&&this.eventCallbackMap[e]()}},{key:"getPageUrl",value:function(){console.log("PAGE URL IS ",window.location.href)}},{key:"_cb",value:function(t){if(console.log("EVENT CALLBACK ",t,this.eventListenerClass),Y(this.eventCallbackMap,t.type,t.detail),"sdk_loaded"===t.type&&(this.sdkLoaded=!0),"record_details"===t.type&&console.log("RECORDING DETAILS ",t.detail),"_record_started"===t.type){var i=t.detail||{};this.recordingInProgress=!0,i.showWebcamPreview&&X(i.stream),i.showMarkupTools&&(n=this.recordingConfiguration,r=this.eventListenerClass,function(t,i){e('<div class="hv-focus-overlay" id="hvOverlayDiv" style="display: none;"> <div id="hvOverlayCircle"></div> </div>').appendTo("body"),e('<div id="hvHighLightDiv" class="hv-highlight-div" style="pointer-events: none">').appendTo("body"),e('<canvas id="hvCanvas" style="opacity:0.6;position: absolute;top: 0;height: 100%;left: 0;background-color: transparent;width: 100%;"></canvas>').appendTo("body"),function(t,i){e('<style>#hippo-overlay{\r\n\tposition: relative;\r\n\tz-index: 2555555;\r\n}\r\n#hvStop {\r\nmargin-bottom: 3px;\r\n}\r\n#hvPen{\r\nmargin-bottom: 2px;\r\n}\r\n#hvFocusArea{\r\nmargin-bottom: 2px;\r\n}\r\n#hvEraser {\r\nmargin-bottom: 2px;\r\n}\r\n#hvClearScreen{\r\nmargin-bottom: 5px;\r\n}\r\n#hippo-overlay-screenrecord{\r\n\tposition: fixed;\r\n\tleft: 0px;\r\n\tbottom: 0px;\r\n\tdisplay: none;\r\n\tborder: 0px solid gray;\r\n\tborder-radius: 5px !important;\r\n}\r\n#hippo-overlay-time {\r\n\tposition: fixed;\r\n\ttext-align: center;\r\n\ttop: 30%;\r\n\tleft:41.5%;\r\n\twidth: 250px;\r\n\theight:250px;\r\n\tborder-radius: 50%;\r\n\tdisplay: none;\r\n\tbackground-color: rgba(0, 0, 0, 0.5);\r\n\tborder:5px solid #f47a58;\r\n\tfont-family: \'Open Sans\';\r\n background-repeat: no-repeat;\r\n background-position: 50% 50%;\r\n\tbox-sizing: content-box;\r\n}\r\n#hippo-overlay-time span\r\n{\r\n\tfont-size: 3.750em !important;\r\n\tcolor: #f47a58 !important;\r\n\ttop: 85px;\r\n\tleft: 110px;\r\n\tposition: absolute;\r\n\tmargin-left:-11px;\r\n\tline-height: normal;\r\n}\r\n.hippo-embed-countdown {\r\n\tbackground-image: none !important;\r\n\tbackground-color: #fff !important;\r\n\tborder: 11px solid #000 !important;\r\n}\r\n.hippo-embed-countdown #countdown {\r\n\tposition: unset !important;\r\n\tmargin-left: 0 !important;\r\n\tdisplay: inline-block !important;\r\n\tmargin-left: 0 !important;\r\n\tfont-family: sans-serif !important;\r\n\tfont-weight: 600 !important;\r\n\tfont-size: 91px !important;\r\n\tmargin-top: 79px !important;\r\n\tcolor: #000 !important;\r\n\tfont-family: "proxima-nova", "Open Sans", "Helvetica Neue", sans-serif;\r\n}\r\n.hippo-video-countdown {\r\n\tbackground-image: none !important;\r\n\tbackground-color: #fff !important;}\r\n.hippo-video-countdown #countdown {\r\n\tposition: unset !important;\r\n\tmargin-left: 0 !important;\r\n\tdisplay: inline-block !important;\r\n\tmargin-left: 0 !important;\r\n\tfont-family: sans-serif !important;\r\n\tfont-weight: 600 !important;\r\n\tfont-size: 91px !important;\r\n\tmargin-top: 79px !important;\r\n\tfont-family: "proxima-nova", "Open Sans", "Helvetica Neue", sans-serif;\r\n}\r\n\r\n.hv-focus-overlay {\r\n top: 0;\r\n left: 0;\r\n position: absolute;\r\n width: 100%;\r\n height: 100%;\r\n pointer-events: none;\r\n z-index: 10000;\r\n}\r\n\r\n#hvOverlayCircle:after {\r\n content: \'\';\r\n position: absolute;\r\n z-index: 10000000000000000;\r\n left: -75px;\r\n top: -75px;\r\n border-radius: 100%;\r\n width: 150px;\r\n height: 150px;\r\n box-shadow: 0px 0px 0px 3000px rgba(0, 0, 0, 0.39);\r\n pointer-events: none;\r\n}\r\n\r\n.hv-highlight-div{\r\n position: absolute;\r\n width: 100%;\r\n height: 100%;\r\n top: 0;\r\n z-index: 10000;\r\n}\r\n\r\n/*Highlight Featues Panel CSS*/\r\n.hv-act-comp-bottom-right {\r\n width: 333px; \r\n position: fixed;\r\n right: 30px;\r\n bottom: 0;\r\n -background-color: #424242;\r\n background-color: rgba(66, 66, 66, 0.8);\r\n max-height: 43px;\r\n -overflow: hidden;\r\n border: 0;\r\n border-radius: 5px 5px 0 0;\r\n cursor: default;\r\n z-index: 10000001;\r\n}\r\n\r\n.hv-act-comp-bottom-left {\r\n position: fixed;\r\n left: 30px;\r\n bottom: 0;\r\n -background-color: #424242;\r\n background-color: rgba(66, 66, 66, 0.8);\r\n max-height: 43px;\r\n -overflow: hidden;\r\n border: 0;\r\n border-radius: 5px 5px 0 0;\r\n cursor: default;\r\n z-index: 10000001;\r\n}\r\n\r\n.hv-highlight-options-div {\r\n -width: 330px;\r\n transition: all 300ms ease-out;\r\n}\r\n.hv-close-highlight-feature-panel {width: 0px;}\r\n/*Highlight Featues Panel CSS Ends*/\r\n\r\n\r\n/*Highlight option Icons and its effects*/\r\n.hv-icon-out-space {\r\n display: inline-block;\r\n padding-top: 13px;\r\n padding-right: 15px;\r\n padding-left: 15px;\r\n padding-bottom: 15px;\r\n cursor: pointer;\r\n}\r\n.hv-icon-out-space img {cursor: pointer;}\r\n.hv-icon-out-space:hover {background-color: #313131;}\r\n\r\n.hv-icon-out-disable {\r\n position: relative;\r\n top: -15px;\r\n opacity: .3;\r\n}\r\n\r\n.hv-icon-out-disable:hover {\r\n background-color: rgba(66, 66, 66, 0.8) !important;\r\n}\r\n\r\n.hv-pause-play {border-radius: 5px 0px 0px 0px;}\r\n\r\n.hv-togarrow-spacer {\r\n position: absolute;\r\n background-color: transparent;\r\n border-left: 1px solid;\r\n display: inline-block;\r\n border-radius: 0 5px 0px 0;\r\n cursor: pointer;\r\n}\r\n.hv-togarrow {padding: 16px 5px 19px 5px;}\r\n.hv-togarrow-left {\r\n padding: 16px 5px 19px 5px;\r\n transform: rotate(-180deg);\r\n}\r\n.hv-togarrow:hover {background-color: #313131;}\r\n\r\n.hv-active-tool {background-color: #313131;}\r\n/*Highlight option Icons and its effects ends*/\r\n\r\n/*Collape*/\r\n.hv-collapsed {\r\n width: 45px;\r\n\r\n background-color: rgba(49, 49, 49, 0.85);\r\n border-radius: 5px;\r\n padding: 10px;\r\n position: absolute;\r\n top: 0;\r\n right: 0px;\r\n max-height: 43px;\r\n cursor: pointer;\r\n transition: all 300ms ease-out;\r\n}\r\n.hv-collapsed-move {right: -30px;}\r\n/*Collape Ends*/\r\n\r\n/*Tooltip Panel*/\r\n.hv-tooltip-panel {\r\n width: 300px;\r\n -background-color: #313131;\r\n background-color: rgba(49, 49, 49, 0.85);\r\n padding: 12px 0px;\r\n border-radius: 5px 5px 0 0;\r\n font-size: 13px;\r\n font-weight: lighter;\r\n color: #ffffff;\r\n text-align: center;\r\n letter-spacing: 0.3px;\r\n margin: 0 auto;\r\n position: absolute;\r\n bottom: 43px;\r\n left: 0;\r\n right: 0;\r\n transition: all 300ms ease-out;\r\n line-height: 17px;\r\n white-space: pre-line;\r\n}\r\n.hv-tooltip-panel-toggle {bottom: -50px;}\r\n/*Tooltip Panel Ends*/\r\n\r\n.disp-none {display: none !important;}\r\n\r\n/*Color Palet*/\r\n.hv-choose-color-panel {\r\n background-color: #313131;\r\n border-radius: 5px 5px 0 0;\r\n max-height: 46px;\r\n overflow: hidden;\r\n position: absolute;\r\n top: -48px;\r\n left: 99px;\r\n line-height: 0;\r\n padding: 13px 5px 13px 10px;\r\n cursor: default;\r\n transition: top 300ms ease;\r\n display: none;\r\n}\r\n.hv-change-color-circle {\r\n width: 20px !important;\r\n height: 20px !important;\r\n border-radius: 100%;\r\n border: 1px solid transparent;\r\n margin-right: 5px;\r\n display: inline-block;\r\n cursor: pointer;\r\n}\r\n\r\n.hv-remove-highlight-div {\r\n\tposition: absolute;\r\n\twidth: 100%;\r\n\theight: 100%;\r\n\ttop: 0;\r\n\tz-index: 10000;\r\n\tpointer-events: none !important;\r\n}\r\n\r\n.hv-add-highlight-div {\r\n\tposition: absolute;\r\n\twidth: 100%;\r\n\theight: 100%;\r\n\ttop: 0;\r\n\tz-index: 10000;\r\n}\r\n\r\n.hv-add-eraser {\r\n\tposition: absolute;\r\n\twidth: 100%;\r\n\theight: 100%;\r\n\ttop: 0;\r\n\tz-index: 10000;\r\n}\r\n\r\n.hv-remove-canvas {\r\n\topacity:0.5;\r\n\tpointer-events: none;\r\n\tposition: absolute;\r\n\ttop: 0;\r\n\tleft: 0;\r\n\tbackground-color: transparent;\r\n\twidth: 100%;\r\n}\r\n\r\n.hv-add-canvas {\r\n\topacity:0.5;\r\n\tposition: absolute;\r\n\ttop: 0;\r\n\tpointer-events: all;\r\n\tleft: 0;\r\n\tbackground-color: transparent;\r\n\twidth: 100%;\r\n}\r\n\r\n.hv-add-canvas-eraser {\r\n\topacity:0.5;\r\n\tposition: absolute;\r\n\ttop: 0;\r\n\tleft: 0;\r\n\tbackground-color: transparent;\r\n\twidth: 100%;\r\n}\r\n\r\n.hv-pause-play{\r\n width: 46px;\r\n height: 44px;\r\n padding: 0px;\r\n text-align: center;\r\n position: relative;\r\n top: -17px;\r\n line-height: 59px;\r\n}\r\n\r\n.hv-black-color {background-color: #000000;}\r\n.hv-red-color {background-color: #ff0000;}\r\n.hv-violet-color {background-color: #8170cd;}\r\n.hv-orange-color {background-color: #ff9a44;}\r\n.hv-green-color {background-color: #7ddc68;}\r\n.hv-blue-color {background-color: #1edde1;}\r\n/*Color Palet Ends*/\r\n\r\n.hv-icon-selected #hvCursorAnimationImg {display: none;}\r\n.hv-icon-selected #hvCursorAnimationImgActive {display: block;}\r\n.hv-icon-unslected #hvCursorAnimationImg {display: block;}\r\n.hv-icon-unslected #hvCursorAnimationImgActive {display: none;}\r\n\r\n.hv-icon-selected #hvPenImg {display: none;}\r\n.hv-icon-selected #hvPenImgActive {display: block;}\r\n.hv-icon-unslected #hvPenImg {display: block;}\r\n.hv-icon-unslected #hvPenImgActive {display: none;}\r\n\r\n.hv-icon-selected #hvFocusImg {display: none;}\r\n.hv-icon-selected #hvFocusImgActive {display: block;}\r\n.hv-icon-unslected #hvFocusImg {display: block;}\r\n.hv-icon-unslected #hvFocusImgActive {display: none;}\r\n\r\n.hv-icon-selected #hvEraseImg {display: none;}\r\n.hv-icon-selected #hvEraseImgActive {display: block;}\r\n.hv-icon-unslected #hvEraseImg {display: block;}\r\n.hv-icon-unslected #hvEraseImgActive {display: none;}\r\n\r\n.hv-icon-selected #hvClearImg {display: none;}\r\n.hv-icon-selected #hvClearImgActive {display: block;}\r\n.hv-icon-unslected #hvClearImg {display: block;}\r\n.hv-icon-unslected #hvClearImgActive {display: none;}\r\n\r\n/*.hv-icon-selected #hvPauseImg {display: none;}\r\n.hv-icon-selected #hvPauseImgActive {display: block;}\r\n.hv-icon-unslected #hvPauseImg {display: block;}\r\n.hv-icon-unslected #hvPauseImgActive {display: none;}*/\r\n\r\n.hv-icon-selected #hvStopImg {display: none;}\r\n.hv-icon-selected #hvStopImgActive {display: block;}\r\n.hv-icon-unslected #hvStopImg {display: block;}\r\n.hv-icon-unslected #hvStopImgActive {display: none;}\r\n\r\n/*intro-div*/\r\n.hv-feature-intro-div {\r\n position: fixed;\r\n top: 0;\r\n overflow: hidden;\r\n width: 100%;\r\n height: 100%;\r\n background-color: rgba(0,0,0,0.8);\r\n z-index: 1000;\r\n}\r\n.hv-feature-intro-div .hv-feature-intro-div-inner {\r\n position: relative;\r\n top: 30%;\r\n width: 800px;\r\n margin: 0 auto;\r\n text-align: center;\r\n color: #fff;\r\n font-weight: 300;\r\n font-size: 16px;\r\n letter-spacing: 0.2px;\r\n line-height: 30px;\r\n}\r\n.hv-arrow-pointer {\r\n position: absolute;\r\n top: 100px;\r\n right: 0;\r\n -webkit-animation: fling-arrow 5s infinite;\r\n animation: fling-arrow 5s infinite;\r\n}\r\n@-webkit-keyframes fling-arrow {\r\n 0% {top: 100px;}\r\n 50% {top: 200px;}\r\n 100% {top: 100px;}\r\n}\r\n@keyframes fling-arrow {\r\n 0% {top: 100px;}\r\n 50% {top: 200px;}\r\n 100% {top: 100px;}\r\n}\r\n.hv-primary-btn-2 {\r\n background-image: linear-gradient(to right, rgb(252, 96, 118) 0%, rgb(255, 154, 68) 51%, rgb(255, 154, 68) 100%);\r\n background-size: 200%;\r\n border-radius: 3px;\r\n box-sizing: border-box;\r\n color: rgb(255, 255, 255);\r\n cursor: pointer;\r\n font-family: "Open Sans";\r\n font-size: 13px;\r\n font-weight: 500;\r\n letter-spacing: 0.2px;\r\n margin: 10px 4px 10px 4px;\r\n padding: 8px 20px 9px 20px;\r\n text-align: center;\r\n text-transform: uppercase;\r\n transition-duration: 0.9s;\r\n transition-property: all;\r\n transition-timing-function: ease;\r\n border: unset;\r\n background-color: unset;\r\n}\r\n.hv-primary-btn {\r\n max-height: 35px;\r\n background-image: linear-gradient(120deg, #fc6076 0%, #ff9a44 100%);\r\n padding-top: 8px;\r\n padding-bottom: 7px;\r\n padding-left: 20px;\r\n padding-right: 20px;\r\n letter-spacing: 0.5px;\r\n transition: 0.5s;\r\n box-shadow: inset 0 0 0 0 #fc6076;\r\n border: 0;\r\n border-radius: 5px;\r\n font-size: 13px;\r\n font-weight: 300;\r\n color: #ffffff;\r\n outline: none;\r\n cursor: pointer;\r\n}\r\n.hv-primary-btn:hover {\r\n background-image: linear-gradient(120deg, #ff9a44 0%, #fc6076 100%);\r\n background-position: right center;\r\n}\r\n.hv-pen-cusor-area{\r\n position: fixed;\r\n\r\n}\r\n.hv-cancel-btn {\r\n\tmargin-right: 10px;\r\n\ttop: 18px;\r\n bottom: 0;\r\n position: relative;\r\n color: #4a90e2 !important;\r\n cursor: pointer;\r\n}\r\n.hv-cancel-btn:hover {\r\n text-decoration: underline;\r\n}\r\n#hippo-overlay-div {\r\n height: 100%;\r\n width: 100%;\r\n background-color: rgba(0,0,0,0.6);\r\n position: fixed;\r\n z-index: 1000001;\r\n top:0;\r\n text-align: center;\r\n}\r\n\r\n#hippo-inner-div {\r\n width: 700px;\r\n left: calc(50% - 350px);\r\n height: 506px;\r\n background-color: #fff;\r\n border-radius: 10px;\r\n position: absolute;\r\n top: 12%;\r\n bottom: 0px;\r\n}\r\n\r\n#hippo-action-div{\r\n position: absolute;\r\n bottom: 10px;\r\n left: 27px;\r\n width: 100%;\r\n}\r\n\r\n.hv-stop-recording-btn{\r\n font-size:14px;\r\n background-size: 200% auto;\r\n background-image: linear-gradient(to right, #fc6076 0%, #ff9a44 31%, #ff9a44 100%);\r\n padding: 8px 30px 8px 30px;\r\n border-radius: 4px;\r\n float: right;\r\n margin-right: 61px;\r\n color: #fff;\r\n cursor: pointer;\r\n}\r\n.hv-webcam-play-btn{\r\n font-size: 14px;\r\n background-color: #8b8b8b;\r\n padding: 8px 30px 8px 30px;\r\n border-radius: 4px;\r\n float: right;\r\n color: #fff;\r\n right: 25px;\r\n margin-left: -30px;\r\n position: relative;\r\n cursor: pointer;\r\n}\r\n\r\n#hv-iframe-overlay-div-drag {\r\n z-index: 100000;\r\n height: 200px;\r\n width: 271px;\r\n}\r\n\r\n.hv-webcam-rectangle-bottom-left{\r\n position: fixed;\r\n bottom:0;\r\n left:0;\r\n height:200px;\r\n z-index:1000000;\r\n border:0;\r\n display:none;\r\n}\r\n\r\n.hv-webcam-rectangle-bottom-right{\r\n position: fixed;\r\n bottom:0;\r\n right:0;\r\n height:200px;\r\n z-index:1000000;\r\n border:0;\r\n display:none;\r\n}\r\n\r\n.hv-webcam-rectangle-top-left{\r\n position: fixed;\r\n top:0;\r\n left:0;\r\n height:200px;\r\n z-index:1000000;\r\n border:0;\r\n display:none;\r\n}\r\n\r\n.hv-webcam-rectangle-top-right{\r\n position: fixed;\r\n top:0;\r\n right:0;\r\n height:200px;\r\n z-index:1000000;\r\n border:0;\r\n display:none;\r\n}\r\ndiv.clickEffect{\r\n position:fixed;\r\n box-sizing:border-box;\r\n border-style:solid;\r\n border-color:#ff160b;\r\n border-radius:50%;\r\n animation:clickEffect 0.6s ease-out;\r\n z-index:99999;\r\n pointer-events: none;\r\n}\r\n@keyframes clickEffect{\r\n 0%{\r\n opacity:1;\r\n width:0.5em;\r\n height:0.5em;\r\n margin:-0.25em;\r\n border-width:8px;\r\n transform: scale(0.6, 0.6);\r\n }\r\n 100%{\r\n opacity:0.4;\r\n width:15em; height:15em;\r\n margin:-7.5em;\r\n border-width:0.48px;\r\n transform: scale(0.4, 0.4);\r\n }\r\n}\r\n\r\ndiv.clickEffect2{\r\n position:fixed;\r\n box-sizing:border-box;\r\n border-style:solid;\r\n border-color:#ff160b;\r\n border-radius:50%;\r\n animation:clickEffect2 0.6s ease-out;\r\n z-index:99999;\r\n pointer-events: none;\r\n}\r\n@keyframes clickEffect2{\r\n 0%{\r\n opacity:1;\r\n width:1em;\r\n height:1em;\r\n margin:-0.5em;\r\n border-width:8px;\r\n transform: scale(0.6, 0.6);\r\n }\r\n 100%{\r\n opacity:0.4;\r\n width:15em; height:15em;\r\n margin:-7.5em;\r\n border-width:0.48px;\r\n transform: scale(0.4, 0.4);\r\n }\r\n}\r\n.hv-blink-right, .hv-blink-left{\r\n width: 2px;\r\n height: 2px;\r\n background-color: white;\r\n animation: blink 1s infinite;\r\n opacity:0.1;\r\n border: 1px solid black;\r\n position: fixed;\r\n bottom:0;\r\n display: none;\r\n}\r\n.hv-blink-right{\r\n right: 0;\r\n}\r\n.hv-blink-left{\r\n left: 0;\r\n}\r\n\r\n@keyframes blink {\r\n 0% {transform: scale(1, 1);}\r\n 50% {transform: scale(1.3, 1.3);}\r\n}\r\n#hv-recordingTimer {\r\n font-size: 35px;\r\n font-weight: lighter;\r\n font-family: \'Open Sans\';\r\n color: #ef5253;\r\n text-align: center;\r\n margin-top: 5px !important;\r\n margin-left: 5px;\r\n float: left;\r\n}\r\n\r\n@keyframes fadeInOut {\r\n 0% {opacity: 0}\r\n 50% {opacity: 1}\r\n 100% {opacity: 0}\r\n}\r\n#recording-blinking {\r\n animation: fadeInOut 1s linear infinite;\r\n color: red;\r\n font-size: 12px;\r\n margin-bottom: 8px;\r\n text-align: center;\r\n padding-top: 5px;\r\n}\r\n#recording-blinking img{\r\n margin-right: 5px;\r\n position: relative;\r\n top: 6px;\r\n vertical-align: unset;\r\n}\r\n\r\n.lessonly-recording-frame {\r\n\tfont-family: "proxima-nova", "Open Sans", "Helvetica Neue", sans-serif !important;\r\n}\r\n\r\n.lessonly-recording-frame #hv-previewcontrol-stop {\r\n\twidth: 170px;\r\n\tfloat: right;\r\n\tbackground-color: #4a90e2 !important;\r\n\tbackground-image: unset;\r\n\tborder: 0;\r\n\tbox-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.1), inset 0 1px 0 0 #4a90e2, inset 0 2px 0 0 rgba(255, 255, 255, 0.2), 0 1px 2px 0 rgba(0, 0, 0, 0.09) !important;\r\n\tfont-family: "proxima-nova", "Open Sans", "Helvetica Neue", sans-serif;\r\n\tcolor: #fff;\r\n\tfont-size: 16px;\r\n\tfont-weight: normal;\r\n\tline-height: 20px;\r\n\tpadding: 0 16px;\r\n\tborder-radius: 3px;\r\n\theight: 40px;\r\n\tletter-spacing: normal;\r\n\ttext-transform: unset;\r\n\tmargin: 10px 4px;\r\n}\r\n\r\n.lessonly-recording-frame #hv-recordingTimer {\r\n color: #4a90e2 !important;\r\n font-family: "proxima-nova", "Open Sans", "Helvetica Neue", sans-serif !important;\r\n}\r\n\r\n#hv-iframe-wrapper {\r\n\twidth: 90%;\r\n margin-left: 5%;\r\n background-color: rgba(0,0,0,0.04);\r\n}\r\n.hv-align-right {\r\n\tfloat: right;\r\n}\r\n</style>').appendTo("head"),window._HVDomain;var n,r,o,a=(o="Unknown",-1!=window.navigator.userAgent.indexOf("Windows")&&(o="Windows"),-1!=window.navigator.userAgent.indexOf("Mac")&&(o="Mac"),-1!=window.navigator.userAgent.indexOf("X11")&&(o="UNIX"),-1!=window.navigator.userAgent.indexOf("Linux")&&(o="Linux"),o);if(R={isEraser:!1,isPen:!1,cursorWidth:5,canvas:null,ctx:null,flag:!1,prevX:0,currX:0,prevY:0,currY:0,dot_flag:!1,penColor:"#000000",selectedColor:0,highlightCursorWidth:10,highlightCursorHeight:10,stopIcon:Object(P.e)("/images/hv-highlight-icons/hb-stop.png"),cursorIcon:Object(P.e)("/images/hv-highlight-icons/hb-select.png"),cursorIconActive:Object(P.e)("/images/hv-highlight-icons/hb-select-active.png"),penIcon:Object(P.e)("/images/hv-highlight-icons/hb-pen.png"),penIconActive:Object(P.e)("/images/hv-highlight-icons/hb-pen-active.png"),focusIcon:Object(P.e)("/images/hv-highlight-icons/hb-focus.png"),focusIconActive:Object(P.e)("/images/hv-highlight-icons/hb-focus-active.png"),eraseIcon:Object(P.e)("/images/hv-highlight-icons/hb-erase.png"),eraseIconActive:Object(P.e)("/images/hv-highlight-icons/hb-erase-active.png"),clearIcon:Object(P.e)("/images/hv-highlight-icons/hb-clear.png"),clearIconActive:Object(P.e)("/images/hv-highlight-icons/hb-clear-active.png"),video:Object(P.e)("/images/hv-highlight-icons/hb-video-off.png"),togarrow:Object(P.e)("/images/hv-highlight-icons/hb-toggle-arrow.png"),collapsIcon:Object(P.e)("/images/hv-highlight-icons/collapse-icon.png"),penColorIcon:Object(P.e)("/images/hv-highlight-icons/pen-with-color.svg"),penCursorIcon:Object(P.e)("/images/hv-highlight-icons/pen-cusor.svg"),eraseCursorIcon:Object(P.e)("/images/hv-highlight-icons/erase-cursor.svg"),arrowPointer:Object(P.e)("/images/hv-highlight-icons/arrow-pointer.png"),mouseAnimationIcon:Object(P.e)("/images/hv-highlight-icons/hb-mouse-animation.png"),mouseAnimationIconActive:Object(P.e)("/images/hv-highlight-icons/hb-mouse-animation-active.png"),highlightsColors:["#000000","#ff0000","#8170cd","#ff9a44","#7ddc68","#1edde1"],isAlt:!1,clearAction:"hvCursor",highlightOptions:function(e){var t=e.currentTarget.id;R.selectHiglightOptions(t,!0)},checkColorPanelVisible:function(t){e(".hv-choose-color-panel").is(":visible")&&R.tooltipHide()},pausePlay:function(t){e("#hvPause").hasClass("disp-none")?(e("#hvPlay").addClass("disp-none"),e("#hvPause").removeClass("disp-none"),R.highlightsEvents("hvPlay")):(e("#hvPlay").removeClass("disp-none"),e("#hvPause").addClass("disp-none"),R.highlightsEvents("hvPause"))},pausePlayWebcam:function(t){"hvResumeWebcam"===t.currentTarget.id?(e("#hvResumeWebcam").addClass("disp-none"),e("#hvPauseWebcam").removeClass("disp-none")):(e("#hvResumeWebcam").removeClass("disp-none"),e("#hvPauseWebcam").addClass("disp-none"))},handleStopRecording:function(){console.log("SENDING EVENT ",i,"hv_stop_recording"),te(i,"markup-tools")},cancelRecording:function(e){},selectHiglightOptions:function(t,i){if("hvClearScreen"!==t&&(R.clearAction=t),e("#"+t).hasClass("hv-active-tool")&&i)return R.resetValues(),R.highlightsEvents("hvCursor"),void R.cursor();if("hvCursor"==t&&!i)return R.resetValues(),void R.cursor();switch(R.resetValues(),e("#"+t).addClass("hv-active-tool"),e("#"+t).removeClass("hv-icon-unslected"),e("#"+t).addClass("hv-icon-selected"),i&&"hvStop"!=t&&R.highlightsEvents(t),"hvPen"!=t&&"hvEraser"!=t&&"hvFocusArea"!=t||e(document).bind("mousemove",R.mouseMove),R.isPen=!1,t){case"hvCursor":R.cursor();break;case"hvCursorAnimation":R.cursorAnimation();break;case"hvPen":R.tooltipHide(),e("#hvHighLightDiv").removeClass("disp-none"),R.pen(),e(".hv-choose-color-panel").show();break;case"hvEraser":R.eraser();break;case"hvClearScreen":R.clearScreen();break;case"hvFocusArea":R.focusArea();break;case"hvStop":R.handleStopRecording()}},resetValues:function(){e(".hv-highlight-option").removeClass("hv-active-tool"),e(".hv-highlight-option").removeClass("hv-icon-selected"),e(".hv-highlight-option").addClass("hv-icon-unslected"),e(".hv-choose-color-panel").hide(),e("#hvHighLightDiv").removeClass("hv-add-highlight-div"),e("#hvHighLightDiv").removeClass("hv-add-eraser"),e("#hvCanvas").removeClass("hv-add-canvas"),e("#hvHighLightDiv").removeClass("hv-remove-highlight-div"),e("#hvCanvas").removeClass("hv-remove-canvas"),e(".hv-pen-cusor-area").remove(),e(document).unbind("mousemove"),document.removeEventListener("mouseup",R.clickEffect)},tooltipHide:function(t){e(".hv-tooltip-panel").hide()},tooltipShow:function(i){if(clearTimeout(r),0!=R.highlightsOpen){e(".hv-tooltip-panel").show();var n=i.currentTarget.id,r=setTimeout((function(){e(".hv-tooltip-panel").hide()}),3e3);switch(n){case"hvCursor":e(".hv-tooltip-panel").text("Press "+("Mac"===a?"Option":"Alt")+" + M for Cursor");break;case"hvCursorAnimation":e(".hv-tooltip-panel").text("Press "+("Mac"===a?"Option":"Alt")+" + A for Click Animation");break;case"hvPen":e(".hv-tooltip-panel").text("Press "+("Mac"===a?"Option":"Alt")+" + H for Highlight \n Hit UP / DOWN arrow to change size \n LEFT / RIGHT arrow to change color");break;case"hvEraser":e(".hv-tooltip-panel").text("Press "+("Mac"===a?"Option":"Alt")+" + E for Eraser");break;case"hvClearScreen":e(".hv-tooltip-panel").text("Press "+("Mac"===a?"Option":"Alt")+" + Z for Clear screen");break;case"hvFocusArea":e(".hv-tooltip-panel").text("Press "+("Mac"===a?"Option":"Alt")+" + F for Focus and ESC for Cursor");break;case"hvPause":case"hvPlay":e(".hv-tooltip-panel").text("Press "+("Mac"===a?"Option":"Alt")+" + P for Pause and Play");break;case"hvCloseHighlight":e(".hv-tooltip-panel").text("Press "+("Mac"===a?"Option":"Alt")+" + C for Close");break;case"hvStop":e(".hv-tooltip-panel").text("Press "+("Mac"===a?"Option":"Alt")+" + S for Stop recording");break;case"disabledState":t.screenRecord?e(".hv-tooltip-panel").text("Upgrade needed"):e(".hv-tooltip-panel").text("")}}},color:function(e){R.highlightsEvents("hvColorChoose"),R.isEraser=!1,R.penColor=e.target.id,R.selectedColor=R.highlightsColors.indexOf(e.target.id),R.setCursor(e.target.id)},draw:function(){R.ctx.beginPath(),1==R.isEraser?R.ctx.globalCompositeOperation="destination-out":R.ctx.globalCompositeOperation="source-over",R.ctx.lineCap="round",R.ctx.moveTo(R.prevX,R.prevY),R.ctx.fillStyle=R.penColor,R.ctx.globalAlpha=1,R.ctx.lineTo(R.currX,R.currY),R.ctx.strokeStyle=R.penColor,R.ctx.lineWidth=R.cursorWidth,R.ctx.stroke()},clearScreen:function(){var e=document.body,t=document.documentElement,i=Math.max(e.scrollHeight,e.offsetHeight,t.clientHeight,t.scrollHeight,t.offsetHeight);R.canvas.height=i;var n=R.canvas.width,r=R.canvas.height;R.ctx.clearRect(0,0,n,r),R.selectHiglightOptions(R.clearAction,!1)},focusArea:function(){e("#hvHighLightDiv").addClass("hv-remove-highlight-div"),e("#hvCanvas").addClass("hv-remove-canvas");var t=document.body,i=document.documentElement,n=Math.max(t.scrollHeight,t.offsetHeight,i.clientHeight,i.scrollHeight,i.offsetHeight);e("body").css({cursor:"default"}),e("#hvHighLightDiv").css("height",n+"px"),e("#hvOverlayDiv").show()},cursor:function(){e("#hvHighLightDiv").css({"pointer-events":"none"});var t=document.body,i=document.documentElement,n=Math.max(t.scrollHeight,t.offsetHeight,i.clientHeight,i.scrollHeight,i.offsetHeight);e("body").css({cursor:"default"}),e("#hvHighLightDiv").css("height",n+"px"),e("#hvOverlayDiv").hide(),e("#hvCanvas").addClass("hv-remove-canvas"),e("#hvCanvas").css("height",n+"px")},cursorAnimation:function(){document.addEventListener("mouseup",R.clickEffect),e("#hvHighLightDiv").css({"pointer-events":"none"});var t=document.body,i=document.documentElement,n=Math.max(t.scrollHeight,t.offsetHeight,i.clientHeight,i.scrollHeight,i.offsetHeight);e("body").css({cursor:"default"}),e("#hvHighLightDiv").css("height",n+"px"),e("#hvOverlayDiv").hide(),e("#hvCanvas").addClass("hv-remove-canvas"),e("#hvCanvas").css("height",n+"px")},clickEffect:function(e){var t=document.createElement("div");t.className="clickEffect",t.style.top=e.clientY+"px",t.style.left=e.clientX+"px",document.body.appendChild(t),t.addEventListener("animationend",function(){t.parentElement.removeChild(t)}.bind(this));var i=document.createElement("div");i.className="clickEffect2",i.style.top=e.clientY+"px",i.style.left=e.clientX+"px",setTimeout((function(){document.body.appendChild(i),i.addEventListener("animationend",function(){i.parentElement.removeChild(i)}.bind(this))}),200)},pen:function(){R.isEraser=!1,R.isPen=!0,R.setCursor(R.penColor),e("#hvHighLightDiv").addClass("hv-add-highlight-div");var t=document.body,i=document.documentElement,n=Math.max(t.scrollHeight,t.offsetHeight,i.clientHeight,i.scrollHeight,i.offsetHeight);e("#hvHighLightDiv").css("height",n+"px"),e("#hvCanvas").removeClass("hv-add-canvas-eraser"),e("#hvCanvas").addClass("hv-add-canvas"),e("#hvCanvas").css("height",n+"px"),e("#hvOverlayDiv").hide();var r='<svg class="hv-pen-cusor-area" xmlns="http://www.w3.org/2000/svg" width="'+R.highlightCursorWidth+'" height="'+R.highlightCursorHeight+'" viewBox="0 0 51 50.969"><metadata><?xpacket begin="\ufeff" id="W5M0MpCehiHzreSzNTczkc9d"?><x:xmpmeta xmlns:x="adobe:ns:meta/" x:xmptk="Adobe XMP Core 5.6-c138 79.159824, 2016/09/14-01:09:01"><rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"><rdf:Description rdf:about=""/></rdf:RDF></x:xmpmeta><?xpacket end="w"?></metadata><defs><style>.cls-1 {fill: none;stroke: #313131;stroke-linecap: round;stroke-linejoin: round;stroke-width: 1px;stroke-dasharray: 5 4;}</style></defs><circle class="cls-1" cx="25.5" cy="25.469" r="25"/></svg>';e(r).appendTo("body")},eraser:function(){R.isEraser=!0,e("body").css("cursor","url("+R.eraseCursorIcon+"), auto"),e("#hvHighLightDiv").addClass("hv-add-eraser"),e("#hvCanvas").addClass("hv-add-canvas-eraser"),e("#hvCanvas").css("height",n+"px");var t=document.body,i=document.documentElement,n=Math.max(t.scrollHeight,t.offsetHeight,i.clientHeight,i.scrollHeight,i.offsetHeight);e("#hvHighLightDiv").css("height",n+"px"),e("#hvOverlayDiv").hide();var r='<svg class="hv-pen-cusor-area" xmlns="http://www.w3.org/2000/svg" width="'+R.highlightCursorWidth+'" height="'+R.highlightCursorHeight+'" viewBox="0 0 51 50.969"><metadata><?xpacket begin="\ufeff" id="W5M0MpCehiHzreSzNTczkc9d"?><x:xmpmeta xmlns:x="adobe:ns:meta/" x:xmptk="Adobe XMP Core 5.6-c138 79.159824, 2016/09/14-01:09:01"><rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"><rdf:Description rdf:about=""/></rdf:RDF></x:xmpmeta><?xpacket end="w"?></metadata><defs><style>.cls-1 {fill: none;stroke: #313131;stroke-linecap: round;stroke-linejoin: round;stroke-width: 1px;stroke-dasharray: 5 4;}</style></defs><circle class="cls-1" cx="25.5" cy="25.469" r="25"/></svg>';e(r).appendTo("body")},mouseMove:function(t){var i=t.pageX,o=t.pageY,a=i/n,s=o/r;Xpos=Math.floor(100*a),Ypos=Math.floor(100*s);var l=i+"px",u=o+"px";e("#hvOverlayCircle").css({transform:"translate("+l+","+u+") translateZ(0px)"})},closeHighlights:function(t){R.tooltipHide(),R.highlightsOpen=!1,t&&R.highlightsEvents("hvCloseHighlight"),e(".hv-tooltip-panel").hide(),e(".hv-highlight-feature-panel").animate({width:"0"},200,(function(){e(".hv-collapsed").removeClass("disp-none")})),e(".hv-highlight-options-div").addClass("hv-close-highlight-feature-panel")},openHighlights:function(t){R.highlightsOpen=!0,t&&R.highlightsEvents("hvOpenHighlight"),e(".hv-highlight-feature-panel").animate({width:"333px"},200),e(".hv-highlight-options-div").removeClass("hv-close-highlight-feature-panel"),e(".hv-highlight-options-div").show().delay(1e3),e(".hv-collapsed").addClass("disp-none")},findxy:function(t,i){"down"==t&&(R.prevX=R.currX,R.prevY=R.currY,R.currX=i.offsetX-R.canvas.offsetLeft,R.currY=i.offsetY-R.canvas.offsetTop,R.currY+=15,R.currX+=5,R.flag=!0,R.dot_flag=!0,R.dot_flag&&(R.ctx.beginPath(),R.ctx.fillStyle=R.penColor,R.ctx.fillRect(R.currX,R.currY,2,2),R.ctx.closePath(),R.dot_flag=!1)),"up"!=t&&"out"!=t||(R.flag=!1),"move"==t&&(e(".hv-pen-cusor-area").css({left:i.offsetX-R.canvas.offsetLeft-e(".hv-pen-cusor-area").width()/2+2,top:i.offsetY-R.canvas.offsetTop-e(".hv-pen-cusor-area").height()/2+17}),R.flag&&(R.prevX=R.currX,R.prevY=R.currY,R.currX=i.offsetX-R.canvas.offsetLeft+5,R.currY=i.offsetY-R.canvas.offsetTop+17,R.draw()))},windowResize:function(){var t=document.body,i=document.documentElement,n=Math.max(t.scrollHeight,t.offsetHeight,i.clientHeight,i.scrollHeight,i.offsetHeight);R.canvas.height=n,e("#hvHighLightDiv").css("height",n+"px")},highlightsEvents:function(e){},setCursor:function(t){if(t){if(0==R.isEraser){e("body").addClass("hv-"+t+"-cursor");var i='<svg xmlns="http://www.w3.org/2000/svg" width="20" viewBox="0 0 24.11 23.93"><defs><style>.cls-1,.cls-2{fill:#fff;stroke:#000;stroke-miterlimit:10;}.cls-2{fill-rule:evenodd;}</style></defs><title>highlight with color</title><g id="Layer_2" data-name="Layer 2"><g id="Layer_1-2" data-name="Layer 1"><path class="cls-1" d="M22.58,1.35a2.91,2.91,0,0,1,0,4.11L21.21,6.82,17.11,2.72l1.37-1.37a2.91,2.91,0,0,1,4.11,0Z"/><polygon class="cls-1" points="2.05 17.77 0.69 23.25 6.16 21.88 19.85 8.19 15.74 4.09 2.05 17.77"/><path class="cls-2" style="fill:'+t+'" d="M20.11,15.94a3.5,3.5,0,1,1-3.5,3.5,3.5,3.5,0,0,1,3.5-3.5Z"/></g></g></svg>',n='url("data:image/svg+xml,'+(i=encodeURIComponent(i.replace(/"/g,"'")))+'"), auto';e("body").css("cursor",n)}}else e("body").css({cursor:"default"})},onkeyupEvent:function(e){18==e.which&&(R.isAlt=!1)},onkeydownEvent:function(t){18==t.which&&(R.isAlt=!0),R.isPen&&[37,38,39,40].indexOf(t.keyCode)>-1&&t.preventDefault(),83==t.which&&1==R.isAlt&&R.stopRecording(),67==t.which&&1==R.isAlt&&(t.preventDefault(),R.closeHighlights(!0)),79==t.which&&1==R.isAlt&&(t.preventDefault(),R.openHighlights(!0)),90==t.which&&1==R.isAlt&&(R.selectHiglightOptions("hvClearScreen",!0),clearScreen()),69==t.which&&1==R.isAlt&&(t.preventDefault(),R.selectHiglightOptions("hvEraser",!0),R.isEraser=!0),72==t.which&&1==R.isAlt&&(R.selectHiglightOptions("hvPen",!0),R.isEraser=!1,R.pen()),70==t.which&&1==R.isAlt&&(t.preventDefault(),R.selectHiglightOptions("hvFocusArea",!0),R.focusArea()),(77==t.which&&1==R.isAlt||27==t.which)&&(R.selectHiglightOptions("hvCursor",!0),R.cursor()),65==t.which&&1==R.isAlt&&R.selectHiglightOptions("hvCursorAnimation",!0),38==t.which&&R.cursorWidth<=200&&(R.cursorWidth+=1,R.highlightCursorWidth+=1,R.highlightCursorHeight+=1,e(".hv-pen-cusor-area").css({width:R.highlightCursorWidth,height:R.highlightCursorHeight})),38==t.which&&R.isAlt,40==t.which&&R.cursorWidth>=5&&(R.cursorWidth-=1,R.highlightCursorWidth-=1,R.highlightCursorHeight-=1,e(".hv-pen-cusor-area").css({width:R.highlightCursorWidth,height:R.highlightCursorHeight})),37==t.which&&0!==R.selectedColor&&(R.selectedColor=R.selectedColor-1,R.penColor=R.highlightsColors[R.selectedColor],R.setCursor(R.penColor)),39==t.which&&5!==R.selectedColor&&(R.selectedColor=R.selectedColor+1,R.penColor=R.highlightsColors[R.selectedColor],R.setCursor(R.penColor))}},!(e(".hv-highlight-feature-panel").length>0)){var s="Press "+("Mac"===a?"Option":"Alt")+" + O for Open",l="Press "+("Mac"===a?"Option":"Alt")+" + H for Highlight",u='<div class="hv-action-component hv-highlight-feature-panel hv-act-comp-bottom-right"> <div class="hv-highlight-options-div"> <span class="hv-highlight-option hv-icon-out-space hv-icon-unslected" id="hvStop"> <img src="'+R.stopIcon+'" id="hvStopImg"/> <img src="'+R.stopIcon+'" id="hvStopImgActive"/> </span> <span class="hv-highlight-option hv-icon-out-space hv-icon-unslected" id="hvCursorAnimation"> <img src="'+R.mouseAnimationIcon+'" id="hvCursorAnimationImg" class=" hv-custom-mouse-pen-cursor" /> <img src="'+R.mouseAnimationIconActive+'" id="hvCursorAnimationImgActive" class=" hv-custom-mouse-pen-cursor" /> </span> <span class="hv-highlight-option hv-icon-out-space hv-icon-unslected" id="hvPen"> <img src="'+R.penIcon+'" id="hvPenImg" /> <img src="'+R.penIconActive+'" id="hvPenImgActive" /> </span> <span class="hv-highlight-option hv-icon-out-space hv-icon-unslected" id="hvFocusArea"> <img src="'+R.focusIcon+'" id="hvFocusImg" /> <img src="'+R.focusIconActive+'" id="hvFocusImgActive" /> </span> <span class="hv-highlight-option hv-icon-out-space hv-icon-unslected" id="hvEraser"> <img src="'+R.eraseIcon+'" class=" hv-custom-mouse-erase-cursor" id="hvEraseImg" /> <img src="'+R.eraseIconActive+'" class=" hv-custom-mouse-erase-cursor" id="hvEraseImgActive" /> </span> <span class="hv-highlight-option hv-icon-out-space hv-icon-unslected" id="hvClearScreen"> <img src="'+R.clearIcon+'" id="hvClearImg" /> <img src="'+R.clearIconActive+'" id="hvClearImgActive" /> </span> <span class="hv-togarrow-spacer hv-close-highlights" id="hvCloseHighlight"><img src="'+R.togarrow+'" class=" hv-togarrow" id="hvTogarrow" /></span> <div class="hv-choose-color-panel"> <div id="#000000" class="hv-change-color-circle hv-black-color"></div> <div id="#ff0000" class="hv-change-color-circle hv-red-color"></div> <div id="#8170cd" class="hv-change-color-circle hv-violet-color"></div> <div id="#ff9a44" class="hv-change-color-circle hv-orange-color"></div> <div id="#7ddc68" class="hv-change-color-circle hv-green-color"></div> <div id="#1edde1" class="hv-change-color-circle hv-blue-color"></div> </div> </div> <div class="hv-collapsed disp-none hv-open-highlights hv-collapsed-move" id="hvOpenHighlight" title="'+s+'"><img src="'+R.collapsIcon+'" class="hv-collapsed-icon" /></div> <div class="hv-tooltip-panel">'+l+"</div> </div>";e(u).appendTo("body"),e(".hv-highlight-option").bind("click",R.highlightOptions),e(".hv-change-color-circle").bind("click",R.color),e(".hv-close-highlights").bind("click",R.closeHighlights),e(".hv-open-highlights").bind("click",R.openHighlights),e(".hv-highlight-option").on("mouseenter",R.tooltipShow),e(".hv-icon-out-disable").on("mouseenter",R.tooltipShow),e(".hv-tooltip-panel").on("mouseenter",R.checkColorPanelVisible),e(".hv-close-highlights").on("mouseover",R.tooltipShow),window.addEventListener("keyup",R.onkeyupEvent),window.addEventListener("keydown",R.onkeydownEvent),window.addEventListener("resize",R.windowResize),R.canvas=document.getElementById("hvCanvas"),R.ctx=R.canvas.getContext("2d"),R.canvas.width=window.innerWidth,R.canvas.height=window.innerHeight,n=R.canvas.width,r=R.canvas.height;var c=document.body,d=document.documentElement,h=Math.max(c.scrollHeight,c.offsetHeight,d.clientHeight,d.scrollHeight,d.offsetHeight);R.canvas.height=h,e("#hvHighLightDiv").css("height",h+"px"),R.selectHiglightOptions("hvCursor"),e("#hvHighLightDiv").css({"pointer-events":"none"}),e("#hvOverlayDiv").hide(),R.canvas.addEventListener("mousemove",(function(e){R.findxy("move",e)}),!1),R.canvas.addEventListener("mousedown",(function(e){R.findxy("down",e)}),!1),R.canvas.addEventListener("mouseup",(function(e){R.findxy("up",e)}),!1),R.canvas.addEventListener("mouseout",(function(e){R.findxy("out",e)}),!1)}}(t,i)}(n,r))}var n,r,o,a,s;"_show_webcam_preview"===t.type&&X((t.detail||{}).stream);if("_remove_webcam_preview"===t.type&&Q(),"_show_upload_progress"===t.type){var l=t.detail||{};o={recorder:l.recorder,theme:l.theme},a=o.recorder,s=o.theme,Object(A.a)(a,s)}"record_stopped"===t.type&&(this.popupElement&&(this.popupElement.style.display="flex"),this.recordingInProgress=!1,Q(),Z()),"record_cancelled"===t.type&&(this.recordingInProgress=!1,Q(),Z()),"video_submitted"!==t.type&&"hide_frame"!==t.type||this.popupElement&&(this.popupElement.style.display="none"),"_close_popup"===t.type&&(this.popupElement&&(this.popupElement.style.display="none"),Q(),Z()),"show_frame"===t.type&&this.popupElement&&(this.popupElement.style.display="flex")}}]),t}(),H={create:function(e,t){return m()(this,void 0),new q(e,{settings:t})}.bind(void 0)},j={create:function(e,t){return m()(this,void 0),new G(e,{settings:t})}.bind(void 0)},q=function(e){r()(i,e);var t=I(i);function i(e){var n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:config,o=r.settings,a=r.recorder_events;return c()(this,i),console.log("add recorder ",e),n=t.call(this,e,{type:k.a.RECORDER,settings:o,recorder_events:a}),console.log("add recorder "),n}return h()(i,[{key:"startRecording",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.recordingInProgress?Y(this.eventCallbackMap,"record_error",{error:"recording_in_progress",message:"A recording is already in progress"}):(e=W(e),console.log("RECORDING CONFIG ",e),$(this.settings,e)?(this.popupElement&&(this.popupElement.style.display="flex"),ee(this.eventListenerClass,"start_recording",{recording_configuration:e,extension_available:O})):Y(this.eventCallbackMap,"record_error",{error:"invalid_record_options",message:"The recording options given are invalid"}))}},{key:"stopRecording",value:function(){te(this.eventListenerClass,"user")}}]),i}(z),G=function(e){r()(i,e);var t=I(i);function i(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:config,r=n.settings,o=n.recorder_events;return c()(this,i),t.call(this,e,{type:k.a.IMPORTER,settings:r,recorder_events:o})}return h()(i,[{key:"open",value:function(e){this.importMedia(null,e)}},{key:"importMedia",value:function(e,t){ee(this.eventListenerClass,"import_video",{file:e,uniqueId:t})}}]),i}(z);function $(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=t.screenRecord,n=t.audio,r=t.webCam,o=e.record_config||{},a=o.screen,s=o.webcam,l=o.mic;return!(!(i||n||r||a||s)&&l)}function W(e){var t=Object.assign({},e);for(var i in e)L[i]&&(delete t[i],t[L[i]]=e[i]);return t}function Y(e,t,i){e[t]&&e[t](i)}function K(t){e("#recording-configuration").remove(),e('<input type=hidden id="recording-configuration" value="" />').appendTo("head");e("#actiontoextension").remove(),e('<input type=hidden id="actiontoextension" value="" />').appendTo("head");var i='<input type=hidden id="hippowiz-ew-digest" value="'.concat(t,'" />');e("#hippowiz-ew-digest").remove(),e(i).appendTo("head")}function J(e){var t=this;try{Object(E.j)(e).then(function(){m()(this,t),O=!0}.bind(this)).catch(function(){m()(this,t),console.log("CONNECTION ERROR!! CAN BE MORE SPECIFIC!! CHECK!!!"),O=!1}.bind(this))}catch(e){O=!1}}function X(e){Object(x.a)(e)}function Q(){!function(e){var t=document.getElementsByClassName(e);for(;t.length>0;)t[0].parentNode.removeChild(t[0])}("hv-rapi-webcam-preview")}function Z(){!function(){R&&R.resetValues();e("#hvOverlayDiv, #hvHighLightDiv, #hvCanvas, .hv-highlight-feature-panel").remove(),e("body").css({cursor:"default"})}()}function ee(e,t,i){var n;try{n=new CustomEvent(t,{detail:i})}catch(e){(n=document.createEvent("Event")).detail=i,n.initEvent(t,!1,!1)}console.log("SENDING EVENT FROM LIBRARY ",n,document.getElementsByClassName(e)[0]),document.getElementsByClassName(e)[0].dispatchEvent(n)}function te(e,t){ee(e,"hv_stop_recording",{from:t})}}.call(this,i(2))},,function(e,t,i){var n=i(9),r=i(34),o=i(27),a=i(29),s=n.TypeError;e.exports=function(e,t){var i,n;if("string"===t&&o(i=e.toString)&&!a(n=r(i,e)))return n;if(o(i=e.valueOf)&&!a(n=r(i,e)))return n;if("string"!==t&&o(i=e.toString)&&!a(n=r(i,e)))return n;throw s("Can't convert object to primitive value")}},function(e,t,i){"use strict";var n=i(209),r=i(92);e.exports=n?{}.toString:function(){return"[object "+r(this)+"]"}},function(e,t,i){"use strict";var n=i(9),r=i(13),o=i(75),a=i(29),s=i(32),l=i(105),u=i(121),c=n.Function,d=r([].concat),h=r([].join),p={},f=function(e,t,i){if(!s(p,t)){for(var n=[],r=0;r<t;r++)n[r]="a["+r+"]";p[t]=c("C,a","return new C("+h(n,",")+")")}return p[t](e,i)};e.exports=u?c.bind:function(e){var t=o(this),i=t.prototype,n=l(arguments,1),r=function(){var i=d(n,l(arguments));return this instanceof r?f(t,i.length,i):t.apply(e,i)};return a(i)&&(r.prototype=i),r}},function(e,t){function i(t,n){return e.exports=i=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},e.exports.__esModule=!0,e.exports.default=e.exports,i(t,n)}e.exports=i,e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t,i){var n=function(e){"use strict";var t=Object.prototype,i=t.hasOwnProperty,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",o=n.asyncIterator||"@@asyncIterator",a=n.toStringTag||"@@toStringTag";function s(e,t,i){return Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{s({},"")}catch(e){s=function(e,t,i){return e[t]=i}}function l(e,t,i,n){var r=t&&t.prototype instanceof d?t:d,o=Object.create(r.prototype),a=new E(n||[]);return o._invoke=function(e,t,i){var n="suspendedStart";return function(r,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===r)throw o;return C()}for(i.method=r,i.arg=o;;){var a=i.delegate;if(a){var s=w(a,i);if(s){if(s===c)continue;return s}}if("next"===i.method)i.sent=i._sent=i.arg;else if("throw"===i.method){if("suspendedStart"===n)throw n="completed",i.arg;i.dispatchException(i.arg)}else"return"===i.method&&i.abrupt("return",i.arg);n="executing";var l=u(e,t,i);if("normal"===l.type){if(n=i.done?"completed":"suspendedYield",l.arg===c)continue;return{value:l.arg,done:i.done}}"throw"===l.type&&(n="completed",i.method="throw",i.arg=l.arg)}}}(e,i,a),o}function u(e,t,i){try{return{type:"normal",arg:e.call(t,i)}}catch(e){return{type:"throw",arg:e}}}e.wrap=l;var c={};function d(){}function h(){}function p(){}var f={};s(f,r,(function(){return this}));var g=Object.getPrototypeOf,m=g&&g(g(T([])));m&&m!==t&&i.call(m,r)&&(f=m);var v=p.prototype=d.prototype=Object.create(f);function y(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function b(e,t){var n;this._invoke=function(r,o){function a(){return new t((function(n,a){!function n(r,o,a,s){var l=u(e[r],e,o);if("throw"!==l.type){var c=l.arg,d=c.value;return d&&"object"==typeof d&&i.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,a,s)}),(function(e){n("throw",e,a,s)})):t.resolve(d).then((function(e){c.value=e,a(c)}),(function(e){return n("throw",e,a,s)}))}s(l.arg)}(r,o,n,a)}))}return n=n?n.then(a,a):a()}}function w(e,t){var i=e.iterator[t.method];if(void 0===i){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,w(e,t),"throw"===t.method))return c;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return c}var n=u(i,e.iterator,t.arg);if("throw"===n.type)return t.method="throw",t.arg=n.arg,t.delegate=null,c;var r=n.arg;return r?r.done?(t[e.resultName]=r.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,c):r:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,c)}function _(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function S(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(_,this),this.reset(!0)}function T(e){if(e){var t=e[r];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,o=function t(){for(;++n<e.length;)if(i.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return o.next=o}}return{next:C}}function C(){return{value:void 0,done:!0}}return h.prototype=p,s(v,"constructor",p),s(p,"constructor",h),h.displayName=s(p,a,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===h||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,p):(e.__proto__=p,s(e,a,"GeneratorFunction")),e.prototype=Object.create(v),e},e.awrap=function(e){return{__await:e}},y(b.prototype),s(b.prototype,o,(function(){return this})),e.AsyncIterator=b,e.async=function(t,i,n,r,o){void 0===o&&(o=Promise);var a=new b(l(t,i,n,r),o);return e.isGeneratorFunction(i)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},y(v),s(v,a,"Generator"),s(v,r,(function(){return this})),s(v,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=[];for(var i in e)t.push(i);return t.reverse(),function i(){for(;t.length;){var n=t.pop();if(n in e)return i.value=n,i.done=!1,i}return i.done=!0,i}},e.values=T,E.prototype={constructor:E,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(S),!e)for(var t in this)"t"===t.charAt(0)&&i.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(i,n){return a.type="throw",a.arg=e,t.next=i,n&&(t.method="next",t.arg=void 0),!!n}for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r],a=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var s=i.call(o,"catchLoc"),l=i.call(o,"finallyLoc");if(s&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(s){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&i.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var o=r;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=e,a.arg=t,o?(this.method="next",this.next=o.finallyLoc,c):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),c},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var i=this.tryEntries[t];if(i.finallyLoc===e)return this.complete(i.completion,i.afterLoc),S(i),c}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var i=this.tryEntries[t];if(i.tryLoc===e){var n=i.completion;if("throw"===n.type){var r=n.arg;S(i)}return r}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,i){return this.delegate={iterator:T(e),resultName:t,nextLoc:i},"next"===this.method&&(this.arg=void 0),c}},e}(e.exports);try{regeneratorRuntime=n}catch(e){"object"==typeof globalThis?globalThis.regeneratorRuntime=n:Function("r","regeneratorRuntime = r")(n)}},function(e,t,i){var n=i(13),r=i(43),o=Math.floor,a=n("".charAt),s=n("".replace),l=n("".slice),u=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,c=/\$([$&'`]|\d{1,2})/g;e.exports=function(e,t,i,n,d,h){var p=i+e.length,f=n.length,g=c;return void 0!==d&&(d=r(d),g=u),s(h,g,(function(r,s){var u;switch(a(s,0)){case"$":return"$";case"&":return e;case"`":return l(t,0,i);case"'":return l(t,p);case"<":u=d[l(s,1,-1)];break;default:var c=+s;if(0===c)return r;if(c>f){var h=o(c/10);return 0===h?r:h<=f?void 0===n[h-1]?a(s,1):n[h-1]+a(s,1):r}u=n[c-1]}return void 0===u?"":u}))}},function(e,t,i){"use strict";
|
|
248
|
+
*/!function(s){"use strict";o=[i(2),i(722),i(723),i(40)],void 0===(a="function"==typeof(r=function(e){return e.effects={effect:{}},function(){var t,i=["add","remove","toggle"],r={border:1,borderBottom:1,borderColor:1,borderLeft:1,borderRight:1,borderTop:1,borderWidth:1,margin:1,padding:1};function o(e){var t,i,n,r=e.ownerDocument.defaultView?e.ownerDocument.defaultView.getComputedStyle(e,null):e.currentStyle,o={};if(r&&r.length&&r[0]&&r[r[0]])for(i=r.length;i--;)"string"==typeof r[t=r[i]]&&(o[(n=t,n.replace(/-([\da-z])/gi,(function(e,t){return t.toUpperCase()})))]=r[t]);else for(t in r)"string"==typeof r[t]&&(o[t]=r[t]);return o}e.each(["borderLeftStyle","borderRightStyle","borderBottomStyle","borderTopStyle"],(function(t,i){e.fx.step[i]=function(e){("none"!==e.end&&!e.setAttr||1===e.pos&&!e.setAttr)&&(n.style(e.elem,i,e.end),e.setAttr=!0)}})),e.fn.addBack||(e.fn.addBack=function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}),e.effects.animateClass=function(t,n,a,s){var l=e.speed(n,a,s);return this.queue((function(){var n,a=e(this),s=a.attr("class")||"",u=l.children?a.find("*").addBack():a;u=u.map((function(){return{el:e(this),start:o(this)}})),(n=function(){e.each(i,(function(e,i){t[i]&&a[i+"Class"](t[i])}))})(),u=u.map((function(){return this.end=o(this.el[0]),this.diff=function(t,i){var n,o,a={};for(n in i)o=i[n],t[n]!==o&&(r[n]||!e.fx.step[n]&&isNaN(parseFloat(o))||(a[n]=o));return a}(this.start,this.end),this})),a.attr("class",s),u=u.map((function(){var t=this,i=e.Deferred(),n=e.extend({},l,{queue:!1,complete:function(){i.resolve(t)}});return this.el.animate(this.diff,n),i.promise()})),e.when.apply(e,u.get()).done((function(){n(),e.each(arguments,(function(){var t=this.el;e.each(this.diff,(function(e){t.css(e,"")}))})),l.complete.call(a[0])}))}))},e.fn.extend({addClass:(t=e.fn.addClass,function(i,n,r,o){return n?e.effects.animateClass.call(this,{add:i},n,r,o):t.apply(this,arguments)}),removeClass:function(t){return function(i,n,r,o){return arguments.length>1?e.effects.animateClass.call(this,{remove:i},n,r,o):t.apply(this,arguments)}}(e.fn.removeClass),toggleClass:function(t){return function(i,n,r,o,a){return"boolean"==typeof n||void 0===n?r?e.effects.animateClass.call(this,n?{add:i}:{remove:i},r,o,a):t.apply(this,arguments):e.effects.animateClass.call(this,{toggle:i},n,r,o)}}(e.fn.toggleClass),switchClass:function(t,i,n,r,o){return e.effects.animateClass.call(this,{add:i,remove:t},n,r,o)}})}(),function(){var t;function i(t,i,n,r){return e.isPlainObject(t)&&(i=t,t=t.effect),t={effect:t},null==i&&(i={}),"function"==typeof i&&(r=i,n=null,i={}),("number"==typeof i||e.fx.speeds[i])&&(r=n,n=i,i={}),"function"==typeof n&&(r=n,n=null),i&&e.extend(t,i),n=n||i.duration,t.duration=e.fx.off?0:"number"==typeof n?n:n in e.fx.speeds?e.fx.speeds[n]:e.fx.speeds._default,t.complete=r||i.complete,t}function n(t){return!(t&&"number"!=typeof t&&!e.fx.speeds[t])||("string"==typeof t&&!e.effects.effect[t]||("function"==typeof t||"object"==typeof t&&!t.effect))}function r(e,t){var i=t.outerWidth(),n=t.outerHeight(),r=/^rect\((-?\d*\.?\d*px|-?\d+%|auto),?\s*(-?\d*\.?\d*px|-?\d+%|auto),?\s*(-?\d*\.?\d*px|-?\d+%|auto),?\s*(-?\d*\.?\d*px|-?\d+%|auto)\)$/.exec(e)||["",0,i,n,0];return{top:parseFloat(r[1])||0,right:"auto"===r[2]?i:parseFloat(r[2]),bottom:"auto"===r[3]?n:parseFloat(r[3]),left:parseFloat(r[4])||0}}e.expr&&e.expr.pseudos&&e.expr.pseudos.animated&&(e.expr.pseudos.animated=(t=e.expr.pseudos.animated,function(i){return!!e(i).data("ui-effects-animated")||t(i)})),!1!==e.uiBackCompat&&e.extend(e.effects,{save:function(e,t){for(var i=0,n=t.length;i<n;i++)null!==t[i]&&e.data("ui-effects-"+t[i],e[0].style[t[i]])},restore:function(e,t){for(var i,n=0,r=t.length;n<r;n++)null!==t[n]&&(i=e.data("ui-effects-"+t[n]),e.css(t[n],i))},setMode:function(e,t){return"toggle"===t&&(t=e.is(":hidden")?"show":"hide"),t},createWrapper:function(t){if(t.parent().is(".ui-effects-wrapper"))return t.parent();var i={width:t.outerWidth(!0),height:t.outerHeight(!0),float:t.css("float")},n=e("<div></div>").addClass("ui-effects-wrapper").css({fontSize:"100%",background:"transparent",border:"none",margin:0,padding:0}),r={width:t.width(),height:t.height()},o=document.activeElement;try{o.id}catch(e){o=document.body}return t.wrap(n),(t[0]===o||e.contains(t[0],o))&&e(o).trigger("focus"),n=t.parent(),"static"===t.css("position")?(n.css({position:"relative"}),t.css({position:"relative"})):(e.extend(i,{position:t.css("position"),zIndex:t.css("z-index")}),e.each(["top","left","bottom","right"],(function(e,n){i[n]=t.css(n),isNaN(parseInt(i[n],10))&&(i[n]="auto")})),t.css({position:"relative",top:0,left:0,right:"auto",bottom:"auto"})),t.css(r),n.css(i).show()},removeWrapper:function(t){var i=document.activeElement;return t.parent().is(".ui-effects-wrapper")&&(t.parent().replaceWith(t),(t[0]===i||e.contains(t[0],i))&&e(i).trigger("focus")),t}}),e.extend(e.effects,{version:"1.13.1",define:function(t,i,n){return n||(n=i,i="effect"),e.effects.effect[t]=n,e.effects.effect[t].mode=i,n},scaledDimensions:function(e,t,i){if(0===t)return{height:0,width:0,outerHeight:0,outerWidth:0};var n="horizontal"!==i?(t||100)/100:1,r="vertical"!==i?(t||100)/100:1;return{height:e.height()*r,width:e.width()*n,outerHeight:e.outerHeight()*r,outerWidth:e.outerWidth()*n}},clipToBox:function(e){return{width:e.clip.right-e.clip.left,height:e.clip.bottom-e.clip.top,left:e.clip.left,top:e.clip.top}},unshift:function(e,t,i){var n=e.queue();t>1&&n.splice.apply(n,[1,0].concat(n.splice(t,i))),e.dequeue()},saveStyle:function(e){e.data("ui-effects-style",e[0].style.cssText)},restoreStyle:function(e){e[0].style.cssText=e.data("ui-effects-style")||"",e.removeData("ui-effects-style")},mode:function(e,t){var i=e.is(":hidden");return"toggle"===t&&(t=i?"show":"hide"),(i?"hide"===t:"show"===t)&&(t="none"),t},getBaseline:function(e,t){var i,n;switch(e[0]){case"top":i=0;break;case"middle":i=.5;break;case"bottom":i=1;break;default:i=e[0]/t.height}switch(e[1]){case"left":n=0;break;case"center":n=.5;break;case"right":n=1;break;default:n=e[1]/t.width}return{x:n,y:i}},createPlaceholder:function(t){var i,n=t.css("position"),r=t.position();return t.css({marginTop:t.css("marginTop"),marginBottom:t.css("marginBottom"),marginLeft:t.css("marginLeft"),marginRight:t.css("marginRight")}).outerWidth(t.outerWidth()).outerHeight(t.outerHeight()),/^(static|relative)/.test(n)&&(n="absolute",i=e("<"+t[0].nodeName+">").insertAfter(t).css({display:/^(inline|ruby)/.test(t.css("display"))?"inline-block":"block",visibility:"hidden",marginTop:t.css("marginTop"),marginBottom:t.css("marginBottom"),marginLeft:t.css("marginLeft"),marginRight:t.css("marginRight"),float:t.css("float")}).outerWidth(t.outerWidth()).outerHeight(t.outerHeight()).addClass("ui-effects-placeholder"),t.data("ui-effects-placeholder",i)),t.css({position:n,left:r.left,top:r.top}),i},removePlaceholder:function(e){var t="ui-effects-placeholder",i=e.data(t);i&&(i.remove(),e.removeData(t))},cleanUp:function(t){e.effects.restoreStyle(t),e.effects.removePlaceholder(t)},setTransition:function(t,i,n,r){return r=r||{},e.each(i,(function(e,i){var o=t.cssUnit(i);o[0]>0&&(r[i]=o[0]*n+o[1])})),r}}),e.fn.extend({effect:function(){var t=i.apply(this,arguments),n=e.effects.effect[t.effect],r=n.mode,o=t.queue,a=o||"fx",s=t.complete,l=t.mode,u=[],c=function(t){var i=e(this),n=e.effects.mode(i,l)||r;i.data("ui-effects-animated",!0),u.push(n),r&&("show"===n||n===r&&"hide"===n)&&i.show(),r&&"none"===n||e.effects.saveStyle(i),"function"==typeof t&&t()};if(e.fx.off||!n)return l?this[l](t.duration,s):this.each((function(){s&&s.call(this)}));function d(i){var o=e(this);function a(){"function"==typeof s&&s.call(o[0]),"function"==typeof i&&i()}t.mode=u.shift(),!1===e.uiBackCompat||r?"none"===t.mode?(o[l](),a()):n.call(o[0],t,(function(){o.removeData("ui-effects-animated"),e.effects.cleanUp(o),"hide"===t.mode&&o.hide(),a()})):(o.is(":hidden")?"hide"===l:"show"===l)?(o[l](),a()):n.call(o[0],t,a)}return!1===o?this.each(c).each(d):this.queue(a,c).queue(a,d)},show:function(e){return function(t){if(n(t))return e.apply(this,arguments);var r=i.apply(this,arguments);return r.mode="show",this.effect.call(this,r)}}(e.fn.show),hide:function(e){return function(t){if(n(t))return e.apply(this,arguments);var r=i.apply(this,arguments);return r.mode="hide",this.effect.call(this,r)}}(e.fn.hide),toggle:function(e){return function(t){if(n(t)||"boolean"==typeof t)return e.apply(this,arguments);var r=i.apply(this,arguments);return r.mode="toggle",this.effect.call(this,r)}}(e.fn.toggle),cssUnit:function(t){var i=this.css(t),n=[];return e.each(["em","px","%","pt"],(function(e,t){i.indexOf(t)>0&&(n=[parseFloat(i),t])})),n},cssClip:function(e){return e?this.css("clip","rect("+e.top+"px "+e.right+"px "+e.bottom+"px "+e.left+"px)"):r(this.css("clip"),this)},transfer:function(t,i){var n=e(this),r=e(t.to),o="fixed"===r.css("position"),a=e("body"),s=o?a.scrollTop():0,l=o?a.scrollLeft():0,u=r.offset(),c={top:u.top-s,left:u.left-l,height:r.innerHeight(),width:r.innerWidth()},d=n.offset(),h=e("<div class='ui-effects-transfer'></div>");h.appendTo("body").addClass(t.className).css({top:d.top-s,left:d.left-l,height:n.innerHeight(),width:n.innerWidth(),position:o?"fixed":"absolute"}).animate(c,t.duration,t.easing,(function(){h.remove(),"function"==typeof i&&i()}))}}),e.fx.step.clip=function(t){t.clipInit||(t.start=e(t.elem).cssClip(),"string"==typeof t.end&&(t.end=r(t.end,t.elem)),t.clipInit=!0),e(t.elem).cssClip({top:t.pos*(t.end.top-t.start.top)+t.start.top,right:t.pos*(t.end.right-t.start.right)+t.start.right,bottom:t.pos*(t.end.bottom-t.start.bottom)+t.start.bottom,left:t.pos*(t.end.left-t.start.left)+t.start.left})}}(),function(){var t={};e.each(["Quad","Cubic","Quart","Quint","Expo"],(function(e,i){t[i]=function(t){return Math.pow(t,e+2)}})),e.extend(t,{Sine:function(e){return 1-Math.cos(e*Math.PI/2)},Circ:function(e){return 1-Math.sqrt(1-e*e)},Elastic:function(e){return 0===e||1===e?e:-Math.pow(2,8*(e-1))*Math.sin((80*(e-1)-7.5)*Math.PI/15)},Back:function(e){return e*e*(3*e-2)},Bounce:function(e){for(var t,i=4;e<((t=Math.pow(2,--i))-1)/11;);return 1/Math.pow(4,3-i)-7.5625*Math.pow((3*t-2)/22-e,2)}}),e.each(t,(function(t,i){e.easing["easeIn"+t]=i,e.easing["easeOut"+t]=function(e){return 1-i(1-e)},e.easing["easeInOut"+t]=function(e){return e<.5?i(2*e)/2:1-i(-2*e+2)/2}}))}(),e.effects})?r.apply(t,o):r)||(e.exports=a)}()}).call(this,i(2))},function(e,t){function i(e,t,i,n,r,o,a){try{var s=e[o](a),l=s.value}catch(e){return void i(e)}s.done?t(l):Promise.resolve(l).then(n,r)}e.exports=function(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var a=e.apply(t,n);function s(e){i(a,r,o,s,l,"next",e)}function l(e){i(a,r,o,s,l,"throw",e)}s(void 0)}))}},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t,i){i(137);var n=i(15),r=n.Service,o=n.apiLoader;o.services.firehose={},n.Firehose=r.defineService("firehose",["2015-08-04"]),Object.defineProperty(o.services.firehose,"2015-08-04",{get:function(){var e=i(512);return e.paginators=i(513).pagination,e},enumerable:!0,configurable:!0}),e.exports=n.Firehose},function(e,t,i){i(137);var n=i(15),r=n.Service,o=n.apiLoader;o.services.kinesis={},n.Kinesis=r.defineService("kinesis",["2013-12-02"]),Object.defineProperty(o.services.kinesis,"2013-12-02",{get:function(){var e=i(528);return e.paginators=i(529).pagination,e.waiters=i(530).waiters,e},enumerable:!0,configurable:!0}),e.exports=n.Kinesis},function(e,t){var i={init:function(e){e||(e="undefined"!=typeof window&&window._i18n&&window._i18n.locale?window._i18n.locale:"undefined"!=typeof document&&document.documentElement.lang?document.documentElement.lang:"undefined"!=typeof navigator&&(navigator.languages||navigator.language||navigator.userLanguage)?((e=navigator.languages&&navigator.languages[0]||navigator.language||navigator.userLanguage)||"root").toLowerCase():"root");var t=this["__"+e]||this.__root;if(t)for(var i in t)this[i]=t[i];for(var i in this.__root)void 0===this[i]&&(this[i]=this.__root[i])}};i.init(),e.exports=i},function(e,t){var i={init:function(e){e||(e="undefined"!=typeof window&&window._i18n&&window._i18n.locale?window._i18n.locale:"undefined"!=typeof document&&document.documentElement.lang?document.documentElement.lang:"undefined"!=typeof navigator&&(navigator.languages||navigator.language||navigator.userLanguage)?((e=navigator.languages&&navigator.languages[0]||navigator.language||navigator.userLanguage)||"root").toLowerCase():"root");var t=this["__"+e]||this.__root;if(t)for(var i in t)this[i]=t[i];for(var i in this.__root)void 0===this[i]&&(this[i]=this.__root[i])}};i.init(),e.exports=i},function(e,t){var i={init:function(e){e||(e="undefined"!=typeof window&&window._i18n&&window._i18n.locale?window._i18n.locale:"undefined"!=typeof document&&document.documentElement.lang?document.documentElement.lang:"undefined"!=typeof navigator&&(navigator.languages||navigator.language||navigator.userLanguage)?((e=navigator.languages&&navigator.languages[0]||navigator.language||navigator.userLanguage)||"root").toLowerCase():"root");var t=this["__"+e]||this.__root;if(t)for(var i in t)this[i]=t[i];for(var i in this.__root)void 0===this[i]&&(this[i]=this.__root[i])}};i.init(),e.exports=i},function(e,t){var i={init:function(e){e||(e="undefined"!=typeof window&&window._i18n&&window._i18n.locale?window._i18n.locale:"undefined"!=typeof document&&document.documentElement.lang?document.documentElement.lang:"undefined"!=typeof navigator&&(navigator.languages||navigator.language||navigator.userLanguage)?((e=navigator.languages&&navigator.languages[0]||navigator.language||navigator.userLanguage)||"root").toLowerCase():"root");var t=this["__"+e]||this.__root;if(t)for(var i in t)this[i]=t[i];for(var i in this.__root)void 0===this[i]&&(this[i]=this.__root[i])}};i.init(),e.exports=i},function(e,t){var i={init:function(e){e||(e="undefined"!=typeof window&&window._i18n&&window._i18n.locale?window._i18n.locale:"undefined"!=typeof document&&document.documentElement.lang?document.documentElement.lang:"undefined"!=typeof navigator&&(navigator.languages||navigator.language||navigator.userLanguage)?((e=navigator.languages&&navigator.languages[0]||navigator.language||navigator.userLanguage)||"root").toLowerCase():"root");var t=this["__"+e]||this.__root;if(t)for(var i in t)this[i]=t[i];for(var i in this.__root)void 0===this[i]&&(this[i]=this.__root[i])}};i.init(),e.exports=i},function(e,t){var i={init:function(e){e||(e="undefined"!=typeof window&&window._i18n&&window._i18n.locale?window._i18n.locale:"undefined"!=typeof document&&document.documentElement.lang?document.documentElement.lang:"undefined"!=typeof navigator&&(navigator.languages||navigator.language||navigator.userLanguage)?((e=navigator.languages&&navigator.languages[0]||navigator.language||navigator.userLanguage)||"root").toLowerCase():"root");var t=this["__"+e]||this.__root;if(t)for(var i in t)this[i]=t[i];for(var i in this.__root)void 0===this[i]&&(this[i]=this.__root[i])}};i.init(),e.exports=i},function(e,t){var i={init:function(e){e||(e="undefined"!=typeof window&&window._i18n&&window._i18n.locale?window._i18n.locale:"undefined"!=typeof document&&document.documentElement.lang?document.documentElement.lang:"undefined"!=typeof navigator&&(navigator.languages||navigator.language||navigator.userLanguage)?((e=navigator.languages&&navigator.languages[0]||navigator.language||navigator.userLanguage)||"root").toLowerCase():"root");var t=this["__"+e]||this.__root;if(t)for(var i in t)this[i]=t[i];for(var i in this.__root)void 0===this[i]&&(this[i]=this.__root[i])}};i.init(),e.exports=i},function(e,t){var i={init:function(e){e||(e="undefined"!=typeof window&&window._i18n&&window._i18n.locale?window._i18n.locale:"undefined"!=typeof document&&document.documentElement.lang?document.documentElement.lang:"undefined"!=typeof navigator&&(navigator.languages||navigator.language||navigator.userLanguage)?((e=navigator.languages&&navigator.languages[0]||navigator.language||navigator.userLanguage)||"root").toLowerCase():"root");var t=this["__"+e]||this.__root;if(t)for(var i in t)this[i]=t[i];for(var i in this.__root)void 0===this[i]&&(this[i]=this.__root[i])}};i.init(),e.exports=i},function(e,t){var i={init:function(e){e||(e="undefined"!=typeof window&&window._i18n&&window._i18n.locale?window._i18n.locale:"undefined"!=typeof document&&document.documentElement.lang?document.documentElement.lang:"undefined"!=typeof navigator&&(navigator.languages||navigator.language||navigator.userLanguage)?((e=navigator.languages&&navigator.languages[0]||navigator.language||navigator.userLanguage)||"root").toLowerCase():"root");var t=this["__"+e]||this.__root;if(t)for(var i in t)this[i]=t[i];for(var i in this.__root)void 0===this[i]&&(this[i]=this.__root[i])}};i.init(),e.exports=i},function(e,t){var i={init:function(e){e||(e="undefined"!=typeof window&&window._i18n&&window._i18n.locale?window._i18n.locale:"undefined"!=typeof document&&document.documentElement.lang?document.documentElement.lang:"undefined"!=typeof navigator&&(navigator.languages||navigator.language||navigator.userLanguage)?((e=navigator.languages&&navigator.languages[0]||navigator.language||navigator.userLanguage)||"root").toLowerCase():"root");var t=this["__"+e]||this.__root;if(t)for(var i in t)this[i]=t[i];for(var i in this.__root)void 0===this[i]&&(this[i]=this.__root[i])}};i.init(),e.exports=i},function(e,t){var i={init:function(e){e||(e="undefined"!=typeof window&&window._i18n&&window._i18n.locale?window._i18n.locale:"undefined"!=typeof document&&document.documentElement.lang?document.documentElement.lang:"undefined"!=typeof navigator&&(navigator.languages||navigator.language||navigator.userLanguage)?((e=navigator.languages&&navigator.languages[0]||navigator.language||navigator.userLanguage)||"root").toLowerCase():"root");var t=this["__"+e]||this.__root;if(t)for(var i in t)this[i]=t[i];for(var i in this.__root)void 0===this[i]&&(this[i]=this.__root[i])}};i.init(),e.exports=i},function(e,t){var i={init:function(e){e||(e="undefined"!=typeof window&&window._i18n&&window._i18n.locale?window._i18n.locale:"undefined"!=typeof document&&document.documentElement.lang?document.documentElement.lang:"undefined"!=typeof navigator&&(navigator.languages||navigator.language||navigator.userLanguage)?((e=navigator.languages&&navigator.languages[0]||navigator.language||navigator.userLanguage)||"root").toLowerCase():"root");var t=this["__"+e]||this.__root;if(t)for(var i in t)this[i]=t[i];for(var i in this.__root)void 0===this[i]&&(this[i]=this.__root[i])}};i.init(),e.exports=i},function(e,t){var i={init:function(e){e||(e="undefined"!=typeof window&&window._i18n&&window._i18n.locale?window._i18n.locale:"undefined"!=typeof document&&document.documentElement.lang?document.documentElement.lang:"undefined"!=typeof navigator&&(navigator.languages||navigator.language||navigator.userLanguage)?((e=navigator.languages&&navigator.languages[0]||navigator.language||navigator.userLanguage)||"root").toLowerCase():"root");var t=this["__"+e]||this.__root;if(t)for(var i in t)this[i]=t[i];for(var i in this.__root)void 0===this[i]&&(this[i]=this.__root[i])}};i.init(),e.exports=i},function(e,t){var i={init:function(e){e||(e="undefined"!=typeof window&&window._i18n&&window._i18n.locale?window._i18n.locale:"undefined"!=typeof document&&document.documentElement.lang?document.documentElement.lang:"undefined"!=typeof navigator&&(navigator.languages||navigator.language||navigator.userLanguage)?((e=navigator.languages&&navigator.languages[0]||navigator.language||navigator.userLanguage)||"root").toLowerCase():"root");var t=this["__"+e]||this.__root;if(t)for(var i in t)this[i]=t[i];for(var i in this.__root)void 0===this[i]&&(this[i]=this.__root[i])}};i.init(),e.exports=i},function(e,t){var i={init:function(e){e||(e="undefined"!=typeof window&&window._i18n&&window._i18n.locale?window._i18n.locale:"undefined"!=typeof document&&document.documentElement.lang?document.documentElement.lang:"undefined"!=typeof navigator&&(navigator.languages||navigator.language||navigator.userLanguage)?((e=navigator.languages&&navigator.languages[0]||navigator.language||navigator.userLanguage)||"root").toLowerCase():"root");var t=this["__"+e]||this.__root;if(t)for(var i in t)this[i]=t[i];for(var i in this.__root)void 0===this[i]&&(this[i]=this.__root[i])}};i.init(),e.exports=i},function(e,t){var i={init:function(e){e||(e="undefined"!=typeof window&&window._i18n&&window._i18n.locale?window._i18n.locale:"undefined"!=typeof document&&document.documentElement.lang?document.documentElement.lang:"undefined"!=typeof navigator&&(navigator.languages||navigator.language||navigator.userLanguage)?((e=navigator.languages&&navigator.languages[0]||navigator.language||navigator.userLanguage)||"root").toLowerCase():"root");var t=this["__"+e]||this.__root;if(t)for(var i in t)this[i]=t[i];for(var i in this.__root)void 0===this[i]&&(this[i]=this.__root[i])}};i.init(),e.exports=i},function(e,t){var i={init:function(e){e||(e="undefined"!=typeof window&&window._i18n&&window._i18n.locale?window._i18n.locale:"undefined"!=typeof document&&document.documentElement.lang?document.documentElement.lang:"undefined"!=typeof navigator&&(navigator.languages||navigator.language||navigator.userLanguage)?((e=navigator.languages&&navigator.languages[0]||navigator.language||navigator.userLanguage)||"root").toLowerCase():"root");var t=this["__"+e]||this.__root;if(t)for(var i in t)this[i]=t[i];for(var i in this.__root)void 0===this[i]&&(this[i]=this.__root[i])}};i.init(),e.exports=i},function(e,t){var i={init:function(e){e||(e="undefined"!=typeof window&&window._i18n&&window._i18n.locale?window._i18n.locale:"undefined"!=typeof document&&document.documentElement.lang?document.documentElement.lang:"undefined"!=typeof navigator&&(navigator.languages||navigator.language||navigator.userLanguage)?((e=navigator.languages&&navigator.languages[0]||navigator.language||navigator.userLanguage)||"root").toLowerCase():"root");var t=this["__"+e]||this.__root;if(t)for(var i in t)this[i]=t[i];for(var i in this.__root)void 0===this[i]&&(this[i]=this.__root[i])}};i.init(),e.exports=i},function(e,t){var i={init:function(e){e||(e="undefined"!=typeof window&&window._i18n&&window._i18n.locale?window._i18n.locale:"undefined"!=typeof document&&document.documentElement.lang?document.documentElement.lang:"undefined"!=typeof navigator&&(navigator.languages||navigator.language||navigator.userLanguage)?((e=navigator.languages&&navigator.languages[0]||navigator.language||navigator.userLanguage)||"root").toLowerCase():"root");var t=this["__"+e]||this.__root;if(t)for(var i in t)this[i]=t[i];for(var i in this.__root)void 0===this[i]&&(this[i]=this.__root[i])}};i.init(),e.exports=i},function(e,t){var i={init:function(e){e||(e="undefined"!=typeof window&&window._i18n&&window._i18n.locale?window._i18n.locale:"undefined"!=typeof document&&document.documentElement.lang?document.documentElement.lang:"undefined"!=typeof navigator&&(navigator.languages||navigator.language||navigator.userLanguage)?((e=navigator.languages&&navigator.languages[0]||navigator.language||navigator.userLanguage)||"root").toLowerCase():"root");var t=this["__"+e]||this.__root;if(t)for(var i in t)this[i]=t[i];for(var i in this.__root)void 0===this[i]&&(this[i]=this.__root[i])}};i.init(),e.exports=i},function(e,t){e.exports=function(e,t,i,n){var r=i?i.call(n,e,t):void 0;if(void 0!==r)return!!r;if(e===t)return!0;if("object"!=typeof e||!e||"object"!=typeof t||!t)return!1;var o=Object.keys(e),a=Object.keys(t);if(o.length!==a.length)return!1;for(var s=Object.prototype.hasOwnProperty.bind(t),l=0;l<o.length;l++){var u=o[l];if(!s(u))return!1;var c=e[u],d=t[u];if(!1===(r=i?i.call(n,c,d,u):void 0)||void 0===r&&c!==d)return!1}return!0}},function(e,t,i){"use strict";t.a=function(e){function t(e,t,n){var r=t.trim().split(f);t=r;var o=r.length,a=e.length;switch(a){case 0:case 1:var s=0;for(e=0===a?"":e[0]+" ";s<o;++s)t[s]=i(e,t[s],n).trim();break;default:var l=s=0;for(t=[];s<o;++s)for(var u=0;u<a;++u)t[l++]=i(e[u]+" ",r[s],n).trim()}return t}function i(e,t,i){var n=t.charCodeAt(0);switch(33>n&&(n=(t=t.trim()).charCodeAt(0)),n){case 38:return t.replace(g,"$1"+e.trim());case 58:return e.trim()+t.replace(g,"$1"+e.trim());default:if(0<1*i&&0<t.indexOf("\f"))return t.replace(g,(58===e.charCodeAt(0)?"":"$1")+e.trim())}return e+t}function n(e,t,i,o){var a=e+";",s=2*t+3*i+4*o;if(944===s){e=a.indexOf(":",9)+1;var l=a.substring(e,a.length-1).trim();return l=a.substring(0,e).trim()+l+";",1===P||2===P&&r(l,1)?"-webkit-"+l+l:l}if(0===P||2===P&&!r(a,1))return a;switch(s){case 1015:return 97===a.charCodeAt(10)?"-webkit-"+a+a:a;case 951:return 116===a.charCodeAt(3)?"-webkit-"+a+a:a;case 963:return 110===a.charCodeAt(5)?"-webkit-"+a+a:a;case 1009:if(100!==a.charCodeAt(4))break;case 969:case 942:return"-webkit-"+a+a;case 978:return"-webkit-"+a+"-moz-"+a+a;case 1019:case 983:return"-webkit-"+a+"-moz-"+a+"-ms-"+a+a;case 883:if(45===a.charCodeAt(8))return"-webkit-"+a+a;if(0<a.indexOf("image-set(",11))return a.replace(C,"$1-webkit-$2")+a;break;case 932:if(45===a.charCodeAt(4))switch(a.charCodeAt(5)){case 103:return"-webkit-box-"+a.replace("-grow","")+"-webkit-"+a+"-ms-"+a.replace("grow","positive")+a;case 115:return"-webkit-"+a+"-ms-"+a.replace("shrink","negative")+a;case 98:return"-webkit-"+a+"-ms-"+a.replace("basis","preferred-size")+a}return"-webkit-"+a+"-ms-"+a+a;case 964:return"-webkit-"+a+"-ms-flex-"+a+a;case 1023:if(99!==a.charCodeAt(8))break;return"-webkit-box-pack"+(l=a.substring(a.indexOf(":",15)).replace("flex-","").replace("space-between","justify"))+"-webkit-"+a+"-ms-flex-pack"+l+a;case 1005:return h.test(a)?a.replace(d,":-webkit-")+a.replace(d,":-moz-")+a:a;case 1e3:switch(t=(l=a.substring(13).trim()).indexOf("-")+1,l.charCodeAt(0)+l.charCodeAt(t)){case 226:l=a.replace(b,"tb");break;case 232:l=a.replace(b,"tb-rl");break;case 220:l=a.replace(b,"lr");break;default:return a}return"-webkit-"+a+"-ms-"+l+a;case 1017:if(-1===a.indexOf("sticky",9))break;case 975:switch(t=(a=e).length-10,s=(l=(33===a.charCodeAt(t)?a.substring(0,t):a).substring(e.indexOf(":",7)+1).trim()).charCodeAt(0)+(0|l.charCodeAt(7))){case 203:if(111>l.charCodeAt(8))break;case 115:a=a.replace(l,"-webkit-"+l)+";"+a;break;case 207:case 102:a=a.replace(l,"-webkit-"+(102<s?"inline-":"")+"box")+";"+a.replace(l,"-webkit-"+l)+";"+a.replace(l,"-ms-"+l+"box")+";"+a}return a+";";case 938:if(45===a.charCodeAt(5))switch(a.charCodeAt(6)){case 105:return l=a.replace("-items",""),"-webkit-"+a+"-webkit-box-"+l+"-ms-flex-"+l+a;case 115:return"-webkit-"+a+"-ms-flex-item-"+a.replace(S,"")+a;default:return"-webkit-"+a+"-ms-flex-line-pack"+a.replace("align-content","").replace(S,"")+a}break;case 973:case 989:if(45!==a.charCodeAt(3)||122===a.charCodeAt(4))break;case 931:case 953:if(!0===T.test(e))return 115===(l=e.substring(e.indexOf(":")+1)).charCodeAt(0)?n(e.replace("stretch","fill-available"),t,i,o).replace(":fill-available",":stretch"):a.replace(l,"-webkit-"+l)+a.replace(l,"-moz-"+l.replace("fill-",""))+a;break;case 962:if(a="-webkit-"+a+(102===a.charCodeAt(5)?"-ms-"+a:"")+a,211===i+o&&105===a.charCodeAt(13)&&0<a.indexOf("transform",10))return a.substring(0,a.indexOf(";",27)+1).replace(p,"$1-webkit-$2")+a}return a}function r(e,t){var i=e.indexOf(1===t?":":"{"),n=e.substring(0,3!==t?i:10);return i=e.substring(i+1,e.length-1),O(2!==t?n:n.replace(E,"$1"),i,t)}function o(e,t){var i=n(t,t.charCodeAt(0),t.charCodeAt(1),t.charCodeAt(2));return i!==t+";"?i.replace(_," or ($1)").substring(4):"("+t+")"}function a(e,t,i,n,r,o,a,s,u,c){for(var d,h=0,p=t;h<D;++h)switch(d=R[h].call(l,e,p,i,n,r,o,a,s,u,c)){case void 0:case!1:case!0:case null:break;default:p=d}if(p!==t)return p}function s(e){return void 0!==(e=e.prefix)&&(O=null,e?"function"!=typeof e?P=1:(P=2,O=e):P=0),s}function l(e,i){var s=e;if(33>s.charCodeAt(0)&&(s=s.trim()),s=[s],0<D){var l=a(-1,i,s,s,x,k,0,0,0,0);void 0!==l&&"string"==typeof l&&(i=l)}var d=function e(i,s,l,d,h){for(var p,f,g,b,_,S=0,E=0,T=0,C=0,R=0,O=0,L=g=p=0,M=0,F=0,B=0,U=0,V=l.length,z=V-1,H="",j="",q="",G="";M<V;){if(f=l.charCodeAt(M),M===z&&0!==E+C+T+S&&(0!==E&&(f=47===E?10:47),C=T=S=0,V++,z++),0===E+C+T+S){if(M===z&&(0<F&&(H=H.replace(c,"")),0<H.trim().length)){switch(f){case 32:case 9:case 59:case 13:case 10:break;default:H+=l.charAt(M)}f=59}switch(f){case 123:for(p=(H=H.trim()).charCodeAt(0),g=1,U=++M;M<V;){switch(f=l.charCodeAt(M)){case 123:g++;break;case 125:g--;break;case 47:switch(f=l.charCodeAt(M+1)){case 42:case 47:e:{for(L=M+1;L<z;++L)switch(l.charCodeAt(L)){case 47:if(42===f&&42===l.charCodeAt(L-1)&&M+2!==L){M=L+1;break e}break;case 10:if(47===f){M=L+1;break e}}M=L}}break;case 91:f++;case 40:f++;case 34:case 39:for(;M++<z&&l.charCodeAt(M)!==f;);}if(0===g)break;M++}switch(g=l.substring(U,M),0===p&&(p=(H=H.replace(u,"").trim()).charCodeAt(0)),p){case 64:switch(0<F&&(H=H.replace(c,"")),f=H.charCodeAt(1)){case 100:case 109:case 115:case 45:F=s;break;default:F=I}if(U=(g=e(s,F,g,f,h+1)).length,0<D&&(_=a(3,g,F=t(I,H,B),s,x,k,U,f,h,d),H=F.join(""),void 0!==_&&0===(U=(g=_.trim()).length)&&(f=0,g="")),0<U)switch(f){case 115:H=H.replace(w,o);case 100:case 109:case 45:g=H+"{"+g+"}";break;case 107:g=(H=H.replace(m,"$1 $2"))+"{"+g+"}",g=1===P||2===P&&r("@"+g,3)?"@-webkit-"+g+"@"+g:"@"+g;break;default:g=H+g,112===d&&(j+=g,g="")}else g="";break;default:g=e(s,t(s,H,B),g,d,h+1)}q+=g,g=B=F=L=p=0,H="",f=l.charCodeAt(++M);break;case 125:case 59:if(1<(U=(H=(0<F?H.replace(c,""):H).trim()).length))switch(0===L&&(p=H.charCodeAt(0),45===p||96<p&&123>p)&&(U=(H=H.replace(" ",":")).length),0<D&&void 0!==(_=a(1,H,s,i,x,k,j.length,d,h,d))&&0===(U=(H=_.trim()).length)&&(H="\0\0"),p=H.charCodeAt(0),f=H.charCodeAt(1),p){case 0:break;case 64:if(105===f||99===f){G+=H+l.charAt(M);break}default:58!==H.charCodeAt(U-1)&&(j+=n(H,p,f,H.charCodeAt(2)))}B=F=L=p=0,H="",f=l.charCodeAt(++M)}}switch(f){case 13:case 10:47===E?E=0:0===1+p&&107!==d&&0<H.length&&(F=1,H+="\0"),0<D*N&&a(0,H,s,i,x,k,j.length,d,h,d),k=1,x++;break;case 59:case 125:if(0===E+C+T+S){k++;break}default:switch(k++,b=l.charAt(M),f){case 9:case 32:if(0===C+S+E)switch(R){case 44:case 58:case 9:case 32:b="";break;default:32!==f&&(b=" ")}break;case 0:b="\\0";break;case 12:b="\\f";break;case 11:b="\\v";break;case 38:0===C+E+S&&(F=B=1,b="\f"+b);break;case 108:if(0===C+E+S+A&&0<L)switch(M-L){case 2:112===R&&58===l.charCodeAt(M-3)&&(A=R);case 8:111===O&&(A=O)}break;case 58:0===C+E+S&&(L=M);break;case 44:0===E+T+C+S&&(F=1,b+="\r");break;case 34:case 39:0===E&&(C=C===f?0:0===C?f:C);break;case 91:0===C+E+T&&S++;break;case 93:0===C+E+T&&S--;break;case 41:0===C+E+S&&T--;break;case 40:if(0===C+E+S){if(0===p)switch(2*R+3*O){case 533:break;default:p=1}T++}break;case 64:0===E+T+C+S+L+g&&(g=1);break;case 42:case 47:if(!(0<C+S+T))switch(E){case 0:switch(2*f+3*l.charCodeAt(M+1)){case 235:E=47;break;case 220:U=M,E=42}break;case 42:47===f&&42===R&&U+2!==M&&(33===l.charCodeAt(U+2)&&(j+=l.substring(U,M+1)),b="",E=0)}}0===E&&(H+=b)}O=R,R=f,M++}if(0<(U=j.length)){if(F=s,0<D&&(void 0!==(_=a(2,j,F,i,x,k,U,d,h,d))&&0===(j=_).length))return G+j+q;if(j=F.join(",")+"{"+j+"}",0!=P*A){switch(2!==P||r(j,2)||(A=0),A){case 111:j=j.replace(y,":-moz-$1")+j;break;case 112:j=j.replace(v,"::-webkit-input-$1")+j.replace(v,"::-moz-$1")+j.replace(v,":-ms-input-$1")+j}A=0}}return G+j+q}(I,s,i,0,0);return 0<D&&(void 0!==(l=a(-2,d,s,s,x,k,d.length,0,0,0))&&(d=l)),"",A=0,k=x=1,d}var u=/^\0+/g,c=/[\0\r\f]/g,d=/: */g,h=/zoo|gra/,p=/([,: ])(transform)/g,f=/,\r+?/g,g=/([\t\r\n ])*\f?&/g,m=/@(k\w+)\s*(\S*)\s*/,v=/::(place)/g,y=/:(read-only)/g,b=/[svh]\w+-[tblr]{2}/,w=/\(\s*(.*)\s*\)/g,_=/([\s\S]*?);/g,S=/-self|flex-/g,E=/[^]*?(:[rp][el]a[\w-]+)[^]*/,T=/stretch|:\s*\w+\-(?:conte|avail)/,C=/([^-])(image-set\()/,k=1,x=1,A=0,P=1,I=[],R=[],D=0,O=null,N=0;return l.use=function e(t){switch(t){case void 0:case null:D=R.length=0;break;default:if("function"==typeof t)R[D++]=t;else if("object"==typeof t)for(var i=0,n=t.length;i<n;++i)e(t[i]);else N=0|!!t}return e},l.set=s,void 0!==e&&s(e),l}},function(e,t,i){"use strict";t.a={animationIterationCount:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1}},function(e){e.exports=JSON.parse('{"a":"/api/v1/prompter"}')},function(e,t,i){var n,r;n=[i(14),i(16)],void 0===(r=function(e,t){return function(e){function t(e,t){return e.w('<div class="small-12 columns large-centered video-prompter-container"><ul class="tabs vpr-tab" data-tab id="scriptTypesId"><li class="tab-title active" id="allVideoScriptsTitle"><a href="#allVideoScripts">').f(t.getPath(!1,["videoPrompter","allScripts"]),t,"h").w('</a></li><li class="tab-title" id="myVideoScriptsTitle"><a href="#myVideoScripts">').f(t.getPath(!1,["videoPrompter","myScripts"]),t,"h").w('</a></li><li class="tab-title" id="sharedScriptsTitle"><a href="#sharedScripts">').f(t.getPath(!1,["videoPrompter","shared"]),t,"h").w('</a></li><a id="refreshPrompterPages" class="refresh"><img src="/svg/refresh.svg"></a>').x(t.get(["can_add_new_scripts"],!1),t,{block:i},{}).w('</ul><div class="tabs-content sf-tab-content" id="scriptListId"><div class="content active" id="allVideoScripts">').h("eq",t,{else:n,block:o},{key:t.getPath(!1,["all_scripts","length"]),value:0},"h").w('</div><div class="content" id="myVideoScripts">').h("eq",t,{else:s,block:u},{key:t.getPath(!1,["my_scripts","length"]),value:0},"h").w('</div><div class="content" id="sharedScripts">').h("eq",t,{else:d,block:p},{key:t.getPath(!1,["shared_scripts","length"]),value:0},"h").w('</div></div><div id="testelement"></div><div class="display-video-prompt hide" id="promptSettingsContainer"><div class="large-12 columns prompt-settings" id="promptPropertiesId"><div class="medium-3 columns font-size text-left right-bar" hv-tooltip="').f(t.getPath(!1,["videoPrompter","propertyHidden"]),t,"h").w('"><h6>').f(t.getPath(!1,["videoPrompter","textSizeChange"]),t,"h").w('</h6><label id="textSizeDecrease" class="minus').x(t.get(["inactive_minus"],!1),t,{block:f},{}).w('"><img src="/svg/minus-ico-white.svg" width="10"></label><label id="textSizeIncrease" class="plus').x(t.get(["inactive_plus"],!1),t,{block:g},{}).w('"><img src="/svg/plus-ico-white.svg" width="10"></label></div><div class="columns medium-3 right-bar linespace-container" hv-tooltip="').f(t.getPath(!1,["videoPrompter","propertyHidden"]),t,"h").w('"><h6>').f(t.getPath(!1,["videoPrompter","lineSpaceChange"]),t,"h").w('</h6><label id="lineSpaceDecrease" class="minus').x(t.get(["inactive_minus_linespace"],!1),t,{block:m},{}).w('"><img src="/svg/minus-ico-white.svg" width="10"></label><label id="lineSpaceIncrease" class="plus').x(t.get(["inactive_plus_linespace"],!1),t,{block:v},{}).w('"><img src="/svg/plus-ico-white.svg" width="10"></label></div><div class="medium-4 columns slider right-bar"><div class="small-5 columns"><h6>').f(t.getPath(!1,["videoPrompter","speedLabel"]),t,"h").w('</h6></div><div class="small-1 columns text-center speed-minus-container ').x(t.get(["inactive_minus_speed"],!1),t,{block:y},{}).w('"><img id="speedDecreaseId" class="minus" src="/svg/minus-ico-white.svg" width="10"></div><div class="small-4 columns text-center speed-slider-container"><span id="speedSliderId" data-min="1" data-max="10" data-value="5" ></span></div><div class="small-1 columns text-center speed-plus-container left ').x(t.get(["inactive_plus_speed"],!1),t,{block:b},{}).w('"><img id="speedIncreaseId" class="plus" src="/svg/plus-ico-white.svg" width="10"></div></div><div class="medium-2 columns"><a id="changeScriptId" class="change-script">').f(t.getPath(!1,["videoPrompter","changeScript"]),t,"h").w('</a></div></div><div class="large-12 columns telepromterColumnContainer" id="telepromterColumnContainer"><div id="teleprompterId" contentEditable="true" class="small-6 small-offset-3 columns video-teleprompter"></div><div id="teleprompterSiblingDiv"></div></div></div></div>')}function i(e,t){return e.w('<a id="addNewScriptFromPrompt" class="hp-border-btn">').f(t.getPath(!1,["videoPrompter","addNewScript"]),t,"h").w("</a>")}function n(e,t){return e.s(t.get(["all_scripts"],!1),t,{block:r},{})}function r(e,t){return e.w('<div class="script-list" id="').f(t.get(["id"],!1),t,"h").w('" data-text="').f(t.get(["script_text"],!1),t,"h").w('">').f(t.get(["title"],!1),t,"h").w("</div>")}function o(e,t){return e.w('<div class="large-12 columns text-center vpr-empty-state"><img class="empty-state-img" src="/svg/teleprompter.svg" width="60"><h4>').f(t.getPath(!1,["videoPrompter","allScriptEmptyStateText"]),t,"h").w("</h4>").x(t.get(["can_add_new_scripts"],!1),t,{block:a},{}).w("</div>")}function a(e,t){return e.w('<a id="addNewScriptFromAllScripts" class="button wiz-primary-btn">').f(t.getPath(!1,["videoPrompter","addNewScript"]),t,"h").w("</a>")}function s(e,t){return e.s(t.get(["my_scripts"],!1),t,{block:l},{})}function l(e,t){return e.w('<div class="script-list" id="').f(t.get(["id"],!1),t,"h").w('" data-text="').f(t.get(["script_text"],!1),t,"h").w('">').f(t.get(["title"],!1),t,"h").w("</div>")}function u(e,t){return e.w('<div class="large-12 columns text-center vpr-empty-state"><img class="empty-state-img" src="/svg/teleprompter.svg" width="60"><h4>').f(t.getPath(!1,["videoPrompter","myScriptEmptyStateText"]),t,"h").w("</h4>").x(t.get(["can_add_new_scripts"],!1),t,{block:c},{}).w("</div>")}function c(e,t){return e.w('<a id="addNewScriptFromMyScripts" class="button wiz-primary-btn">').f(t.getPath(!1,["videoPrompter","addNewScript"]),t,"h").w("</a>")}function d(e,t){return e.s(t.get(["shared_scripts"],!1),t,{block:h},{})}function h(e,t){return e.w('<div class="script-list" id="').f(t.get(["id"],!1),t,"h").w('" data-text="').f(t.get(["script_text"],!1),t,"h").w('">').f(t.get(["title"],!1),t,"h").w("</div>")}function p(e,t){return e.w('<div class="large-12 columns text-center vpr-empty-state"><img class="empty-state-img" src="/svg/teleprompter.svg" width="60"><h4>').f(t.getPath(!1,["videoPrompter","sharedEmptyStateText"]),t,"h").w("</h4></div>")}function f(e,t){return e.w(" in-active")}function g(e,t){return e.w(" in-active")}function m(e,t){return e.w(" in-active")}function v(e,t){return e.w(" in-active")}function y(e,t){return e.w(" in-active")}function b(e,t){return e.w(" in-active")}e.register("templates/wiz/video_prompter",t),t.__dustBody=!0,i.__dustBody=!0,n.__dustBody=!0,r.__dustBody=!0,o.__dustBody=!0,a.__dustBody=!0,s.__dustBody=!0,l.__dustBody=!0,u.__dustBody=!0,c.__dustBody=!0,d.__dustBody=!0,h.__dustBody=!0,p.__dustBody=!0,f.__dustBody=!0,g.__dustBody=!0,m.__dustBody=!0,v.__dustBody=!0,y.__dustBody=!0,b.__dustBody=!0}(e),function(t,i){var n;return e.render("templates/wiz/video_prompter",t,(function(e,t){if("function"==typeof i)try{i(e,t)}catch(e){}if(e)throw e;n=t})),n}}.apply(t,n))||(e.exports=r)},function(e,t,i){var n,r;n=[i(14),i(16)],void 0===(r=function(e,t){return function(e){function t(e,t){return e.w('<div class="small-12 columns large-centered video-prompter-container"><ul class="tabs vpr-tab" data-tab id="scriptTypesId"><li class="tab-title active" id="allVideoScriptsTitle"><a data-tab="allVideoScripts">').f(t.getPath(!1,["videoPrompter","allScripts"]),t,"h").w('</a></li><li class="tab-title" id="myVideoScriptsTitle"><a data-tab="myVideoScripts">').f(t.getPath(!1,["videoPrompter","myScripts"]),t,"h").w('</a></li><li class="tab-title" id="sharedScriptsTitle"><a data-tab="sharedScripts">').f(t.getPath(!1,["videoPrompter","shared"]),t,"h").w("</a></li>").x(t.get(["can_add_new_scripts"],!1),t,{block:i},{}).w('<a id="refreshPrompterPages" class="refresh"><img src="/svg/refresh.svg"></a></ul><div class="tabs-content sf-tab-content" id="scriptListId"><div class="content active" id="allVideoScripts">').h("eq",t,{else:n,block:o},{key:t.getPath(!1,["all_scripts","length"]),value:0},"h").w('</div><div class="content" id="myVideoScripts">').h("eq",t,{else:s,block:u},{key:t.getPath(!1,["my_scripts","length"]),value:0},"h").w('</div><div class="content" id="sharedScripts">').h("eq",t,{else:d,block:p},{key:t.getPath(!1,["shared_scripts","length"]),value:0},"h").w('</div></div><div id="testelement"></div><div class="display-video-prompt hide" id="promptSettingsContainer"><div class="large-12 columns prompt-settings" id="promptPropertiesId"><div class="medium-3 columns font-size text-center right-bar" hv-tooltip="').f(t.getPath(!1,["videoPrompter","propertyHidden"]),t,"h").w('"><h6>').f(t.getPath(!1,["videoPrompter","textSizeChange"]),t,"h").w('</h6><label id="textSizeDecrease" class="minus').x(t.get(["inactive_minus"],!1),t,{block:f},{}).w('"><img src="/svg/minusicon.svg" width="25"></label><label id="textSizeIncrease" class="plus').x(t.get(["inactive_plus"],!1),t,{block:g},{}).w('"><img src="/svg/plusicon.svg" width="25"></label></div><div class="columns medium-3 right-bar linespace-container text-center" hv-tooltip="').f(t.getPath(!1,["videoPrompter","propertyHidden"]),t,"h").w('"><h6>').f(t.getPath(!1,["videoPrompter","lineSpaceChange"]),t,"h").w('</h6><label id="lineSpaceDecrease" class="minus').x(t.get(["inactive_minus_linespace"],!1),t,{block:m},{}).w('"><img src="/svg/minusicon.svg" width="25"></label><label id="lineSpaceIncrease" class="plus').x(t.get(["inactive_plus_linespace"],!1),t,{block:v},{}).w('"><img src="/svg/plusicon.svg" width="25"></label></div><div class="medium-4 columns slider right-bar"><div class="small-5 columns"><h6>').f(t.getPath(!1,["videoPrompter","speedLabel"]),t,"h").w('</h6></div><div class="small-1 columns text-center speed-minus-container ').x(t.get(["inactive_minus_speed"],!1),t,{block:y},{}).w('"><img id="speedDecreaseId" class="minus" src="/svg/minusicon.svg" width="10"></div><div class="small-4 columns text-center speed-slider-container"><span id="speedSliderId" data-min="1" data-max="10" data-value="5" ></span></div><div class="small-1 columns text-center speed-plus-container left ').x(t.get(["inactive_plus_speed"],!1),t,{block:b},{}).w('"><img id="speedIncreaseId" class="plus" src="/svg/plusicon.svg" width="10"></div></div><div class="medium-2 columns text-center"><a id="changeScriptId" class="change-script">').f(t.getPath(!1,["videoPrompter","changeScript"]),t,"h").w('</a></div></div><div class="large-12 columns ').x(t.get(["newRecorderScreen"],!1),t,{else:w,block:_},{}).w(' custom-scroll" id="telepromterColumnContainer"><div id="teleprompterId" contentEditable="true" class="small-6 small-offset-3 columns video-teleprompter"></div><div id="teleprompterSiblingDiv"></div></div></div></div>')}function i(e,t){return e.w('<a id="addNewScriptFromPrompt" class="hp-border-btn">').f(t.getPath(!1,["videoPrompter","addNewScript"]),t,"h").w("</a>")}function n(e,t){return e.s(t.get(["all_scripts"],!1),t,{block:r},{})}function r(e,t){return e.w('<div class="script-list" id="').f(t.get(["id"],!1),t,"h").w('" data-text="').f(t.get(["script_text"],!1),t,"h").w('">').f(t.get(["title"],!1),t,"h").w("</div>")}function o(e,t){return e.w('<div class="large-12 columns text-center vpr-empty-state"><img class="empty-state-img" src="/svg/teleprompter_new.svg" width="60"><h4>').f(t.getPath(!1,["videoPrompter","allScriptEmptyStateText"]),t,"h").w("</h4>").x(t.get(["can_add_new_scripts"],!1),t,{block:a},{}).w("</div>")}function a(e,t){return e.w('<a id="addNewScriptFromAllScripts" class="button wiz-primary-btn">').f(t.getPath(!1,["videoPrompter","addNewScript"]),t,"h").w("</a>")}function s(e,t){return e.s(t.get(["my_scripts"],!1),t,{block:l},{})}function l(e,t){return e.w('<div class="script-list" id="').f(t.get(["id"],!1),t,"h").w('" data-text="').f(t.get(["script_text"],!1),t,"h").w('">').f(t.get(["title"],!1),t,"h").w("</div>")}function u(e,t){return e.w('<div class="large-12 columns text-center vpr-empty-state"><img class="empty-state-img" src="/svg/teleprompter_new.svg" width="60"><h4>').f(t.getPath(!1,["videoPrompter","myScriptEmptyStateText"]),t,"h").w("</h4>").x(t.get(["can_add_new_scripts"],!1),t,{block:c},{}).w("</div>")}function c(e,t){return e.w('<a id="addNewScriptFromMyScripts" class="button wiz-primary-btn">').f(t.getPath(!1,["videoPrompter","addNewScript"]),t,"h").w("</a>")}function d(e,t){return e.s(t.get(["shared_scripts"],!1),t,{block:h},{})}function h(e,t){return e.w('<div class="script-list" id="').f(t.get(["id"],!1),t,"h").w('" data-text="').f(t.get(["script_text"],!1),t,"h").w('">').f(t.get(["title"],!1),t,"h").w("</div>")}function p(e,t){return e.w('<div class="large-12 columns text-center vpr-empty-state"><img class="empty-state-img" src="/svg/teleprompter_new.svg" width="60"><h4>').f(t.getPath(!1,["videoPrompter","sharedEmptyStateText"]),t,"h").w("</h4></div>")}function f(e,t){return e.w(" in-active")}function g(e,t){return e.w(" in-active")}function m(e,t){return e.w(" in-active")}function v(e,t){return e.w(" in-active")}function y(e,t){return e.w(" in-active")}function b(e,t){return e.w(" in-active")}function w(e,t){return e.w("telepromterColumnContainer")}function _(e,t){return e.w("hvteleprompter-column-container")}e.register("templates/wiz/video_prompter_new",t),t.__dustBody=!0,i.__dustBody=!0,n.__dustBody=!0,r.__dustBody=!0,o.__dustBody=!0,a.__dustBody=!0,s.__dustBody=!0,l.__dustBody=!0,u.__dustBody=!0,c.__dustBody=!0,d.__dustBody=!0,h.__dustBody=!0,p.__dustBody=!0,f.__dustBody=!0,g.__dustBody=!0,m.__dustBody=!0,v.__dustBody=!0,y.__dustBody=!0,b.__dustBody=!0,w.__dustBody=!0,_.__dustBody=!0}(e),function(t,i){var n;return e.render("templates/wiz/video_prompter_new",t,(function(e,t){if("function"==typeof i)try{i(e,t)}catch(e){}if(e)throw e;n=t})),n}}.apply(t,n))||(e.exports=r)},function(e,t,i){var n,r;n=[i(14),i(16)],void 0===(r=function(e,t){return function(e){function t(e,t){return e.w('<div class="video-prompter-container"><ul class="tabs vpr-tab" data-tab id="scriptTypesId"><li class="tab-title active" id="allVideoScriptsTitle"><a href="#allVideoScripts">').f(t.getPath(!1,["videoPrompter","allScripts"]),t,"h").w('</a></li><li class="tab-title" id="myVideoScriptsTitle"><a href="#myVideoScripts">').f(t.getPath(!1,["videoPrompter","myScripts"]),t,"h").w('</a></li><li class="tab-title" id="sharedScriptsTitle"><a href="#sharedScripts">').f(t.getPath(!1,["videoPrompter","shared"]),t,"h").w('</a></li><a id="refreshPrompterPages" class="refresh"><img src="').f(t.get(["origin"],!1),t,"h").w('/svg/refresh.svg"></a>').x(t.get(["can_add_new_scripts"],!1),t,{block:i},{}).w('</ul><div class="tabs-content sf-tab-content" id="scriptListId"><div class="content active" id="allVideoScripts">').h("eq",t,{else:n,block:o},{key:t.getPath(!1,["all_scripts","length"]),value:0},"h").w('</div><div class="content" id="myVideoScripts">').h("eq",t,{else:s,block:u},{key:t.getPath(!1,["my_scripts","length"]),value:0},"h").w('</div><div class="content" id="sharedScripts">').h("eq",t,{else:d,block:p},{key:t.getPath(!1,["shared_scripts","length"]),value:0},"h").w('</div></div><div id="testelement"></div><div class="display-video-prompt hide" id="promptSettingsContainer"><div class="prompt-settings" id="promptPropertiesId"><div class="font-size text-left right-bar col-grid-3" hv-tooltip="').f(t.getPath(!1,["videoPrompter","propertyHidden"]),t,"h").w('"><div><h6>').f(t.getPath(!1,["videoPrompter","textSizeChange"]),t,"h").w('</h6></div><label id="textSizeDecrease" class="minus').x(t.get(["inactive_minus"],!1),t,{block:f},{}).w('"><img src="').f(t.get(["origin"],!1),t,"h").w('/svg/minus-ico-white.svg" width="10"></label><label id="textSizeIncrease" class="plus').x(t.get(["inactive_plus"],!1),t,{block:g},{}).w('"><img src="').f(t.get(["origin"],!1),t,"h").w('/svg/plus-ico-white.svg" width="10"></label></div><div class="right-bar linespace-container col-grid-3" hv-tooltip="').f(t.getPath(!1,["videoPrompter","propertyHidden"]),t,"h").w('"><div><h6>').f(t.getPath(!1,["videoPrompter","lineSpaceChange"]),t,"h").w('</h6></div><label id="lineSpaceDecrease" class="minus').x(t.get(["inactive_minus_linespace"],!1),t,{block:m},{}).w('"><img src="/svg/minus-ico-white.svg" width="10"></label><label id="lineSpaceIncrease" class="plus').x(t.get(["inactive_plus_linespace"],!1),t,{block:v},{}).w('"><img src="/svg/plus-ico-white.svg" width="10"></label></div><div class="slider right-bar"><div><h6>').f(t.getPath(!1,["videoPrompter","speedLabel"]),t,"h").w('</h6></div><div class="speed-minus-container"><img id="speedDecreaseId" class="minus" src="').f(t.get(["origin"],!1),t,"h").w('/svg/minus-ico-white.svg" width="10"></div><div class="speed-slider-container"><span id="speedSliderId" data-min="1" data-max="10" data-value="1" ></span></div><div class="speed-plus-container left"><img id="speedIncreaseId" class="plus" src="').f(t.get(["origin"],!1),t,"h").w('/svg/plus-ico-white.svg" width="10"></div></div><div class=""><a id="changeScriptId" class="change-script">').f(t.getPath(!1,["videoPrompter","changeScript"]),t,"h").w('</a></div></div><div class="telepromterColumnContainer" id="telepromterColumnContainer"><div id="teleprompterId" contentEditable="true" class="video-teleprompter"></div><div id="teleprompterSiblingDiv"></div></div></div></div>')}function i(e,t){return e.w('<a id="addNewScriptFromPrompt" class="hp-border-btn">').f(t.getPath(!1,["videoPrompter","addNewScript"]),t,"h").w("</a>")}function n(e,t){return e.s(t.get(["all_scripts"],!1),t,{block:r},{})}function r(e,t){return e.w('<div class="script-list" id="').f(t.get(["id"],!1),t,"h").w('" data-text="').f(t.get(["script_text"],!1),t,"h").w('">').f(t.get(["title"],!1),t,"h").w("</div>")}function o(e,t){return e.w('<div class="vpr-empty-state"><img class="empty-state-img" src="').f(t.get(["origin"],!1),t,"h").w('/svg/teleprompter.svg" width="60"><h4>').f(t.getPath(!1,["videoPrompter","allScriptEmptyStateText"]),t,"h").w("</h4>").x(t.get(["can_add_new_scripts"],!1),t,{block:a},{}).w("</div>")}function a(e,t){return e.w('<a id="addNewScriptFromAllScripts" class="button wiz-primary-btn">').f(t.getPath(!1,["videoPrompter","addNewScript"]),t,"h").w("</a>")}function s(e,t){return e.s(t.get(["my_scripts"],!1),t,{block:l},{})}function l(e,t){return e.w('<div class="script-list" id="').f(t.get(["id"],!1),t,"h").w('" data-text="').f(t.get(["script_text"],!1),t,"h").w('">').f(t.get(["title"],!1),t,"h").w("</div>")}function u(e,t){return e.w('<div class="vpr-empty-state"><img class="empty-state-img" src="').f(t.get(["origin"],!1),t,"h").w('/svg/teleprompter.svg" width="60"><h4>').f(t.getPath(!1,["videoPrompter","myScriptEmptyStateText"]),t,"h").w("</h4>").x(t.get(["can_add_new_scripts"],!1),t,{block:c},{}).w("</div>")}function c(e,t){return e.w('<a id="addNewScriptFromMyScripts" class="button wiz-primary-btn">').f(t.getPath(!1,["videoPrompter","addNewScript"]),t,"h").w("</a>")}function d(e,t){return e.s(t.get(["shared_scripts"],!1),t,{block:h},{})}function h(e,t){return e.w('<div class="script-list" id="').f(t.get(["id"],!1),t,"h").w('" data-text="').f(t.get(["script_text"],!1),t,"h").w('">').f(t.get(["title"],!1),t,"h").w("</div>")}function p(e,t){return e.w('<div class="vpr-empty-state"><img class="empty-state-img" src="').f(t.get(["origin"],!1),t,"h").w('/svg/teleprompter.svg" width="60"><h4>').f(t.getPath(!1,["videoPrompter","sharedEmptyStateText"]),t,"h").w("</h4></div>")}function f(e,t){return e.w(" in-active")}function g(e,t){return e.w(" in-active")}function m(e,t){return e.w(" in-active")}function v(e,t){return e.w(" in-active")}e.register("templates/wiz/sdk_video_prompter",t),t.__dustBody=!0,i.__dustBody=!0,n.__dustBody=!0,r.__dustBody=!0,o.__dustBody=!0,a.__dustBody=!0,s.__dustBody=!0,l.__dustBody=!0,u.__dustBody=!0,c.__dustBody=!0,d.__dustBody=!0,h.__dustBody=!0,p.__dustBody=!0,f.__dustBody=!0,g.__dustBody=!0,m.__dustBody=!0,v.__dustBody=!0}(e),function(t,i){var n;return e.render("templates/wiz/sdk_video_prompter",t,(function(e,t){if("function"==typeof i)try{i(e,t)}catch(e){}if(e)throw e;n=t})),n}}.apply(t,n))||(e.exports=r)},function(e,t,i){var n=i(616),r=0;e.exports=function(e){var t=++r;return n(e)+t}},function(e,t,i){var n,r;n=[i(627),i(632),i(634),i(8)],void 0===(r=function(e,t,i,n){return function(r){var o=!1,a=!1;try{o=HippoVideo.data.api.getProperty("isLessonly"),a=HippoVideo.data.api.getProperty("isPlayer2022")}catch(e){}return o=o||"lessonly"==n.getQueryParams().type||"lessonly"==n.getQueryParams().integration_type,r.isDelivery&&!o&&a?new i(r):r.isDelivery&&!o||r.isNewPlayer?new t(r):new e(r)}}.apply(t,n))||(e.exports=r)},function(e,t,i){"use strict";(function(e){i.d(t,"a",(function(){return C}));i(96),i(186),i(24),i(249),i(56),i(72),i(84),i(113),i(61),i(177),i(52),i(85),i(86),i(140),i(67),i(141);var n=i(99),r=i.n(n),o=i(98),a=i.n(o),s=i(1),l=i.n(s),u=i(0),c=i.n(u),d=i(393),h=i.n(d),p=i(398),f=i.n(p),g=i(7),m=i.n(g),v=i(31),y=i(101),b=i.n(y),w=i(399),_=i(6);function S(e,t){var i="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!i){if(Array.isArray(e)||(i=function(e,t){if(!e)return;if("string"==typeof e)return E(e,t);var i=Object.prototype.toString.call(e).slice(8,-1);"Object"===i&&e.constructor&&(i=e.constructor.name);if("Map"===i||"Set"===i)return Array.from(e);if("Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i))return E(e,t)}(e))||t&&e&&"number"==typeof e.length){i&&(e=i);var n=0,r=function(){};return{s:r,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){i=i.call(e)},n:function(){var e=i.next();return a=e.done,e},e:function(e){s=!0,o=e},f:function(){try{a||null==i.return||i.return()}finally{if(s)throw o}}}}function E(e,t){(null==t||t>e.length)&&(t=e.length);for(var i=0,n=new Array(t);i<t;i++)n[i]=e[i];return n}function T(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,n)}return i}function C(t){var i=this;console.log("SE INIT PROPS ",t.videoPlayerView);var n=t.videoPlayerView,o=t.token,s=t.tokenType,d=t.recorder,p=t.recorderApiModel,g=t.isPersonalisationEnabled,y=t.customColors,E=t.footageUrls,C=t.showSimpleEditor,k=t.projectJson,x=t.integrationType,A=t.onSimpleEditorInitialize,P=Object(u.useState)(d.recordDetails),I=P[0],R=P[1],D=Object(u.useContext)(v.a).recorderInitOptions.edit,O=Object(_.c)(),N=Object(u.useRef)(!1),L=Object(u.useRef)(),M=Object(u.useRef)(k),F=Object(u.useRef)();Object(u.useEffect)(function(){var e=this;if(l()(this,i),!I||!I.asset_id)return d.getRecordDetails().then(function(t){l()(this,e),R(t)}.bind(this)).catch(function(t){l()(this,e),console.log("ERROR IN GETTING RECORD DETAILS ",t)}.bind(this)),function(){l()(this,e),d.cancelGetRecordDetails()}.bind(this)}.bind(this),[d]);var B=function(){if(l()(this,i),I.asset_id){var e={el:L.current,fromSDK:!0,videoPlayerView:n,integration_type:x,assetId:I&&I.asset_id,token:o,tokenType:s,recorder:d,recorderApiModel:p,isBlurEnabled:!0,embeddedDigest:I&&I.delivery_token,isPersonalizationEnabled:g,customColors:y,authoringId:I&&I.authoring_id,footageUrls:E};console.log("SIMPLE EDIT OPTIONS ",e),F.current?(console.log("1"),F.current.initialize(e)):(console.log("2"),F.current=new h.a(e)),A&&A(F.current)}}.bind(this),U=function(){l()(this,i);try{var e={};if(D&&"object"===a()(D)&&null!==D)for(var t in D)!1!==D[t]&&"false"!==D[t]||(e[t]="false");return e}catch(e){return{}}}.bind(this);return Object(u.useEffect)(function(){l()(this,i),L.current&&(L.current.innerHTML+=f()(e.extend(b.a,function(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?T(Object(i),!0).forEach((function(t){r()(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):T(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}({shouldHideTrimTimer:"true",integrationType:x,isAddImageEnabled:!1,canShowPersonalization:g,mfValues:m.a.personalization.defaultMergeFields,origin:O},U()))),N.current=!0,console.log("CONTROLS ADDED >>>",L.current))}.bind(this),[L]),Object(u.useEffect)(function(){l()(this,i),n&&L.current&&I&&N.current&&B()}.bind(this),[n,L,I,N]),Object(u.useEffect)(function(){if(l()(this,i),F.current)if(C){F.current.enable();var e,t=S(L.current.getElementsByClassName("simple-edit-container"));try{for(t.s();!(e=t.n()).done;){e.value.classList.remove("hide")}}catch(e){t.e(e)}finally{t.f()}F.current.height="140px"}else{var n,r=S(L.current.getElementsByClassName("simple-edit-container"));try{for(r.s();!(n=r.n()).done;){n.value.classList.add("hide")}}catch(e){r.e(e)}finally{r.f()}F.current.height="0"}}.bind(this),[C]),Object(u.useEffect)(function(){var e=this;return l()(this,i),M.current=k,k&&F.current&&n&&(setTimeout(function(){l()(this,e),F.current.setProjectJson(k)}.bind(this),300),n.show()),function(){l()(this,e)}.bind(this)}.bind(this),[k]),Object(u.useEffect)(function(){var e=this;l()(this,i),F.current&&n&&M.current&&(setTimeout(function(){l()(this,e),console.log("PROJECT JSON 123",k),F.current.setProjectJson(k)}.bind(this),300),n.show())}.bind(this),[F,n]),c.a.createElement(w.a,{showSimpleEditor:!0,ref:L})}}).call(this,i(11))},function(e,t,i){var n,r;n=[i(2),i(11),i(35),i(8),i(12),i(330),i(649),i(650),i(7),i(48),i(189),i(188),i(117),i(651),i(238),i(652),i(726),i(120),i(115),i(116),i(68),i(713),i(714),i(715),i(357),i(718),i(719),i(97),i(721),i(724)],void 0===(r=function(e,t,i,n,r,o,a,s,l,u,c,d,h,p,f,g,m,v){var y;return d=d.default,r=r.default,a=a.default,m=m.default,s=s.default,i.View.extend({initialize:function(t){y=d.getVideoI18N_v2(),this.$el=t.$el||e(t.el),this.origin=t.fromSDK?window._HVDomain||"https://assets.hippovideo.io":"",this.videoPlayerView=t.videoPlayerView,this.assetId=t.assetId,this.token=t.token,this.tokenType=t.tokenType,this.recorder=t.recorder,this.recorderApiModel=t.recorderApiModel,this.digest=t.digest,this.integrationType=t.integration_type,this.embeddedDigest=t.embeddedDigest,this.isPersonalizationEnabled=t.isPersonalizationEnabled,this.customColors=t.customColors,this.overrideWarnOnExit=t.overrideWarnOnExit,this.isPPR=t.isPPR,this.enabled=!1,this.askReloadConfirmation=!1,this.onBoardRequired=this.isOnBoardRequired(),this.currentSelectedText=void 0,this.currentSelectedSticker=void 0,this.currentSelectedCallout=void 0,this.currentSelectedBlur=void 0,this.showingColorPicker=!1,this.blurPlayInterval=void 0,this.isBlurEnabled=t.isBlurEnabled,this.authoringId=t.authoringId,this.footageUrls=t.footageUrls||{},this.closeImportCallback=t.closeImportCallback||function(){},this.openImportCallback=t.openImportCallback||function(){},this.defaultTextAreaValue=y.simpleEdit.enterTextHere,this.isMac=window.navigator.userAgent.indexOf("Mac")>=0,this.isTicketVideoPreview=t.isTicketViewPreview,this.isAssignmentVideoPreview=t.isAssignmentVideoPreview,this.isTestimonialVideoPreview=t.isTestimonialVideoPreview,this.isGuestRecording=t.isGuestRecording,this.fromQuickRecord=t.fromQuickRecord,this.canInitializeUI=t.initEditUI,this.initSettingModel(),this.brand_colors=[],this.defaultFontValue="timesnewroman",this.brand_font_color="#000000",this.colorPaletteEnabled=t.colorPaletteEnabled,this.isPPR=t.isPPR,this.fontCache={},this.sessionDetails={addedClips:[],primaryVideo:void 0,secondaryVideo:void 0,trimSliderStart:0,trimSliderEnd:0,totalAddedEffects:0},this.stickerSize=[],this.stickers={1:{name:"Smileys",mainId:1124,startId:945,endId:1935},2:{name:"Animals&Nature",mainId:315,startId:286,endId:434},3:{name:"Food&Drink",mainId:932,startId:854,endId:944},4:{name:"Objects",mainId:1947,startId:1936,endId:2134},5:{name:"Travel&Places",mainId:435,startId:435,endId:547},6:{name:"Activity",mainId:829,startId:547,endId:853},7:{name:"Symbols",mainId:2340,startId:2135,endId:2428},8:{name:"Flags",mainId:25,startId:2,endId:285}},this.callouts=n.getAvailableCallouts(),this.calloutsDisplayorder=n.getCalloutDisplayorder(),this.selectPrimaryVideo=this.selectPrimaryVideo.bind(this),this.selectSecondaryVideo=this.selectSecondaryVideo.bind(this),this.userEventStart=this.userEventStart.bind(this),this.userEventStop=this.userEventStop.bind(this),this.selectTrim=this.selectTrim.bind(this),this.selectCrop=this.selectCrop.bind(this),this.selectAddText=this.selectAddText.bind(this),this.selectAddCallouts=this.selectAddCallouts.bind(this),this.selectAddStickers=this.selectAddStickers.bind(this),this.selectAddImage=this.selectAddImage.bind(this),this.hanldeImageAspectRatioChange=this.hanldeImageAspectRatioChange.bind(this),this.deleteImage=this.deleteImage.bind(this),this.changeImageOpacity=this.changeImageOpacity.bind(this),this.addImage=this.addImage.bind(this),this.addPersonalizedImage=this.addPersonalizedImage.bind(this),this.processSelectedImage=this.processSelectedImage.bind(this),this.createNewImage=this.createNewImage.bind(this),this.addWebsiteImageBtn=this.addWebsiteImageBtn.bind(this),this.applyCrop=this.applyCrop.bind(this),this.resetCrop=this.resetCrop.bind(this),this.addEnteredText=this.addEnteredText.bind(this),this.textPropertyChanged=this.textPropertyChanged.bind(this),this.textEditableChanged=this.textEditableChanged.bind(this),this.deleteText=this.deleteText.bind(this),this.addNewSticker=this.addNewSticker.bind(this),this.deleteSticker=this.deleteSticker.bind(this),this.stickerPropertyChanged=this.stickerPropertyChanged.bind(this),this.calloutPropertyChanged=this.calloutPropertyChanged.bind(this),this.deleteCallout=this.deleteCallout.bind(this),this.playerTimeUpdate=this.playerTimeUpdate.bind(this),this.makeVideoResizeableDraggable=this.makeVideoResizeableDraggable.bind(this),this.selectBlur=this.selectBlur.bind(this),this.selectAddBlur=this.selectAddBlur.bind(this),this.deleteBlur=this.deleteBlur.bind(this),this.addNewBlur=this.addNewBlur.bind(this),this.blurPropertyChanged=this.blurPropertyChanged.bind(this),this.blurAreaChanged=this.blurAreaChanged.bind(this),this.handleVideoPlay=this.handleVideoPlay.bind(this),this.handleVideoPause=this.handleVideoPause.bind(this),this.handleVideoSeeked=this.handleVideoSeeked.bind(this),this.newComponentDragged=this.newComponentDragged.bind(this),this.newComponentDropped=this.newComponentDropped.bind(this),this.getReloadConfirmationState=this.getReloadConfirmationState.bind(this),this.checkAndPopulateMf=this.checkAndPopulateMf.bind(this),this.playerResized=this.playerResized.bind(this),this.textBoxResized=this.textBoxResized.bind(this),this.initializeAtwho=this.initializeAtwho.bind(this),this.fontLoaded=this.fontLoaded.bind(this),this.markerSelected=this.markerSelected.bind(this),this.globalKeypress=this.globalKeypress.bind(this),this.initSettingModel=this.initSettingModel.bind(this),this.getBrandingInfoSuccess=this.getBrandingInfoSuccess.bind(this),this.cropResizable=this.videoPlayerView.$el.find(".se-crop-resizable"),this.primaryVideoContainer=this.videoPlayerView.$el.find(".primary-video-container"),this.primaryVideoOverflowContainer=this.videoPlayerView.$el.find(".primary-video-overflow-container"),this.secondaryVideoContainer=this.videoPlayerView.$el.find(".secondary-video-container"),this.secondaryVideoOverflowContainer=this.videoPlayerView.$el.find(".secondary-video-overflow-container"),this.infoText=this.$el.find(".default-control-detail .info-text"),r.initializeJQueryTouchPunch(),this.$el.find(".se-text-properties").unbind("change").bind("change",this.textPropertyChanged),0!=this.canInitializeUI&&this.initializeUI(),e(document).bind("mousedown",{that:this},this.globalClick),this.$el.find(".trim-btn").unbind("click").bind("click",this.selectTrim),this.$el.find(".crop-btn").unbind("click").bind("click",this.selectCrop),this.$el.find(".add-text-btn").unbind("click").bind("click",this.selectAddText),this.$el.find(".add-callouts-btn").unbind("click").bind("click",this.selectAddCallouts),this.$el.find(".add-stickers-btn").unbind("click").bind("click",this.selectAddStickers),this.$el.find(".add-image-btn").unbind("click").bind("click",this.selectAddImage),this.$el.find(".apply-crop").unbind("click").bind("click",this.applyCrop),this.$el.find(".reset-crop").unbind("click").bind("click",this.resetCrop),this.$el.find(".add-text").unbind("click").bind("click",this.addEnteredText),this.videoPlayerView.$el.find(".se-text-editable").unbind("keypress").bind("keypress",this.textEditableChanged),this.videoPlayerView.$el.find(".se-clip-time").unbind("click").bind("click",{that:this},this.showClipTimePop),this.videoPlayerView.$el.find(".timer-input-btn").unbind("click").bind("click",{that:this},this.clipInputButtonClicked),this.videoPlayerView.$el.find(".timer-start-input, .timer-stop-input").unbind("keyup").bind("keyup",{that:this},this.clipInputtyped),this.$el.find(".se-sticker-btn").unbind("click").bind("click",{that:this},this.stickerBtnClicked),this.$el.find(".delete-sticker").unbind("click").bind("click",this.deleteSticker),this.$el.find(".sticker-control").unbind("change").bind("change",{that:this},this.stickerPropertyChanged),this.$el.find(".se-callout-btn").unbind("click").bind("click",{that:this},this.calloutBtnClicked),this.$el.find(".delete-callout").unbind("click").bind("click",this.deleteCallout),this.$el.find(".callout-control").unbind("change").bind("change",{that:this},this.calloutPropertyChanged),this.$el.find(".lock-aspect-ratio").unbind("click").bind("click",{that:this},this.lockAspectRatio),this.$el.find(".sticker-family-container").unbind("click").bind("click",{that:this},this.showStickerFamily),this.$el.find(".callout-scroll-right, .callout-scroll-left").unbind("click").bind("click",{that:this},this.scrollCallouts),this.$el.find(".addtext-input-text").unbind("keyup").bind("keyup",{that:this},this.addTextChanged),this.$el.find(".trim-input-btn").unbind("click").bind("click",{that:this},this.trimInputButtonClicked),this.$el.find(".trim-before-input, .trim-after-input").unbind("keyup").bind("keyup",{that:this},this.trimInputTyped),this.$el.find(".trim-before-time").unbind("click").bind("click",{that:this},this.showTrimBeforePop),this.$el.find(".trim-after-time").unbind("click").bind("click",{that:this},this.showTrimAfterPop),this.$el.find("#blurBtn").unbind("click").bind("click",this.selectAddBlur),this.$el.find("#resizeDragBtn").unbind("click").bind("click",this.makeVideoResizeableDraggable),this.$el.find(".delete-blur").unbind("click").bind("click",this.deleteBlur),this.$el.find("#applyBlur").unbind("click").bind("click",{that:this},this.addNewBlur),this.$el.find(".blur-control").unbind("click").bind("click",this.blurPropertyChanged),this.$el.find("#imageOpacitySlider").unbind("change").bind("change",this.changeImageOpacity),this.$el.find("#imageOpacityInput").unbind("change keyup").bind("change keyup",this.changeImageOpacity),this.$el.find("#imageArLock").unbind("change").bind("change",this.hanldeImageAspectRatioChange),this.$el.find("#deleteImage").unbind("click").bind("click",this.deleteImage),this.$el.find("#addImageBtn").unbind("click").bind("click",this.addImage),this.$el.find("#addPersonalizedImageBtn").unbind("click").bind("click",this.addPersonalizedImage),this.$el.find("#addWebsiteImageBtn").unbind("click").bind("click",this.addWebsiteImageBtn),this.$el.find("#imageOpacitySlider").val(100),!(this.isGuestRecording||this.isTicketVideoPreview||this.isAssignmentVideoPreview||this.isTestimonialVideoPreview||"true"!=e("#isAddImageInVideoEnabled").val())||this.$el.find("#addImageMenuBtn").remove(),this.isTicketVideoPreview&&this.$el.find(".merge-field-container").remove(),document.fonts&&(document.fonts.onloadingdone=this.fontLoaded),this.videoPlayerView.setUpdateHandler(this.playerTimeUpdate),this.videoPlayerView.setPlayPauseHandler(this.handleVideoPlay,!0),this.videoPlayerView.setPlayPauseHandler(this.handleVideoPause,!1),this.videoPlayerView.setSeekedHandler(this.handleVideoSeeked),this.videoPlayerView.setPlayerResizeHandler(this.playerResized),this.userEmail=e("#userEmail").val(),e(document).bind("keydown",{that:this},this.globalKeypress),this.applyCustomColors(),this.addCustomFontStyles(),HippoVideo&&HippoVideo.AppRegistry&&HippoVideo.AppRegistry.isDeepIntg&&HippoVideo.AppRegistry.isPersonalizationEnabled&&e("#addTextBtn").hide()},initSettingModel:function(){var e=this;this.settingModel=new c({settingTabName:l.wizSetting.BRANDING});var t={};try{if(HippoVideo&&HippoVideo.data&&HippoVideo.data.api&&HippoVideo.data.api.getProperty&&""!=HippoVideo.data.api.getProperty("userEmail"))t={authentication_token:HippoVideo.data.api.getProperty("authToken"),email:encodeURIComponent(HippoVideo.data.api.getProperty("userEmail"))},this.settingModel.fetch({data:t,success:function(t){e.brand_colors=t.get("info").brand_colors,t.get("info").brand_font&&(e.defaultFontValue=t.get("info").brand_font.toLowerCase().replace(/\s/g,""),e.$el.find(".se-font-selector").val(e.defaultFontValue)),t.get("info").brand_font_color&&(e.brand_font_color=t.get("info").brand_font_color),e.setupSpectrum()}});else if(this.digest||this.recorderApiModel){var i=e.getPageSource();this.recorderApiModel?this.recorderApiModel.getBrandingInfo().then((function(t){e.getBrandingInfoSuccess(t,e)})).catch((function(e){console.error(e)})):this.settingModel.getDigestInfo(this.digest,i,(function(t){e.getBrandingInfoSuccess(t,e)}))}}catch(e){console.error(e)}},getBrandingInfoSuccess:function(e,t){t.brand_colors=e.brand_colors,e.brand_font&&(t.defaultFontValue=e.brand_font.toLowerCase().replace(/\s/g,""),t.$el.find(".se-font-selector").val(t.defaultFontValue)),e.brand_font_color&&(t.brand_font_color=e.brand_font_color),t.setupSpectrum()},getPageSource:function(){return"true"==e("#isTestimonial").val()?"testimonial":e("#isGuestRecording").val()?"guest":"lessonly"==n.getQueryParams().type?"lessonly":"generic_embed"==n.getQueryParams().type?"generic_embed":this.integrationType?this.integrationType:""},resizeHandler:function(){this.mediaContainerResized(this.primaryVideoContainer),this.mediaContainerResized(this.secondaryVideoContainer)},initializeUI:function(){var t=this;this.defaultFontValue="timesnewroman",this.$el.find(".trim-slider").slider({range:!0,min:0,max:1e3,step:1,values:[0,1e3],start:function(){t.unselectAllComponents()},slide:function(e,i){t.$el.find(".trim-control-detail input.sliderValue[data-index=0]").val(i.values[0]),t.$el.find(".trim-control-detail input.sliderValue[data-index=1]").val(1e3-i.values[1]),t.trimChanged(),t.trimSliding(i)},stop:function(e){t.$el.find(".trim-before-container, .trim-after-container").removeClass("trim-hovered"),t.trimChanged()}}),this.cropResizable.resizable({containment:t.videoPlayerView.$el.find(".se-crop-scale"),handles:"n, e, w, s, ne, nw, se, sw",resize:function(e,i){t.cropResized(!0)},stop:function(){t.cropStopped()}}),this.makeVideoContainerResizable(this.primaryVideoContainer,this.$el.find(".primaryvid-control-detail .lock-aspect-ratio").is(":checked")),this.primaryVideoContainer.draggable({scroll:!1,opacity:.9,snap:".hippo-video-player, .se-crop-highlighter",snapMode:"both",snapTolerance:10,start:this.userEventStart,stop:function(){t.unselectAllComponents(),t.userEventStop()}}),this.makeVideoContainerResizable(this.secondaryVideoContainer,this.$el.find(".secondaryvid-control-detail .lock-aspect-ratio").is(":checked")),this.secondaryVideoContainer.draggable({scroll:!1,opacity:.9,snap:".hippo-video-player, .primary-video-container, .se-crop-highlighter",snapMode:"both",snapTolerance:10,start:this.userEventStart,stop:function(){t.unselectAllComponents(),t.userEventStop()}}),e(".primary-video-container, .secondary-video-container").hover((function(){e(".se-components-hover").removeClass("se-components-hover"),e(this).addClass("se-components-hover")}),(function(){e(this).removeClass("se-components-hover")}));var i=n.getFontMap(),r=[];for(var o in i)r.push(o);r=r.sort();for(var a=0;a<r.length;a++){o=r[a];this.$el.find(".se-font-selector").append(e("<option>",{value:o,text:i[o].family,style:"font-family: "+i[o].family+";"})),this.defaultFontValue=i[o].isDefault?o:this.defaultFontValue}this.$el.find(".se-font-selector").val(this.defaultFontValue),this.$el.find(".sticker-btn-container").empty();for(var s in this.stickers){var l=this.stickers[s];this.$el.find(".sticker-btn-container").append(p({i:s,mainImg:"https://s3.amazonaws.com/hippolms-wiz-static/stickers-preview/s"+l.mainId+".png?v=2"})),this.downloadAndSetStickers(this,s,l.startId,l.endId)}for(var u in this.$el.find(".callout-btn-container").empty(),this.calloutsDisplayorder){s=this.calloutsDisplayorder[u];var c=document.createElement("img");e(c).addClass("se-callout-btn"),c.id="se-callout-btn-"+s,c.src="https://s3.amazonaws.com/hippolms-wiz-static/callouts/c"+s+".png?v=2",c.crossOrigin="Anonymous",this.$el.find(".callout-btn-container").append(c),this.findCalloutSize(s)}this.$el.find(".se-callout-btn").draggable({scroll:!1,helper:"clone",revert:"invalid",revertDuration:100,start:this.newComponentDragged,stop:this.newComponentDropped}),this.$el.find(".se-sticker-btn").draggable({scroll:!1,appendTo:"body",stack:".se-sticker-btn",helper:"clone",revert:"invalid",revertDuration:100,start:this.newComponentDragged,stop:this.newComponentDropped}),this.videoPlayerView.$el.find(".se-crop-resizable").droppable({accept:".se-sticker-btn, .se-callout-btn",drop:function(e,i){t.componentDropped(i.draggable[0].id,e.pageX-t.videoPlayerView.$el.find(".se-crop-scale").offset().left-40,e.pageY-t.videoPlayerView.$el.find(".se-crop-scale").offset().top-40)}}),this.videoPlayerView.$el.find(".se-clip-time").resizable({containment:e(".components-time-container"),handles:"e, w",resize:function(e,t){},stop:function(){t.onClipTimeChangeHandler(),t.updateTimeFromClipToPopup(t)}});var d=this.$el.find(".addtext-control-detail .color-picker .sp-replacer"),h=document.createElement("div");e(h).addClass("text-color-picker"),e(h).text("A"),e(d).prepend(h),this.$el.find(".se-font-selector").select2({minimumResultsForSearch:-1,theme:"hippocategory",width:"element",dropdownCssClass:"et-dropdown-css",templateResult:function(t,i){return t.element&&e(i)[0].style.setProperty("font-family",e(t.element).css("font-family"),"important"),t.text}}),this.$el.find(".se-fontsize-selector").select2({minimumResultsForSearch:-1,theme:"hippocategory"}),this.isPersonalizationEnabled&&(this.$el.find("#seMfSelector").select2({tags:!0,multiple:!1,theme:"hippocategory",templateResult:function(t,i){return t.element&&e(i).addClass("selection-in-blue"),t.text}}),this.mfValues=["{Email}","{First Name}","{Last Name}","{Country}","{City}","{Phone Number}","{Company Name}","{Title}","{State}","{Address}"],this.$el.find("#seMfSelector").on("change",{that:this},this.handleMfChange)),this.$el.find(".se-textalign-selector").select2({minimumResultsForSearch:-1,dropdownAutoWidth:!0,theme:"hippocategory",templateSelection:function(e){return'<img width="10" src="'+(this.origin+"/svg/text-"+e.id+"-align.svg")+'"/>'},templateResult:function(e){return e.id||(e.id="center"),'<img width="10" style="margin-right:5px" src="'+(this.origin+"/svg/text-"+e.id+"-align.svg")+'"/>'+e.text},escapeMarkup:function(e){return e}}).next(".select2-container").addClass("textalign-select2"),this.$el.find(".select2-selection__rendered").removeAttr("title"),this.disable(),this.cropResized(!1),this.enableBlurForPlayer()},setupSpectrum:function(){e(".sp-container").remove();var t=this,i={showInput:!0,preferredFormat:"rgb",clickoutFiresChange:!0,chooseText:"set",color:t.brand_font_color,show:function(){t.showingColorPicker=!0,e(".seColorContainer").length>0&&e(".seColorContainer")[0].scrollIntoView({block:"end",behavior:"smooth"})},hide:function(){t.showingColorPicker=!1},move:function(){t._previewColorChange()},change:function(){t._handleColorChange(),t.showingColorPicker=!1},containerClassName:"seColorContainer"};if(this.brand_colors&&this.brand_colors.length>0){var n=s.getPaletteConfig(this.brand_colors,"seColorContainer",this.colorPaletteEnabled);i=Object.assign(i,n)}this.$el.find(".se-color-selector").spectrum(i)},_previewColorChange:function(){if(this.currentSelectedText){var t=this.$el.find(".addtext-control-detail .se-color-choose").spectrum("get").toHexString();e("#se-component-"+this.currentSelectedText+" .text-el-line").css("color",t)}},_handleColorChange:function(){this.setTextColorInClip()},setTextColorInClip:function(){if(this.currentSelectedText){var e=this.getClipOf(this.currentSelectedText);e&&(e.properties.color=this.$el.find(".addtext-control-detail .se-color-choose").spectrum("get").toHexString(),this.updateProjectJson(),this.reconstructUI())}},downloadAndSetStickers:function(t,i,n,r){if(!(n>=r)){var o=document.createElement("img");e(o).addClass("se-sticker-btn"),o.id="se-sticker-btn-"+n,o.src="https://s3.amazonaws.com/hippolms-wiz-static/stickers-all/transparent.png?v=2";var a=(n-2)%50*-20,s=-20*Math.floor((n-2)/50);o.style.background="url('https://s3.amazonaws.com/hippolms-wiz-static/stickers-all/stickers_all.png?v=2') "+a+"px "+s+"px",t.$el.find(".sticker-family-container-"+i+" .sticker-family-all").append(o),t.findStickerSize(n),e(o).unbind("click").bind("click",{that:t},t.stickerBtnClicked),setTimeout((function(){t.downloadAndSetStickers(t,i,n+1,r)}),10)}},enable:function(){this.enabled=!0;try{HippoVideo.data.api.getProperty("isTrimEnabled")&&this.$el.find(".simple-edit-buttons-box").hide()}catch(e){}this.primaryVideoContainer.css("z-index","100"),this.secondaryVideoContainer.css("z-index","101"),this.videoPlayerView.setSimpleEditMode(!0),this.unselectAllControls(),this.videoPlayerView.$el.find(".se-crop-highlighter").css({background:"rgba(72, 72, 72, 0.97)","z-index":"108"}),this.videoPlayerView.$el.css("overflow","visible"),this.videoPlayerView.$el.find(".se-crop-scale").css({top:"0px",left:"0px"}),this.scaleElement(this.videoPlayerView.$el.find(".se-crop-scale"),1,1,0,0),e("#previewPageLeft").addClass("simple-edit-top-pad"),e(".body-wiz").addClass("tmp-body-wiz").removeClass("body-wiz"),e(".tmp-body-wiz").css("margin-top","105px"),e(".tmp-body-wiz").animate({marginTop:"0px"},200),this.videoPlayerView.$el.find(".thumbnail-container").hide(),this.videoPlayerView.$el.find(".play-btn-container").fadeOut(100),this.videoPlayerView.$el.find(".player-touch-guard").hide(),this.snapshot={},this.snapshot.projectJson=n.naiveClone(this.projectJson),this.snapshot.trimSliderStart=this.sessionDetails.trimSliderStart,this.snapshot.trimSliderEnd=this.sessionDetails.trimSliderEnd,this.snapshot.addedClips=n.naiveClone(this.sessionDetails.addedClips),this.cropResizable.removeClass("disp-none").addClass("disp-show"),this.snapshot.crop={x:this.cropResizable.position().left,y:this.cropResizable.position().top,w:this.cropResizable.width(),h:this.cropResizable.height()},this.cropResizable.removeClass("disp-show").addClass("disp-none"),this.onBoardRequired?(this.onBoardRequired=!1,this.onBoardUser()):(this.$el.find(".default-control-detail").show(),this.infoText.html(" ")),this.reconstructUI(),this.videoPlayerView.resizePlayerForWindow(),this.$el.find("#trimBtn").length>0?this.selectTrim():this.$el.find(".simple-edit-buttons-box .wiz-simple-edit-btn").first().click(),!1===this.overrideWarnOnExit&&(window.onbeforeunload=function(){return"Please save before you close!!"}),this.prefetchAssetsForSimpleEdit()},save:function(){this.disable(),this.disabled(),this.projectJson.simpleEdit=!0,this.projectJson.seSessionDetails=this.sessionDetails,this.renderVideo()},renderVideo:function(){var e=this;this.recorder?this.recorder.renderVideo({assetId:this.assetId,projectJson:this.getIOAdjustedProjectJSON(),renderFrom:"simple_edit"}).then((function(){n.trackInDB("SE-Save",e.userEmail),e.isPPR&&e._getVideoModel().urgent_videos([e.assetId],(function(){o.trigger("remountCtaActions")}))})).catch((function(e){console.error(err)})):this._getVideoModel().mergeAndRender(this.assetId,this.getIOAdjustedProjectJSON(),"simple_edit",this.digest,(function(t){n.trackInDB("SE-Save",e.userEmail),e.isPPR&&e._getVideoModel().urgent_videos([e.assetId],(function(){o.trigger("remountCtaActions")}))}),(function(e){console.log("error ",e)}))},cancel:function(){this.cancelCrop(),this.disable(),this.projectJson=this.snapshot.projectJson,this.sessionDetails.trimSliderStart=this.snapshot.trimSliderStart,this.sessionDetails.trimSliderEnd=this.snapshot.trimSliderEnd,this.sessionDetails.addedClips=this.snapshot.addedClips;var e=this;this.reconstructUI(!0,(function(){e.disabled()}))},disable:function(){this.enabled=!1,this.unselectAllComponents(),this.unselectAllControls(),this.primaryVideoContainer.css("z-index","0"),this.primaryVideoContainer.resizable({disabled:!0}),this.primaryVideoContainer.draggable({disabled:!0}),this.secondaryVideoContainer.css("z-index","0"),this.secondaryVideoContainer.resizable({disabled:!0}),this.secondaryVideoContainer.draggable({disabled:!0}),this.videoPlayerView.setSimpleEditMode(!1),this.videoPlayerView.$el.find(".player-border").fadeOut(),this.videoPlayerView.$el.find(".player-touch-guard").show(),e(".tmp-body-wiz").animate({marginTop:"0px"},200,(function(){e(".tmp-body-wiz").addClass("body-wiz").removeClass("tmp-body-wiz")})),this.askReloadConfirmation=!1,!1===this.overrideWarnOnExit&&(window.onbeforeunload=void 0)},disabled:function(){this.cropResizable.removeClass("disp-none").addClass("disp-show"),null!=this.projectJson.crop&&this.cropResizable.css({left:this.getValueForPlayer(this.projectJson.crop.x,!0)+"px",top:this.getValueForPlayer(this.projectJson.crop.y,!1)+"px",width:this.getValueForPlayer(this.projectJson.crop.w,!0)+"px",height:this.getValueForPlayer(this.projectJson.crop.h,!1)+"px"}),this.cropResizable.removeClass("disp-show").addClass("disp-none"),this.reconstructUI(),this.cropResized(!1,!1),this.cropResizable.removeClass("disp-none").addClass("disp-show"),this.videoPlayerView.$el.find(".se-text-component, .se-image-component").draggable({disabled:!0}),this.videoPlayerView.$el.find(".se-text-component").unbind("click"),this.videoPlayerView.$el.find(".se-text-component").css({"user-select":"none",cursor:"default"}),this.videoPlayerView.$el.find(".se-crop-highlighter").css({background:"black","z-index":"200"}),this.videoPlayerView.$el.css("overflow","hidden");var e=this.cropResizable.height(),t=this.cropResizable.width(),i=this.videoPlayerView.$el.width(),n=this.videoPlayerView.$el.height(),r=i/t,o=n/e;if(r*e>n){var a=this.cropResizable.position().top,s=i/2-t*o/2-this.cropResizable.position().left;this.videoPlayerView.$el.find(".se-crop-scale").css("top",-a+"px"),this.scaleElement(this.videoPlayerView.$el.find(".se-crop-scale"),o,o,this.cropResizable.position().left,a),this.videoPlayerView.$el.find(".se-crop-scale").css("left",s+"px")}else{a=n/2-e*r/2-this.cropResizable.position().top,s=this.cropResizable.position().left;this.videoPlayerView.$el.find(".se-crop-scale").css("left",-s+"px"),this.scaleElement(this.videoPlayerView.$el.find(".se-crop-scale"),r,r,s,this.cropResizable.position().top),this.videoPlayerView.$el.find(".se-crop-scale").css("top",a+"px")}this.cropResizable.removeClass("disp-show").addClass("disp-none")},setProjectJson:function(e){if(this.projectJson=e,window.projectJson=this.projectJson,this.projectJson.simpleEdit=!0,null!=this.projectJson.seSessionDetails)this.sessionDetails=this.projectJson.seSessionDetails;else{this.sessionDetails.totalCreatedClips=this.projectJson.clips.length;for(var t=!1,i=0;i<this.projectJson.clips.length;i++){"webcam"==(s=this.projectJson.clips[i]).footage.type&&!0,"screenrecord"==s.footage.type&&(t=!0)}var n=-1,r=[],o=JSON.parse(JSON.stringify(this.projectJson.clips||[]));for(i=0;i<this.projectJson.clips.length;i++){(s=o[i]).properties.xposRaw=this.getValueForPlayer(s.properties.xpos,!0),s.properties.yposRaw=this.getValueForPlayer(s.properties.ypos,!1),s.properties.widthRaw=this.getValueForPlayer(s.properties.width,!0),s.properties.heightRaw=this.getValueForPlayer(s.properties.height,!1),"screenrecord"!=s.footage.type&&"webcam"!=s.footage.type||(n=-1==n?s.footage.duration:Math.min(n,s.footage.duration),r.push(s.footage)),s.footage.containsVideo&&("screenrecord"==s.footage.type||"webcam"==s.footage.type&&!t?(this.sessionDetails.primaryVideo=s.id,this.sessionDetails.totalAddedEffects=(s.effects||[]).length):"webcam"==s.footage.type&&(this.sessionDetails.secondaryVideo=s.id))}for(var i in r)r[i].duration=n}for(i=0;i<this.projectJson.clips.length;i++){var s=this.projectJson.clips[i];this.isImageComponent(s.id)&&("image"==s.footage.type?s.footage.src=this.footageUrls[Number(s.footage.id)]:s.footage.src=a.getMfImage(s.footage.image_id?s.footage.image_id:s.footage.id,s.footage.is_website?"website":"image"))}this.cropResizable.removeClass("disp-none").addClass("disp-show"),null!=this.projectJson.crop&&this.cropResizable.css({left:this.getValueForPlayer(this.projectJson.crop.x,!0)+"px",top:this.getValueForPlayer(this.projectJson.crop.y,!1)+"px",width:this.getValueForPlayer(this.projectJson.crop.w,!0)+"px",height:this.getValueForPlayer(this.projectJson.crop.h,!1)+"px"}),this.cropResizable.removeClass("disp-show").addClass("disp-none"),null==this.sessionDetails.secondaryVideo&&this.secondaryVideoContainer.hide(),this.reconstructUI(),this.cropResized(!1,!1),this.enabled||this.disabled()},mediaContainerResized:function(e){var t=e.find("video");0==t.length&&(t=e.find("img"));var i=e.width()/t.width(),n=e.height()/t.height();t.css("height",""),this.scaleElement(t,i,n)},scaleElement:function(e,t,i,n,r){e.css({"-ms-transform":"scale("+t+","+i+")","-webkit-transform":"scale("+t+","+i+")",transform:"scale("+t+","+i+")","-ms-transform-origin:":null==n?"top left":n+"px "+r+"px","-webkit-transform-origin":null==n?"top left":n+"px "+r+"px","transform-origin":null==n?"top left":n+"px "+r+"px"})},globalClick:function(t){HippoVideo&&HippoVideo.AppRegistry&&HippoVideo.AppRegistry.isDeepIntg&&("saveTextEdit"!==t.target.id&&"cancelTextEdit"!==t.target.id||e("#"+t.target.id).is(":visible")&&e("#"+t.target.id).click());var i=t.data.that;i.enabled&&(i.currentSelectedText,0!=i.videoPlayerView.$el.find(".se-text-editable").has(e(t.target)).length||0!=i.videoPlayerView.$el.find(".se-text-component").has(e(t.target)).length||e(t.target).hasClass("se-text-component")||e(t.target).hasClass("se-text-editable")||null==i.currentSelectedText||e(t.target).parent().hasClass("atwho-view-ul")||(i.textEditableChanged(),i.videoPlayerView.$el.find(".se-text-editable").is(":visible")?i.closeTextEditable():0==i.$el.find(".addtext-control-detail").has(e(t.target)).length&&0==i.videoPlayerView.$el.find(".player-controls-container").has(e(t.target)).length&&0==e(".sp-picker-container").has(e(t.target)).length&&0==e(".sp-palette-container").has(e(t.target)).length&&(console.log("HERE!!!!!!!!"),i.unselectText())),0!=i.$el.has(e(t.target)).length||0!=i.videoPlayerView.$el.has(e(t.target)).length||i.showingColorPicker||e(t.target).parent().hasClass("atwho-view-ul")||i.unselectAllComponents(),0==i.$el.find(".sticker-family-container").has(e(t.target)).length&&i.$el.find(".sticker-family-all").hide(),!e(t.target).hasClass("trim-before-pop")&&0==i.$el.find(".trim-before-pop").has(e(t.target)).length&&i.$el.find(".trim-before-pop").is(":visible")&&i.$el.find(".trim-before-pop").fadeOut(100),!e(t.target).hasClass("trim-after-pop")&&0==i.$el.find(".trim-after-pop").has(e(t.target)).length&&i.$el.find(".trim-after-pop").is(":visible")&&i.$el.find(".trim-after-pop").fadeOut(100))},selectPrimaryVideo:function(){this.enabled&&(this.primaryVideoOverflowContainer.css("overflow","visible"),this.primaryVideoContainer.addClass("edit-video-selected").css("z-index","105").resizable("enable"),this.secondaryVideoContainer.removeClass("edit-video-selected").css("z-index","106").resizable("disable"),this.$el.find(".primaryvid-control-detail").show(),this.$el.find(".secondaryvid-control-detail").hide())},selectSecondaryVideo:function(){this.enabled&&(this.secondaryVideoOverflowContainer.css("overflow","visible"),this.secondaryVideoContainer.addClass("edit-video-selected").css("z-index","105").resizable("enable"),this.primaryVideoContainer.removeClass("edit-video-selected").css("z-index","105").resizable("disable"),this.$el.find(".primaryvid-control-detail").hide(),this.$el.find(".secondaryvid-control-detail").show())},makeVideoResizeableDraggable:function(){this.enabled&&(this.isPPR?n.trackInThirdPartyTools("video_preview_Resize_save_isPPR",{email:this.userEmail}):n.trackInThirdPartyTools("video_preview_Resize_save",{email:this.userEmail}),this.unselectAllControls(),this.userEventStart(),this.unselectAllComponents(),this.selectPrimaryVideo(),this.selectControl("resize-draggable-btn"),this.primaryVideoContainer.unbind("mousedown",this.selectPrimaryVideo).bind("mousedown",this.selectPrimaryVideo).draggable("enable"),this.secondaryVideoContainer.unbind("mousedown",this.selectSecondaryVideo).bind("mousedown",this.selectSecondaryVideo).draggable("enable"),this.$el.find(".se-resize-control-detail").show())},unselectClips:function(){this.primaryVideoContainer.unbind("mousedown",this.selectPrimaryVideo).resizable({disabled:!0}).draggable({disabled:!0}),this.secondaryVideoContainer.unbind("mousedown",this.selectSecondaryVideo).resizable({disabled:!0}).draggable({disabled:!0}),this.$el.find(".se-resize-control-detail, .primaryvid-control-detail, .secondaryvid-control-detail").hide(),this.primaryVideoOverflowContainer.css("overflow","hidden"),this.secondaryVideoOverflowContainer.css("overflow","hidden"),this.primaryVideoContainer.css("z-index","100"),this.secondaryVideoContainer.css("z-index","101"),e(".edit-video-selected").removeClass("edit-video-selected")},userEventStart:function(){this.videoPlayerView.$el.find(".player-border").fadeIn()},userEventStop:function(){this.videoPlayerView.$el.find(".player-border").fadeOut(),this.updateProjectJson()},playerResized:function(e){if(null!=this.projectJson&&(this.enabled||(this.videoPlayerView.$el.find(".se-crop-scale").css({top:"0px",left:"0px"}),this.scaleElement(this.videoPlayerView.$el.find(".se-crop-scale"),1,1,0,0)),this.cropResizable.removeClass("disp-none").addClass("disp-show"),null!=this.projectJson.crop&&this.cropResizable.css({left:this.getValueForPlayer(this.projectJson.crop.x,!0)+"px",top:this.getValueForPlayer(this.projectJson.crop.y,!1)+"px",width:this.getValueForPlayer(this.projectJson.crop.w,!0)+"px",height:this.getValueForPlayer(this.projectJson.crop.h,!1)+"px"}),this.cropResizable.removeClass("disp-show").addClass("disp-none"),this.reconstructUI(),this.cropResized(!1,!1),!this.enabled)){this.videoPlayerView.$el.find(".se-crop-resizable").removeClass("disp-none").addClass("disp-show");var t=this.cropResizable.height(),i=this.cropResizable.width(),n=this.videoPlayerView.$el.width(),r=this.videoPlayerView.$el.height(),o=n/i,a=r/t;if(o*t>r){var s=this.cropResizable.position().top,l=n/2-i*a/2-this.cropResizable.position().left;this.videoPlayerView.$el.find(".se-crop-scale").css("top",-s+"px"),this.scaleElement(this.videoPlayerView.$el.find(".se-crop-scale"),a,a,this.cropResizable.position().left,s),this.videoPlayerView.$el.find(".se-crop-scale").css("left",l+"px")}else{s=r/2-t*o/2-this.cropResizable.position().top,l=this.cropResizable.position().left;this.videoPlayerView.$el.find(".se-crop-scale").css("left",-l+"px"),this.scaleElement(this.videoPlayerView.$el.find(".se-crop-scale"),o,o,l,this.cropResizable.position().top),this.videoPlayerView.$el.find(".se-crop-scale").css("top",s+"px")}this.videoPlayerView.$el.find(".se-crop-resizable").removeClass("disp-show").addClass("disp-none"),this.videoPlayerView.resizeFitThumnbail()}},updateProjectJson:function(){if(this.enabled){var t=n.map(this.sessionDetails.trimSliderStart,0,1e3,0,this.videoPlayerView.mediaPlayer.duration),i=n.map(this.sessionDetails.trimSliderEnd,0,1e3,0,this.videoPlayerView.mediaPlayer.duration);if(n.isNumber(t)&&n.isNumber(i))for(var r=0;r<this.projectJson.clips.length;r++){var o=this.projectJson.clips[r];if(this.updateClipPropertiesForProjectJSON(o,t,i),o.id===this.sessionDetails.primaryVideo)for(var a=o.effects||[],s=0;s<a.length;s++)this.updateClipPropertiesForProjectJSON(a[s],t,i)}var l=this.cropResizable.is(":visible");this.cropResizable.removeClass("disp-none").addClass("disp-show"),this.projectJson.crop={x:this.getValueForProject(this.cropResizable.position().left,!0),y:this.getValueForProject(this.cropResizable.position().top,!1),w:Math.min(this.getValueForProject(this.cropResizable.width(),!0),this.projectJson.canvasWidth),h:Math.min(this.getValueForProject(this.cropResizable.height(),!1),this.projectJson.canvasHeight)},l||this.cropResizable.removeClass("disp-show").addClass("disp-none");for(r=0;r<this.projectJson.clips.length;r++){a=(o=this.projectJson.clips[r]).effects||[];null!=this.sessionDetails.primaryVideo&&o.id==this.sessionDetails.primaryVideo&&(o.properties.widthRaw=this.primaryVideoContainer.width(),o.properties.heightRaw=this.primaryVideoContainer.height(),o.properties.xposRaw=this.primaryVideoContainer.position().left,o.properties.yposRaw=this.primaryVideoContainer.position().top,o.properties.width=this.getValueForProject(o.properties.widthRaw,!0),o.properties.height=this.getValueForProject(o.properties.heightRaw,!1),o.properties.xpos=this.getValueForProject(o.properties.xposRaw,!0),o.properties.ypos=this.getValueForProject(o.properties.yposRaw,!1)),null!=this.sessionDetails.secondaryVideo&&o.id==this.sessionDetails.secondaryVideo&&(o.properties.widthRaw=this.secondaryVideoContainer.width(),o.properties.heightRaw=this.secondaryVideoContainer.height(),o.properties.xposRaw=this.secondaryVideoContainer.position().left,o.properties.yposRaw=this.secondaryVideoContainer.position().top,o.properties.width=this.getValueForProject(o.properties.widthRaw,!0),o.properties.height=this.getValueForProject(o.properties.heightRaw,!1),o.properties.xpos=this.getValueForProject(o.properties.xposRaw,!0),o.properties.ypos=this.getValueForProject(o.properties.yposRaw,!1)),-1!==this.sessionDetails.addedClips.indexOf(o.id)&&o.footage.containsImage&&(e("#se-component-"+o.id).length>0?(o.properties.xposRaw=e("#se-component-"+o.id).position().left,o.properties.yposRaw=e("#se-component-"+o.id).position().top,o.properties.widthRaw=e("#se-component-"+o.id).width(),o.properties.heightRaw=e("#se-component-"+o.id).height(),o.properties.xpos=this.getValueForProject(o.properties.xposRaw,!0),o.properties.ypos=this.getValueForProject(o.properties.yposRaw,!1),o.properties.width=this.getValueForProject(o.properties.widthRaw,!0),o.properties.height=this.getValueForProject(o.properties.heightRaw,!1)):console.warn("not drawn#se-component-"+o.id)),o.footage.containsText&&(null==o.properties.fontSizeProject&&(o.properties.fontSizeProject=this.getValueForProject(o.properties.fontSize,!0)),o.properties.boundingBoxRaw&&(o.properties.boundingBox=this.getBoundingBoxForProject(o.properties.boundingBoxRaw)))}}},updateClipPropertiesForProjectJSON:function(e,t,i){null!=e.startFrom&&null!=e.endAt?(e.position=e.startFrom-t,0==e.position&&(e.position=.001),e.position>this.videoPlayerView.mediaPlayer.duration-i?e.deleted=!0:e.deleted=!1,e.end=e.endAt-e.startFrom,e.endAt>this.videoPlayerView.mediaPlayer.duration-i&&(e.end=this.videoPlayerView.mediaPlayer.duration-i-e.startFrom),e.end=Math.max(.02,e.end),e.start=0):(e.start=t,e.end=(e.footage?e.footage.duration:e.duration)-i,e.end<e.start&&(e.end=e.start))},reconstructUI:function(t,i){if(this.projectJson){var r=this.videoPlayerView.$el.width()/this.projectJson.canvasWidth,o=this.videoPlayerView.$el.height()/this.projectJson.canvasHeight,a=this,s=!1,l=this.videoPlayerView.$el.find(".se-components-container");l.empty();var u=function(){a.resizeHandler(),i&&!s&&(s=!0,i())};void 0===this.sessionDetails.primaryVideo&&void 0===this.sessionDetails.secondaryVideo&&this.updateProjectJson();var c=n.map(this.sessionDetails.trimSliderStart,0,1e3,0,this.videoPlayerView.mediaPlayer.duration),d=n.map(this.sessionDetails.trimSliderEnd,0,1e3,0,this.videoPlayerView.mediaPlayer.duration);n.isNumber(c)&&n.isNumber(d)&&this.videoPlayerView.trim(c,d,!0);for(var h=JSON.parse(JSON.stringify(this.projectJson.clips||[])),p=0;p<this.projectJson.clips.length;p++){var f=h[p];if(null!=this.sessionDetails.primaryVideo&&f.id==this.sessionDetails.primaryVideo&&this.primaryVideoContainer.animate({width:f.properties.width*r+"px",height:f.properties.height*o+"px",left:f.properties.xpos*r+"px",top:f.properties.ypos*o+"px"},t?200:10,u),null!=this.sessionDetails.secondaryVideo&&f.id==this.sessionDetails.secondaryVideo&&this.secondaryVideoContainer.animate({width:f.properties.width*r+"px",height:f.properties.height*o+"px",left:f.properties.xpos*r+"px",top:f.properties.ypos*o+"px"},t?200:10,u),-1!=this.sessionDetails.addedClips.indexOf(f.id)){a=this;if(f.footage.containsText){(m=document.createElement("div")).id="se-component-"+f.id,e(m).addClass("se-text-component"),f.properties.boundingBox?(f.properties.boundingBoxRaw={x:f.properties.boundingBox.x*r,y:f.properties.boundingBox.y*o,w:f.properties.boundingBox.w*r,h:f.properties.boundingBox.h*o},e(m).css({left:f.properties.boundingBoxRaw.x+"px",top:f.properties.boundingBoxRaw.y+"px",width:f.properties.boundingBoxRaw.w+"px",height:f.properties.boundingBoxRaw.h+"px"})):e(m).css({left:f.properties.xpos*r+"px",top:f.properties.ypos*o+"px"}),this.setTextDraggableContainerSize(m,f,!1);var g=document.createElement("div");e(g).addClass("se-text-container"),this.checkAndPopulateMf(f.properties.text),this.newlineTextToHtml(g,f),e(m).append(g),e(m).append('<span class="se-text-delete">x</span>'),e(m).find(".se-text-delete").bind("click",this.deleteText),e(m).draggable({scroll:!1,opacity:.9,snap:".hippo-video-player, .se-crop-highlighter",snapMode:"both",snapTolerance:10,start:function(e){a.selectText(e.target.id.split("se-component-")[1]),a.userEventStart()},stop:function(){a.textBoxResized(),a.textPropertyChanged(),a.userEventStop()}}),f.footage.calloutId&&e(m).draggable("option","containment","#se-component-"+f.footage.calloutId),e(m).click((function(e){if(!((new Date).getTime()-a.lastTextResizeTime<100)){var t=a.currentSelectedText==e.currentTarget.id.split("se-component-")[1];a.selectText(e.currentTarget.id.split("se-component-")[1]),t&&a.showTextEditable(e.currentTarget.id.split("se-component-")[1])}})),e(m).hover((function(t){a.currentSelectedText!=t.currentTarget.id.split("se-component-")[1]&&(e(".se-components-hover").removeClass("se-components-hover"),e(this).addClass("se-components-hover"))}),(function(t){a.currentSelectedText!=t.currentTarget.id.split("se-component-")[1]&&e(this).removeClass("se-components-hover")})),l.append(m),f.id==this.currentSelectedText&&this.selectText(f.id,!0),this.setLineHeight(f)}else if(f.footage.containsImage){var m=document.createElement("div"),v=document.createElement("img");v.crossOrigin="Anonymous",m.id="se-component-"+f.id,e(m).addClass("se-image-component"),f.footage.id<=-1e4?v.src="https://s3.amazonaws.com/hippolms-wiz-static/callouts/c"+(-f.footage.id-1e4)+".png?v=2":this.isImageComponent(f.id)?v.src=f.footage.src:v.src="https://s3.amazonaws.com/hippolms-wiz-static/stickers/s"+(-f.footage.id-100)+".png?v=2",e(m).css({left:f.properties.xpos*r+"px",top:f.properties.ypos*o+"px",width:f.properties.width*r+"px",height:f.properties.height*o+"px",opacity:f.properties.opacity}),e(m).draggable({scroll:!1,opacity:.9,snap:".hippo-video-player, .se-crop-highlighter",snapMode:"both",snapTolerance:10,drag:function(t){var i=t.target.id.split("se-component-")[1];null==i&&(i=e(t.target).parent()[0].id.split("se-component-")[1]),a.isCalloutImage(i)&&a.calloutDragged()},start:function(t){var i=t.target.id.split("se-component-")[1];if(null==i&&(i=e(t.target).parent()[0].id.split("se-component-")[1]),a.isCalloutImage(i)){a.selectCallout(i);var r=a.getClipOf(i),o=a.getClipOf(r.footage.textId);o&&o.properties.boundingBoxRaw&&(a.calloutTextBoxSpread={x:n.map(o.properties.boundingBoxRaw.x,r.properties.xposRaw,r.properties.xposRaw+r.properties.widthRaw,0,1),y:n.map(o.properties.boundingBoxRaw.y,r.properties.yposRaw,r.properties.yposRaw+r.properties.heightRaw,0,1),w:o.properties.boundingBoxRaw.w/r.properties.widthRaw})}else a.selectSticker(i);a.userEventStart()},stop:function(t){var i=t.target.id.split("se-component-")[1];null==i&&(i=e(t.target).parent()[0].id.split("se-component-")[1]),a.isCalloutImage(i)?(a.calloutDragged(),a.calloutPropertyChanged()):a.stickerPropertyChanged(),a.userEventStop(),a.isCalloutImage(i)?a.unselectCallout():a.unselectSticker()}}),e(m).resizable({handles:"n, e, w, s, ne, nw, se, sw",aspectRatio:f.properties.lockAspectRatio,resize:function(t,i){a.mediaContainerResized(e(t.target));var n=t.target.id.split("se-component-")[1];null==n&&(n=e(t.target).parent()[0].id.split("se-component-")[1]),a.isCalloutImage(n)&&a.calloutResized(n)},start:function(t){var i=t.target.id.split("se-component-")[1];if(null==i&&(i=e(t.target).parent()[0].id.split("se-component-")[1]),a.isCalloutImage(i)){a.selectCallout(i);var r=a.getClipOf(i),o=a.getClipOf(r.footage.textId);o&&o.properties.boundingBoxRaw&&(a.calloutTextBoxSpread={x:n.map(o.properties.boundingBoxRaw.x,r.properties.xposRaw,r.properties.xposRaw+r.properties.widthRaw,0,1),y:n.map(o.properties.boundingBoxRaw.y,r.properties.yposRaw,r.properties.yposRaw+r.properties.heightRaw,0,1),w:o.properties.boundingBoxRaw.w/r.properties.widthRaw})}else a.selectSticker(i);a.userEventStart()},stop:function(t){var i=t.target.id.split("se-component-")[1];null==i&&(i=e(t.target).parent()[0].id.split("se-component-")[1]),a.isCalloutImage(i)?(a.calloutResized(i),a.calloutPropertyChanged()):a.stickerPropertyChanged(),a.userEventStop(),a.setAdaptiveBorderForTarget(e(t.target))}}),this.currentSelectedSticker!=f.id&&this.currentSelectedCallout!=f.id&&e(m).resizable({disabled:!0}),e(m).find(".ui-resizable-handle").css("display",""),e(m).find(".ui-resizable-handle").removeClass("ui-icon ui-icon-gripsmall-diagonal-se"),e(m).click((function(t){var i=t.target.id.split("se-component-")[1];null==i&&(i=e(t.target).parent()[0].id.split("se-component-")[1]),a.isCalloutImage(i)?a.selectCallout(i):a.selectSticker(i)})),e(m).hover((function(){e(".se-components-hover").removeClass("se-components-hover"),e(this).addClass("se-components-hover")}),(function(){e(this).removeClass("se-components-hover")})),e(m).append(v),l.append(m),this.currentSelectedSticker!=f.id&&this.currentSelectedCallout!=f.id||this.setAdaptiveBorderForTarget(e("#se-component-"+f.id)),a.mediaContainerResized(e(m))}}}this.initializeAtwho(),this.applyEffects(),this.resizeHandler(),this.playerTimeUpdate()}},checkAndPopulateMf:function(t){if(this.isPersonalizationEnabled)for(var i,n=0,r=t.indexOf("${",0);-1!=r&&-1!=n;){-1!=(n=t.indexOf("}",r))&&(i=t.substring(r+2,n),this.mfValues.includes("{"+i+"}")||(this.mfValues.push("{"+i+"}"),this.$el.find("#seMfSelector").append(e("<option>"+i+"</option>"))),r=t.indexOf("${",n))}},applyEffects:function(){var t,i=this.getClipOf(this.sessionDetails.primaryVideo),n=this;if(i){var r=i.effects||[],o=this.videoPlayerView.$el.find(".se-effects-components-container");o.empty();for(var a=0;a<r.length;a++){(t=r[a]).xposRaw=this.getValueFromClipPercent(t.xpos,i,!0),t.yposRaw=this.getValueFromClipPercent(t.ypos,i,!1),t.widthRaw=this.getValueFromClipPercent(t.width,i,!0),t.heightRaw=this.getValueFromClipPercent(t.height,i,!1);var s=document.createElement("div");s.id="se-effects-"+t.id,s.className="se-effects",s.style.left=t.xposRaw+"px",s.style.top=t.yposRaw+"px",s.style.width=t.widthRaw+"px",s.style.height=t.heightRaw+"px",e(s).draggable({scroll:!1,opacity:.9,snap:".hippo-video-player, .se-crop-highlighter",snapMode:"both",snapTolerance:10,containment:".primary-video-container",start:function(e){n.selectBlur(e.target.id.split("se-effects-")[1]),n.userEventStart()},stop:function(e){n.blurAreaChanged(),n.userEventStop()}}).resizable({handles:"n, e, w, s, ne, nw, se, sw",aspectRatio:t.lockAspectRatio,containment:".primary-video-container",start:function(t){var i=t.target.id.split("se-effects-")[1];i||(i=e(t.target).parent()[0].id.split("se-effects-")[1]),n.selectBlur(i),n.userEventStart()},stop:function(t){n.blurAreaChanged(),n.userEventStop(),n.setAdaptiveBorderForTarget(e(t.target))}}).mousedown((function(e){n.selectBlur(e.target.id.split("se-effects-")[1]),e.stopPropagation()})),this.currentSelectedBlur!=t.id&&e(s).resizable({disabled:!0}),e(s).find(".ui-resizable-handle").css("display",""),e(s).find(".ui-resizable-handle").removeClass("ui-icon ui-icon-gripsmall-diagonal-se"),o.append(s)}}this.drawBlurLayer()},getValueForPlayer:function(e,t){var i=this.videoPlayerView.$el.width(),r=this.videoPlayerView.$el.height(),o=this.projectJson.canvasWidth,a=this.projectJson.canvasHeight;return t?n.roundNumber(e*(i/o),3):n.roundNumber(e*(r/a),3)},getValueForProject:function(e,t){var i=this.videoPlayerView.$el.width(),r=this.videoPlayerView.$el.height(),o=this.projectJson.canvasWidth,a=this.projectJson.canvasHeight;return t?n.roundNumber(e*(o/i),3):n.roundNumber(e*(a/r),3)},getBoundingBoxForProject:function(e){var t={x:this.getValueForProject(e.x,!0),y:this.getValueForProject(e.y,!1),w:this.getValueForProject(e.w,!0),h:this.getValueForProject(e.h,!1)};return null!=e.topPadding&&(t.topPadding=this.getValueForProject(e.topPadding,!1)),t},getValueForClip:function(e,t,i){var r=t.properties.widthRaw,o=t.properties.heightRaw;return i?n.roundNumber(n.map(e,0,r,0,1),5):n.roundNumber(n.map(e,0,o,0,1),5)},getValueFromClipPercent:function(e,t,i){var r=t.properties.widthRaw,o=t.properties.heightRaw;return i?n.roundNumber(e*r,5):n.roundNumber(e*o,5)},onBoardUser:function(){var t=this;this.unselectAllControls(),this.$el.find(".default-control-detail").show(),this.infoText.html("Resize and Move videos.."),this.secondaryVideoOverflowContainer.css("overflow","visible"),this.secondaryVideoContainer.find(".ui-resizable-handle").hide(),e.when(this.secondaryVideoContainer.find(".ui-resizable-handle").delay(200).fadeIn(300)).done((function(){e.when(t.secondaryVideoContainer.find(".ui-resizable-handle").fadeOut(300)).done((function(){t.secondaryVideoOverflowContainer.css("overflow","hidden"),t.primaryVideoOverflowContainer.css("overflow","visible"),t.primaryVideoContainer.find(".ui-resizable-handle").hide(),e.when(t.primaryVideoContainer.find(".ui-resizable-handle").delay(500).fadeIn(300)).done((function(){e.when(t.primaryVideoContainer.find(".ui-resizable-handle").fadeOut(300)).done((function(){t.secondaryVideoContainer.find(".ui-resizable-handle").css("display",""),t.primaryVideoContainer.find(".ui-resizable-handle").css("display",""),t.unselectClips(),t.onBoardControls()}))}))}))}))},onBoardControls:function(){var e=this;e.highlightControl(".trim-btn","Trim Video to change start and end points..",(function(){e.highlightControl(".crop-btn","Crop video..",(function(){e.highlightControl(".add-text-btn","Add text to video.",(function(){e.highlightControl(".add-callouts-btn","Add callouts to video",(function(){e.highlightControl(".add-stickers-btn","Add your favourite stickers",(function(){e.infoText.html("Lets go!!"),setTimeout((function(){e.infoText.html(" ")}),1500)}))}))}))}))}))},highlightControl:function(e,t,i){var n=this;n.infoText.delay(300).html(t),n.$el.find(e).animate({opacity:.5},200,(function(){n.$el.find(e).delay(700).animate({opacity:1},200,(function(){i&&i()}))}))},unselectAllControls:function(){this.$el.find(".se-control-detail").hide(),this.unselectCrop(),this.unselectClips(),this.videoPlayerView.$el.find(".components-marker-container").empty()},unselectAllComponents:function(){console.log("HERE!!!!!!!! 2"),this.unselectText(),this.unselectSticker(),this.unselectCallout(),this.unselectBlur(),this.primaryVideoOverflowContainer.css("overflow","hidden"),this.secondaryVideoOverflowContainer.css("overflow","hidden")},selectTrim:function(e){null!=e&&(this.askReloadConfirmation=!0),this.isPPR?n.trackInThirdPartyTools("video_preview_Trim_save_isPPR",{email:this.userEmail}):n.trackInThirdPartyTools("video_preview_Trim_save",{email:this.userEmail}),this.unselectAllControls(),this.$el.find(".trim-slider").slider("values",[this.sessionDetails.trimSliderStart,1e3-this.sessionDetails.trimSliderEnd]),this.$el.find(".trim-control-detail").fadeIn(100),this.$el.find(".trim-preview-container, .preview-trim-arrow").hide(),this.updateTrimInput(),this.selectControl("trim-btn"),isFinite(this.videoPlayerView.mediaPlayer.duration)||this.$el.find(".trim-before-container, .trim-after-container").hide()},trimInputButtonClicked:function(t){var i=t.data.that,r=t.target,o=n.map(i.sessionDetails.trimSliderStart,0,1e3,0,i.videoPlayerView.mediaPlayer.duration),a=i.videoPlayerView.mediaPlayer.duration-n.map(i.sessionDetails.trimSliderEnd,0,1e3,0,i.videoPlayerView.mediaPlayer.duration);e.contains(i.$el.find(".trim-before-container")[0],r)?e(r).hasClass("trim-input-btn-minus")?o=Math.max(o-1,0):e(r).hasClass("trim-input-btn-plus")&&(o=Math.min(o+1,i.videoPlayerView.mediaPlayer.duration)):e.contains(i.$el.find(".trim-after-container")[0],r)&&(e(r).hasClass("trim-input-btn-minus")?a=Math.max(a-1,0):e(r).hasClass("trim-input-btn-plus")&&(a=Math.min(a+1,i.videoPlayerView.mediaPlayer.duration))),Math.floor(o)>=Math.floor(a)||(i.$el.find(".trim-before-input").val(n.strToTime(o)),i.$el.find(".trim-after-input").val(n.strToTime(a)),i.trimInputChanged())},trimInputTyped:function(t){var i=t.data.that,r=e(t.target),o=n.map(i.sessionDetails.trimSliderStart,0,1e3,0,i.videoPlayerView.mediaPlayer.duration),a=i.videoPlayerView.mediaPlayer.duration-n.map(i.sessionDetails.trimSliderEnd,0,1e3,0,i.videoPlayerView.mediaPlayer.duration);if(38==t.keyCode||40==t.keyCode){if(t.preventDefault(),38==t.keyCode?r.hasClass("trim-before-input")?o=Math.min(o+1,i.videoPlayerView.mediaPlayer.duration):r.hasClass("trim-after-input")&&(a=Math.min(a+1,i.videoPlayerView.mediaPlayer.duration)):40==t.keyCode&&(r.hasClass("trim-before-input")?o=Math.max(o-1,0):r.hasClass("trim-after-input")&&(a=Math.max(a-1,0))),Math.floor(o)>=Math.floor(a))return;i.$el.find(".trim-before-input").val(n.strToTime(o)),i.$el.find(".trim-after-input").val(n.strToTime(a)),i.trimInputChanged()}else{i=t.data.that;clearTimeout(i.trimInputTypedTimeout),i.trimInputTypedTimeout=setTimeout((function(){i.trimInputChanged()}),500)}},trimInputChanged:function(){var e=n.timeToIntWithMillisecond(this.$el.find(".trim-before-input").val()),t=n.timeToIntWithMillisecond(this.$el.find(".trim-after-input").val()),i=n.map(e,0,this.videoPlayerView.mediaPlayer.duration,0,1e3),r=n.map(t,0,this.videoPlayerView.mediaPlayer.duration,0,1e3);parseInt(i)>=parseInt(r)||(this.$el.find(".trim-slider").slider("values",[i,r]),this.$el.find(".trim-control-detail input.sliderValue[data-index=0]").val(i),this.$el.find(".trim-control-detail input.sliderValue[data-index=1]").val(1e3-r)),this.trimChanged()},updateTrimInput:function(){var e=n.map(this.sessionDetails.trimSliderStart,0,1e3,0,this.videoPlayerView.mediaPlayer.duration),t=this.videoPlayerView.mediaPlayer.duration-n.map(this.sessionDetails.trimSliderEnd,0,1e3,0,this.videoPlayerView.mediaPlayer.duration);if(!isFinite(e)||!isFinite(t))return this.$el.find(".trim-before-time").html("-"),void this.$el.find(".trim-after-time").html("-");e=parseFloat(e).toFixed(3),t=parseFloat(t).toFixed(3),this.$el.find(".trim-before-time").html(n.strToTime(e)),this.$el.find(".trim-after-time").html(n.strToTime(t)),this.$el.find(".trim-before-input").val(n.strToTime(e)),this.$el.find(".trim-after-input").val(n.strToTime(t)),this.$el.find(".ruler-dynamic").is(":visible")||(this.drawDynamicRuler(),this.$el.find(".ruler-static").hide(),this.$el.find(".ruler-dynamic").show())},drawDynamicRuler:function(){for(var e=this.$el.find(".ruler-dynamic")[0].width,t=this.$el.find(".ruler-dynamic")[0].height,i=e/this.videoPlayerView.mediaPlayer.duration,n=i,r=2;n<15;r++)n=i*r;var o,a=this.$el.find(".ruler-dynamic")[0],s=a.getContext("2d");s.clearRect(0,0,a.width,a.height),s.lineWidth=1;for(r=0;r<e;r+=n){o=r,s.beginPath(),s.moveTo(r,0),s.lineTo(r,t/2);for(var l=0;l<4;l++)o+=n/5,s.moveTo(o,0),s.lineTo(o,t/3);s.stroke(),s.closePath()}},showTrimBeforePop:function(e){e.data.that.$el.find(".trim-before-pop").fadeIn(100)},showTrimAfterPop:function(e){e.data.that.$el.find(".trim-after-pop").fadeIn(100)},trimSliding:function(t){if(this.$el.find(".trim-preview-video")[0].src.length<=0&&(this.$el.find(".trim-preview-video")[0].src=this.videoPlayerView.mediaPlayer.currentSrc),t.handle==this.$el.find(".trim-slider .ui-slider-handle")[0]){this.$el.find(".trim-before-container").addClass("trim-hovered");var i=n.map(this.sessionDetails.trimSliderStart,0,1e3,0,this.videoPlayerView.mediaPlayer.duration);this.$el.find(".trim-preview-video")[0].currentTime=i,this.$el.find(".trim-preview-container").css("left",e(this.$el.find(".trim-slider .ui-slider-handle")[0]).position().left-e(".trim-preview-container").width()/2+"px"),this.$el.find(".preview-trim-arrow").css("left",e(this.$el.find(".trim-slider .ui-slider-handle")[0]).position().left)}else{this.$el.find(".trim-after-container").addClass("trim-hovered");var r=n.map(this.sessionDetails.trimSliderEnd,0,1e3,0,this.videoPlayerView.mediaPlayer.duration);this.$el.find(".trim-preview-video")[0].currentTime=this.videoPlayerView.mediaPlayer.duration-r,this.$el.find(".trim-preview-container").css("left",e(this.$el.find(".trim-slider .ui-slider-handle")[1]).position().left-+e(".trim-preview-container").width()/2+"px"),this.$el.find(".preview-trim-arrow").css("left",e(this.$el.find(".trim-slider .ui-slider-handle")[1]).position().left)}this.$el.find(".trim-preview-container, .preview-trim-arrow").show(),clearTimeout(this.trimFadeoutTimeout);var o=this;this.trimFadeoutTimeout=setTimeout((function(){o.$el.find(".trim-preview-container, .preview-trim-arrow").fadeOut(200)}),2e3)},trimChanged:function(){this.trimLeadGenerated=!0,this.sessionDetails.trimSliderStart=this.$el.find(".trim-control-detail input.sliderValue[data-index=0]").val(),this.sessionDetails.trimSliderEnd=this.$el.find(".trim-control-detail input.sliderValue[data-index=1]").val(),this.updateTrimInput(),this.updateProjectJson(),this.reconstructUI()},disableTrim:function(){e(".trim-btn").addClass("disabled")},selectCrop:function(){this.askReloadConfirmation=!0,this.isPPR?n.trackInThirdPartyTools("video_preview_Crop_save_isPPR",{email:this.userEmail}):n.trackInThirdPartyTools("video_preview_Crop_save",{email:this.userEmail}),this.unselectAllControls(),this.unselectAllComponents(),this.$el.find(".crop-control-detail").fadeIn(100),this.cropResizable.resizable("enable"),this.cropResizable.removeClass("disp-none").addClass("disp-show"),this.selectControl("crop-btn")},cropResized:function(t,i){var n=this.cropResizable.is(":visible");if(this.cropResizable.removeClass("disp-none").addClass("disp-show"),this.videoPlayerView.$el.find(".se-crop-highlighter").show(),this.videoPlayerView.$el.find(".se-crop-highlighter-right").css("left",this.cropResizable.position().left+this.cropResizable.width()+"px"),this.videoPlayerView.$el.find(".se-crop-highlighter-left").css("right",this.videoPlayerView.$el.width()-this.cropResizable.position().left+"px"),this.videoPlayerView.$el.find(".se-crop-highlighter-bottom").css({top:this.cropResizable.position().top+this.cropResizable.height()+"px",width:this.cropResizable.width()+2+"px",left:this.cropResizable.position().left-1+"px"}),this.videoPlayerView.$el.find(".se-crop-highlighter-top").css({bottom:this.videoPlayerView.$el.height()-this.cropResizable.position().top+"px",width:this.cropResizable.width()+2+"px",left:this.cropResizable.position().left-1+"px"}),null!=this.projectJson&&(null==i&&e(".reposition-webcam").is(":checked")||1==i)){var r=this.webcamSnappedLayoutOnCrop();this.secondaryVideoContainer.css({left:r.x+"px",top:r.y+"px"})}null!=this.projectJson&&t&&this.updateProjectJson(),0==n&&this.cropResizable.removeClass("disp-show").addClass("disp-none")},cropStopped:function(){this.cropResizable.position().left<0&&this.cropResizable.css("left","0"),this.cropResizable.position().top<0&&this.cropResizable.css("top","0"),this.cropResizable.position().left+this.cropResizable.width()>this.videoPlayerView.$el.width()&&this.cropResizable.css("width",this.videoPlayerView.$el.width()-this.cropResizable.position().left+"px"),this.cropResizable.position().top+this.cropResizable.height()>this.videoPlayerView.$el.height()&&this.cropResizable.css("height",this.videoPlayerView.$el.height()-this.cropResizable.position().top+"px"),this.cropResized(!0)},applyCrop:function(){this.unselectCrop(),this.$el.find(".default-control-detail").show()},resetCrop:function(){this.cropResizable.css({left:"0",top:"0",width:"100%",height:"100%"}),this.cropResizable.removeClass("disp-none").addClass("disp-show"),this.cropResized(!0),this.unselectCrop(),this.$el.find(".default-control-detail").show()},cancelCrop:function(){this.cropResizable.css({left:this.snapshot.crop.x+"px",top:this.snapshot.crop.y+"px",width:this.snapshot.crop.w+"px",height:this.snapshot.crop.h+"px"}),this.cropResizable.removeClass("disp-none").addClass("disp-show"),this.cropResized(!0,!1),this.unselectCrop(),this.$el.find(".default-control-detail").show()},unselectCrop:function(){this.cropResizable.resizable({disabled:!0}),this.cropResizable.removeClass("disp-show").addClass("disp-none"),this.$el.find(".crop-control-detail").hide()},disableCrop:function(){e(".crop-btn").addClass("disabled")},handleMfChange:function(t){var i=t.data.that,r=i.$el.find("#seMfSelector").find(":selected").val();if("Merge Fields"!==r){if(i.mfValues.includes("{"+r+"}")){if(i.currentSelectedText){var o=i.getClipOf(i.currentSelectedText);o?(o.properties.textUnwrapped!=this.defaultTextAreaValue?o.properties.textUnwrapped+=" ${"+r+"} ":o.properties.textUnwrapped=" ${"+r+"} ",i.showTextEditable(o.id)):i.addEnteredText("${"+r+"} ")}else i.addEnteredText("${"+r+"} ");i.$el.find("#seMfSelector").val("Merge Fields").trigger("change")}else i.mfValues.push("{"+r+"}"),i.$el.find("#seMfSelector").append(e("<option selected>"+r+"</option>")).trigger("change"),e("#select2-seMfSelector-results").find(".select2-results__option--highlighted").remove(),i.initializeAtwho();n.trackInThirdPartyTools(l.PERSONALIZATION_ACTIONS.PA122,{assetId:this.assetId,email:this.userEmail})}},initializeAtwho:function(){this.isPersonalizationEnabled&&e("#seTextEditable").atwho({at:"$",data:this.mfValues,limit:this.mfValues.length})},selectAddText:function(){this.askReloadConfirmation=!0,n.trackInThirdPartyTools("video_preview_Text_save",{email:this.userEmail}),this.unselectAllControls(),this.$el.find(".addtext-control-detail").fadeIn(100),this.showMarkers("text"),this.selectControl("add-text-btn"),this.isTextClipExist()||this.$el.find(".addtext-control-detail").find("#addTextLink").click()},isTextClipExist:function(){if(this.projectJson&&this.projectJson.clips)for(var e=0;e<this.projectJson.clips.length;e++)if("text"==this.projectJson.clips[e].footage.type)return!0;return!1},addEnteredText:function(t){e(".addimage-control-detail").css("margin","0px"),(!t||t instanceof e.Event)&&(t=this.defaultTextAreaValue);var i=this.getMaxDuration(),r=this.sessionDetails.totalCreatedClips;this.projectJson.trackNames.push("Text - "+t.substring(0,10));var o={containsAudio:!1,containsVideo:!1,containsText:!0,duration:i,type:"text"},a=this.$el.find(".se-font-selector").val(),s=this.$el.find(".se-fontsize-selector").val();null==s&&(s=40);var l=this.$el.find(".se-bold-toggle").is(":checked"),u=this.$el.find(".se-italic-toggle").is(":checked"),c=this;this.getFont(a,l,u,(function(n){var l=c.getMetrics(t,s,n),u={w:l.actualWidth+Math.min(100,Math.max(20,l.actualWidth/10)),h:l.fontHeight+Math.min(100,Math.max(20,l.fontHeight/10))};u.x=c.videoPlayerView.$el.find(".se-crop-highlighter-left").width(),u.x+=(c.videoPlayerView.$el.find(".se-crop-highlighter-right").position().left-c.videoPlayerView.$el.find(".se-crop-highlighter-left").width()-u.w)/2,u.y=c.videoPlayerView.$el.find(".se-crop-highlighter-top").height(),u.y+=(c.videoPlayerView.$el.find(".se-crop-highlighter-bottom").position().top-c.videoPlayerView.$el.find(".se-crop-highlighter-top").height()-u.h)/2;var d={color:"#000000",font:a,fontSize:s,fontSizeProject:c.getValueForProject(s,!0),fadein:0,fadeout:0,opacity:1,text:t,textUnwrapped:t,textAlign:"center",xposRaw:u.x,yposRaw:u.y,xpos:c.getValueForProject(u.x,!0),ypos:c.getValueForProject(u.y,!1),boundingBoxRaw:u,boundingBox:c.getBoundingBoxForProject(u)},h=Math.max(c.videoPlayerView.getCurrentTime(),.001);c.getLuminanceForClip(d.boundingBoxRaw.x,d.boundingBoxRaw.y,d.boundingBoxRaw.w,d.boundingBoxRaw.h)<128&&(d.color="#FFFFFF");var p={deleted:!1,end:3,footage:o,id:r,position:Math.max(h-c.videoPlayerView.trimStart,.001),properties:d,start:0,track:c.projectJson.totalVideoTracks+1,startFrom:h,endAt:Math.min(c.videoPlayerView.getCurrentTime()+3,i)};c.projectJson.totalVideoTracks++,c.projectJson.clips.push(p),c.sessionDetails.addedClips.push(p.id),c.reconstructUI(),c.currentSelectedText=r,c.videoPlayerView.$el.find(".se-text-editable").val(p.properties.text),c.selectText(r),c.sessionDetails.totalCreatedClips++,c.$el.find(".addtext-control-detail .se-color-choose").spectrum("set",c.brand_font_color||p.properties.color),c.$el.find(".addtext-control-detail .color-picker .sp-replacer .text-color-picker").css("color",p.properties.color),c.textPropertyChanged(!0),e("#se-component-"+r).click()})),n.trackInThirdPartyTools("Add text clicked")},getLuminanceForClip:function(e,t,i,n){if(null==e||null==t||null==i||null==n)return null;var r=this.videoPlayerView.$el.find(".primary-video")[0],o=document.createElement("canvas"),a=this.videoPlayerView.$el.width(),s=this.videoPlayerView.$el.height();o.width=a,o.height=s;var l=o.getContext("2d");l.clearRect(0,0,a,s),l.rect(0,0,a,s),l.globalAlpha=1,l.drawImage(r,0,0,a,s),console.log("draw context ",l,a,s,r);for(var u=l.getImageData(e,t,i,n),c=u.data.length/4,d=0,h=0,p=0,f=0;f<c;f++)d+=u.data[4*f+0],h+=u.data[4*f+1],p+=u.data[4*f+2];return.2126*(d/=c)+.7152*(h/=c)+.0722*(p/=c)},selectText:function(t,i){if(this.enabled){this.currentSelectedText==t||this.fromQuickRecord||(this.unselectAllControls(),this.unselectAllComponents()),this.$el.find("#textPropertiesTab").show(),this.currentSelectedText=t,this.currentSelectedClip=this.getClipOf(t),this.$el.find(".addtext-control-detail").show();var r=this.getClipOf(t);this.videoPlayerView.$el.find(".se-text-editable").val(r.properties.textUnwrapped?r.properties.textUnwrapped:r.properties.text),this.videoPlayerView.$el.find(".se-text-editable").css({"font-family":null!=n.getFontMap()[r.properties.font]?n.getFontMap()[r.properties.font].css:"","font-size":r.properties.fontSize+"px","font-style":r.properties.italic?"italic":"normal","font-weight":r.properties.bold?"bold":"normal",color:r.properties.color}),this.$el.find(".addtext-input-text").val(r.properties.text),this.$el.find(".se-font-selector").val(this.getFontIfAvailable(r.properties.font)).trigger("change.select2"),this.$el.find(".se-fontsize-selector").val(r.properties.fontSize).trigger("change.select2"),this.$el.find(".se-bold-toggle").prop("checked",r.properties.bold),this.$el.find(".se-italic-toggle").prop("checked",r.properties.italic),this.$el.find(".addtext-control-detail .se-color-choose").spectrum("set",r.properties.color||this.brand_font_color),this.$el.find(".addtext-control-detail .se-shadow-toggle").spectrum("set",r.properties.shadow),this.$el.find(".addtext-control-detail .color-picker .sp-replacer .text-color-picker").css("color",r.properties.color),this.$el.find(".se-textalign-selector").val(r.properties.textAlign?r.properties.textAlign:"left").trigger("change.select2"),e("#se-component-"+this.currentSelectedText).addClass("se-text-component-selected"),this.setAdaptiveBorderForTarget(e("#se-component-"+this.currentSelectedText)),e(".se-components-hover").removeClass("se-components-hover"),this.setTextDraggableContainerSize(e("#se-component-"+this.currentSelectedText)[0],r,!0),i||this.showClipTime(r),this.selectControl("add-text-btn"),this.showMarkers("text")}},getFontIfAvailable:function(e){if(null==e)return this.defaultFontValue;for(var t in n.getFontMap())if(t==e)return e;return this.defaultFontValue},setAdaptiveBorderForTarget:function(t){0!=t.length&&(this.getLuminanceForClip(t.position().left,t.position().top,t.width(),t.height())<128?e(t).addClass("white"):e(t).addClass("black"))},unselectText:function(t){if(null!=this.currentSelectedText){this.$el.find("#textPropertiesTab").hide(),t=void 0===t?"callouttext"==this.getClipOf(this.currentSelectedText).footage.type:t,this.closeTextEditable();var i=e("#se-component-"+this.currentSelectedText);this.currentSelectedText=void 0,this.videoPlayerView.$el.find(".se-text-editable").val(""),this.videoPlayerView.$el.find(".se-text-editable").hide(),i&&e(i).removeClass("se-text-component-selected black white").resizable("destroy"),this.$el.find(".se-text-component").show(),t?this.showMarkers("calloutimage"):this.showMarkers("text"),this.videoPlayerView.$el.find(".se-clip-time").hide()}},textEditableChanged:function(t){var i=this.getClipOf(this.currentSelectedText);i.properties.textUnwrapped=this.videoPlayerView.$el.find(".se-text-editable").val().trim(),i.properties.textUnwrapped.trim().length||(i.properties.text=""),this.newlineTextToHtml(e("#se-component-"+this.currentSelectedText+" .se-text-container")[0],i),t&&13==t.keyCode&&!t.shiftKey&&(this.closeTextEditable(),console.log("HERE!!!!!!!! 2"),this.unselectText())},addTextChanged:function(e){var t=e.data.that;13==e.keyCode&&t.addEnteredText()},textPropertyChanged:function(t){if(this.currentSelectedText){var i=this.getClipOf(this.currentSelectedText);i&&(i.properties.text=this.getTextFromTextEl(e("#se-component-"+this.currentSelectedText)).trim(),i.properties.font=this.$el.find(".se-font-selector").val(),i.properties.fontSize=this.$el.find(".se-fontsize-selector").val(),(null==i.properties.fontSizeProject||t&&t.target&&e(t.target).hasClass("se-fontsize-selector"))&&(i.properties.fontSizeProject=this.getValueForProject(i.properties.fontSize,!0)),i.properties.bold=this.$el.find(".se-bold-toggle").is(":checked"),i.properties.italic=this.$el.find(".se-italic-toggle").is(":checked"),t&&(i.properties.color=this.$el.find(".addtext-control-detail .se-color-choose").spectrum("get").toHexString()),this.$el.find(".addtext-control-detail .color-picker .sp-replacer .text-color-picker").css("color",i.properties.color),i.properties.textAlign=this.$el.find(".se-textalign-selector").val(),i.properties.xposRaw=e("#se-component-"+this.currentSelectedText).position().left,i.properties.yposRaw=e("#se-component-"+this.currentSelectedText).position().top,i.properties.xpos=this.getValueForProject(i.properties.xposRaw,!0),i.properties.ypos=this.getValueForProject(i.properties.yposRaw,!1),i.footage.calloutId&&(i.properties.offsetX=e("#se-component-"+this.currentSelectedText).position().left-e("#se-component-"+i.footage.calloutId).position().left,i.properties.offsetY=e("#se-component-"+this.currentSelectedText).position().top-e("#se-component-"+i.footage.calloutId).position().top),this.updateProjectJson(),this.reconstructUI())}},showTextEditable:function(e){var t=this.getClipOf(e),i=this.getClipElOf(e);this.videoPlayerView.$el.find(".se-text-editable").css({left:i.position().left+"px",top:i.position().top+"px",width:i.width()+"px",height:i.height()+"px","text-align":t.properties.textAlign}),i.fadeOut();var n=this,r=t.properties.textUnwrapped?t.properties.textUnwrapped:t.properties.text;r=r==this.defaultTextAreaValue?"":r,this.videoPlayerView.$el.find(".se-text-editable").val(r),this.videoPlayerView.$el.find(".se-text-editable").fadeIn(150,(function(){n.videoPlayerView.$el.find(".se-text-editable").focus()}))},closeTextEditable:function(){var t=this.getClipOf(this.currentSelectedText);t&&this.setLineHeight(t),this.videoPlayerView.$el.find(".se-text-editable").hide(),this.videoPlayerView.$el.find(".se-text-component").show(),t&&!t.properties.text.trim().length&&e("#se-component-"+this.currentSelectedText).find(".se-text-delete").click()},deleteText:function(){var e="callouttext"==this.getClipOf(this.currentSelectedText).footage.type;this.removeClip(this.currentSelectedText),this.unselectText(e),this.reconstructUI()},selectAddStickers:function(){this.askReloadConfirmation=!0,this.isPPR?n.trackInThirdPartyTools("video_preview_Emoji_save_isPPR",{email:this.userEmail}):n.trackInThirdPartyTools("video_preview_Emoji_save",{email:this.userEmail}),this.unselectAllControls(),this.$el.find(".addsticker-selected").hide(),this.$el.find(".addsticker-initial").show(),this.$el.find(".addsticker-control-detail").fadeIn(100),this.showMarkers("sticker"),this.selectControl("add-stickers-btn")},selectAddImage:function(){this.askReloadConfirmation=!0,this.unselectAllControls(),this.$el.find(".addimage-selected").hide(),this.$el.find(".addimage-initial").show(),this.$el.find(".addimage-control-detail").fadeIn(100),this.selectControl("add-image-btn"),this.isPPR?n.trackInThirdPartyTools("video_preview_Image_save_isPPR",{email:this.userEmail}):n.trackInThirdPartyTools(l.PERSONALIZATION_ACTIONS.PA41,{email:this.userEmail})},hanldeImageAspectRatioChange:function(){this.stickerPropertyChanged(),n.trackInThirdPartyTools(l.PERSONALIZATION_ACTIONS.PA413,{email:this.userEmail})},deleteImage:function(){this.deleteSticker(),n.trackInThirdPartyTools(l.PERSONALIZATION_ACTIONS.PA415,{email:this.userEmail})},changeImageOpacity:function(t){this.$el.find("#imageOpacitySlider").val(""===e(t.currentTarget).val()?0:e(t.currentTarget).val()),this.$el.find("#imageOpacityInput").val(""===e(t.currentTarget).val()?"":parseInt(e(t.currentTarget).val())>100?100:e(t.currentTarget).val()),this.stickerPropertyChanged(),n.trackInThirdPartyTools(l.PERSONALIZATION_ACTIONS.PA414,{email:this.userEmail})},addImage:function(){this.openImportCallback(),new m({type:"image",maximumFilesAllowed:1,maximumPerFileSize:5,isMultiple:!1,showAddMoreTemplate:!1,callbackMethodToHandleFiles:this.processSelectedImage,closeImportCallback:this.closeImportCallback}),n.trackInThirdPartyTools(l.PERSONALIZATION_ACTIONS.PA411,{email:this.userEmail})},addPersonalizedImage:function(){var e={component_type:"image-mf"},t=a.getNewImageMfId(this.projectJson,"image");e.id=t.footageId,e.image_id=t.imageId,e.is_website=!1,e.url=a.getMfImage(e.image_id,"image"),e.addToFootageList=!1,this.createNewImage(e),n.trackInThirdPartyTools(l.PERSONALIZATION_ACTIONS.PA412,{email:this.userEmail})},addWebsiteImageBtn:function(){var e={component_type:"image-mf"},t=a.getNewImageMfId(this.projectJson,"website");e.id=t.footageId,e.image_id=t.imageId,e.is_website=!0,e.url=a.getMfImage(e.image_id,"website"),e.addToFootageList=!1,this.createNewImage(e),n.trackInThirdPartyTools(l.PERSONALIZATION_ACTIONS.PA416,{email:this.userEmail})},processSelectedImage:function(e,t){var i=e[0],n=a.getImportedImageInfo(i),o=[n],s=this;this.$el.find("#imageUploadProgessContainer").show(),this.$el.find("#imageUploadProgressText").text(y.simpleEdit.prepareToImport),(new u).importAssetForSlideShow(JSON.stringify(o),this.assetId,void 0,(function(e){var t=e.video[0];"local_file"==n.upload_type?new v({acl:"private",bucket:t.bucket,key:t.key}).uploadFile(i,void 0,(function(e){s.$el.find("#imageUploadProgessContainer").hide(),s.closeImportCallback(),t.component_type="image",t.addToFootageList=!0,s.createNewImage(t)}),(function(e){r.showBannerAlert(y.simpleEdit.errorMessage,3e3,"error"),r.postErrorsToLog({error:"Error while uploading media to S3 for user.",stackTrace:JSON.stringify(e)}),s.$el.find("#imageUploadProgessContainer").hide(),s.closeImportCallback()})):(s.$el.find("#imageUploadProgessContainer").hide(),s.closeImportCallback(),t.component_type="image",t.addToFootageList=!0,s.createNewImage(t))}),(function(e){r.showBannerAlert(y.simpleEdit.errorMessage,3e3,"error"),r.postErrorsToLog({error:"Error while importing slideshow for user.",stackTrace:JSON.stringify(e)}),s.$el.find("#imageUploadProgessContainer").hide(),s.closeImportCallback()}))},createNewImage:function(e){var t=this.sessionDetails.totalCreatedClips,i=this.getMaxDuration();this.projectJson.trackNames.push("Image");var n={containsAudio:!1,containsVideo:!1,containsText:!1,containsImage:!0,id:e.id.toString(),duration:i,type:e.component_type};"image-mf"===e.component_type&&(n.is_website=e.is_website,n.image_id=e.image_id);var r=this.videoPlayerView.$el.find(".se-crop-highlighter-left").width();r+=(this.videoPlayerView.$el.find(".se-crop-highlighter-right").position().left-this.videoPlayerView.$el.find(".se-crop-highlighter-left").width())/2;var o=this.videoPlayerView.$el.find(".se-crop-highlighter-top").height();o+=(this.videoPlayerView.$el.find(".se-crop-highlighter-bottom").position().top-this.videoPlayerView.$el.find(".se-crop-highlighter-top").height())/2;var a=new Image;a.crossOrigin="Anonymous",a.src=e.url;var s=this;a.onload=function(){var l,u=a.width,c=a.height;a.width>s.videoPlayerView.$el.width()?(l=s.videoPlayerView.$el.width()/a.width,u=s.videoPlayerView.$el.width()/3,c=l*a.height/3):a.height>s.videoPlayerView.$el.height()?(l=s.videoPlayerView.$el.height()/a.height,c=s.videoPlayerView.$el.height()/3,u=l*a.width/3):(u=a.width/3,c=a.height/3);var d={fadein:0,fadeout:0,heightRaw:c,widthRaw:u,height:s.getValueForProject(c,!1),width:s.getValueForProject(u,!0),xposRaw:r,yposRaw:o,xpos:s.getValueForProject(r,!0),ypos:s.getValueForProject(o,!1),opacity:1,lockAspectRatio:!0,containsAlpha:!0},h=Math.max(s.videoPlayerView.getCurrentTime(),.001),p={deleted:!1,end:3,footage:n,id:t,position:Math.max(h-s.videoPlayerView.trimStart,.001),properties:d,start:0,track:s.projectJson.totalVideoTracks+1,startFrom:h,endAt:Math.min(s.videoPlayerView.getCurrentTime()+3,i)};s.projectJson.totalVideoTracks++,s.projectJson.clips.push(p),e.addToFootageList&&s.projectJson.footageList.push(e.id),n.src=e.url,s.sessionDetails.addedClips.push(p.id),s.reconstructUI(),s.selectSticker(t),s.sessionDetails.totalCreatedClips++}},isImageComponent:function(e){return"image"==this.getClipOf(e).footage.type||"image-mf"==this.getClipOf(e).footage.type},componentDropped:function(e,t,i){-1!==e.indexOf("se-sticker-btn-")?this.addNewSticker(e.split("se-sticker-btn-")[1],t,i):-1!==e.indexOf("se-callout-btn-")&&this.addNewCallout(e.split("se-callout-btn-")[1],t,i)},stickerBtnClicked:function(e){e.data.that.addNewSticker(e.target.id.split("se-sticker-btn-")[1])},addNewSticker:function(e,t,i){var n=this.sessionDetails.totalCreatedClips,r=this.getMaxDuration();this.projectJson.trackNames.push("Sticker");var o={containsAudio:!1,containsVideo:!1,containsText:!1,containsImage:!0,id:-e-100,duration:r,type:"sticker"};null!=t&&null!=i||(t=this.videoPlayerView.$el.find(".se-crop-highlighter-left").width(),t+=(this.videoPlayerView.$el.find(".se-crop-highlighter-right").position().left-this.videoPlayerView.$el.find(".se-crop-highlighter-left").width())/2,i=this.videoPlayerView.$el.find(".se-crop-highlighter-top").height(),i+=(this.videoPlayerView.$el.find(".se-crop-highlighter-bottom").position().top-this.videoPlayerView.$el.find(".se-crop-highlighter-top").height())/2);var a={fadein:0,fadeout:0,heightRaw:this.stickerSize[e].height/1.5,widthRaw:this.stickerSize[e].width/1.5,height:this.getValueForProject(this.stickerSize[e].height/1.5,!1),width:this.getValueForProject(this.stickerSize[e].width/1.5,!0),xposRaw:t,yposRaw:i,xpos:this.getValueForProject(t,!0),ypos:this.getValueForProject(i,!1),opacity:1,lockAspectRatio:!0},s=Math.max(this.videoPlayerView.getCurrentTime(),.001),l={deleted:!1,end:3,footage:o,id:n,position:Math.max(s-this.videoPlayerView.trimStart,.001),properties:a,start:0,track:this.projectJson.totalVideoTracks+1,startFrom:s,endAt:Math.min(this.videoPlayerView.getCurrentTime()+3,r)};this.projectJson.totalVideoTracks++,this.projectJson.clips.push(l),this.sessionDetails.addedClips.push(l.id),this.reconstructUI(),this.selectSticker(n),this.sessionDetails.totalCreatedClips++},selectSticker:function(t){if(this.enabled){this.unselectAllControls(),this.unselectAllComponents(),this.currentSelectedSticker=t,this.currentSelectedClip=this.getClipOf(t);var i=this.getClipOf(this.currentSelectedSticker);this.isImageComponent(i.id)?(this.$el.find(".addimage-selected #imageOpacitySlider").val(100*i.properties.opacity),this.$el.find(".addimage-selected #imageOpacityInput").val(parseInt(100*i.properties.opacity)),this.$el.find(".addimage-selected #imageArLock").prop("checked",i.properties.lockAspectRatio),this.$el.find(".addimage-control-detail").show(),this.$el.find(".addimage-initial").hide(),this.$el.find(".addimage-selected").show()):(this.$el.find(".addsticker-selected .opacity-val").val(100*i.properties.opacity),this.$el.find(".addsticker-selected .lock-aspect-ratio").prop("checked",i.properties.lockAspectRatio),this.$el.find(".addsticker-control-detail").show(),this.$el.find(".addsticker-initial").hide(),this.$el.find(".addsticker-selected").show());var n=e("#se-component-"+t);n.resizable("enable"),n.addClass("edit-video-selected"),this.setAdaptiveBorderForTarget(e("#se-component-"+t)),this.isImageComponent(i.id)?(this.showMarkers("image"),this.selectControl("add-image-btn")):(this.showMarkers("sticker"),this.selectControl("add-stickers-btn")),this.showClipTime(i)}},unselectSticker:function(){null!=this.currentSelectedSticker&&(this.isImageComponent(this.currentSelectedSticker)?(this.currentSelectedSticker=void 0,this.$el.find(".addimage-initial").show(),this.$el.find(".addimage-selected").hide(),this.showMarkers("image")):(this.currentSelectedSticker=void 0,this.$el.find(".addsticker-initial").show(),this.$el.find(".addsticker-selected").hide(),this.showMarkers("sticker")),e(".se-image-component").resizable({disabled:!0}),e(".se-image-component").removeClass("edit-video-selected white black"),this.videoPlayerView.$el.find(".se-clip-time").hide())},stickerPropertyChanged:function(){var e=this.getClipOf(this.currentSelectedSticker);this.isImageComponent(this.currentSelectedSticker)?(e.properties.opacity=this.$el.find(".addimage-selected #imageOpacitySlider").val()/100,e.properties.lockAspectRatio=this.$el.find(".addimage-selected #imageArLock").is(":checked")):(e.properties.opacity=this.$el.find(".addsticker-selected .opacity-val").val()/100,e.properties.lockAspectRatio=this.$el.find(".addsticker-selected .lock-aspect-ratio").is(":checked")),this.updateProjectJson(),this.reconstructUI()},deleteSticker:function(){var e=this.currentSelectedSticker;this.unselectSticker(),this.removeClip(e),this.reconstructUI()},findStickerSize:function(e){this.stickerSize[e]={width:128,height:128}},showStickerFamily:function(t){t.data.that.$el.find(".sticker-family-all").hide(),e(t.target).closest(".sticker-family-container").find(".sticker-family-all").show()},selectAddBlur:function(){"true"===e("#isBlurEnabled").val()||this.isBlurEnabled?(this.askReloadConfirmation=!0,this.isPPR?n.trackInThirdPartyTools("video_preview_Blur_save_isPPR",{email:this.userEmail}):n.trackInThirdPartyTools("video_preview_Blur_save",{email:this.userEmail}),this.unselectAllControls(),this.$el.find("#blurSelected").hide(),this.$el.find("#blurInitial").show(),this.$el.find(".blur-control-detail").fadeIn(100),this.showMarkers("effects"),this.selectControl("add-blur-btn"),e(".new").hide()):(n._upgradeAlertPopup(y,h),e(".new").hide())},addNewBlur:function(e,t){if(void 0!==this.sessionDetails.primaryVideo||void 0!==this.sessionDetails.secondaryVideo){var i=this.getMaxDuration(),r=this.getClipOf(this.sessionDetails.primaryVideo)||{},o=Math.max(this.videoPlayerView.getCurrentTime(),.001);null==this.sessionDetails.totalAddedEffects&&(this.sessionDetails.totalAddedEffects=0);var a=this.sessionDetails.totalAddedEffects++,s={id:a,type:"blur",opacity:1,strength:10,widthRaw:this.getValueFromClipPercent(.3,r,!0),heightRaw:this.getValueFromClipPercent(.3,r,!1),xposRaw:this.getValueFromClipPercent(.3,r,!0),yposRaw:this.getValueFromClipPercent(.3,r,!1),lockAspectRatio:!1,start:0,end:3,width:.3,height:.3,xpos:.3,ypos:.3,startFrom:o,endAt:Math.min(this.videoPlayerView.getCurrentTime()+3,i),position:Math.max(o-this.videoPlayerView.trimStart,.001)};r.effects?r.effects.push(s):r.effects=[s],this.reconstructUI(),this.selectBlur(a),n.trackInThirdPartyTools("SE - Add New Blur",{email:this.userEmail})}},enableBlurForPlayer:function(){var e=this;this.$el.find("#blurStrength").slider({min:0,max:100,step:1,value:50,slide:e.blurPropertyChanged}),this.$el.find("#blurStrengthText").bind("change",(function(){e.blurPropertyChanged({},{},!0)}))},blurPropertyChanged:function(e,i,r){var o=this.getClipOf(this.sessionDetails.primaryVideo)||{},a=t.where(o.effects,{id:Number(this.currentSelectedBlur)})[0]||{};if(r){var s=this.$el.find("#blurStrengthText").val();this.$el.find("#blurStrength").slider("option","value",s)}else{s=this.$el.find("#blurStrength").slider("option","value");this.$el.find("#blurStrengthText").val(s)}a.strength=n.map(s,0,100,0,20),a.lockAspectRatio=this.$el.find(".blur-selected .lock-aspect-ratio").is(":checked"),this.updateProjectJson(),this.reconstructUI()},blurAreaChanged:function(){var i=this.getClipOf(this.sessionDetails.primaryVideo)||{},n=t.where(i.effects,{id:Number(this.currentSelectedBlur)})[0]||{},r=e("#se-effects-"+n.id);n.xpos=this.getValueForClip(r.position().left,i,!0),n.ypos=this.getValueForClip(r.position().top,i,!1),n.width=this.getValueForClip(r.width(),i,!0),n.height=this.getValueForClip(r.height(),i,!1),this.reconstructUI()},selectBlur:function(i){if(this.enabled){var r=this.getClipOf(this.sessionDetails.primaryVideo)||{},o=t.where(r.effects,{id:Number(i)})[0]||{},a=Math.ceil(n.map(o.strength,0,20,0,100));this.unselectAllControls(),this.unselectAllComponents(),this.currentSelectedBlur=i,this.currentSelectedClip=o,this.$el.find("#blurStrengthText").val(a),this.$el.find("#blurStrength").slider("option","value",a),this.$el.find(".blur-selected .lock-aspect-ratio").prop("checked",o.lockAspectRatio),this.$el.find(".blur-control-detail").show(),this.$el.find(".blur-initial").hide(),this.$el.find(".blur-selected").show(),this.showMarkers("effects"),e("#se-effects-"+i+" .ui-resizable-handle").show(),e("#se-effects-"+i).resizable("enable").addClass("edit-video-selected"),this.setAdaptiveBorderForTarget(e("#se-effects-"+i)),this.selectControl("add-blur-btn"),void 0!==o.id&&this.showClipTime(o,!0)}},unselectBlur:function(){null!=this.currentSelectedBlur&&(this.currentSelectedBlur=void 0,this.$el.find(".blur-initial").show(),this.$el.find(".blur-selected").hide(),e(".se-effects .ui-resizable-handle").hide(),e(".se-effects").resizable({disabled:!0}).removeClass("edit-video-selected white black"),this.showMarkers("effects"),this.videoPlayerView.$el.find(".se-clip-time").hide())},deleteBlur:function(){for(var e=this.getClipOf(this.sessionDetails.primaryVideo)||{},t=e.effects||[],i=0;i<e.effects.length&&e.effects[i].id!=this.currentSelectedBlur;i++);i!=e.effects.length&&(t.splice(i,1),this.unselectBlur(),this.reconstructUI(),n.trackInThirdPartyTools("SE - Delete Blur",{email:this.userEmail}))},drawBlurLayer:function(){if(this.projectJson){var t=this.videoPlayerView.$el.find(".primary-video")[0],i=this.videoPlayerView.$el.find(".se-effects-canvas")[0],r=i.getContext("2d"),o=this.primaryVideoContainer.width(),a=this.primaryVideoContainer.height(),s=(this.getClipOf(this.sessionDetails.primaryVideo)||{}).effects||[];i.width=o,i.height=a,r.clearRect(0,0,o,a);for(var l=0;l<s.length;l++){var u=s[l];if(u&&!(this.videoPlayerView.getCurrentTime()-this.videoPlayerView.trimStart<u.position-.1||this.videoPlayerView.getCurrentTime()-this.videoPlayerView.trimStart>u.position+(u.end-u.start))){r.save(),r.rect(u.xposRaw,u.yposRaw,u.widthRaw,u.heightRaw),r.clip(),r.filter="blur("+u.strength+"px)";var c=n.map(u.xposRaw,0,o,0,t.videoWidth),d=n.map(u.yposRaw,0,a,0,t.videoHeight),h=n.map(u.widthRaw,0,o,0,t.videoWidth),p=n.map(u.heightRaw,0,a,0,t.videoHeight);r.drawImage(t,c,d,h,p,u.xposRaw,u.yposRaw,u.widthRaw,u.heightRaw),r.restore(),e("#se-effects-"+u.id).css({opacity:"1","z-index":"106"})}else e("#se-effects-"+u.id).css({opacity:"0","z-index":"-1"})}}},getMaxDuration:function(){for(var e=0,t=0;t<this.projectJson.clips.length;t++)e=Math.max(e,this.projectJson.clips[t].end);return e},selectAddCallouts:function(){this.askReloadConfirmation=!0,this.isPPR?n.trackInThirdPartyTools("video_preview_Callout_save_isPPR",{email:this.userEmail}):n.trackInThirdPartyTools("video_preview_Callout_save",{email:this.userEmail}),this.unselectAllControls(),this.$el.find(".addcallout-selected").hide(),this.$el.find(".addcallout-initial").show(),this.$el.find(".addcallout-control-detail").fadeIn(100),this.showMarkers("calloutimage"),this.selectControl("add-callouts-btn")},calloutBtnClicked:function(e){e.data.that.addNewCallout(e.target.id.split("se-callout-btn-")[1])},addNewCallout:function(e,t,i){var n=this.sessionDetails.totalCreatedClips,r=this.getMaxDuration();this.projectJson.trackNames.push("Callout-Image");var o={containsAudio:!1,containsVideo:!1,containsText:!1,containsImage:!0,id:-e-1e4,baseId:-e-1e4,duration:r,type:"calloutimage"};null!=t&&null!=i||(t=this.videoPlayerView.$el.find(".se-crop-highlighter-left").width(),t+=(this.videoPlayerView.$el.find(".se-crop-highlighter-right").position().left-this.videoPlayerView.$el.find(".se-crop-highlighter-left").width())/2,i=this.videoPlayerView.$el.find(".se-crop-highlighter-top").height(),i+=(this.videoPlayerView.$el.find(".se-crop-highlighter-bottom").position().top-this.videoPlayerView.$el.find(".se-crop-highlighter-top").height())/2);var a={fadein:0,fadeout:0,heightRaw:this.callouts[e].height/2,widthRaw:this.callouts[e].width/2,height:this.getValueForProject(this.callouts[e].height/2,!1),width:this.getValueForProject(this.callouts[e].width/2,!0),xposRaw:t,yposRaw:i,xpos:this.getValueForProject(t,!0),ypos:this.getValueForProject(i,!1),opacity:1,lockAspectRatio:!0},s=3,l=Math.max(this.videoPlayerView.getCurrentTime(),.001),u={deleted:!1,end:s,footage:o,id:n,position:Math.max(l-this.videoPlayerView.trimStart,.001),properties:a,start:0,track:this.projectJson.totalVideoTracks+1,startFrom:l,endAt:Math.min(this.videoPlayerView.getCurrentTime()+s,r)};if(this.projectJson.totalVideoTracks++,this.projectJson.clips.push(u),this.sessionDetails.addedClips.push(u.id),this.sessionDetails.totalCreatedClips++,this.callouts[e].hasText){var c=this.sessionDetails.totalCreatedClips;this.projectJson.trackNames.push("Callout-Text"),o.textId=c;var d={containsAudio:!1,containsVideo:!1,containsText:!0,containsImage:!1,duration:r,calloutId:n,type:"callouttext"};t+=0;var h={x:a.xposRaw,y:i+=50,w:a.widthRaw,h:a.heightRaw/4},p={text:this.defaultTextAreaValue,textUnwrapped:this.defaultTextAreaValue,font:this.defaultFontValue,fontSize:15,fontSizeProject:this.getValueForProject(15,!0),color:"black",bold:!1,italic:!1,opacity:1,xposRaw:t,yposRaw:i,xpos:this.getValueForProject(t,!0),ypos:this.getValueForProject(i,!1),offsetX:0,offsetY:50,textAlign:"center",boundingBoxRaw:h,boundingBox:this.getBoundingBoxForProject(h)};this.getLuminanceForClip(p.boundingBoxRaw.x,p.boundingBoxRaw.y,p.boundingBoxRaw.w,p.boundingBoxRaw.h)<128&&(p.color="#FFFFFF");s=3,l=Math.max(this.videoPlayerView.getCurrentTime(),.001);var f={deleted:!1,end:s,footage:d,id:c,position:Math.max(l-this.videoPlayerView.trimStart,.001),properties:p,start:0,track:this.projectJson.totalVideoTracks+1,startFrom:l,endAt:Math.min(this.videoPlayerView.getCurrentTime()+s,r)};this.projectJson.totalVideoTracks++,this.projectJson.clips.push(f),this.sessionDetails.addedClips.push(f.id),this.sessionDetails.totalCreatedClips++}this.reconstructUI(),this.selectCallout(n)},selectCallout:function(t){if(this.enabled){this.unselectAllControls(),this.unselectAllComponents(),this.currentSelectedCallout=t,this.currentSelectedClip=this.getClipOf(t),this.$el.find(".addcallout-control-detail").show(),this.$el.find(".addcallout-initial").hide(),this.$el.find(".addcallout-selected").show();var i=this.getClipOf(this.currentSelectedCallout);this.$el.find(".addcallout-selected .opacity-val").val(100*i.properties.opacity),this.$el.find(".addcallout-selected .lock-aspect-ratio").prop("checked",i.properties.lockAspectRatio),this.$el.find(".addcallout-selected .callout-variation").val(i.footage.baseId-i.footage.id);var n=e("#se-component-"+t);n.resizable("enable"),n.addClass("edit-video-selected"),this.setAdaptiveBorderForTarget(e("#se-component-"+t)),this.showMarkers("calloutimage"),this.showClipTime(i),this.selectControl("add-callouts-btn")}},unselectCallout:function(){null!=this.currentSelectedCallout&&(this.currentSelectedCallout=void 0,this.$el.find(".addcallout-initial").show(),this.$el.find(".addcallout-selected").hide(),e(".se-image-component").resizable({disabled:!0}),e(".se-image-component").removeClass("edit-video-selected white black"),this.showMarkers("calloutimage"),this.videoPlayerView.$el.find(".se-clip-time").hide())},calloutDragged:function(){var t=this.getClipOf(this.currentSelectedCallout),i=this.getClipOf(t.footage.textId);if(null!=i){var r=this.getClipElOf(t.footage.textId);i.properties.boundingBoxRaw?r.css({left:n.map(this.calloutTextBoxSpread.x,0,1,t.properties.xposRaw,t.properties.xposRaw+t.properties.widthRaw)+"px",top:n.map(this.calloutTextBoxSpread.y,0,1,t.properties.yposRaw,t.properties.yposRaw+t.properties.heightRaw)+"px"}):e("#se-component-"+t.footage.textId).css({left:e("#se-component-"+t.id).position().left+i.properties.offsetX+"px",top:e("#se-component-"+t.id).position().top+i.properties.offsetY+"px"}),i.properties.xposRaw=r.position().left,i.properties.yposRaw=r.position().top,i.properties.xpos=this.getValueForProject(i.properties.xposRaw,!0),i.properties.ypos=this.getValueForProject(i.properties.yposRaw,!1),i&&i.properties.boundingBoxRaw&&(i.properties.boundingBoxRaw.x=i.properties.xposRaw,i.properties.boundingBoxRaw.y=i.properties.yposRaw,i.properties.boundingBox=this.getBoundingBoxForProject(i.properties.boundingBoxRaw))}this.updateProjectJson()},calloutResized:function(e){var t=this.getClipOf(e),i=this.getClipOf(t.footage.textId);i&&i.properties.boundingBoxRaw&&this.calloutTextBoxSpread&&(this.getClipElOf(i.id).css({left:n.map(this.calloutTextBoxSpread.x,0,1,t.properties.xposRaw,t.properties.xposRaw+t.properties.widthRaw)+"px",top:n.map(this.calloutTextBoxSpread.y,0,1,t.properties.yposRaw,t.properties.yposRaw+t.properties.heightRaw)+"px",width:this.calloutTextBoxSpread.w*t.properties.widthRaw+"px"}),this.textBoxResized(i.id)),this.updateProjectJson()},calloutPropertyChanged:function(){var e=this.getClipOf(this.currentSelectedCallout);e.properties.opacity=this.$el.find(".addcallout-selected .opacity-val").val()/100,e.properties.lockAspectRatio=this.$el.find(".addcallout-selected .lock-aspect-ratio").is(":checked"),e.footage.id=e.footage.baseId-parseInt(this.$el.find(".callout-variation").val()),this.updateProjectJson(),this.reconstructUI()},deleteCallout:function(){var e=this.getClipOf(this.currentSelectedCallout),t=this.getClipOf(e.footage.textId);null!=t&&this.removeClip(t.id),this.removeClip(this.currentSelectedCallout),this.unselectCallout(),this.reconstructUI()},findCalloutSize:function(e){var t=document.createElement("img");t.src="https://s3.amazonaws.com/hippolms-wiz-static/callouts/c"+e+".png?v=2",t.crossOrigin="Anonymous";var i=this;this.callouts[e]&&(this.callouts[e].width=300,this.callouts[e].height=300),t.onload=function(){i.callouts[e]&&(i.callouts[e].width=t.width,i.callouts[e].height=t.height)}},isCalloutImage:function(e){return this.getClipOf(e).footage.id<=-1e4},scrollCallouts:function(t){var i=e(t.target).hasClass("callout-scroll-left"),n=t.data.that;n.$el.find(".callout-btn-scroll-container").animate({scrollLeft:n.$el.find(".callout-btn-scroll-container").scrollLeft()+200*(i?-1:1)},200)},newComponentDragged:function(){this.videoPlayerView.$el.find(".se-crop-resizable").removeClass("disp-none").addClass("disp-show"),this.videoPlayerView.$el.find(".se-components-droppable").fadeIn(200),this.videoPlayerView.$el.find(".se-components-droppable").css({"z-index":1e3,width:this.videoPlayerView.$el.find(".se-crop-resizable").width()+"px",height:this.videoPlayerView.$el.find(".se-crop-resizable").height()+"px",left:this.videoPlayerView.$el.find(".se-crop-resizable").position().left+"px",top:this.videoPlayerView.$el.find(".se-crop-resizable").position().top+"px"})},newComponentDropped:function(){this.videoPlayerView.$el.find(".se-crop-resizable").removeClass("disp-show").addClass("disp-none"),this.videoPlayerView.$el.find(".se-components-droppable").hide(),this.videoPlayerView.$el.find(".se-components-droppable").css("z-index",0)},getClipOf:function(e){for(var t=void 0,i=0;i<this.projectJson.clips.length;i++)if(this.projectJson.clips[i].id==e){t=this.projectJson.clips[i];break}return t},getClipElOf:function(t){return e("#se-component-"+t)},removeClip:function(e){e=parseInt(e);for(var t=0;t<this.projectJson.clips.length;t++)if(this.projectJson.clips[t].id==e){this.projectJson.clips.splice(t,1);break}-1!==this.sessionDetails.addedClips.indexOf(e)&&this.sessionDetails.addedClips.splice(this.sessionDetails.addedClips.indexOf(e),1)},lockAspectRatio:function(t){var i=t.data.that;e(t.target).hasClass("primary-vid-control")?(i.primaryVideoContainer.resizable("destroy"),i.makeVideoContainerResizable(i.primaryVideoContainer,e(t.target).is(":checked"))):e(t.target).hasClass("secondary-vid-control")&&(i.secondaryVideoContainer.resizable("destroy"),i.makeVideoContainerResizable(i.secondaryVideoContainer,e(t.target).is(":checked")))},opacityChanged:function(t){var i=t.data.that;e(t.target).hasClass("primary-vid-control")?(i.primaryVideoContainer.resizable("destroy"),i.makeVideoContainerResizable(i.primaryVideoContainer,e(t.target).is(":checked"))):e(t.target).hasClass("secondary-vid-control")&&(i.secondaryVideoContainer.resizable("destroy"),i.makeVideoContainerResizable(i.secondaryVideoContainer,e(t.target).is(":checked")))},showClipTime:function(t,i){var r=t.footage?t.footage.type:"blur";this.videoPlayerView.$el.find(".se-clip-time").show();var o=Math.max(n.map(t.startFrom,this.videoPlayerView.trimStart,this.videoPlayerView.mediaPlayer.duration-this.videoPlayerView.trimEnd,0,this.videoPlayerView.$el.find(".components-time-container").width()),0),a=Math.min(n.map(t.endAt,this.videoPlayerView.trimStart,this.videoPlayerView.mediaPlayer.duration-this.videoPlayerView.trimEnd,0,this.videoPlayerView.$el.find(".components-time-container").width()),this.videoPlayerView.$el.find(".components-time-container").width());this.videoPlayerView.$el.find(".se-clip-time").resizable("enable"),this.videoPlayerView.$el.find(".se-clip-time").css({left:o+"px",width:a-o+"px"}),this.videoPlayerView.$el.find(".se-clip-time .se-selected-type").html(r.substring(0,1).toUpperCase()),i||this.updateTimeFromClipToPopup(this),e(".timer-pop-up").show()},playerTimeUpdate:function(){for(var e=0;e<this.sessionDetails.addedClips.length;e++){var t=this.getClipOf(this.sessionDetails.addedClips[e]);null!=t&&(this.videoPlayerView.getCurrentTime()-this.videoPlayerView.trimStart<t.position-.1||this.videoPlayerView.getCurrentTime()-this.videoPlayerView.trimStart>t.position+(t.end-t.start)?this.videoPlayerView.$el.find("#se-component-"+t.id).css({opacity:"0","z-index":"0"}):this.videoPlayerView.$el.find("#se-component-"+t.id).css({opacity:null!=t.properties.opacity?t.properties.opacity:1,"z-index":"107"}))}},handleVideoPlay:function(){var e=this;this.blurPlayInterval=setInterval((function(){e.drawBlurLayer()}),15)},handleVideoPause:function(){clearInterval(this.blurPlayInterval)},handleVideoSeeked:function(){this.drawBlurLayer(),this.setBorderForClipOnVideoSeek()},showMarkers:function(t){var i,r,o=this.videoPlayerView.$el.find(".player-progress").width()+parseInt(e(".player-progress").css("marginRight"))+parseInt(e(".player-progress").css("marginLeft"));if(this.videoPlayerView.$el.find(".components-time-container, .components-marker-container").css("width",o+"px"),this.videoPlayerView.$el.find(".components-marker-container").empty(),"effects"===t){i=(this.getClipOf(this.sessionDetails.primaryVideo)||{}).effects||[];for(var a=0;a<i.length;a++)r=Math.max(n.map(i[a].startFrom,this.videoPlayerView.trimStart,this.videoPlayerView.mediaPlayer.duration-this.videoPlayerView.trimEnd,0,this.videoPlayerView.$el.find(".components-time-container").width()),0),this.videoPlayerView.$el.find(".components-marker-container").append('<span class="se-selected-type" id="effect-'+i[a].id+'" style = "left:'+r+'px">'+i[a].type.substring(0,1).toUpperCase()+"</span>")}else for(a=0;a<this.projectJson.clips.length;a++){var s=this.projectJson.clips[a];s.footage.type==t&&(r=Math.max(n.map(s.startFrom,this.videoPlayerView.trimStart,this.videoPlayerView.mediaPlayer.duration-this.videoPlayerView.trimEnd,0,this.videoPlayerView.$el.find(".components-time-container").width()),0),this.videoPlayerView.$el.find(".components-marker-container").append('<span class="se-selected-type" id="clip-'+s.id+'" style = "left:'+r+'px">'+s.footage.type.substring(0,1).toUpperCase()+"</span>"))}this.videoPlayerView.$el.find(".se-selected-type").bind("click",{that:this},this.markerSelected)},markerSelected:function(e){var i,n=e.target.id,r=0;if(n.includes("clip"))i=n.split("-")[1],r=this.getClipOf(i).startFrom;else{if(!n.includes("effect"))return;i=n.split("-")[1],effects=(this.getClipOf(this.sessionDetails.primaryVideo)||{}).effects||[],r=(t.where(effects,{id:Number(i)})[0]||{}).startFrom}this.videoPlayerView.goToTime(Math.min(Math.max(r,this.videoPlayerView.trimStart),this.videoPlayerView.mediaPlayer.duration-this.videoPlayerView.trimEnd)),this.reconstructUI(),this.selectComponentFromId(i,n.includes("effect"))},selectComponentFromId:function(e,t){t?this.selectBlur(e):(type=this.getClipOf(e).footage.type,"sticker"===type?this.selectSticker(e):"text"===type?this.selectText(e):"calloutimage"===type&&this.selectCallout(e))},makeVideoContainerResizable:function(t,i){var n=this;t.resizable({aspectRatio:i,handles:"n, e, w, s, ne, nw, se, sw",resize:function(t,i){n.mediaContainerResized(e(t.target))},start:this.userEventStart,stop:function(){n.userEventStop(),n.reconstructUI()}}),this.videoPlayerView.$el.find(".ui-resizable-handle").removeClass("ui-icon ui-icon-gripsmall-diagonal-se")},isOnBoardRequired:function(){return!1},getFont:function(e,t,i,n){var r=this;this.fontCache[e+":"+t+":"+i]?n(this.fontCache[e+":"+t+":"+i]):(e||(console.warn("fontname not set"),e=r.defaultFontValue),g.load(this.getFontURL(e,t,i),(function(o,a){if(o){var s;for(var l in console.error("error loading font "+e+":"+t+":"+i),r.fontCache)s=r.fontCache[l];s?n(s):(console.warn("trying to load default font"),g.load(r.getFontURL("montserrat",t,i),(function(e,t){o?console.error("loading default font also failed"):n(t)})))}else r.fontCache[e+":"+t+":"+i]=a,n(a)})))},setLineHeight:function(t){var i=this;null==t.properties.fontSizeProject&&(t.properties.fontSizeProject=this.getValueForProject(t.properties.fontSize));var n=this.getValueForPlayer(t.properties.fontSizeProject,!0);this.getFont(t.properties.font,t.properties.bold,t.properties.italic,(function(r){var o=i.getMetrics(t.properties.text,n,r),a=0;e("#se-component-"+t.id+" div").each((function(){var t=i.getMetrics(e(this).text(),n,r);a=Math.max(a,t.actualBoundingBoxAscent-t.actualBoundingBoxDescent)})),a+=(o.fontBoundingBoxAscent-o.fontBoundingBoxDescent)/10,t.properties.lineHeight=i.getValueForProject(a,!1);var s=0,l=0,u=a*e("#se-component-"+t.id+" .text-el-line").length,c=Math.min(Math.max(10,u/2),40);t.properties.boundingBoxRaw&&(c=(t.properties.boundingBoxRaw.h-u)/2);var d=t.properties.textAlign?t.properties.textAlign:"left";e("#se-component-"+t.id+" .text-el-line").each((function(){var t=i.getMetrics(e(this).text(),n,r);l=Math.max(l,t.actualWidth)})),null==t.properties.boundingBoxRaw&&(c=Math.min(Math.max(10,u/2),40),t.properties.boundingBoxRaw={x:t.properties.xposRaw,y:t.properties.yposRaw-c,w:l+2*c,h:u+2*c},t.properties.textAlign=d,i.setTextDraggableContainerSize(e("#se-component-"+t.id)[0],t,!1)),t.properties.boundingBoxRaw.topPadding=c,t.properties.boundingBox=i.getBoundingBoxForProject(t.properties.boundingBoxRaw),e("#se-component-"+t.id+" .text-el-line").each((function(){var o=i.getMetrics(e(this).text(),n,r),l=0;"center"==d?l=(t.properties.boundingBoxRaw.w-o.actualWidth)/2:"right"==d&&(l=t.properties.boundingBoxRaw.w-o.actualWidth),e(this).css({"line-height":o.fontBoundingBoxAscent-o.fontBoundingBoxDescent+"px",top:s+(o.actualBoundingBoxAscent-o.fontBoundingBoxAscent)+c+"px",left:l+"px"}),s+=a}))}))},setTextDraggableContainerSize:function(t,i,n){var r=this;i.properties.boundingBoxRaw&&(e(t).css({width:i.properties.boundingBoxRaw.w+"px",height:i.properties.boundingBoxRaw.h+"px"}),n&&(e(t).resizable({handles:"se",aspectRatio:!1,containment:".primary-video-container",create:function(){e(this).find(".ui-resizable-handle").removeClass("ui-icon ui-icon-gripsmall-diagonal-se")},stop:function(){r.lastTextResizeTime=(new Date).getTime()},resize:r.textBoxResized}),i.footage.calloutId&&e(t).resizable("option","containment","#se-component-"+i.footage.calloutId)))},selectControl:function(e){this.$el.find(".se-control-selected").removeClass("se-control-selected"),this.$el.find("."+e).addClass("se-control-selected")},computedDuration:function(){this.resizeHandler(),this.$el.find(".trim-before-container, .trim-after-container").show(),this.reconstructUI(),this.updateTrimInput()},_getVideoModel:function(){if(this.embeddedDigest&&this.embeddedDigest.length>0)var e=new u({embedded_digest:this.embeddedDigest});else if(this.digest)e=new u({digest:this.digest});else e=new u;return e},getReloadConfirmationState:function(){return this.askReloadConfirmation},prefetchAssetsForSimpleEdit:function(){try{var e=new Image;e.src="https://s3.amazonaws.com/hippolms-wiz-static/stickers-all/stickers_all.png?v=2",e.crossOrigin="Anonymous"}catch(e){console.log("Image constructor - Browser not supported!")}},showClipTimePop:function(t){var i=e(t.target);(i.hasClass("se-clip-time")||i.hasClass("se-selected-type"))&&(t.data.that.updateTimeFromClipToPopup(t.data.that),e(".timer-pop-up").toggle())},clipInputButtonClicked:function(e){e.stopPropagation();var t=e.data.that,i=t.currentSelectedClip||{},n=e.target.className.indexOf("timer-start-btn")>-1,r=e.target.className.indexOf("plus")>-1;t.calculateTimeAndUpdateClip(n,r,i,t),t.reconstructUI()},clipInputtyped:function(t){t.stopPropagation();var i=t.data.that,r=t.keyCode,o=e(t.target).hasClass("timer-start-input");if(38===r||40===r)i.calculateTimeAndUpdateClip(o,38===r,i.currentSelectedClip||{},i);else{var a=n.timeToInt(e(".timer-start-input").val()),s=n.timeToInt(e(".timer-stop-input").val());clearTimeout(i.clipTimeInputTimeout),i.isValidClipTime(a,s)?i.setClipTimeAndUpdateValues(a,s,i):i.clipTimeInputTimeout=setTimeout((function(){i.updateTimeFromClipToPopup()}),1e3)}i.reconstructUI()},isValidClipTime:function(e,t){var i=this.videoPlayerView,n=i.mediaPlayer.duration-i.trimEnd;return!(e>=t||e<i.trimStart||t>n||isNaN(e)||isNaN(t))},updateTimeFromClipToPopup:function(t){var i=(t=t||this).currentSelectedClip||{};e(".timer-start-input").val(n.strToTime(i.startFrom)),e(".timer-stop-input").val(n.strToTime(i.endAt))},calculateTimeAndUpdateClip:function(t,i,r,o){var a=r.startFrom,s=r.endAt,l=o.videoPlayerView,u=l.mediaPlayer.duration-l.trimEnd;t?a=i?Math.min(a+1,u):Math.max(a-1,l.trimStart):s=i?Math.min(s+1,u):Math.max(s-1,l.trimStart),a>=s||(e(".timer-start-input").val(n.strToTime(a)),e(".timer-stop-input").val(n.strToTime(s)),o.setClipTimeAndUpdateValues(a,s,o))},setClipTimeAndUpdateValues:function(e,t,i){var n=i.currentSelectedClip||{},r=n.footage?n.footage.type:"blur";n.startFrom=e,n.endAt=t,("calloutimage"===r||"sticker"===r||"text"===r||"blur"===r)&&this.showClipTime(n,!0),this.updateCalloutClipTime(n),this.updateProjectJson()},updateCalloutClipTime:function(e){if(null!=e&&null!=e.footage&&null!=e.footage.type){var t;if("callouttext"==e.footage.type)t=this.getClipOf(e.footage.calloutId);else{if("calloutimage"!=e.footage.type||null==e.footage.textId)return;t=this.getClipOf(e.footage.textId)||{}}t.startFrom=e.startFrom,t.endAt=e.endAt}},onClipTimeChangeHandler:function(){var e=n.map(this.videoPlayerView.$el.find(".se-clip-time").position().left,0,this.videoPlayerView.$el.find(".components-time-container").width(),this.videoPlayerView.trimStart,this.videoPlayerView.mediaPlayer.duration-this.videoPlayerView.trimEnd),t=n.map(this.videoPlayerView.$el.find(".se-clip-time").width(),0,this.videoPlayerView.$el.find(".components-time-container").width(),0,this.videoPlayerView.mediaPlayer.duration-this.videoPlayerView.trimStart-this.videoPlayerView.trimEnd),i=this.getSelectedClipOrEffect();null!=i&&(i.startFrom=e,i.endAt=i.startFrom+t,this.updateCalloutClipTime(i),this.updateProjectJson(),this.reconstructUI())},getTextFromTextEl:function(t){for(var i=t.find(".text-el-line").toArray(),n="",r=0;r<i.length;r++)n+=e(i[r]).text()+(r+1<i.length?"\n":"");return n},newlineTextToHtml:function(t,i){var r=this,o=i.properties.text.split(/[\r\n]+/);for(var a in i.properties.textUnwrapped&&(o=i.properties.textUnwrapped.split(/[\r\n]+/),i.properties.boundingBoxRaw&&i.properties.textUnwrapped&&this.getFont(i.properties.font,i.properties.bold,i.properties.italic,(function(e){for(var t=0;t<o.length;t++){for(var n=o[t].split(/(\$[\s]*\{.*\}|\S+|\s+)/).filter((function(e){return 0!=e.length})),a=[{first:o[t]}],s=n.length-1;s>0;s--)a.push({first:n.slice(0,s).join(""),second:n.slice(s,n.length).join("")});var l=a[a.length-1].first;if(!l.replace(/\s/g,"").startsWith("${"))for(s=l.length-1;s>0;s--)a.push({first:l.slice(0,s),second:[l.slice(s,l.length),n.slice(1,n.length).join("")].join("")});for(var u=0;u<a.length;u++){if(r.getMetrics(a[u].first,r.getValueForPlayer(i.properties.fontSizeProject,!0),e).actualWidth<=i.properties.boundingBoxRaw.w)break}u=Math.min(a.length-1,u),o[t]=a[u].first,a[u].second&&o.splice(t+1,0,a[u].second)}})),i.properties.text=o.join("\n")),e(t).empty(),o){var s=document.createElement("div");e(s).append(o[a]),e(s).addClass("text-el-line"),e(s).css({"font-family":null!=n.getFontMap()[i.properties.font]?n.getFontMap()[i.properties.font].css:"","font-size":this.getValueForPlayer(i.properties.fontSizeProject,!0)+"px","font-style":i.properties.italic?"italic":"normal","font-weight":i.properties.bold?"bold":"normal",color:i.properties.color,position:"absolute","line-height":"0.7em"}),e(t).append(s)}this.setLineHeight(i)},fontLoaded:function(e){if(null!=this.currentSelectedText){var t=this.getClipOf(this.currentSelectedText),i=this.getClipElOf(this.currentSelectedText);this.newlineTextToHtml(i.find(".se-text-container")[0],t)}},textBoxResized:function(t){(t instanceof e.Event||null==t)&&(t=this.currentSelectedText);var i=this.getClipOf(t),n=this.getClipElOf(t);i.properties.boundingBoxRaw={x:n.position().left,y:n.position().top,w:n.width(),h:n.height()},i.properties.boundingBox=this.getBoundingBoxForProject(i.properties.boundingBoxRaw),this.newlineTextToHtml(n.find(".se-text-container")[0],i)},webcamSnappedLayoutOnCrop:function(){var e="bottom-left";return this.projectJson&&null!=this.projectJson.webcamPosition&&(e=this.projectJson.webcamPosition),"bottom-left"==e?{x:this.cropResizable.position().left,y:this.cropResizable.position().top+this.cropResizable.height()-this.secondaryVideoContainer.height()}:"bottom-right"==e?{x:this.cropResizable.position().left+this.cropResizable.width()-this.secondaryVideoContainer.width(),y:this.cropResizable.position().top+this.cropResizable.height()-this.secondaryVideoContainer.height()}:"top-right"==e?{x:this.cropResizable.position().left+this.cropResizable.width()-this.secondaryVideoContainer.width(),y:this.cropResizable.position().top}:"top-left"==e?{x:this.cropResizable.position().left,y:this.cropResizable.position().top}:void 0},getProjectJSON:function(){return this.projectJson},getIOAdjustedProjectJSON:function(){var e=n.naiveClone(this.projectJson);if(null!=e.ioDetails)try{if(e.ioDetails.intro&&e.ioDetails.intro.theme>0){for(var t=e.ioDetails.intro,i=t.duration,r=i,o=0;o<e.clips.length;o++)e.clips[o].deleted||e.clips[o].properties.isPlaceHolder||(e.clips[o].position=parseInt(e.clips[o].position)+i,r=Math.min(r,e.clips[o].position));var a=e.totalVideoTracks;for(o=0;o<t.clips.length;o++){if(!(c=t.clips[o]).deleted&&!c.properties.isPlaceHolder){var s=o+1;r<i&&(s+=a),s>e.totalVideoTracks&&(e.totalVideoTracks++,e.trackNames.push(c.properties.text)),c.track=s,e.clips.push(c)}}}if(e.ioDetails.outro&&e.ioDetails.outro.theme>0){var l=e.ioDetails.outro,u=0;for(o=0;o<e.clips.length;o++)e.clips[o].deleted||e.clips[o].properties.isPlaceHolder||(u=Math.max(u,parseInt(e.clips[o].position)+e.clips[o].end-e.clips[o].start));for(o=0;o<l.clips.length;o++){var c;if(!(c=l.clips[o]).deleted&&!c.properties.isPlaceHolder)(s=o+1)>=e.totalVideoTracks&&(e.totalVideoTracks++,e.trackNames.push(c.properties.text)),c.position=u,c.track=s,e.clips.push(c)}}}catch(e){console.error(e)}return e},overrideStyle:function(e,t,i){e.each((function(){this.style.setProperty(t,i,"important")}))},applyCustomColors:function(){this.customColors&&(this.customColors.primaryColor&&(this.overrideStyle(this.$el.find(".trim-slider .ui-slider-handle"),"background",this.customColors.primaryColor),this.overrideStyle(this.$el.find(".trim-slider .ui-slider-range"),"border-color",this.customColors.primaryColor)),this.customColors.secondaryColor&&this.overrideStyle(this.$el.find(".trim-slider .ui-slider-range"),"background",this.customColors.secondaryColor),this.customColors.bgColor&&this.overrideStyle(this.$el.find(".trim-slider"),"background",this.customColors.bgColor))},addCustomFontStyles:function(){var e=document.createElement("style");for(var t in n.getFontMap()){var i=n.getFontMap()[t];e.appendChild(document.createTextNode("@font-face { font-family: '"+i.family+"'; font-style: normal; font-weight: 400; src: url('"+this.getFontURL(t,!1,!1)+"') format('truetype'); }")),e.appendChild(document.createTextNode("@font-face { font-family: '"+i.family+"'; font-style: normal; font-weight: bold; src: url('"+this.getFontURL(t,!0,!1)+"') format('truetype'); }")),e.appendChild(document.createTextNode("@font-face { font-family: '"+i.family+"'; font-style: italic; font-weight: 400; src: url('"+this.getFontURL(t,!1,!0)+"') format('truetype'); }")),e.appendChild(document.createTextNode("@font-face { font-family: '"+i.family+"'; font-style: italic; font-weight: bold; src: url('"+this.getFontURL(t,!0,!0)+"') format('truetype'); }"))}document.head.appendChild(e)},getFontURL:function(e,t,i){var n=e;return t&&i?n+="bi":t?n+="bd":i&&(n+="i"),"https://fontstatic.s3-accelerate.amazonaws.com/"+e+"/"+n+".ttf"},getMetrics:function(e,t,i){for(var n=0,r=0,o=0,a=1/i.unitsPerEm*t,s=i.stringToGlyphs(e.replace(/\s/g,"")),l=0;l<s.length;l++){var u=s[l];u.advanceWidth&&(o+=u.advanceWidth*a),l<s.length-1&&(kerningValue=i.getKerningValue(u,s[l+1]),o+=kerningValue*a),n=Math.max(n,u.yMax),r=Math.min(r,u.yMin)}var c=i.getPath(e,0,0,t);return{actualWidth:c.getBoundingBox().x2-c.getBoundingBox().x1,width:o,actualBoundingBoxAscent:n*a,actualBoundingBoxDescent:r*a,actualHeight:n*a-r*a,fontBoundingBoxAscent:i.ascender*a,fontBoundingBoxDescent:i.descender*a,fontHeight:i.ascender*a-i.descender*a}},globalKeypress:function(t){var i=t.keyCode;0==this.videoPlayerView.$el.find(".timer-pop-up").find(e(t.target)).length&&(!this.isMac&&46===i||this.isMac&&8===i)&&this.deleteClipOrEffectSelected()},deleteClipOrEffectSelected:function(){null!=this.currentSelectedBlur?this.deleteBlur():null!=this.currentSelectedSticker?this.deleteSticker():null!=this.currentSelectedCallout?this.deleteCallout():null!=this.currentSelectedText&&(this.videoPlayerView.$el.find(".se-text-editable").is(":visible")||this.deleteText())},setBorderForClipOnVideoSeek:function(){var e=this.getSelectedClipOrEffect();null!=e&&(null!=this.currentSelectedBlur?(this.videoPlayerView.$el.find("#se-effects-"+e.id).removeClass("black white"),this.setAdaptiveBorderForTarget(this.videoPlayerView.$el.find("#se-effects-"+e.id))):(this.videoPlayerView.$el.find("#se-component-"+e.id).removeClass("black white"),this.setAdaptiveBorderForTarget(this.videoPlayerView.$el.find("#se-component-"+e.id))))},getSelectedClipOrEffect:function(){var e=null!=this.currentSelectedText?this.currentSelectedText:null!=this.currentSelectedSticker?this.currentSelectedSticker:null!=this.currentSelectedCallout?this.currentSelectedCallout:void 0;if(null!=e)return this.getClipOf(e);if(null!=this.currentSelectedBlur){e=this.currentSelectedBlur;var i=(this.getClipOf(this.sessionDetails.primaryVideo)||{}).effects||[];return t.where(i,{id:Number(e)})[0]||{}}}})}.apply(t,n))||(e.exports=r)},function(e,t,i){var n,r;n=[i(14),i(16)],void 0===(r=function(e,t){return function(e){function t(e,t){return e.x(t.get(["showAsModal"],!1),t,{else:i,block:s},{})}function i(e,t){return e.w('<center class="hippo-progress-loader"><div class="hippo-progress-text" id="progressText"> Preparing File... </div>').x(t.get(["showHippoIcon"],!1),t,{else:n,block:r},{}).w("</center>")}function n(e,t){return e.w('<div class="hippo-branding-loader"><span></span><span></span><span></span><span></span><span></span></div>')}function r(e,t){return e.x(t.get(["isVirtualBg"],!1),t,{else:o,block:a},{}).w('<div class="hippo-progress-container text-left"><div class="hippo-progress-strip"></div><div class="hippo-progress-fill-strip" id="progressFillStrip"></div></div>')}function o(e,t){return e.w('<img class="hippo-progress-gif" src="/img/hippo-yoga.gif">')}function a(e,t){return e.w('<img class="hippo-progress-gif virtualbg-notify-img" src="/img/virtualbg-notify.png">')}function s(e,t){return e.w('<div class="modal-backdrop" id="progressBackdrop"><div class="large-4 large-offset-4 medium-6 medium-offset-3 hippo-progress"><center class="hippo-progress-loader"><div class="hippo-progress-text" id="progressText"> Preparing File... </div>').x(t.get(["showHippoIcon"],!1),t,{else:l,block:u},{}).w("</center></div></div>")}function l(e,t){return e.w('<div class="hippo-branding-loader"><span></span><span></span><span></span><span></span><span></span></div>')}function u(e,t){return e.x(t.get(["isVirtualBg"],!1),t,{else:c,block:d},{}).w('<div class="hippo-progress-container text-left"><div class="hippo-progress-strip"></div><div class="hippo-progress-fill-strip" id="progressFillStrip"></div></div>')}function c(e,t){return e.w('<img class="hippo-progress-gif" src="/img/hippo-yoga.gif">')}function d(e,t){return e.w('<img class="hippo-progress-gif virtualbg-notify-img" src="/img/virtualbg-notify.png">')}e.register("templates/component/hippo_yoga",t),t.__dustBody=!0,i.__dustBody=!0,n.__dustBody=!0,r.__dustBody=!0,o.__dustBody=!0,a.__dustBody=!0,s.__dustBody=!0,l.__dustBody=!0,u.__dustBody=!0,c.__dustBody=!0,d.__dustBody=!0}(e),function(t,i){var n;return e.render("templates/component/hippo_yoga",t,(function(e,t){if("function"==typeof i)try{i(e,t)}catch(e){}if(e)throw e;n=t})),n}}.apply(t,n))||(e.exports=r)},function(e,t,i){var n,r;n=[i(2),i(11),i(35),i(69),i(20)],void 0===(r=function(e,t,i,n,r){"use strict";return r=r.default,i.Model.extend({idAttribute:"id",defaults:{id:null},initialize:function(e){},url:function(){var e=this.attributes.id?this.attributes.id:"";return JSON.parse(n).getVideoCategories+(e?"/"+e:"")},parse:function(e){return e},getVideoCategories:function(e,t){r.call({url:JSON.parse(n).getAllVideoCategories,method:"GET",success:e,error:t})},getMultipleVideoCategories:function(e,t,i,o){r.call({url:JSON.parse(n).getMultipleCategoryVideos+e,method:"POST",data:t,success:i,error:o})},setDefaultVideoCategory:function(e,t,i,o,a){var s={set_default:i,from:t};r.call({url:JSON.parse(n).setDefaultVideoCategory+"/"+e,method:"PUT",data:s,success:o,error:a})},getVideoCategoriesWithToken:function(e,t,i){r.call({url:JSON.parse(n).getVideoCategoriesWithToken+"/"+e,method:"GET",success:t,error:i})},getCategoryDetails:function(e,t,i){r.call({url:JSON.parse(n).getVideoCategories+"/details/"+e,method:"GET",success:t,error:i})},getVideoGroups:function(e,t,i){r.call({url:JSON.parse(n).getVideoGroups+"?asset_id="+e,method:"GET",success:t,error:i})},getVideoCategoriesAndSelected:function(e,t,i){r.call({url:JSON.parse(n).selectedVideoCategories+"/"+e,method:"GET",success:t,error:i})},getVideosOfCategory:function(e,t,i,o){r.call({url:JSON.parse(n).getCategoryVideos+"/"+e+"/"+t,method:"GET",success:i,error:o})},getVideosOfCategoryWithToken:function(e,t,i,o,a){r.call({url:JSON.parse(n).getCategoryVideosWithToken+"/"+e+"/"+t+"/"+i,method:"GET",success:o,error:a})},assignCategories:function(e,t,i,o){var a=new FormData;a.append("asset_id",e),a.append("cat_ids",t),r.call({url:JSON.parse(n).assignCategories,method:"POST",data:a,contentType:!1,processData:!1,success:i,error:o})},assignGroups:function(e,t,i){r.call({url:JSON.parse(n).assignGroups,method:"POST",data:e,success:t,error:i})},assignVideos:function(e,t,i,o){var a=new FormData;a.append("asset_ids",e),a.append("cat_ids",t),r.call({url:JSON.parse(n).assignVideos,method:"POST",data:a,contentType:!1,processData:!1,success:i,error:o})},searchCategories:function(e,t,i,o,a){var s=new FormData;t&&s.append("search_token",e),s.append("is_search",t),s.append("order_type",i);var l=JSON.parse(n).createVideo+"/1/search_category";r.call({url:l,method:"POST",data:s,contentType:!1,processData:!1,success:o,error:a})},assignToTeacher:function(e,t,i,o){var a="asset_id="+e+"&token="+t;r.call({url:JSON.parse(n).createVideo+"/assign_to_teacher",method:"POST",data:a,success:i,error:o})},deleteVideoCategory:function(e,t,i){r.call({url:JSON.parse(n).deleteVideoCategory+"/"+e,method:"DELETE",success:t,error:i})},saveDocumentInfo:function(e,t,i){r.call({url:JSON.parse(n).saveDocumentInfo,method:"POST",data:e,success:t,error:i})},getUsersAndGroups:function(e,t){r.call({url:"/api/internal/get_user_and_group_list",method:"GET",success:e,error:t})},updatePinFolder:function(e,t,i){r.call({url:JSON.parse(n).updatePinFolder,method:"POST",data:e,success:t,error:i})}})}.apply(t,n))||(e.exports=r)},function(e,t,i){var n,r;n=[i(14),i(16)],void 0===(r=function(e,t){return function(e){function t(e,t){return e.w('<div class="container"><div class="row"><div class="large-8 large-offset-2 medium-10 medium-offset-1 small-12 import-media-container"><div class="import-header clearfix"><div class="pull-left"> ').h("eq",t,{else:i,block:n},{key:t.get(["type"],!1),value:"doc"},"h").w(' </div><div class="pull-right"> <img src="/svg/close-gray.svg" alt="close" id="closeImport"/> </div></div><div class="tab-container" id="tabContainer">').x(t.get(["fromVideoPages"],!1),t,{block:r},{}).x(t.get(["canShowImportFromLocal"],!1),t,{block:a},{}).x(t.get(["canShowVideoLibrary"],!1),t,{block:s},{}).x(t.get(["canShowRecentlyUsed"],!1),t,{block:l},{}).nx(t.get(["fromVideoPages"],!1),t,{block:u},{}).x(t.get(["canShowAudioLibrary"],!1),t,{block:d},{}).x(t.get(["canShowGdriveImport"],!1),t,{block:h},{}).x(t.get(["canImportImageFromLibrary"],!1),t,{block:p},{}).x(t.get(["canShowImageWebSearch"],!1),t,{block:f},{}).x(t.get(["canShowTestimonial"],!1),t,{block:g},{}).x(t.get(["canShowShopify"],!1),t,{block:m},{}).x(t.get(["canShowAddViaLink"],!1),t,{block:v},{}).x(t.get(["canShowCreateVideoOption"],!1),t,{block:y},{}).x(t.get(["canShowWebLink"],!1),t,{block:b},{}).w('</div><div class="import-body no-box-shadow">').p("templates/partials/import_from_local",t,t,{}).p("templates/partials/import_recently_used",t,t,{}).p("templates/partials/import_from_web",t,t,{}).p("templates/partials/import_from_library",t,t,{}).p("templates/partials/import_from_drive",t,t,{}).p("templates/partials/import_from_video_library",t,t,{}).p("templates/partials/import_from_shopify",t,t,{}).p("templates/partials/import_from_custom_link",t,t,{}).p("templates/partials/import_from_website_link",t,t,{}).nx(t.get(["handleOneFileUpload"],!1),t,{block:w},{}).w('<div id="importVideoFormContainer" class="hide"></div></div><div class="import-footer text-right clearfix"><div class="powered-by pull-left hide" id="footerPoweredBy"><span class="powered-by-label"> Powered by </span><img src="/svg/flickr-logo.svg" alt="Flickr" /><img src="/img/pexels-logo.png" alt="Pexels" /></div><div class="pull-left foot-note" id="footnote">').x(t.get(["handleOneFileUpload"],!1),t,{block:_},{}).w("<div>").h("eq",t,{else:T,block:C},{key:t.get(["type"],!1),value:"doc"},"h").w('</div></div><div class="pull-right"><button class="button wiz-secondary-btn wiz-new-secondary-btn radius" id="cancelImport"> ').f(t.get(["cancel"],!1),t,"h").w(' </button><button class="button wiz-primary-btn" id="import" disabled>').h("eq",t,{block:k},{key:t.get(["type"],!1),value:"video"},"h").h("eq",t,{block:x},{key:t.get(["type"],!1),value:"doc"},"h").w(" ").h("ne",t,{block:A},{key:t.get(["type"],!1),value:"video"},"h").w('</button><button class="button wiz-secondary-btn wiz-new-secondary-btn radius hide" id="cancelVideoForm"> ').f(t.get(["changeFile"],!1),t,"h").w(' </button><button class="button wiz-primary-btn hide" id="submitVideoForm"> ').f(t.get(["import"],!1),t,"h").w(" </button></div></div></div></div></div>")}function i(e,t){return e.w(" ").f(t.get(["title"],!1),t,"h").w(" ")}function n(e,t){return e.w(" ").f(t.get(["importDocument"],!1),t,"h").w(" ")}function r(e,t){return e.x(t.get(["canShowVideoLibraryMulti"],!1),t,{block:o},{})}function o(e,t){return e.w('<div class="tab" id="importVideoLibraryTabMulti" data-panel-id="importVideoLibraryl"> ').f(t.get(["importFromVideoLibraryMulti"],!1),t,"h").w(" </div>")}function a(e,t){return e.w('<div class="tab active" id="importLocalTab" data-panel-id="importFromLocal"> ').f(t.get(["importFromLocal"],!1),t,"h").w(" </div>")}function s(e,t){return e.w('<div class="tab" id="importVideoLibrarylTab" data-panel-id="importVideoLibraryl"> ').f(t.get(["importFromVideoLibrary"],!1),t,"h").w(" </div>")}function l(e,t){return e.w('<div class="tab" id="recentlyUsedTab" data-panel-id="importRecentlyUsed"> ').f(t.get(["recentlyUsed"],!1),t,"h").w(" </div>")}function u(e,t){return e.x(t.get(["canShowVideoLibraryMulti"],!1),t,{block:c},{})}function c(e,t){return e.w('<div class="tab" id="importVideoLibraryTabMulti" data-panel-id="importVideoLibraryl"> ').f(t.get(["importFromVideoLibraryMulti"],!1),t,"h").w(" </div>")}function d(e,t){return e.w('<div class="tab" id="importLibraryTab" data-panel-id="importFromLibrary"> ').f(t.get(["importFromLibrary"],!1),t,"h").w(" </div>")}function h(e,t){return e.w('<div class="tab" id="importDriveTab" data-panel-id="importFromDrive"> ').f(t.get(["importFromDrive"],!1),t,"h").w(" </div>")}function p(e,t){return e.w('<div class="tab" id="importImgLibTab" data-panel-id="importImageFromLibrary"> ').f(t.get(["importImageFromLib"],!1),t,"h").w(" </div>")}function f(e,t){return e.w('<div class="tab" id="importWebTab" data-panel-id="importFromWeb"> ').f(t.get(["searchFromWeb"],!1),t,"h").w(" </div>")}function g(e,t){return e.w('<div class="tab" id="importTestimonial" data-panel-id="importVideoLibraryl"> ').f(t.get(["importTestimonial"],!1),t,"h").w(" </div>")}function m(e,t){return e.w('<div class="tab" id="importShopifyTab" data-panel-id="importFromShopify"> ').f(t.get(["shopifyTitle"],!1),t,"h").w(" </div>")}function v(e,t){return e.w('<div class="tab" id="importViaLinkTab" data-panel-id="importFromLink"> ').f(t.get(["addViaLinkTitle"],!1),t,"h").w(" </div>")}function y(e,t){return e.w('<div class="additional-options-block"><a id="libraryRefresh" class="button wiz-border-button create-video-btn no-margin hide"><img class="reload-img" src="/svg/retake-orange.svg"></a><a id="createVideoFromImportBtn" class="button wiz-border-button create-video-btn no-margin" target="_blank" href="/video/record">').f(t.get(["createVideo"],!1),t,"h").w("</a></div>")}function b(e,t){return e.w('<div class="tab" id="importViaWebLink" data-panel-id="importFromWebLink"> ').f(t.get(["WebLinkTitle"],!1),t,"h").w(" </div>")}function w(e,t){return e.p("templates/partials/import_selected_drawer",t,t,{}).w('<div class="drawer-handle" id="openDrawHandle"><img src="/svg/arrow-inactive.svg" alt="Left" class="arrow-marker" /></div>')}function _(e,t){return e.w(" <span> ").f(t.get(["note"],!1),t,"h").w(": </span> ").h("eq",t,{else:S,block:E},{key:t.get(["type"],!1),value:"doc"},"h").w(" ")}function S(e,t){return e.w(" ").f(t.get(["importHelp"],!1),t,"h").w(" ")}function E(e,t){return e.w(" ").f(t.get(["importPDFOnly"],!1),t,"h").w("<b>").f(t.get(["videoLandingPages"],!1),t,"h").w("</b> ")}function T(e,t){return e.w(" ").f(t.get(["supports"],!1),t,"h").w(" ").f(t.get(["formatsList"],!1),t,"h").w(" ").f(t.get(["formatsWithMaxSize"],!1),t,"h").w(" ").f(t.get(["maxFileSize"],!1),t,"h").w(" MB")}function C(e,t){return e.f(t.get(["canBeUsedOnly"],!1),t,"h").w("<br>").f(t.get(["canBeUsedOnlyImage"],!1),t,"h")}function k(e,t){return e.f(t.get(["proceed"],!1),t,"h")}function x(e,t){return e.f(t.get(["proceed"],!1),t,"h")}function A(e,t){return e.h("ne",t,{block:P},{key:t.get(["type"],!1),value:"doc"},"h")}function P(e,t){return e.f(t.get(["import"],!1),t,"h")}e.register("templates/component/import_media",t),t.__dustBody=!0,i.__dustBody=!0,n.__dustBody=!0,r.__dustBody=!0,o.__dustBody=!0,a.__dustBody=!0,s.__dustBody=!0,l.__dustBody=!0,u.__dustBody=!0,c.__dustBody=!0,d.__dustBody=!0,h.__dustBody=!0,p.__dustBody=!0,f.__dustBody=!0,g.__dustBody=!0,m.__dustBody=!0,v.__dustBody=!0,y.__dustBody=!0,b.__dustBody=!0,w.__dustBody=!0,_.__dustBody=!0,S.__dustBody=!0,E.__dustBody=!0,T.__dustBody=!0,C.__dustBody=!0,k.__dustBody=!0,x.__dustBody=!0,A.__dustBody=!0,P.__dustBody=!0}(e),function(t,i){var n;return e.render("templates/component/import_media",t,(function(e,t){if("function"==typeof i)try{i(e,t)}catch(e){}if(e)throw e;n=t})),n}}.apply(t,n))||(e.exports=r)},function(e,t,i){var n,r;n=[i(14),i(16)],void 0===(r=function(e,t){return function(e){function t(e,t){return e.w('<div class="import-body-container import-video-form" id="importVideoForm"><div class="import-web-content image-gallery main-gallery custom-scroll"><form name="importVideoDetails" id="importVideoDetails"><div class="row"><div class="small-12 clearfix"><label class="small-3 inline cat-form-la pull-left"> ').x(t.get(["isMultipleImageImport"],!1),t,{else:i,block:n},{}).w(' </label><div class="small-8 pull-left image-gallery"><div class="image pull-left import-video-form-preview">').x(t.get(["thumbnail_url"],!1),t,{else:r,block:d},{}).w('</div><div class="pull-left desc-container"><label class="import-file-name"> ').x(t.get(["isMultipleImageImport"],!1),t,{else:h,block:p},{}).w("</label>").x(t.get(["isMultipleImageImport"],!1),t,{else:f,block:m},{}).w("</div></div></div>").x(t.get(["askVideoDetails"],!1),t,{block:v},{}).w('</div></form><div id="videoImportStatusLoading" class="hide"></div></div></div>')}function i(e,t){return e.w(" ").f(t.get(["selectedFile"],!1),t,"h").w(" ")}function n(e,t){return e.w(" ").f(t.get(["selectedFiles"],!1),t,"h").w(" ")}function r(e,t){return e.x(t.get(["isImagePreview"],!1),t,{else:o,block:c},{})}function o(e,t){return e.x(t.get(["isAudioPreview"],!1),t,{else:a,block:u},{})}function a(e,t){return e.x(t.get(["isVideoPreview"],!1),t,{else:s,block:l},{})}function s(e,t){return e.w('<img src="/img/film-hippo.png" alt="Video Thumbnail" class="gallery-view" />')}function l(e,t){return e.w('<video autoplay muted play><source src="').f(t.get(["preview_url"],!1),t,"h").w('" type="').f(t.get(["type"],!1),t,"h").w('"></video>')}function u(e,t){return e.w('<audio controls><source src="').f(t.get(["preview_url"],!1),t,"h").w('" type="').f(t.get(["type"],!1),t,"h").w('"></audio>')}function c(e,t){return e.w('<img src="').f(t.get(["preview_url"],!1),t,"h").w('" alt="Video Thumbnail" class="gallery-view" />')}function d(e,t){return e.w('<img src="').f(t.get(["thumbnail_url"],!1),t,"h").w('" alt="Video Thumbnail" class="gallery-view" />')}function h(e,t){return e.w(" ").f(t.get(["name"],!1),t,"h").w(" ")}function p(e,t){return e.w(" ").f(t.get(["totalFileNamesText"],!1),t,"h").w(" ")}function f(e,t){return e.x(t.get(["sizeFormatted"],!1),t,{block:g},{})}function g(e,t){return e.w('<label class="import-file-size"> ').f(t.get(["sizeFormatted"],!1),t,"h").w(" </label>")}function m(e,t){return e.w('<label class="import-file-size"> ').f(t.get(["totalFileCount"],!1),t,"h").w(" files </label>")}function v(e,t){return e.nx(t.get(["isMultipleImageImport"],!1),t,{block:y},{}).x(t.get(["isCategoryAvailable"],!1),t,{block:_},{}).w('<div class="small-12 clearfix"><label class="small-3 inline cat-form-la pull-left"> ').f(t.get(["addTags"],!1),t,"h").w(' </label><div class="small-8 pull-left"><div id="importVideoTags"></div></div></div>').nx(t.get(["isMultipleImageImport"],!1),t,{block:T},{})}function y(e,t){return e.w('<div class="small-12 clearfix"><label class="small-3 inline cat-form-la pull-left required-mark"> ').x(t.get(["isVideo"],!1),t,{else:b,block:w},{}).w(' </label><div class="small-8 pull-left"><input type="text" name="importVideoTitle" id="importVideoTitle" value="').f(t.get(["name"],!1),t,"h").w('"/></div></div>')}function b(e,t){return e.w(" ").f(t.get(["docTitle"],!1),t,"h").w(" ")}function w(e,t){return e.w(" ").f(t.get(["videoTitle"],!1),t,"h").w(" ")}function _(e,t){return e.w('<div class="small-12 clearfix"><label class="small-3 inline cat-form-la pull-left"> ').f(t.get(["addToCategory"],!1),t,"h").w(' </label><div class="small-8 pull-left"><select name="categories" multiple="multiple" id="importVideoCategories">').s(t.get(["categories"],!1),t,{block:S},{}).w("</select></div></div>")}function S(e,t){return e.w('<option value="').f(t.get(["id"],!1),t,"h").w('"').x(t.get(["is_default_category"],!1),t,{block:E},{}).w("> ").f(t.get(["name"],!1),t,"h").w(" </option>")}function E(e,t){return e.w(" selected")}function T(e,t){return e.w('<div class="small-12 clearfix"><label class="small-3 inline cat-form-la pull-left"> ').f(t.get(["description"],!1),t,"h").w(' </label><div class="small-8 pull-left"><textarea rows="5" name="importVideoDesc" id="importVideoDesc" placeholder="Add Description"></textarea></div></div>').x(t.get(["showPreserveTransparency"],!1),t,{block:C},{})}function C(e,t){return e.w('<div class="small-12 clearfix" id="preserveTransparencyContainer"><label class="small-3 inline cat-form-la pull-left"> ').f(t.get(["preserveTransparency"],!1),t,"h").w(' </label><div class="small-8 pull-left"><input class="wiz-checkbox-blue" type="checkbox" id="preserveTransparency"><label class="" for="preserveTransparency"></label></div></div>')}e.register("templates/partials/import_video_form",t),t.__dustBody=!0,i.__dustBody=!0,n.__dustBody=!0,r.__dustBody=!0,o.__dustBody=!0,a.__dustBody=!0,s.__dustBody=!0,l.__dustBody=!0,u.__dustBody=!0,c.__dustBody=!0,d.__dustBody=!0,h.__dustBody=!0,p.__dustBody=!0,f.__dustBody=!0,g.__dustBody=!0,m.__dustBody=!0,v.__dustBody=!0,y.__dustBody=!0,b.__dustBody=!0,w.__dustBody=!0,_.__dustBody=!0,S.__dustBody=!0,E.__dustBody=!0,T.__dustBody=!0,C.__dustBody=!0}(e),function(t,i){var n;return e.render("templates/partials/import_video_form",t,(function(e,t){if("function"==typeof i)try{i(e,t)}catch(e){}if(e)throw e;n=t})),n}}.apply(t,n))||(e.exports=r)},function(e,t,i){var n,r;n=[i(14),i(16)],void 0===(r=function(e,t){return function(e){function t(e,t){return e.w('<div class="simple-edit-container hide ').x(t.get(["integrationType"],!1),t,{block:i},{}).w('"><div class="simple-edit-controls"><div class="se-control-detail default-control-detail clearfix hide"><span class="info-text"></span></div>').h("ne",t,{block:n},{key:t.get(["trim"],!1),value:"false"},"h").h("ne",t,{block:o},{key:t.get(["crop"],!1),value:"false"},"h").h("ne",t,{block:a},{key:t.get(["image"],!1),value:"false"},"h").h("ne",t,{block:h},{key:t.get(["text"],!1),value:"false"},"h").h("ne",t,{block:v},{key:t.get(["stickers"],!1),value:"false"},"h").h("ne",t,{block:y},{key:t.get(["callout"],!1),value:"false"},"h").h("ne",t,{block:E},{key:t.get(["blur"],!1),value:"false"},"h").h("ne",t,{block:T},{key:t.get(["resize"],!1),value:"false"},"h").w('<div class="simple-edit-buttons-box ').x(t.get(["integrationType"],!1),t,{block:C},{}).w('">').h("ne",t,{block:k},{key:t.get(["trim"],!1),value:"false"},"h").h("ne",t,{block:A},{key:t.get(["crop"],!1),value:"false"},"h").nx(t.get(["fromQuickRecord"],!1),t,{block:I},{}).h("ne",t,{block:N},{key:t.get(["stickers"],!1),value:"false"},"h").h("ne",t,{block:M},{key:t.get(["callouts"],!1),value:"false"},"h").h("ne",t,{block:B},{key:t.get(["blur"],!1),value:"false"},"h").h("ne",t,{block:V},{key:t.get(["resize"],!1),value:"false"},"h").w('</div></div></div><div class="modal-backdrop image-upload-progress-container" id="imageUploadProgessContainer"><div class="text-center loading-container"><div class="progress-text" id="imageUploadProgressText"> </div></div></div>')}function i(e,t){return e.f(t.get(["integrationType"],!1),t,"h").w("-simple-edit")}function n(e,t){return e.w('<div class="se-control-detail clearfix trim-control-detail hide"><img class="ruler ruler-static" src="').f(t.get(["origin"],!1),t,"h").w('/img/ruler-two.png"><canvas class="ruler ruler-dynamic hide" width="1000" height="15"></canvas><input type="text" class="sliderValue" style="display:none" data-index="0" value="0" /><input type="text" class="sliderValue" style="display:none" data-index="1" value="0" /><div class="trim-slider" id="trimSlider"></div>').h("ne",t,{block:r},{key:t.get(["shouldHideTrimTimer"],!1),value:"true"},"h").w('<div class="trim-preview-container"><video class="trim-preview-video"></video></div><div class="preview-trim-arrow"></div></div>')}function r(e,t){return e.w('<div class="trim-before-container"><div class="trim-before-time-element"><div class="arrow right-arrow"></div><span class="trim-before-time"></span></div><div class="trim-before-pop"><span>').f(t.getPath(!1,["simpleEdit","trimStartTime"]),t,"h").w('</span><input type="text" class="trim-before-input"><div class="before-trim-div"><div class="arrow up-arrow trim-input-btn trim-input-btn-plus"></div><div class="arrow down-arrow trim-input-btn trim-input-btn-minus"></div></div><div class="trim-arrow"></div></div></div><div class="trim-after-container"><div class="trim-after-time-element"><div class="arrow left-arrow"></div><span class="trim-after-time"></span></div><div class="trim-after-pop"><span>').f(t.getPath(!1,["simpleEdit","trimEndTime"]),t,"h").w('</span><input type="text" class="trim-after-input"><div class="after-trim-div"><div class="arrow up-arrow trim-input-btn trim-input-btn-plus"></div><div class="arrow down-arrow trim-input-btn trim-input-btn-minus"></div></div><div class="trim-arrow"></div></div></div>')}function o(e,t){return e.w('<div class="se-control-detail clearfix crop-control-detail hide"><div class="pull-left reposition-webcam-container"><input type="checkbox" class="reposition-webcam wiz-checkbox-blue" id="move" checked /><label for="move">').f(t.getPath(!1,["simpleEdit","moveWebcam"]),t,"h").w('</label></div><div class="pull-right text-right"><a class="apply-crop apply-btn" id="cropApplyBtn">').f(t.getPath(!1,["simpleEdit","apply"]),t,"h").w('</a><a class="reset-crop reset-btn" id="cropResetBtn">').f(t.getPath(!1,["simpleEdit","reset"]),t,"h").w("</a></div></div>")}function a(e,t){return e.x(t.get(["isAddImageEnabled"],!1),t,{block:s},{})}function s(e,t){return e.w('<div class="se-control-detail clearfix addimage-control-detail hide">').nx(t.get(["fromQuickRecord"],!1),t,{else:l,block:c},{}).w('<div class="addimage-selected hide"><div class="left"><input type="checkbox" class="wiz-checkbox-blue" id="imageArLock" checked /><label for="imageArLock" class="image-ar-lock">').f(t.getPath(!1,["simpleEdit","lockAspectRatioResize"]),t,"h").w('</label></div><div class="left opacity-container"><span class="left">').f(t.getPath(!1,["simpleEdit","opacity"]),t,"h").w('</span><input class="left slider" type="range" min="0" max="100" id="imageOpacitySlider"><input class="left slider-ip" type="number" min="0" max="100" value="100" id="imageOpacityInput"></div><div class="right delete-btn-container"><div id="deleteImage" class="delete-btn">').f(t.getPath(!1,["simpleEdit","delete"]),t,"h").w("</div></div></div></div>")}function l(e,t){return e.w('\x3c!-- new quick record flow personalization --\x3e<div class="addimage-initial cpv-personalization hide"><div class="add-image-action left add-text hide">\t<img src="').f(t.get(["origin"],!1),t,"h").w('/svg/plus-ico-blue.svg"/><span id="addTextLink">\t').f(t.getPath(!1,["simpleEdit","addText"]),t,"h").w('\t</span>\t</div><div class="add-image-action left" id="addImageBtn"><img src="').f(t.get(["origin"],!1),t,"h").w('/svg/plus-ico-blue.svg"/><span>').f(t.getPath(!1,["simpleEdit","addImage"]),t,"h").w("</span></div>").x(t.get(["canShowPersonalization"],!1),t,{block:u},{}).w("</div>\x3c!-- end of new quick record flow personalization --\x3e")}function u(e,t){return e.w('<div class="add-image-action left" id="addPersonalizedImageBtn"><img src="').f(t.get(["origin"],!1),t,"h").w('/svg/plus-ico-blue.svg"/><span>').f(t.getPath(!1,["simpleEdit","addPersonalizedImage"]),t,"h").w('</span></div><div class="add-image-action left" id="addWebsiteImageBtn"><img src="').f(t.get(["origin"],!1),t,"h").w('/svg/plus-ico-blue.svg"/><span>').f(t.getPath(!1,["simpleEdit","addWebsiteImage"]),t,"h").w("</span></div>")}function c(e,t){return e.w('<div class="addimage-initial hide"><div class="add-image-action left add-text hide">\t<span id="addTextLink">\t').f(t.getPath(!1,["simpleEdit","addText"]),t,"h").w('\t</span>\t</div><div class="add-image-action left" id="addImageBtn"><span>').f(t.getPath(!1,["simpleEdit","addImage"]),t,"h").w("</span></div>").x(t.get(["canShowPersonalization"],!1),t,{block:d},{}).w("</div>")}function d(e,t){return e.w('<div class="add-image-action left" id="addPersonalizedImageBtn"><span>').f(t.getPath(!1,["simpleEdit","addPersonalizedImage"]),t,"h").w('</span></div><div class="left add-image-tooltip"><img src="').f(t.get(["origin"],!1),t,"h").w('/img/help.png"><div class="add-image-tooltip-content">').f(t.getPath(!1,["simpleEdit","addImageInfo"]),t,"h").w('<a href="https://help.hippovideo.io/support/solutions/articles/19000100178-image-personalization" target="_blank">').f(t.getPath(!1,["simpleEdit","learnMore"]),t,"h").w('</a></div></div><div class="add-image-action left" id="addWebsiteImageBtn"><span>').f(t.getPath(!1,["simpleEdit","addWebsiteImage"]),t,"h").w('</span></div><div class="left add-image-tooltip"><img src="').f(t.get(["origin"],!1),t,"h").w('/img/help.png"><div class="add-image-tooltip-content">').f(t.getPath(!1,["simpleEdit","addWebsiteImageInfo"]),t,"h").w('<a href="https://help.hippovideo.io/support/solutions/articles/19000100178-image-personalization" target="_blank">').f(t.getPath(!1,["simpleEdit","learnMore"]),t,"h").w("</a></div></div>")}function h(e,t){return e.w('<div class="se-control-detail clearfix addtext-control-detail hide"><div class="addtext-container"><div id="textPropertiesTab" style="display:none" class="sdk-top-wrap"><div class="sdk-text-wrap"><div class="padding-face se-font mf-custom-selector"><select class="se-text-properties se-font-selector"></select></div><div class="padding-face se-fontsize mf-custom-selector"><select class="se-text-properties se-fontsize-selector"><option value="15">15px</option><option value="17">17px</option><option value="20">20px</option><option value="25">25px</option><option value="35">35px</option><option value="40" selected>40px</option><option value="50">50px</option><option value="60">60px</option><option value="70">70px</option><option value="90">90px</option><option value="110">110px</option></select></div><div class="padding-face alignment-selector"><select class="se-text-properties se-textalign-selector"><option value="left">').f(t.getPath(!1,["simpleEdit","left"]),t,"h").w('</option><option value="center" selected>').f(t.getPath(!1,["simpleEdit","center"]),t,"h").w('</option><option value="right">').f(t.getPath(!1,["simpleEdit","right"]),t,"h").w('</option></select></div></div><div class="sdk-textstyle-wrap"><div class="se-bold-face"><input type="checkbox" id="c1" class="se-text-properties se-bold-toggle chk-btn" /><label for=\'c1\'><b>B</b></label></div><div class="italic-face"><input type="checkbox" id="c2" class="se-text-properties se-italic-toggle chk-btn" /><label for=\'c2\'><i>I</i></label></div><div class=""><div class="padding-face color-picker"><input type = "color" class="se-text-properties se-color-choose se-color-selector"/></div></div></div></div><div class="padding-face for-merge-field"><div class="mf-custom-selector mf-custom-selector-button merge-field-container">').x(t.get(["canShowPersonalization"],!1),t,{block:p},{}).w('</div><div class="padding-face se-add-text-btn text-right"><a class="add-text" id="addTextLink"><img src="').h("eq",t,{else:g,block:m},{key:t.get(["integrationType"],!1),value:"lessonly"},"h").w('" alt="plus" />').f(t.getPath(!1,["simpleEdit","addText"]),t,"h").w("</a></div></div></div></div>")}function p(e,t){return e.w('<div class="mf-selector"><select id="seMfSelector"><option selected>').f(t.getPath(!1,["simpleEdit","mergeFields"]),t,"h").w("</option>").s(t.get(["mfValues"],!1),t,{block:f},{}).w('</select></div><div class="text-right mf-label"><label><div><span class="mf-info-tooltip">').f(t.getPath(!1,["simpleEdit","mfInfoTooltip"]),t,"h").w('</span><img src="').f(t.get(["origin"],!1),t,"h").w('/svg/help1.svg" /></div></label></div>')}function f(e,t){return e.w("<option>").f(t.get(["mf"],!1),t,"h").w("</option>")}function g(e,t){return e.f(t.get(["origin"],!1),t,"h").w("/img/small-plus.png")}function m(e,t){return e.w("/img/small-plus-4a90e2.png")}function v(e,t){return e.w('<div class="se-control-detail clearfix addsticker-control-detail hide"><div class="addsticker-initial hide"><div class="sticker-btn-container clearfix"></div></div><div class="addsticker-selected hide"><div class=""><input type="checkbox" class="lock-aspect-ratio sticker-control wiz-checkbox-blue" id="sticker-lock" checked /><label for="sticker-lock">').f(t.getPath(!1,["simpleEdit","lockAspectRatioResize"]),t,"h").w('</label></div><div class=""><div class="text-right"><span>').f(t.getPath(!1,["simpleEdit","opacity"]),t,"h").w('</span></div><div class=""><select class="opacity-val sticker-control"><option value="0">0</option><option value="25">25</option><option value="50">50</option><option value="75">75</option><option value="100">100</option></select></div></div><div class="text-right"><a class="delete-sticker delete-label" id="deleteSticker">').f(t.getPath(!1,["simpleEdit","delete"]),t,"h").w("</a></div></div></div>")}function y(e,t){return e.w('<div class="se-control-detail clearfix addcallout-control-detail hide"><div class="addcallout-initial clearfix hide"><img class="callout-scroll-left pull-left" src="').h("eq",t,{else:b,block:w},{key:t.get(["integrationType"],!1),value:"lessonly"},"h").w('"><div class="callout-btn-scroll-container pull-left"><div class="callout-btn-container"></div></div><img class="callout-scroll-right pull-right" src="').h("eq",t,{else:_,block:S},{key:t.get(["integrationType"],!1),value:"lessonly"},"h").w('"><div class="callout-scroll-hide-layer"></div></div><div class="addcallout-selected hide"><div class=""><input type="checkbox" class="lock-aspect-ratio callout-control wiz-checkbox-blue" id="callout-lock" checked /><label for="callout-lock">').f(t.getPath(!1,["simpleEdit","lockAspectRatioResize"]),t,"h").w('</label></div><div class="se-callout-internal"><div class=""><span>').f(t.getPath(!1,["simpleEdit","opacity"]),t,"h").w('</span></div><div class=""><select class="opacity-val callout-control"><option value="0">0</option><option value="25">25</option><option value="50">50</option><option value="75">75</option><option value="100" selected>100</option></select></div></div><div class="se-callout-internal"><div class=""><span>').f(t.getPath(!1,["simpleEdit","color"]),t,"h").w('</span></div><div class=""><select class="callout-control callout-variation"><option value="0">').f(t.getPath(!1,["simpleEdit","default"]),t,"h").w('</option><option value="1">').f(t.getPath(!1,["simpleEdit","yellow"]),t,"h").w('</option><option value="2">').f(t.getPath(!1,["simpleEdit","orange"]),t,"h").w('</option><option value="3">').f(t.getPath(!1,["simpleEdit","green"]),t,"h").w('</option><option value="4">').f(t.getPath(!1,["simpleEdit","violet"]),t,"h").w('</option><option value="5">').f(t.getPath(!1,["simpleEdit","blue"]),t,"h").w('</option><option value="6">').f(t.getPath(!1,["simpleEdit","dark"]),t,"h").w('</option><option value="7">').f(t.getPath(!1,["simpleEdit","white"]),t,"h").w('</option></select></div></div><div class="text-right"><a class="delete-callout delete-label" id="deleteCallout">').f(t.getPath(!1,["simpleEdit","delete"]),t,"h").w("</a></div></div></div>")}function b(e,t){return e.f(t.get(["origin"],!1),t,"h").w("/img/sli-aro-left.png")}function w(e,t){return e.w("/img/sli-aro-left-4a90e2.png")}function _(e,t){return e.f(t.get(["origin"],!1),t,"h").w("/img/sli-aro-right.png")}function S(e,t){return e.w("/img/sli-aro-right-4a90e2.png")}function E(e,t){return e.w('<div class="se-control-detail clearfix blur-control-detail text-left hide"><div class="blur-initial hide" id="blurInitial">').f(t.getPath(!1,["simpleEdit","blurDescription"]),t,"h").w('<div class="outline-btn pull-right" id="applyBlur"> ').f(t.getPath(!1,["simpleEdit","addNewBlur"]),t,"h").w(' </div></div><div class="blur-selected clearfix hide" id="blurSelected"><div class="pull-left"><input type="checkbox" class="lock-aspect-ratio blur-control wiz-checkbox-blue" id="blurLock" /><label for="blurLock">').f(t.getPath(!1,["simpleEdit","lockAspectRatioResize"]),t,"h").w('</label></div><div class="pull-left content-box"><div class="props-label pull-left"><span> ').f(t.getPath(!1,["simpleEdit","strength"]),t,"h").w(' </span></div><div class="pull-left"><div class="blur-control" id="blurStrength"></div></div><div class="pull-left"><input type="number" step="1" min="0" max="100" value="25" class="blur-input" id="blurStrengthText" /></div></div><div class="pull-right text-right content-box"><a class="delete-blur delete-label" id="deleteblur">').f(t.getPath(!1,["simpleEdit","delete"]),t,"h").w("</a></div></div></div>")}function T(e,t){return e.w('<div class="se-resize-control-detail hide"><div class="se-control-detail clearfix primaryvid-control-detail hide"><input type="checkbox" class="lock-aspect-ratio primary-vid-control wiz-checkbox-blue" id="lock-three" checked /><label for="lock-three" class="cursor-pointer" >').f(t.getPath(!1,["simpleEdit","lockAspectRatioResize"]),t,"h").w('</label></div><div class="se-control-detail clearfix secondaryvid-control-detail hide"><input type="checkbox" class="lock-aspect-ratio secondary-vid-control wiz-checkbox-blue" id="lock-four" checked /><label for="lock-four">').f(t.getPath(!1,["simpleEdit","lockAspectRatioResize"]),t,"h").w("</label></div></div>")}function C(e,t){return e.f(t.get(["integrationType"],!1),t,"h").w("-se-icon-sprite")}function k(e,t){return e.w('<div class="wiz-simple-edit-btn trim-btn ').x(t.get(["isHideTrim"],!1),t,{block:x},{}).w('" id="trimBtn" tooltip="').f(t.getPath(!1,["simpleEdit","trim"]),t,"h").w('" tooltip-position="bottom"><span class="simple-edit-trim"></span></div>')}function x(e,t){return e.w(" disp-none ")}function A(e,t){return e.w('<div class="wiz-simple-edit-btn crop-btn ').x(t.get(["isHideCorp"],!1),t,{block:P},{}).w('" id="cropBtn" tooltip="').f(t.getPath(!1,["simpleEdit","crop"]),t,"h").w('" tooltip-position="bottom"><span class="simple-edit-crop"></span></div>')}function P(e,t){return e.w(" disp-none ")}function I(e,t){return e.h("ne",t,{block:R},{key:t.get(["text"],!1),value:"false"},"h").x(t.get(["isAddImageEnabled"],!1),t,{block:D},{})}function R(e,t){return e.w('<div class="wiz-simple-edit-btn add-text-btn" id="addTextBtn" tooltip="').f(t.getPath(!1,["simpleEdit","text"]),t,"h").w('" tooltip-position="bottom"><span class="simple-edit-text"></span></div>')}function D(e,t){return e.h("ne",t,{block:O},{key:t.get(["image"],!1),value:"false"},"h")}function O(e,t){return e.w('<div class="wiz-simple-edit-btn add-image-btn" id="addImageMenuBtn" tooltip="').f(t.getPath(!1,["simpleEdit","image"]),t,"h").w('" tooltip-position="bottom"><span class="simple-edit-image-personalisation"></span></div>')}function N(e,t){return e.w('<div class="wiz-simple-edit-btn add-stickers-btn ').x(t.get(["isHideStickers"],!1),t,{block:L},{}).w('" id="addStickersBtn" tooltip="').f(t.getPath(!1,["simpleEdit","emoji"]),t,"h").w('" tooltip-position="bottom"><span class="simple-edit-sticker"></span></div>')}function L(e,t){return e.w(" disp-none ")}function M(e,t){return e.w('<div class="wiz-simple-edit-btn add-callouts-btn ').x(t.get(["isHideCallouts"],!1),t,{block:F},{}).w('" id="addCalloutsBtn" tooltip="').f(t.getPath(!1,["simpleEdit","callout"]),t,"h").w('" tooltip-position="bottom"><span class="simple-edit-callout"></span></div>')}function F(e,t){return e.w(" disp-none ")}function B(e,t){return e.w('<div class="wiz-simple-edit-btn add-blur-btn ').x(t.get(["isHideBlur"],!1),t,{block:U},{}).w('" id="blurBtn" tooltip="').f(t.getPath(!1,["simpleEdit","blur"]),t,"h").w('" tooltip-position="bottom"><span class="simple-edit-blur"></span></div>')}function U(e,t){return e.w(" disp-none ")}function V(e,t){return e.w('<div class="wiz-simple-edit-btn resize-draggable-btn ').x(t.get(["isResizableNotAllowed"],!1),t,{block:z},{}).w('" id="resizeDragBtn" tooltip="').f(t.getPath(!1,["simpleEdit","resize"]),t,"h").w('" tooltip-position="bottom"><span class="simple-edit-resize"></span></div>')}function z(e,t){return e.w(" disp-none ")}e.register("templates/simple_edit/sdk_controls",t),t.__dustBody=!0,i.__dustBody=!0,n.__dustBody=!0,r.__dustBody=!0,o.__dustBody=!0,a.__dustBody=!0,s.__dustBody=!0,l.__dustBody=!0,u.__dustBody=!0,c.__dustBody=!0,d.__dustBody=!0,h.__dustBody=!0,p.__dustBody=!0,f.__dustBody=!0,g.__dustBody=!0,m.__dustBody=!0,v.__dustBody=!0,y.__dustBody=!0,b.__dustBody=!0,w.__dustBody=!0,_.__dustBody=!0,S.__dustBody=!0,E.__dustBody=!0,T.__dustBody=!0,C.__dustBody=!0,k.__dustBody=!0,x.__dustBody=!0,A.__dustBody=!0,P.__dustBody=!0,I.__dustBody=!0,R.__dustBody=!0,D.__dustBody=!0,O.__dustBody=!0,N.__dustBody=!0,L.__dustBody=!0,M.__dustBody=!0,F.__dustBody=!0,B.__dustBody=!0,U.__dustBody=!0,V.__dustBody=!0,z.__dustBody=!0}(e),function(t,i){var n;return e.render("templates/simple_edit/sdk_controls",t,(function(e,t){if("function"==typeof i)try{i(e,t)}catch(e){}if(e)throw e;n=t})),n}}.apply(t,n))||(e.exports=r)},function(e,t,i){"use strict";i.d(t,"a",(function(){return u}));var n,r=i(1),o=i.n(r),a=i(4),s=i.n(a),l=i(3),u=l.c.div(n||(n=s()(["\n margin-top: ",";\n margin-left: auto;\n margin-right: auto;\n\n /* Because the css of image-upload-progress-container is not defined properly and you will need to import entire wiz-delivery.scss file for this to work */\n .image-upload-progress-container {\n display: none;\n }\n"])),function(e){var t=e.showSimpleEditor;return o()(this,void 0),t?"0":"38px"}.bind(void 0))},function(e,t,i){"use strict";i.d(t,"a",(function(){return x}));var n,r,o=i(1),a=i.n(o),s=i(0),l=i.n(s),u=i(57),c=i.n(u),d=i(3),h=i(4),p=i.n(h),f=d.c.div(n||(n=p()(["\n .progress-widget-header {\n position: relative;\n display: flex;\n align-items: center;\n width: 80%;\n border-bottom: 1px solid #E6E6E6;\n margin: 0 auto;\n &-progress-warpper {\n position: relative;\n }\n &-status-text {\n color: #000000;\n font: normal normal 600 14px/19px Open Sans;\n }\n &-percent-text {\n font: normal normal 600 14px/19px Open Sans;\n color: #000000;\n position: absolute;\n right: 0;\n }\n img {\n position: absolute;\n top: 11px;\n left: 10px;\n }\n }\n .progress-widget-content {\n width: 80%;\n margin: 0 auto;\n padding: 10px 10px;\n font: normal normal normal 12px/17px Open Sans;\n color: #6F6F6F;\n }\n"]))),g=d.c.div(r||(r=p()(["\n svg {\n width: 30px;\n height: 28px;\n .bg {\n fill: none;\n stroke-width: 2px;\n stroke: #E6E6E6;\n }\n .progress {\n fill: none;\n stroke-width: 2px;\n stroke: #F47A58;\n stroke-linecap: round;\n stroke-dasharray: 62.36;\n transform: rotate(-90deg);\n transform-origin: 50% 50%;\n stroke-dashoffset: ",";\n transition: stroke-dashoffset 1s ease-in;\n }\n }\n"])),function(e){return a()(this,void 0),isNaN(e.progress)?"62":e.progress}.bind(void 0));function m(e){var t=this,i=e.progressPercent,n=void 0===i?0:i,r=Object(s.useMemo)(function(){return a()(this,t),62-n/100*62}.bind(this),[n]);return l.a.createElement(g,{progress:r},l.a.createElement("svg",null,l.a.createElement("circle",{className:"bg",cx:"15",cy:"15",r:"10"}),l.a.createElement("circle",{className:"progress two",cx:"15",cy:"15",r:"10"})))}var v,y=i(6),b={completedPercent:0,type:"upload"};function w(e){var t=this,i=e.recorder,n=e.onUploadComplete,r=e.onUploadError,o=Object(s.useState)(b),u=o[0],c=o[1],d=Object(s.useRef)(),h=Object(y.a)(u);return Object(s.useEffect)(function(){var e=this;a()(this,t),console.log("progressFetchInterval.current ",d.current),d.current||(d.current=setInterval(function(){var t=this;a()(this,e);try{i.getUploadDetails().then(function(e){return a()(this,t),e&&e.completed?(n&&n(),clearInterval(d.current),void(d.current=null)):e&&e.error?(clearInterval(d.current),d.current=null,void r(e.errorType)):void c(e)}.bind(this)).catch(function(e){a()(this,t),console.error("UPLOAD STATUS FETCH ERROR ",e),clearInterval(d.current),d.current=null}.bind(this))}catch(e){console.error("UPLOAD PROGRESS EX ",e),clearInterval(d.current),d.current=null}}.bind(this),1e3),function(){a()(this,e),clearInterval(d.current),d.current=null}.bind(this))}.bind(this)),l.a.createElement(f,null,l.a.createElement("div",{className:"progress-widget-header"},l.a.createElement("div",{className:"progress-widget-header-progress-warpper"},l.a.createElement(m,{progressPercent:u.completedPercent}),l.a.createElement("img",{src:Object(y.e)("/svg/rapi/webcam-icon.svg")})),l.a.createElement("div",{className:"progress-widget-header-status-text"},"Uploading video"),l.a.createElement("div",{className:"progress-widget-header-percent-text"},u.completedPercent,"%")),l.a.createElement("div",{className:"progress-widget-content"},l.a.createElement("div",null,h)))}var _,S=d.c.div(v||(v=p()(["\n margin: 0 auto;\n width: 90%;\n .hv-upload-error-screen-header {\n display: flex;\n align-items: center;\n padding-bottom: 10px;\n padding-top: 20px;\n border-bottom: 1px solid #e6e6e6;\n img {\n margin-right: 5px;\n }\n div {\n font: normal normal 600 14px/19px Open Sans;\n }\n }\n\n .hv-upload-error-screen-content {\n &-text {\n font: normal normal normal 12px/17px Open Sans;\n color: #212121;\n padding-top: 10px;\n }\n &-options-wrapper {\n text-align: center;\n padding: 20px 0px;\n }\n }\n"]))),E=i(18);function T(e){var t=this,i=e.downloadSources,n=e.onRetryUpload,r=function(){a()(this,t);var e=[];if(i)for(var n in i){var r=i[n];e.push({link:r,linkType:"download",downloadName:"Testing the name",linkName:"Download ".concat(n," source")})}return e}.bind(this);return l.a.createElement(S,null,l.a.createElement("div",{className:"hv-upload-error-screen-header"},l.a.createElement("img",{src:Object(y.e)("/svg/rapi/error-circle-red.svg")}),l.a.createElement("div",null,"Upload Failed")),l.a.createElement("div",{className:"hv-upload-error-screen-content"},l.a.createElement("div",null,l.a.createElement("div",{className:"hv-upload-error-screen-content-text"},"Your video upload has failed! Below are the few options you can try."),l.a.createElement("div",{className:"hv-upload-error-screen-content-options-wrapper"},l.a.createElement(E.f,{style:{marginRight:"10px"},icon:Object(y.e)("/svg/rapi/download-icon.svg"),text:"Download Video",options:r(),buttonFeature:E.b.DROPDOWN,dropdownPosition:E.e.TOP}),l.a.createElement(E.f,{text:"Retry Upload",onClickHandler:n})))))}var C=d.c.div(_||(_=p()(["\n max-width: 400px;\n min-width: 300px;\n border: 1px solid #E6E6E6;\n background-color: #ffffff;\n box-shadow: 0px 8px 12px #0000001A;\n border-radius: 8px;\n"])));function k(e){var t=this,i=e.recorder,n=e.onUploadComplete,r=Object(s.useState)(!1),o=r[0],u=r[1],c=Object(s.useRef)(),d=function(e){a()(this,t),console.log("SETTING UPLOAD ERROR >>> ",e),c.current=i.getRecordingObjectUrls(),console.log("SETTING UPLOAD ERROR >>> ",c.current),u(e)}.bind(this),h=function(){a()(this,t),i.retryUpload(),u(!1)}.bind(this);return l.a.createElement(C,null,o?l.a.createElement(T,{downloadSources:c.current,onRetryUpload:h}):l.a.createElement(w,{recorder:i,onUploadComplete:n,onUploadError:d}))}function x(e,t){var i=P();c.a.render(l.a.createElement(d.a,{theme:t},l.a.createElement(k,{recorder:e,onUploadComplete:A})),i)}var A=function(){a()(this,void 0),c.a.unmountComponentAtNode(document.getElementsByClassName("hv-upload-progress-widget")[0])}.bind(void 0),P=function(){if(a()(this,void 0),document.getElementsByClassName("hv-upload-progress-widget").length>0)return document.getElementsByClassName("hv-upload-progress-widget")[0];var e=document.createElement("div");return e.className="hv-upload-progress-widget",e.style="position: fixed;bottom: 20px;right: 20px;",document.body.appendChild(e),e}.bind(void 0)},function(e,t,i){"use strict";i.d(t,"a",(function(){return m}));var n,r=i(1),o=i.n(r),a=i(0),s=i.n(a),l=i(57),u=i.n(l),c=i(194),d=i(195),h=i(4),p=i.n(h),f=i(3).c.div(n||(n=p()(["\n position: fixed;\n width: 320px;\n bottom: 0;\n left: 5px;\n z-index: 100;\n"])));function g(e){var t=e.stream,i=Object(a.useRef)(),n=Object(a.useRef)();return window.videoPreviewRef=i,window.lightingCanvasRef=n,s.a.createElement(f,null,s.a.createElement(c.a,{stream:t,ref:i}),t&&s.a.createElement(d.a,{ref:n}))}function m(e){var t=v();console.log("ROOT ELEMENT ",t),u.a.render(s.a.createElement(g,{stream:e}),t)}var v=function(){if(o()(this,void 0),document.getElementsByClassName("hv-rapi-webcam-preview").length>0)return document.getElementsByClassName("hv-rapi-webcam-preview")[0];var e=document.createElement("div");return e.className="hv-rapi-webcam-preview",document.body.appendChild(e),e}.bind(void 0)},function(e,t,i){"use strict";i.r(t),function(e){i.d(t,"removeWidget",(function(){return F})),i.d(t,"initialize",(function(){return B})),i.d(t,"availableRecordingSupport",(function(){return V})),i.d(t,"RecorderWidget",(function(){return H})),i.d(t,"ImportWidget",(function(){return j}));i(24),i(77);var n=i(49),r=i.n(n),o=i(54),a=i.n(o),s=i(41),l=i.n(s),u=i(37),c=i.n(u),d=i(38),h=i.n(d),p=i(360),f=i.n(p),g=i(1),m=i.n(g),v=i(254),y=i.n(v),b=(i(66),i(52),i(106),i(221),i(0)),w=i.n(b),_=i(57),S=i.n(_),E=i(26),T=i(5),C=i(190),k=i(208),x=i(401),A=i(400),P=i(6);function I(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var i,n=l()(e);if(t){var r=l()(this).constructor;i=Reflect.construct(n,arguments,r)}else i=n.apply(this,arguments);return a()(this,i)}}var R,D=["sdk_loaded","record_initiated","record_started","record_details","record_paused","record_resumed","record_stopped","record_aborted","record_error","video_cancelled","video_submitted","import_progress","import_complete","import_failed","source_uploaded"],O=!1,N={},L={screen:"screenRecord",webcam:"webCam",system_audio:"systemAudio",tab_recording:"tabRecording",separate_layer:"separateLayer",from_popup:"fromPopup",aspect_ratio:"aspectRatio",record_config:"recordConfig"};function M(){var e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",t="";window&&window.performance&&(t="".concat(Math.round(window.performance.now())));for(var i=e.length,n=0;n<10;n++)t+=e.charAt(Math.floor(Math.random()*i));return t}var F=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document.getElementById("recorder1");m()(this,void 0);try{S.a.unmountComponentAtNode(e)}catch(e){}}.bind(void 0);function B(e,t){return U.apply(this,arguments)}function U(){return(U=f()(y.a.mark((function e(t,i){var n,r,o,a,s,l,u,c,d,h,p,f,g,m;return y.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t){e.next=3;break}return i&&i(null,{error:"INVALID_CONFIGURATION",message:"The configuration passed is invalid"}),e.abrupt("return");case 3:if(n=t.token,r=t.token_type,o=void 0===r?T.e.RECORDER_SDK_TOKEN:r,a=t.environment,s=t.integration_type,l=void 0===s?"generic_recorder":s,window._HVDomain=window._HVDomain||"https://www.hippovideo.io",n){e.next=8;break}return i&&i(null,{error:"TOKEN_NOT_FOUND",message:"The token was not passed in the method"}),e.abrupt("return");case 8:return u=new C.a({token:n,tokenType:o}),e.next=11,u.authenticateToken();case 11:if(c=e.sent,d=c[0],h=c[1],!d){e.next=26;break}if(p=d.data,f=p.user_id,console.log("SUCCESS ",d),!p.error){e.next=21;break}return i&&i(null,p),e.abrupt("return");case 21:g=M(),N[g]={token:n,userId:f,environment:a,initialized:!0,tokenType:o},J(l),K(n),i&&i({key:g},null);case 26:if(!h){e.next=31;break}return console.log("ERROR ",h),m={error:"NETWORK_ERROR",message:"There was a network error. Please check network connection and try again"},i&&i(null,m),e.abrupt("return");case 31:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function V(){var e=Object(E.f)();return e.recording&&delete e.recording.system_audio,console.log("Recording capabilities ",e.recording,e.constraints),e}var z=function(){function t(e,i){var n=this,r=i.type,o=i.settings,a=void 0===o?{}:o;i.recorder_events;if(c()(this,t),!N.hasOwnProperty(e))throw new Error("INVALID_KEY");var s=a.extensionless,l=a.inline;if(this.recordingInProgress=!1,this.recorderSettings=a,this.eventCallbackMap={},N[e].initialized){if(window.HippoVideo||(window.HippoVideo={}),this.eventListenerClass="hvr-evl-".concat((new Date).getTime()),this.recorderClassName="hv-recorder-".concat((new Date).getTime()),this.targetElement,this.extensionless=s,l){var u=l.element_id,d=l.element;if(u&&(this.targetElement=document.getElementById(u)),d&&(this.targetElement=d),!this.targetElement&&document.getElementsByTagName("hippo-video-recorder")[0]&&(this.targetElement=document.getElementsByTagName("hippo-video-recorder")[0]),!this.targetElement)return void Y(this.eventCallbackMap,"record_error",{error:"inline_element_not_provided",message:'Parent element for adding recorder not found. Please pass the element id or element or set config "popup" as true.'})}else this.targetElement=(h="hvr-popup-".concat((new Date).getTime()),(p=document.createElement("div")).setAttribute("id",h),p.style.cssText="display:none;z-index: 100;position: absolute;width: 100%;height: 100%;top: 0;left: 0;justify-content: center;align-items: center;background: rgba(0,0,0,0.72);",document.body.appendChild(p),p),this.popupElement=this.targetElement;var h,p;console.log("ELEMENT ",this.targetElement,this.popupElementId),F(this.targetElement),this.targetElement.innerHTML="",S.a.render(w.a.createElement(k.b,{settings:a,userId:N[e].userId,type:r,token:N[e].token,recorderClassName:this.recorderClassName,eventListenerClass:this.eventListenerClass,eventCallback:function(e){return m()(this,n),this._cb(e)}.bind(this)}),this.targetElement)}else Y(this.eventCallbackMap,"record_error",{error:"recorder_not_initialized",message:"Recorder not initialized. Please call initialize method first."})}return h()(t,[{key:"open",value:function(){ee(this.eventListenerClass,"open_widget"),this.popupElement&&(this.popupElement.style.display="flex")}},{key:"remove",value:function(){F(this.targetElement),this.popupElement&&(this.popupElement.style.display="none")}},{key:"on",value:function(e,t){D.includes(e)&&(this.eventCallbackMap[e]=t),"sdk_loaded"===e&&this.sdkLoaded&&this.eventCallbackMap[e]()}},{key:"getPageUrl",value:function(){console.log("PAGE URL IS ",window.location.href)}},{key:"_cb",value:function(t){if(console.log("EVENT CALLBACK ",t,this.eventListenerClass),Y(this.eventCallbackMap,t.type,t.detail),"sdk_loaded"===t.type&&(this.sdkLoaded=!0),"record_details"===t.type&&console.log("RECORDING DETAILS ",t.detail),"_record_started"===t.type){var i=t.detail||{};this.recordingInProgress=!0,i.showWebcamPreview&&X(i.stream),i.showMarkupTools&&(n=this.recordingConfiguration,r=this.eventListenerClass,function(t,i){e('<div class="hv-focus-overlay" id="hvOverlayDiv" style="display: none;"> <div id="hvOverlayCircle"></div> </div>').appendTo("body"),e('<div id="hvHighLightDiv" class="hv-highlight-div" style="pointer-events: none">').appendTo("body"),e('<canvas id="hvCanvas" style="opacity:0.6;position: absolute;top: 0;height: 100%;left: 0;background-color: transparent;width: 100%;"></canvas>').appendTo("body"),function(t,i){e('<style>#hippo-overlay{\r\n\tposition: relative;\r\n\tz-index: 2555555;\r\n}\r\n#hvStop {\r\nmargin-bottom: 3px;\r\n}\r\n#hvPen{\r\nmargin-bottom: 2px;\r\n}\r\n#hvFocusArea{\r\nmargin-bottom: 2px;\r\n}\r\n#hvEraser {\r\nmargin-bottom: 2px;\r\n}\r\n#hvClearScreen{\r\nmargin-bottom: 5px;\r\n}\r\n#hippo-overlay-screenrecord{\r\n\tposition: fixed;\r\n\tleft: 0px;\r\n\tbottom: 0px;\r\n\tdisplay: none;\r\n\tborder: 0px solid gray;\r\n\tborder-radius: 5px !important;\r\n}\r\n#hippo-overlay-time {\r\n\tposition: fixed;\r\n\ttext-align: center;\r\n\ttop: 30%;\r\n\tleft:41.5%;\r\n\twidth: 250px;\r\n\theight:250px;\r\n\tborder-radius: 50%;\r\n\tdisplay: none;\r\n\tbackground-color: rgba(0, 0, 0, 0.5);\r\n\tborder:5px solid #f47a58;\r\n\tfont-family: \'Open Sans\';\r\n background-repeat: no-repeat;\r\n background-position: 50% 50%;\r\n\tbox-sizing: content-box;\r\n}\r\n#hippo-overlay-time span\r\n{\r\n\tfont-size: 3.750em !important;\r\n\tcolor: #f47a58 !important;\r\n\ttop: 85px;\r\n\tleft: 110px;\r\n\tposition: absolute;\r\n\tmargin-left:-11px;\r\n\tline-height: normal;\r\n}\r\n.hippo-embed-countdown {\r\n\tbackground-image: none !important;\r\n\tbackground-color: #fff !important;\r\n\tborder: 11px solid #000 !important;\r\n}\r\n.hippo-embed-countdown #countdown {\r\n\tposition: unset !important;\r\n\tmargin-left: 0 !important;\r\n\tdisplay: inline-block !important;\r\n\tmargin-left: 0 !important;\r\n\tfont-family: sans-serif !important;\r\n\tfont-weight: 600 !important;\r\n\tfont-size: 91px !important;\r\n\tmargin-top: 79px !important;\r\n\tcolor: #000 !important;\r\n\tfont-family: "proxima-nova", "Open Sans", "Helvetica Neue", sans-serif;\r\n}\r\n.hippo-video-countdown {\r\n\tbackground-image: none !important;\r\n\tbackground-color: #fff !important;}\r\n.hippo-video-countdown #countdown {\r\n\tposition: unset !important;\r\n\tmargin-left: 0 !important;\r\n\tdisplay: inline-block !important;\r\n\tmargin-left: 0 !important;\r\n\tfont-family: sans-serif !important;\r\n\tfont-weight: 600 !important;\r\n\tfont-size: 91px !important;\r\n\tmargin-top: 79px !important;\r\n\tfont-family: "proxima-nova", "Open Sans", "Helvetica Neue", sans-serif;\r\n}\r\n\r\n.hv-focus-overlay {\r\n top: 0;\r\n left: 0;\r\n position: absolute;\r\n width: 100%;\r\n height: 100%;\r\n pointer-events: none;\r\n z-index: 10000;\r\n}\r\n\r\n#hvOverlayCircle:after {\r\n content: \'\';\r\n position: absolute;\r\n z-index: 10000000000000000;\r\n left: -75px;\r\n top: -75px;\r\n border-radius: 100%;\r\n width: 150px;\r\n height: 150px;\r\n box-shadow: 0px 0px 0px 3000px rgba(0, 0, 0, 0.39);\r\n pointer-events: none;\r\n}\r\n\r\n.hv-highlight-div{\r\n position: absolute;\r\n width: 100%;\r\n height: 100%;\r\n top: 0;\r\n z-index: 10000;\r\n}\r\n\r\n/*Highlight Featues Panel CSS*/\r\n.hv-act-comp-bottom-right {\r\n width: 333px; \r\n position: fixed;\r\n right: 30px;\r\n bottom: 0;\r\n -background-color: #424242;\r\n background-color: rgba(66, 66, 66, 0.8);\r\n max-height: 43px;\r\n -overflow: hidden;\r\n border: 0;\r\n border-radius: 5px 5px 0 0;\r\n cursor: default;\r\n z-index: 10000001;\r\n}\r\n\r\n.hv-act-comp-bottom-left {\r\n position: fixed;\r\n left: 30px;\r\n bottom: 0;\r\n -background-color: #424242;\r\n background-color: rgba(66, 66, 66, 0.8);\r\n max-height: 43px;\r\n -overflow: hidden;\r\n border: 0;\r\n border-radius: 5px 5px 0 0;\r\n cursor: default;\r\n z-index: 10000001;\r\n}\r\n\r\n.hv-highlight-options-div {\r\n -width: 330px;\r\n transition: all 300ms ease-out;\r\n}\r\n.hv-close-highlight-feature-panel {width: 0px;}\r\n/*Highlight Featues Panel CSS Ends*/\r\n\r\n\r\n/*Highlight option Icons and its effects*/\r\n.hv-icon-out-space {\r\n display: inline-block;\r\n padding-top: 13px;\r\n padding-right: 15px;\r\n padding-left: 15px;\r\n padding-bottom: 15px;\r\n cursor: pointer;\r\n}\r\n.hv-icon-out-space img {cursor: pointer;}\r\n.hv-icon-out-space:hover {background-color: #313131;}\r\n\r\n.hv-icon-out-disable {\r\n position: relative;\r\n top: -15px;\r\n opacity: .3;\r\n}\r\n\r\n.hv-icon-out-disable:hover {\r\n background-color: rgba(66, 66, 66, 0.8) !important;\r\n}\r\n\r\n.hv-pause-play {border-radius: 5px 0px 0px 0px;}\r\n\r\n.hv-togarrow-spacer {\r\n position: absolute;\r\n background-color: transparent;\r\n border-left: 1px solid;\r\n display: inline-block;\r\n border-radius: 0 5px 0px 0;\r\n cursor: pointer;\r\n}\r\n.hv-togarrow {padding: 16px 5px 19px 5px;}\r\n.hv-togarrow-left {\r\n padding: 16px 5px 19px 5px;\r\n transform: rotate(-180deg);\r\n}\r\n.hv-togarrow:hover {background-color: #313131;}\r\n\r\n.hv-active-tool {background-color: #313131;}\r\n/*Highlight option Icons and its effects ends*/\r\n\r\n/*Collape*/\r\n.hv-collapsed {\r\n width: 45px;\r\n\r\n background-color: rgba(49, 49, 49, 0.85);\r\n border-radius: 5px;\r\n padding: 10px;\r\n position: absolute;\r\n top: 0;\r\n right: 0px;\r\n max-height: 43px;\r\n cursor: pointer;\r\n transition: all 300ms ease-out;\r\n}\r\n.hv-collapsed-move {right: -30px;}\r\n/*Collape Ends*/\r\n\r\n/*Tooltip Panel*/\r\n.hv-tooltip-panel {\r\n width: 300px;\r\n -background-color: #313131;\r\n background-color: rgba(49, 49, 49, 0.85);\r\n padding: 12px 0px;\r\n border-radius: 5px 5px 0 0;\r\n font-size: 13px;\r\n font-weight: lighter;\r\n color: #ffffff;\r\n text-align: center;\r\n letter-spacing: 0.3px;\r\n margin: 0 auto;\r\n position: absolute;\r\n bottom: 43px;\r\n left: 0;\r\n right: 0;\r\n transition: all 300ms ease-out;\r\n line-height: 17px;\r\n white-space: pre-line;\r\n}\r\n.hv-tooltip-panel-toggle {bottom: -50px;}\r\n/*Tooltip Panel Ends*/\r\n\r\n.disp-none {display: none !important;}\r\n\r\n/*Color Palet*/\r\n.hv-choose-color-panel {\r\n background-color: #313131;\r\n border-radius: 5px 5px 0 0;\r\n max-height: 46px;\r\n overflow: hidden;\r\n position: absolute;\r\n top: -48px;\r\n left: 99px;\r\n line-height: 0;\r\n padding: 13px 5px 13px 10px;\r\n cursor: default;\r\n transition: top 300ms ease;\r\n display: none;\r\n}\r\n.hv-change-color-circle {\r\n width: 20px !important;\r\n height: 20px !important;\r\n border-radius: 100%;\r\n border: 1px solid transparent;\r\n margin-right: 5px;\r\n display: inline-block;\r\n cursor: pointer;\r\n}\r\n\r\n.hv-remove-highlight-div {\r\n\tposition: absolute;\r\n\twidth: 100%;\r\n\theight: 100%;\r\n\ttop: 0;\r\n\tz-index: 10000;\r\n\tpointer-events: none !important;\r\n}\r\n\r\n.hv-add-highlight-div {\r\n\tposition: absolute;\r\n\twidth: 100%;\r\n\theight: 100%;\r\n\ttop: 0;\r\n\tz-index: 10000;\r\n}\r\n\r\n.hv-add-eraser {\r\n\tposition: absolute;\r\n\twidth: 100%;\r\n\theight: 100%;\r\n\ttop: 0;\r\n\tz-index: 10000;\r\n}\r\n\r\n.hv-remove-canvas {\r\n\topacity:0.5;\r\n\tpointer-events: none;\r\n\tposition: absolute;\r\n\ttop: 0;\r\n\tleft: 0;\r\n\tbackground-color: transparent;\r\n\twidth: 100%;\r\n}\r\n\r\n.hv-add-canvas {\r\n\topacity:0.5;\r\n\tposition: absolute;\r\n\ttop: 0;\r\n\tpointer-events: all;\r\n\tleft: 0;\r\n\tbackground-color: transparent;\r\n\twidth: 100%;\r\n}\r\n\r\n.hv-add-canvas-eraser {\r\n\topacity:0.5;\r\n\tposition: absolute;\r\n\ttop: 0;\r\n\tleft: 0;\r\n\tbackground-color: transparent;\r\n\twidth: 100%;\r\n}\r\n\r\n.hv-pause-play{\r\n width: 46px;\r\n height: 44px;\r\n padding: 0px;\r\n text-align: center;\r\n position: relative;\r\n top: -17px;\r\n line-height: 59px;\r\n}\r\n\r\n.hv-black-color {background-color: #000000;}\r\n.hv-red-color {background-color: #ff0000;}\r\n.hv-violet-color {background-color: #8170cd;}\r\n.hv-orange-color {background-color: #ff9a44;}\r\n.hv-green-color {background-color: #7ddc68;}\r\n.hv-blue-color {background-color: #1edde1;}\r\n/*Color Palet Ends*/\r\n\r\n.hv-icon-selected #hvCursorAnimationImg {display: none;}\r\n.hv-icon-selected #hvCursorAnimationImgActive {display: block;}\r\n.hv-icon-unslected #hvCursorAnimationImg {display: block;}\r\n.hv-icon-unslected #hvCursorAnimationImgActive {display: none;}\r\n\r\n.hv-icon-selected #hvPenImg {display: none;}\r\n.hv-icon-selected #hvPenImgActive {display: block;}\r\n.hv-icon-unslected #hvPenImg {display: block;}\r\n.hv-icon-unslected #hvPenImgActive {display: none;}\r\n\r\n.hv-icon-selected #hvFocusImg {display: none;}\r\n.hv-icon-selected #hvFocusImgActive {display: block;}\r\n.hv-icon-unslected #hvFocusImg {display: block;}\r\n.hv-icon-unslected #hvFocusImgActive {display: none;}\r\n\r\n.hv-icon-selected #hvEraseImg {display: none;}\r\n.hv-icon-selected #hvEraseImgActive {display: block;}\r\n.hv-icon-unslected #hvEraseImg {display: block;}\r\n.hv-icon-unslected #hvEraseImgActive {display: none;}\r\n\r\n.hv-icon-selected #hvClearImg {display: none;}\r\n.hv-icon-selected #hvClearImgActive {display: block;}\r\n.hv-icon-unslected #hvClearImg {display: block;}\r\n.hv-icon-unslected #hvClearImgActive {display: none;}\r\n\r\n/*.hv-icon-selected #hvPauseImg {display: none;}\r\n.hv-icon-selected #hvPauseImgActive {display: block;}\r\n.hv-icon-unslected #hvPauseImg {display: block;}\r\n.hv-icon-unslected #hvPauseImgActive {display: none;}*/\r\n\r\n.hv-icon-selected #hvStopImg {display: none;}\r\n.hv-icon-selected #hvStopImgActive {display: block;}\r\n.hv-icon-unslected #hvStopImg {display: block;}\r\n.hv-icon-unslected #hvStopImgActive {display: none;}\r\n\r\n/*intro-div*/\r\n.hv-feature-intro-div {\r\n position: fixed;\r\n top: 0;\r\n overflow: hidden;\r\n width: 100%;\r\n height: 100%;\r\n background-color: rgba(0,0,0,0.8);\r\n z-index: 1000;\r\n}\r\n.hv-feature-intro-div .hv-feature-intro-div-inner {\r\n position: relative;\r\n top: 30%;\r\n width: 800px;\r\n margin: 0 auto;\r\n text-align: center;\r\n color: #fff;\r\n font-weight: 300;\r\n font-size: 16px;\r\n letter-spacing: 0.2px;\r\n line-height: 30px;\r\n}\r\n.hv-arrow-pointer {\r\n position: absolute;\r\n top: 100px;\r\n right: 0;\r\n -webkit-animation: fling-arrow 5s infinite;\r\n animation: fling-arrow 5s infinite;\r\n}\r\n@-webkit-keyframes fling-arrow {\r\n 0% {top: 100px;}\r\n 50% {top: 200px;}\r\n 100% {top: 100px;}\r\n}\r\n@keyframes fling-arrow {\r\n 0% {top: 100px;}\r\n 50% {top: 200px;}\r\n 100% {top: 100px;}\r\n}\r\n.hv-primary-btn-2 {\r\n background-image: linear-gradient(to right, rgb(252, 96, 118) 0%, rgb(255, 154, 68) 51%, rgb(255, 154, 68) 100%);\r\n background-size: 200%;\r\n border-radius: 3px;\r\n box-sizing: border-box;\r\n color: rgb(255, 255, 255);\r\n cursor: pointer;\r\n font-family: "Open Sans";\r\n font-size: 13px;\r\n font-weight: 500;\r\n letter-spacing: 0.2px;\r\n margin: 10px 4px 10px 4px;\r\n padding: 8px 20px 9px 20px;\r\n text-align: center;\r\n text-transform: uppercase;\r\n transition-duration: 0.9s;\r\n transition-property: all;\r\n transition-timing-function: ease;\r\n border: unset;\r\n background-color: unset;\r\n}\r\n.hv-primary-btn {\r\n max-height: 35px;\r\n background-image: linear-gradient(120deg, #fc6076 0%, #ff9a44 100%);\r\n padding-top: 8px;\r\n padding-bottom: 7px;\r\n padding-left: 20px;\r\n padding-right: 20px;\r\n letter-spacing: 0.5px;\r\n transition: 0.5s;\r\n box-shadow: inset 0 0 0 0 #fc6076;\r\n border: 0;\r\n border-radius: 5px;\r\n font-size: 13px;\r\n font-weight: 300;\r\n color: #ffffff;\r\n outline: none;\r\n cursor: pointer;\r\n}\r\n.hv-primary-btn:hover {\r\n background-image: linear-gradient(120deg, #ff9a44 0%, #fc6076 100%);\r\n background-position: right center;\r\n}\r\n.hv-pen-cusor-area{\r\n position: fixed;\r\n\r\n}\r\n.hv-cancel-btn {\r\n\tmargin-right: 10px;\r\n\ttop: 18px;\r\n bottom: 0;\r\n position: relative;\r\n color: #4a90e2 !important;\r\n cursor: pointer;\r\n}\r\n.hv-cancel-btn:hover {\r\n text-decoration: underline;\r\n}\r\n#hippo-overlay-div {\r\n height: 100%;\r\n width: 100%;\r\n background-color: rgba(0,0,0,0.6);\r\n position: fixed;\r\n z-index: 1000001;\r\n top:0;\r\n text-align: center;\r\n}\r\n\r\n#hippo-inner-div {\r\n width: 700px;\r\n left: calc(50% - 350px);\r\n height: 506px;\r\n background-color: #fff;\r\n border-radius: 10px;\r\n position: absolute;\r\n top: 12%;\r\n bottom: 0px;\r\n}\r\n\r\n#hippo-action-div{\r\n position: absolute;\r\n bottom: 10px;\r\n left: 27px;\r\n width: 100%;\r\n}\r\n\r\n.hv-stop-recording-btn{\r\n font-size:14px;\r\n background-size: 200% auto;\r\n background-image: linear-gradient(to right, #fc6076 0%, #ff9a44 31%, #ff9a44 100%);\r\n padding: 8px 30px 8px 30px;\r\n border-radius: 4px;\r\n float: right;\r\n margin-right: 61px;\r\n color: #fff;\r\n cursor: pointer;\r\n}\r\n.hv-webcam-play-btn{\r\n font-size: 14px;\r\n background-color: #8b8b8b;\r\n padding: 8px 30px 8px 30px;\r\n border-radius: 4px;\r\n float: right;\r\n color: #fff;\r\n right: 25px;\r\n margin-left: -30px;\r\n position: relative;\r\n cursor: pointer;\r\n}\r\n\r\n#hv-iframe-overlay-div-drag {\r\n z-index: 100000;\r\n height: 200px;\r\n width: 271px;\r\n}\r\n\r\n.hv-webcam-rectangle-bottom-left{\r\n position: fixed;\r\n bottom:0;\r\n left:0;\r\n height:200px;\r\n z-index:1000000;\r\n border:0;\r\n display:none;\r\n}\r\n\r\n.hv-webcam-rectangle-bottom-right{\r\n position: fixed;\r\n bottom:0;\r\n right:0;\r\n height:200px;\r\n z-index:1000000;\r\n border:0;\r\n display:none;\r\n}\r\n\r\n.hv-webcam-rectangle-top-left{\r\n position: fixed;\r\n top:0;\r\n left:0;\r\n height:200px;\r\n z-index:1000000;\r\n border:0;\r\n display:none;\r\n}\r\n\r\n.hv-webcam-rectangle-top-right{\r\n position: fixed;\r\n top:0;\r\n right:0;\r\n height:200px;\r\n z-index:1000000;\r\n border:0;\r\n display:none;\r\n}\r\ndiv.clickEffect{\r\n position:fixed;\r\n box-sizing:border-box;\r\n border-style:solid;\r\n border-color:#ff160b;\r\n border-radius:50%;\r\n animation:clickEffect 0.6s ease-out;\r\n z-index:99999;\r\n pointer-events: none;\r\n}\r\n@keyframes clickEffect{\r\n 0%{\r\n opacity:1;\r\n width:0.5em;\r\n height:0.5em;\r\n margin:-0.25em;\r\n border-width:8px;\r\n transform: scale(0.6, 0.6);\r\n }\r\n 100%{\r\n opacity:0.4;\r\n width:15em; height:15em;\r\n margin:-7.5em;\r\n border-width:0.48px;\r\n transform: scale(0.4, 0.4);\r\n }\r\n}\r\n\r\ndiv.clickEffect2{\r\n position:fixed;\r\n box-sizing:border-box;\r\n border-style:solid;\r\n border-color:#ff160b;\r\n border-radius:50%;\r\n animation:clickEffect2 0.6s ease-out;\r\n z-index:99999;\r\n pointer-events: none;\r\n}\r\n@keyframes clickEffect2{\r\n 0%{\r\n opacity:1;\r\n width:1em;\r\n height:1em;\r\n margin:-0.5em;\r\n border-width:8px;\r\n transform: scale(0.6, 0.6);\r\n }\r\n 100%{\r\n opacity:0.4;\r\n width:15em; height:15em;\r\n margin:-7.5em;\r\n border-width:0.48px;\r\n transform: scale(0.4, 0.4);\r\n }\r\n}\r\n.hv-blink-right, .hv-blink-left{\r\n width: 2px;\r\n height: 2px;\r\n background-color: white;\r\n animation: blink 1s infinite;\r\n opacity:0.1;\r\n border: 1px solid black;\r\n position: fixed;\r\n bottom:0;\r\n display: none;\r\n}\r\n.hv-blink-right{\r\n right: 0;\r\n}\r\n.hv-blink-left{\r\n left: 0;\r\n}\r\n\r\n@keyframes blink {\r\n 0% {transform: scale(1, 1);}\r\n 50% {transform: scale(1.3, 1.3);}\r\n}\r\n#hv-recordingTimer {\r\n font-size: 35px;\r\n font-weight: lighter;\r\n font-family: \'Open Sans\';\r\n color: #ef5253;\r\n text-align: center;\r\n margin-top: 5px !important;\r\n margin-left: 5px;\r\n float: left;\r\n}\r\n\r\n@keyframes fadeInOut {\r\n 0% {opacity: 0}\r\n 50% {opacity: 1}\r\n 100% {opacity: 0}\r\n}\r\n#recording-blinking {\r\n animation: fadeInOut 1s linear infinite;\r\n color: red;\r\n font-size: 12px;\r\n margin-bottom: 8px;\r\n text-align: center;\r\n padding-top: 5px;\r\n}\r\n#recording-blinking img{\r\n margin-right: 5px;\r\n position: relative;\r\n top: 6px;\r\n vertical-align: unset;\r\n}\r\n\r\n.lessonly-recording-frame {\r\n\tfont-family: "proxima-nova", "Open Sans", "Helvetica Neue", sans-serif !important;\r\n}\r\n\r\n.lessonly-recording-frame #hv-previewcontrol-stop {\r\n\twidth: 170px;\r\n\tfloat: right;\r\n\tbackground-color: #4a90e2 !important;\r\n\tbackground-image: unset;\r\n\tborder: 0;\r\n\tbox-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.1), inset 0 1px 0 0 #4a90e2, inset 0 2px 0 0 rgba(255, 255, 255, 0.2), 0 1px 2px 0 rgba(0, 0, 0, 0.09) !important;\r\n\tfont-family: "proxima-nova", "Open Sans", "Helvetica Neue", sans-serif;\r\n\tcolor: #fff;\r\n\tfont-size: 16px;\r\n\tfont-weight: normal;\r\n\tline-height: 20px;\r\n\tpadding: 0 16px;\r\n\tborder-radius: 3px;\r\n\theight: 40px;\r\n\tletter-spacing: normal;\r\n\ttext-transform: unset;\r\n\tmargin: 10px 4px;\r\n}\r\n\r\n.lessonly-recording-frame #hv-recordingTimer {\r\n color: #4a90e2 !important;\r\n font-family: "proxima-nova", "Open Sans", "Helvetica Neue", sans-serif !important;\r\n}\r\n\r\n#hv-iframe-wrapper {\r\n\twidth: 90%;\r\n margin-left: 5%;\r\n background-color: rgba(0,0,0,0.04);\r\n}\r\n.hv-align-right {\r\n\tfloat: right;\r\n}\r\n</style>').appendTo("head"),window._HVDomain;var n,r,o,a=(o="Unknown",-1!=window.navigator.userAgent.indexOf("Windows")&&(o="Windows"),-1!=window.navigator.userAgent.indexOf("Mac")&&(o="Mac"),-1!=window.navigator.userAgent.indexOf("X11")&&(o="UNIX"),-1!=window.navigator.userAgent.indexOf("Linux")&&(o="Linux"),o);if(R={isEraser:!1,isPen:!1,cursorWidth:5,canvas:null,ctx:null,flag:!1,prevX:0,currX:0,prevY:0,currY:0,dot_flag:!1,penColor:"#000000",selectedColor:0,highlightCursorWidth:10,highlightCursorHeight:10,stopIcon:Object(P.e)("/images/hv-highlight-icons/hb-stop.png"),cursorIcon:Object(P.e)("/images/hv-highlight-icons/hb-select.png"),cursorIconActive:Object(P.e)("/images/hv-highlight-icons/hb-select-active.png"),penIcon:Object(P.e)("/images/hv-highlight-icons/hb-pen.png"),penIconActive:Object(P.e)("/images/hv-highlight-icons/hb-pen-active.png"),focusIcon:Object(P.e)("/images/hv-highlight-icons/hb-focus.png"),focusIconActive:Object(P.e)("/images/hv-highlight-icons/hb-focus-active.png"),eraseIcon:Object(P.e)("/images/hv-highlight-icons/hb-erase.png"),eraseIconActive:Object(P.e)("/images/hv-highlight-icons/hb-erase-active.png"),clearIcon:Object(P.e)("/images/hv-highlight-icons/hb-clear.png"),clearIconActive:Object(P.e)("/images/hv-highlight-icons/hb-clear-active.png"),video:Object(P.e)("/images/hv-highlight-icons/hb-video-off.png"),togarrow:Object(P.e)("/images/hv-highlight-icons/hb-toggle-arrow.png"),collapsIcon:Object(P.e)("/images/hv-highlight-icons/collapse-icon.png"),penColorIcon:Object(P.e)("/images/hv-highlight-icons/pen-with-color.svg"),penCursorIcon:Object(P.e)("/images/hv-highlight-icons/pen-cusor.svg"),eraseCursorIcon:Object(P.e)("/images/hv-highlight-icons/erase-cursor.svg"),arrowPointer:Object(P.e)("/images/hv-highlight-icons/arrow-pointer.png"),mouseAnimationIcon:Object(P.e)("/images/hv-highlight-icons/hb-mouse-animation.png"),mouseAnimationIconActive:Object(P.e)("/images/hv-highlight-icons/hb-mouse-animation-active.png"),highlightsColors:["#000000","#ff0000","#8170cd","#ff9a44","#7ddc68","#1edde1"],isAlt:!1,clearAction:"hvCursor",highlightOptions:function(e){var t=e.currentTarget.id;R.selectHiglightOptions(t,!0)},checkColorPanelVisible:function(t){e(".hv-choose-color-panel").is(":visible")&&R.tooltipHide()},pausePlay:function(t){e("#hvPause").hasClass("disp-none")?(e("#hvPlay").addClass("disp-none"),e("#hvPause").removeClass("disp-none"),R.highlightsEvents("hvPlay")):(e("#hvPlay").removeClass("disp-none"),e("#hvPause").addClass("disp-none"),R.highlightsEvents("hvPause"))},pausePlayWebcam:function(t){"hvResumeWebcam"===t.currentTarget.id?(e("#hvResumeWebcam").addClass("disp-none"),e("#hvPauseWebcam").removeClass("disp-none")):(e("#hvResumeWebcam").removeClass("disp-none"),e("#hvPauseWebcam").addClass("disp-none"))},handleStopRecording:function(){console.log("SENDING EVENT ",i,"hv_stop_recording"),te(i,"markup-tools")},cancelRecording:function(e){},selectHiglightOptions:function(t,i){if("hvClearScreen"!==t&&(R.clearAction=t),e("#"+t).hasClass("hv-active-tool")&&i)return R.resetValues(),R.highlightsEvents("hvCursor"),void R.cursor();if("hvCursor"==t&&!i)return R.resetValues(),void R.cursor();switch(R.resetValues(),e("#"+t).addClass("hv-active-tool"),e("#"+t).removeClass("hv-icon-unslected"),e("#"+t).addClass("hv-icon-selected"),i&&"hvStop"!=t&&R.highlightsEvents(t),"hvPen"!=t&&"hvEraser"!=t&&"hvFocusArea"!=t||e(document).bind("mousemove",R.mouseMove),R.isPen=!1,t){case"hvCursor":R.cursor();break;case"hvCursorAnimation":R.cursorAnimation();break;case"hvPen":R.tooltipHide(),e("#hvHighLightDiv").removeClass("disp-none"),R.pen(),e(".hv-choose-color-panel").show();break;case"hvEraser":R.eraser();break;case"hvClearScreen":R.clearScreen();break;case"hvFocusArea":R.focusArea();break;case"hvStop":R.handleStopRecording()}},resetValues:function(){e(".hv-highlight-option").removeClass("hv-active-tool"),e(".hv-highlight-option").removeClass("hv-icon-selected"),e(".hv-highlight-option").addClass("hv-icon-unslected"),e(".hv-choose-color-panel").hide(),e("#hvHighLightDiv").removeClass("hv-add-highlight-div"),e("#hvHighLightDiv").removeClass("hv-add-eraser"),e("#hvCanvas").removeClass("hv-add-canvas"),e("#hvHighLightDiv").removeClass("hv-remove-highlight-div"),e("#hvCanvas").removeClass("hv-remove-canvas"),e(".hv-pen-cusor-area").remove(),e(document).unbind("mousemove"),document.removeEventListener("mouseup",R.clickEffect)},tooltipHide:function(t){e(".hv-tooltip-panel").hide()},tooltipShow:function(i){if(clearTimeout(r),0!=R.highlightsOpen){e(".hv-tooltip-panel").show();var n=i.currentTarget.id,r=setTimeout((function(){e(".hv-tooltip-panel").hide()}),3e3);switch(n){case"hvCursor":e(".hv-tooltip-panel").text("Press "+("Mac"===a?"Option":"Alt")+" + M for Cursor");break;case"hvCursorAnimation":e(".hv-tooltip-panel").text("Press "+("Mac"===a?"Option":"Alt")+" + A for Click Animation");break;case"hvPen":e(".hv-tooltip-panel").text("Press "+("Mac"===a?"Option":"Alt")+" + H for Highlight \n Hit UP / DOWN arrow to change size \n LEFT / RIGHT arrow to change color");break;case"hvEraser":e(".hv-tooltip-panel").text("Press "+("Mac"===a?"Option":"Alt")+" + E for Eraser");break;case"hvClearScreen":e(".hv-tooltip-panel").text("Press "+("Mac"===a?"Option":"Alt")+" + Z for Clear screen");break;case"hvFocusArea":e(".hv-tooltip-panel").text("Press "+("Mac"===a?"Option":"Alt")+" + F for Focus and ESC for Cursor");break;case"hvPause":case"hvPlay":e(".hv-tooltip-panel").text("Press "+("Mac"===a?"Option":"Alt")+" + P for Pause and Play");break;case"hvCloseHighlight":e(".hv-tooltip-panel").text("Press "+("Mac"===a?"Option":"Alt")+" + C for Close");break;case"hvStop":e(".hv-tooltip-panel").text("Press "+("Mac"===a?"Option":"Alt")+" + S for Stop recording");break;case"disabledState":t.screenRecord?e(".hv-tooltip-panel").text("Upgrade needed"):e(".hv-tooltip-panel").text("")}}},color:function(e){R.highlightsEvents("hvColorChoose"),R.isEraser=!1,R.penColor=e.target.id,R.selectedColor=R.highlightsColors.indexOf(e.target.id),R.setCursor(e.target.id)},draw:function(){R.ctx.beginPath(),1==R.isEraser?R.ctx.globalCompositeOperation="destination-out":R.ctx.globalCompositeOperation="source-over",R.ctx.lineCap="round",R.ctx.moveTo(R.prevX,R.prevY),R.ctx.fillStyle=R.penColor,R.ctx.globalAlpha=1,R.ctx.lineTo(R.currX,R.currY),R.ctx.strokeStyle=R.penColor,R.ctx.lineWidth=R.cursorWidth,R.ctx.stroke()},clearScreen:function(){var e=document.body,t=document.documentElement,i=Math.max(e.scrollHeight,e.offsetHeight,t.clientHeight,t.scrollHeight,t.offsetHeight);R.canvas.height=i;var n=R.canvas.width,r=R.canvas.height;R.ctx.clearRect(0,0,n,r),R.selectHiglightOptions(R.clearAction,!1)},focusArea:function(){e("#hvHighLightDiv").addClass("hv-remove-highlight-div"),e("#hvCanvas").addClass("hv-remove-canvas");var t=document.body,i=document.documentElement,n=Math.max(t.scrollHeight,t.offsetHeight,i.clientHeight,i.scrollHeight,i.offsetHeight);e("body").css({cursor:"default"}),e("#hvHighLightDiv").css("height",n+"px"),e("#hvOverlayDiv").show()},cursor:function(){e("#hvHighLightDiv").css({"pointer-events":"none"});var t=document.body,i=document.documentElement,n=Math.max(t.scrollHeight,t.offsetHeight,i.clientHeight,i.scrollHeight,i.offsetHeight);e("body").css({cursor:"default"}),e("#hvHighLightDiv").css("height",n+"px"),e("#hvOverlayDiv").hide(),e("#hvCanvas").addClass("hv-remove-canvas"),e("#hvCanvas").css("height",n+"px")},cursorAnimation:function(){document.addEventListener("mouseup",R.clickEffect),e("#hvHighLightDiv").css({"pointer-events":"none"});var t=document.body,i=document.documentElement,n=Math.max(t.scrollHeight,t.offsetHeight,i.clientHeight,i.scrollHeight,i.offsetHeight);e("body").css({cursor:"default"}),e("#hvHighLightDiv").css("height",n+"px"),e("#hvOverlayDiv").hide(),e("#hvCanvas").addClass("hv-remove-canvas"),e("#hvCanvas").css("height",n+"px")},clickEffect:function(e){var t=document.createElement("div");t.className="clickEffect",t.style.top=e.clientY+"px",t.style.left=e.clientX+"px",document.body.appendChild(t),t.addEventListener("animationend",function(){t.parentElement.removeChild(t)}.bind(this));var i=document.createElement("div");i.className="clickEffect2",i.style.top=e.clientY+"px",i.style.left=e.clientX+"px",setTimeout((function(){document.body.appendChild(i),i.addEventListener("animationend",function(){i.parentElement.removeChild(i)}.bind(this))}),200)},pen:function(){R.isEraser=!1,R.isPen=!0,R.setCursor(R.penColor),e("#hvHighLightDiv").addClass("hv-add-highlight-div");var t=document.body,i=document.documentElement,n=Math.max(t.scrollHeight,t.offsetHeight,i.clientHeight,i.scrollHeight,i.offsetHeight);e("#hvHighLightDiv").css("height",n+"px"),e("#hvCanvas").removeClass("hv-add-canvas-eraser"),e("#hvCanvas").addClass("hv-add-canvas"),e("#hvCanvas").css("height",n+"px"),e("#hvOverlayDiv").hide();var r='<svg class="hv-pen-cusor-area" xmlns="http://www.w3.org/2000/svg" width="'+R.highlightCursorWidth+'" height="'+R.highlightCursorHeight+'" viewBox="0 0 51 50.969"><metadata><?xpacket begin="\ufeff" id="W5M0MpCehiHzreSzNTczkc9d"?><x:xmpmeta xmlns:x="adobe:ns:meta/" x:xmptk="Adobe XMP Core 5.6-c138 79.159824, 2016/09/14-01:09:01"><rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"><rdf:Description rdf:about=""/></rdf:RDF></x:xmpmeta><?xpacket end="w"?></metadata><defs><style>.cls-1 {fill: none;stroke: #313131;stroke-linecap: round;stroke-linejoin: round;stroke-width: 1px;stroke-dasharray: 5 4;}</style></defs><circle class="cls-1" cx="25.5" cy="25.469" r="25"/></svg>';e(r).appendTo("body")},eraser:function(){R.isEraser=!0,e("body").css("cursor","url("+R.eraseCursorIcon+"), auto"),e("#hvHighLightDiv").addClass("hv-add-eraser"),e("#hvCanvas").addClass("hv-add-canvas-eraser"),e("#hvCanvas").css("height",n+"px");var t=document.body,i=document.documentElement,n=Math.max(t.scrollHeight,t.offsetHeight,i.clientHeight,i.scrollHeight,i.offsetHeight);e("#hvHighLightDiv").css("height",n+"px"),e("#hvOverlayDiv").hide();var r='<svg class="hv-pen-cusor-area" xmlns="http://www.w3.org/2000/svg" width="'+R.highlightCursorWidth+'" height="'+R.highlightCursorHeight+'" viewBox="0 0 51 50.969"><metadata><?xpacket begin="\ufeff" id="W5M0MpCehiHzreSzNTczkc9d"?><x:xmpmeta xmlns:x="adobe:ns:meta/" x:xmptk="Adobe XMP Core 5.6-c138 79.159824, 2016/09/14-01:09:01"><rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"><rdf:Description rdf:about=""/></rdf:RDF></x:xmpmeta><?xpacket end="w"?></metadata><defs><style>.cls-1 {fill: none;stroke: #313131;stroke-linecap: round;stroke-linejoin: round;stroke-width: 1px;stroke-dasharray: 5 4;}</style></defs><circle class="cls-1" cx="25.5" cy="25.469" r="25"/></svg>';e(r).appendTo("body")},mouseMove:function(t){var i=t.pageX,o=t.pageY,a=i/n,s=o/r;Xpos=Math.floor(100*a),Ypos=Math.floor(100*s);var l=i+"px",u=o+"px";e("#hvOverlayCircle").css({transform:"translate("+l+","+u+") translateZ(0px)"})},closeHighlights:function(t){R.tooltipHide(),R.highlightsOpen=!1,t&&R.highlightsEvents("hvCloseHighlight"),e(".hv-tooltip-panel").hide(),e(".hv-highlight-feature-panel").animate({width:"0"},200,(function(){e(".hv-collapsed").removeClass("disp-none")})),e(".hv-highlight-options-div").addClass("hv-close-highlight-feature-panel")},openHighlights:function(t){R.highlightsOpen=!0,t&&R.highlightsEvents("hvOpenHighlight"),e(".hv-highlight-feature-panel").animate({width:"333px"},200),e(".hv-highlight-options-div").removeClass("hv-close-highlight-feature-panel"),e(".hv-highlight-options-div").show().delay(1e3),e(".hv-collapsed").addClass("disp-none")},findxy:function(t,i){"down"==t&&(R.prevX=R.currX,R.prevY=R.currY,R.currX=i.offsetX-R.canvas.offsetLeft,R.currY=i.offsetY-R.canvas.offsetTop,R.currY+=15,R.currX+=5,R.flag=!0,R.dot_flag=!0,R.dot_flag&&(R.ctx.beginPath(),R.ctx.fillStyle=R.penColor,R.ctx.fillRect(R.currX,R.currY,2,2),R.ctx.closePath(),R.dot_flag=!1)),"up"!=t&&"out"!=t||(R.flag=!1),"move"==t&&(e(".hv-pen-cusor-area").css({left:i.offsetX-R.canvas.offsetLeft-e(".hv-pen-cusor-area").width()/2+2,top:i.offsetY-R.canvas.offsetTop-e(".hv-pen-cusor-area").height()/2+17}),R.flag&&(R.prevX=R.currX,R.prevY=R.currY,R.currX=i.offsetX-R.canvas.offsetLeft+5,R.currY=i.offsetY-R.canvas.offsetTop+17,R.draw()))},windowResize:function(){var t=document.body,i=document.documentElement,n=Math.max(t.scrollHeight,t.offsetHeight,i.clientHeight,i.scrollHeight,i.offsetHeight);R.canvas.height=n,e("#hvHighLightDiv").css("height",n+"px")},highlightsEvents:function(e){},setCursor:function(t){if(t){if(0==R.isEraser){e("body").addClass("hv-"+t+"-cursor");var i='<svg xmlns="http://www.w3.org/2000/svg" width="20" viewBox="0 0 24.11 23.93"><defs><style>.cls-1,.cls-2{fill:#fff;stroke:#000;stroke-miterlimit:10;}.cls-2{fill-rule:evenodd;}</style></defs><title>highlight with color</title><g id="Layer_2" data-name="Layer 2"><g id="Layer_1-2" data-name="Layer 1"><path class="cls-1" d="M22.58,1.35a2.91,2.91,0,0,1,0,4.11L21.21,6.82,17.11,2.72l1.37-1.37a2.91,2.91,0,0,1,4.11,0Z"/><polygon class="cls-1" points="2.05 17.77 0.69 23.25 6.16 21.88 19.85 8.19 15.74 4.09 2.05 17.77"/><path class="cls-2" style="fill:'+t+'" d="M20.11,15.94a3.5,3.5,0,1,1-3.5,3.5,3.5,3.5,0,0,1,3.5-3.5Z"/></g></g></svg>',n='url("data:image/svg+xml,'+(i=encodeURIComponent(i.replace(/"/g,"'")))+'"), auto';e("body").css("cursor",n)}}else e("body").css({cursor:"default"})},onkeyupEvent:function(e){18==e.which&&(R.isAlt=!1)},onkeydownEvent:function(t){18==t.which&&(R.isAlt=!0),R.isPen&&[37,38,39,40].indexOf(t.keyCode)>-1&&t.preventDefault(),83==t.which&&1==R.isAlt&&R.stopRecording(),67==t.which&&1==R.isAlt&&(t.preventDefault(),R.closeHighlights(!0)),79==t.which&&1==R.isAlt&&(t.preventDefault(),R.openHighlights(!0)),90==t.which&&1==R.isAlt&&(R.selectHiglightOptions("hvClearScreen",!0),clearScreen()),69==t.which&&1==R.isAlt&&(t.preventDefault(),R.selectHiglightOptions("hvEraser",!0),R.isEraser=!0),72==t.which&&1==R.isAlt&&(R.selectHiglightOptions("hvPen",!0),R.isEraser=!1,R.pen()),70==t.which&&1==R.isAlt&&(t.preventDefault(),R.selectHiglightOptions("hvFocusArea",!0),R.focusArea()),(77==t.which&&1==R.isAlt||27==t.which)&&(R.selectHiglightOptions("hvCursor",!0),R.cursor()),65==t.which&&1==R.isAlt&&R.selectHiglightOptions("hvCursorAnimation",!0),38==t.which&&R.cursorWidth<=200&&(R.cursorWidth+=1,R.highlightCursorWidth+=1,R.highlightCursorHeight+=1,e(".hv-pen-cusor-area").css({width:R.highlightCursorWidth,height:R.highlightCursorHeight})),38==t.which&&R.isAlt,40==t.which&&R.cursorWidth>=5&&(R.cursorWidth-=1,R.highlightCursorWidth-=1,R.highlightCursorHeight-=1,e(".hv-pen-cusor-area").css({width:R.highlightCursorWidth,height:R.highlightCursorHeight})),37==t.which&&0!==R.selectedColor&&(R.selectedColor=R.selectedColor-1,R.penColor=R.highlightsColors[R.selectedColor],R.setCursor(R.penColor)),39==t.which&&5!==R.selectedColor&&(R.selectedColor=R.selectedColor+1,R.penColor=R.highlightsColors[R.selectedColor],R.setCursor(R.penColor))}},!(e(".hv-highlight-feature-panel").length>0)){var s="Press "+("Mac"===a?"Option":"Alt")+" + O for Open",l="Press "+("Mac"===a?"Option":"Alt")+" + H for Highlight",u='<div class="hv-action-component hv-highlight-feature-panel hv-act-comp-bottom-right"> <div class="hv-highlight-options-div"> <span class="hv-highlight-option hv-icon-out-space hv-icon-unslected" id="hvStop"> <img src="'+R.stopIcon+'" id="hvStopImg"/> <img src="'+R.stopIcon+'" id="hvStopImgActive"/> </span> <span class="hv-highlight-option hv-icon-out-space hv-icon-unslected" id="hvCursorAnimation"> <img src="'+R.mouseAnimationIcon+'" id="hvCursorAnimationImg" class=" hv-custom-mouse-pen-cursor" /> <img src="'+R.mouseAnimationIconActive+'" id="hvCursorAnimationImgActive" class=" hv-custom-mouse-pen-cursor" /> </span> <span class="hv-highlight-option hv-icon-out-space hv-icon-unslected" id="hvPen"> <img src="'+R.penIcon+'" id="hvPenImg" /> <img src="'+R.penIconActive+'" id="hvPenImgActive" /> </span> <span class="hv-highlight-option hv-icon-out-space hv-icon-unslected" id="hvFocusArea"> <img src="'+R.focusIcon+'" id="hvFocusImg" /> <img src="'+R.focusIconActive+'" id="hvFocusImgActive" /> </span> <span class="hv-highlight-option hv-icon-out-space hv-icon-unslected" id="hvEraser"> <img src="'+R.eraseIcon+'" class=" hv-custom-mouse-erase-cursor" id="hvEraseImg" /> <img src="'+R.eraseIconActive+'" class=" hv-custom-mouse-erase-cursor" id="hvEraseImgActive" /> </span> <span class="hv-highlight-option hv-icon-out-space hv-icon-unslected" id="hvClearScreen"> <img src="'+R.clearIcon+'" id="hvClearImg" /> <img src="'+R.clearIconActive+'" id="hvClearImgActive" /> </span> <span class="hv-togarrow-spacer hv-close-highlights" id="hvCloseHighlight"><img src="'+R.togarrow+'" class=" hv-togarrow" id="hvTogarrow" /></span> <div class="hv-choose-color-panel"> <div id="#000000" class="hv-change-color-circle hv-black-color"></div> <div id="#ff0000" class="hv-change-color-circle hv-red-color"></div> <div id="#8170cd" class="hv-change-color-circle hv-violet-color"></div> <div id="#ff9a44" class="hv-change-color-circle hv-orange-color"></div> <div id="#7ddc68" class="hv-change-color-circle hv-green-color"></div> <div id="#1edde1" class="hv-change-color-circle hv-blue-color"></div> </div> </div> <div class="hv-collapsed disp-none hv-open-highlights hv-collapsed-move" id="hvOpenHighlight" title="'+s+'"><img src="'+R.collapsIcon+'" class="hv-collapsed-icon" /></div> <div class="hv-tooltip-panel">'+l+"</div> </div>";e(u).appendTo("body"),e(".hv-highlight-option").bind("click",R.highlightOptions),e(".hv-change-color-circle").bind("click",R.color),e(".hv-close-highlights").bind("click",R.closeHighlights),e(".hv-open-highlights").bind("click",R.openHighlights),e(".hv-highlight-option").on("mouseenter",R.tooltipShow),e(".hv-icon-out-disable").on("mouseenter",R.tooltipShow),e(".hv-tooltip-panel").on("mouseenter",R.checkColorPanelVisible),e(".hv-close-highlights").on("mouseover",R.tooltipShow),window.addEventListener("keyup",R.onkeyupEvent),window.addEventListener("keydown",R.onkeydownEvent),window.addEventListener("resize",R.windowResize),R.canvas=document.getElementById("hvCanvas"),R.ctx=R.canvas.getContext("2d"),R.canvas.width=window.innerWidth,R.canvas.height=window.innerHeight,n=R.canvas.width,r=R.canvas.height;var c=document.body,d=document.documentElement,h=Math.max(c.scrollHeight,c.offsetHeight,d.clientHeight,d.scrollHeight,d.offsetHeight);R.canvas.height=h,e("#hvHighLightDiv").css("height",h+"px"),R.selectHiglightOptions("hvCursor"),e("#hvHighLightDiv").css({"pointer-events":"none"}),e("#hvOverlayDiv").hide(),R.canvas.addEventListener("mousemove",(function(e){R.findxy("move",e)}),!1),R.canvas.addEventListener("mousedown",(function(e){R.findxy("down",e)}),!1),R.canvas.addEventListener("mouseup",(function(e){R.findxy("up",e)}),!1),R.canvas.addEventListener("mouseout",(function(e){R.findxy("out",e)}),!1)}}(t,i)}(n,r))}var n,r,o,a,s;"_show_webcam_preview"===t.type&&X((t.detail||{}).stream);if("_remove_webcam_preview"===t.type&&Q(),"_show_upload_progress"===t.type){var l=t.detail||{};o={recorder:l.recorder,theme:l.theme},a=o.recorder,s=o.theme,Object(A.a)(a,s)}"record_stopped"===t.type&&(this.popupElement&&(this.popupElement.style.display="flex"),this.recordingInProgress=!1,Q(),Z()),"record_cancelled"===t.type&&(this.recordingInProgress=!1,Q(),Z()),"video_submitted"!==t.type&&"hide_frame"!==t.type||this.popupElement&&(this.popupElement.style.display="none"),"_close_popup"===t.type&&(this.popupElement&&(this.popupElement.style.display="none"),Q(),Z()),"show_frame"===t.type&&this.popupElement&&(this.popupElement.style.display="flex")}}]),t}(),H={create:function(e,t){return m()(this,void 0),new q(e,{settings:t})}.bind(void 0)},j={create:function(e,t){return m()(this,void 0),new G(e,{settings:t})}.bind(void 0)},q=function(e){r()(i,e);var t=I(i);function i(e){var n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:config,o=r.settings,a=r.recorder_events;return c()(this,i),console.log("add recorder ",e),n=t.call(this,e,{type:k.a.RECORDER,settings:o,recorder_events:a}),console.log("add recorder "),n}return h()(i,[{key:"startRecording",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.recordingInProgress?Y(this.eventCallbackMap,"record_error",{error:"recording_in_progress",message:"A recording is already in progress"}):(e=W(e),console.log("RECORDING CONFIG ",e),$(this.settings,e)?(this.popupElement&&(this.popupElement.style.display="flex"),ee(this.eventListenerClass,"start_recording",{recording_configuration:e,extension_available:O})):Y(this.eventCallbackMap,"record_error",{error:"invalid_record_options",message:"The recording options given are invalid"}))}},{key:"stopRecording",value:function(){te(this.eventListenerClass,"user")}}]),i}(z),G=function(e){r()(i,e);var t=I(i);function i(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:config,r=n.settings,o=n.recorder_events;return c()(this,i),t.call(this,e,{type:k.a.IMPORTER,settings:r,recorder_events:o})}return h()(i,[{key:"open",value:function(e){this.importMedia(null,e)}},{key:"importMedia",value:function(e,t){ee(this.eventListenerClass,"import_video",{file:e,uniqueId:t})}}]),i}(z);function $(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=t.screenRecord,n=t.audio,r=t.webCam,o=e.record_config||{},a=o.screen,s=o.webcam,l=o.mic;return!(!(i||n||r||a||s)&&l)}function W(e){var t=Object.assign({},e);for(var i in e)L[i]&&(delete t[i],t[L[i]]=e[i]);return t}function Y(e,t,i){e[t]&&e[t](i)}function K(t){e("#recording-configuration").remove(),e('<input type=hidden id="recording-configuration" value="" />').appendTo("head");e("#actiontoextension").remove(),e('<input type=hidden id="actiontoextension" value="" />').appendTo("head");var i='<input type=hidden id="hippowiz-ew-digest" value="'.concat(t,'" />');e("#hippowiz-ew-digest").remove(),e(i).appendTo("head")}function J(e){var t=this;try{Object(E.j)(e).then(function(){m()(this,t),O=!0}.bind(this)).catch(function(){m()(this,t),console.log("CONNECTION ERROR!! CAN BE MORE SPECIFIC!! CHECK!!!"),O=!1}.bind(this))}catch(e){O=!1}}function X(e){Object(x.a)(e)}function Q(){!function(e){var t=document.getElementsByClassName(e);for(;t.length>0;)t[0].parentNode.removeChild(t[0])}("hv-rapi-webcam-preview")}function Z(){!function(){R&&R.resetValues();e("#hvOverlayDiv, #hvHighLightDiv, #hvCanvas, .hv-highlight-feature-panel").remove(),e("body").css({cursor:"default"})}()}function ee(e,t,i){var n;try{n=new CustomEvent(t,{detail:i})}catch(e){(n=document.createEvent("Event")).detail=i,n.initEvent(t,!1,!1)}console.log("SENDING EVENT FROM LIBRARY ",n,document.getElementsByClassName(e)[0]),document.getElementsByClassName(e)[0].dispatchEvent(n)}function te(e,t){ee(e,"hv_stop_recording",{from:t})}}.call(this,i(2))},,function(e,t,i){var n=i(9),r=i(34),o=i(27),a=i(29),s=n.TypeError;e.exports=function(e,t){var i,n;if("string"===t&&o(i=e.toString)&&!a(n=r(i,e)))return n;if(o(i=e.valueOf)&&!a(n=r(i,e)))return n;if("string"!==t&&o(i=e.toString)&&!a(n=r(i,e)))return n;throw s("Can't convert object to primitive value")}},function(e,t,i){"use strict";var n=i(209),r=i(92);e.exports=n?{}.toString:function(){return"[object "+r(this)+"]"}},function(e,t,i){"use strict";var n=i(9),r=i(13),o=i(75),a=i(29),s=i(32),l=i(105),u=i(121),c=n.Function,d=r([].concat),h=r([].join),p={},f=function(e,t,i){if(!s(p,t)){for(var n=[],r=0;r<t;r++)n[r]="a["+r+"]";p[t]=c("C,a","return new C("+h(n,",")+")")}return p[t](e,i)};e.exports=u?c.bind:function(e){var t=o(this),i=t.prototype,n=l(arguments,1),r=function(){var i=d(n,l(arguments));return this instanceof r?f(t,i.length,i):t.apply(e,i)};return a(i)&&(r.prototype=i),r}},function(e,t){function i(t,n){return e.exports=i=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},e.exports.__esModule=!0,e.exports.default=e.exports,i(t,n)}e.exports=i,e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t,i){var n=function(e){"use strict";var t=Object.prototype,i=t.hasOwnProperty,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",o=n.asyncIterator||"@@asyncIterator",a=n.toStringTag||"@@toStringTag";function s(e,t,i){return Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{s({},"")}catch(e){s=function(e,t,i){return e[t]=i}}function l(e,t,i,n){var r=t&&t.prototype instanceof d?t:d,o=Object.create(r.prototype),a=new E(n||[]);return o._invoke=function(e,t,i){var n="suspendedStart";return function(r,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===r)throw o;return C()}for(i.method=r,i.arg=o;;){var a=i.delegate;if(a){var s=w(a,i);if(s){if(s===c)continue;return s}}if("next"===i.method)i.sent=i._sent=i.arg;else if("throw"===i.method){if("suspendedStart"===n)throw n="completed",i.arg;i.dispatchException(i.arg)}else"return"===i.method&&i.abrupt("return",i.arg);n="executing";var l=u(e,t,i);if("normal"===l.type){if(n=i.done?"completed":"suspendedYield",l.arg===c)continue;return{value:l.arg,done:i.done}}"throw"===l.type&&(n="completed",i.method="throw",i.arg=l.arg)}}}(e,i,a),o}function u(e,t,i){try{return{type:"normal",arg:e.call(t,i)}}catch(e){return{type:"throw",arg:e}}}e.wrap=l;var c={};function d(){}function h(){}function p(){}var f={};s(f,r,(function(){return this}));var g=Object.getPrototypeOf,m=g&&g(g(T([])));m&&m!==t&&i.call(m,r)&&(f=m);var v=p.prototype=d.prototype=Object.create(f);function y(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function b(e,t){var n;this._invoke=function(r,o){function a(){return new t((function(n,a){!function n(r,o,a,s){var l=u(e[r],e,o);if("throw"!==l.type){var c=l.arg,d=c.value;return d&&"object"==typeof d&&i.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,a,s)}),(function(e){n("throw",e,a,s)})):t.resolve(d).then((function(e){c.value=e,a(c)}),(function(e){return n("throw",e,a,s)}))}s(l.arg)}(r,o,n,a)}))}return n=n?n.then(a,a):a()}}function w(e,t){var i=e.iterator[t.method];if(void 0===i){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,w(e,t),"throw"===t.method))return c;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return c}var n=u(i,e.iterator,t.arg);if("throw"===n.type)return t.method="throw",t.arg=n.arg,t.delegate=null,c;var r=n.arg;return r?r.done?(t[e.resultName]=r.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,c):r:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,c)}function _(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function S(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(_,this),this.reset(!0)}function T(e){if(e){var t=e[r];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,o=function t(){for(;++n<e.length;)if(i.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return o.next=o}}return{next:C}}function C(){return{value:void 0,done:!0}}return h.prototype=p,s(v,"constructor",p),s(p,"constructor",h),h.displayName=s(p,a,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===h||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,p):(e.__proto__=p,s(e,a,"GeneratorFunction")),e.prototype=Object.create(v),e},e.awrap=function(e){return{__await:e}},y(b.prototype),s(b.prototype,o,(function(){return this})),e.AsyncIterator=b,e.async=function(t,i,n,r,o){void 0===o&&(o=Promise);var a=new b(l(t,i,n,r),o);return e.isGeneratorFunction(i)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},y(v),s(v,a,"Generator"),s(v,r,(function(){return this})),s(v,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=[];for(var i in e)t.push(i);return t.reverse(),function i(){for(;t.length;){var n=t.pop();if(n in e)return i.value=n,i.done=!1,i}return i.done=!0,i}},e.values=T,E.prototype={constructor:E,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(S),!e)for(var t in this)"t"===t.charAt(0)&&i.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(i,n){return a.type="throw",a.arg=e,t.next=i,n&&(t.method="next",t.arg=void 0),!!n}for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r],a=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var s=i.call(o,"catchLoc"),l=i.call(o,"finallyLoc");if(s&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(s){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&i.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var o=r;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=e,a.arg=t,o?(this.method="next",this.next=o.finallyLoc,c):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),c},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var i=this.tryEntries[t];if(i.finallyLoc===e)return this.complete(i.completion,i.afterLoc),S(i),c}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var i=this.tryEntries[t];if(i.tryLoc===e){var n=i.completion;if("throw"===n.type){var r=n.arg;S(i)}return r}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,i){return this.delegate={iterator:T(e),resultName:t,nextLoc:i},"next"===this.method&&(this.arg=void 0),c}},e}(e.exports);try{regeneratorRuntime=n}catch(e){"object"==typeof globalThis?globalThis.regeneratorRuntime=n:Function("r","regeneratorRuntime = r")(n)}},function(e,t,i){var n=i(13),r=i(43),o=Math.floor,a=n("".charAt),s=n("".replace),l=n("".slice),u=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,c=/\$([$&'`]|\d{1,2})/g;e.exports=function(e,t,i,n,d,h){var p=i+e.length,f=n.length,g=c;return void 0!==d&&(d=r(d),g=u),s(h,g,(function(r,s){var u;switch(a(s,0)){case"$":return"$";case"&":return e;case"`":return l(t,0,i);case"'":return l(t,p);case"<":u=d[l(s,1,-1)];break;default:var c=+s;if(0===c)return r;if(c>f){var h=o(c/10);return 0===h?r:h<=f?void 0===n[h-1]?a(s,1):n[h-1]+a(s,1):r}u=n[c-1]}return void 0===u?"":u}))}},function(e,t,i){"use strict";
|
|
249
249
|
/** @license React v16.14.0
|
|
250
250
|
* react.production.min.js
|
|
251
251
|
*
|