!function(e){"use strict";"function"==typeof define&&define.amd?define(["jquery","./menu","../keycode","../position","../safe-active-element","../version","../widget"],e):e(jQuery)}(function(o){"use strict";return o.widget("ui.autocomplete",{version:"1.13.3",defaultElement:"<input>",options:{appendTo:null,autoFocus:!1,delay:300,minLength:1,position:{my:"left top",at:"left bottom",collision:"none"},source:null,change:null,close:null,focus:null,open:null,response:null,search:null,select:null},requestIndex:0,pending:0,liveRegionTimer:null,_create:function(){var i,s,n,e=this.element[0].nodeName.toLowerCase(),t="textarea"===e,e="input"===e;this.isMultiLine=t||!e&&this._isContentEditable(this.element),this.valueMethod=this.element[t||e?"val":"text"],this.isNewMenu=!0,this._addClass("ui-autocomplete-input"),this.element.attr("autocomplete","off"),this._on(this.element,{keydown:function(e){if(this.element.prop("readOnly"))s=n=i=!0;else{s=n=i=!1;var t=o.ui.keyCode;switch(e.keyCode){case t.PAGE_UP:i=!0,this._move("previousPage",e);break;case t.PAGE_DOWN:i=!0,this._move("nextPage",e);break;case t.UP:i=!0,this._keyEvent("previous",e);break;case t.DOWN:i=!0,this._keyEvent("next",e);break;case t.ENTER:this.menu.active&&(i=!0,e.preventDefault(),this.menu.select(e));break;case t.TAB:this.menu.active&&this.menu.select(e);break;case t.ESCAPE:this.menu.element.is(":visible")&&(this.isMultiLine||this._value(this.term),this.close(e),e.preventDefault());break;default:s=!0,this._searchTimeout(e)}}},keypress:function(e){if(i)i=!1,this.isMultiLine&&!this.menu.element.is(":visible")||e.preventDefault();else if(!s){var t=o.ui.keyCode;switch(e.keyCode){case t.PAGE_UP:this._move("previousPage",e);break;case t.PAGE_DOWN:this._move("nextPage",e);break;case t.UP:this._keyEvent("previous",e);break;case t.DOWN:this._keyEvent("next",e)}}},input:function(e){n?(n=!1,e.preventDefault()):this._searchTimeout(e)},focus:function(){this.selectedItem=null,this.previous=this._value()},blur:function(e){clearTimeout(this.searching),this.close(e),this._change(e)}}),this._initSource(),this.menu=o("<ul>").appendTo(this._appendTo()).menu({role:null}).hide().attr({unselectable:"on"}).menu("instance"),this._addClass(this.menu.element,"ui-autocomplete","ui-front"),this._on(this.menu.element,{mousedown:function(e){e.preventDefault()},menufocus:function(e,t){var i,s;this.isNewMenu&&(this.isNewMenu=!1,e.originalEvent)&&/^mouse/.test(e.originalEvent.type)?(this.menu.blur(),this.document.one("mousemove",function(){o(e.target).trigger(e.originalEvent)})):(s=t.item.data("ui-autocomplete-item"),!1!==this._trigger("focus",e,{item:s})&&e.originalEvent&&/^key/.test(e.originalEvent.type)&&this._value(s.value),(i=t.item.attr("aria-label")||s.value)&&String.prototype.trim.call(i).length&&(clearTimeout(this.liveRegionTimer),this.liveRegionTimer=this._delay(function(){this.liveRegion.html(o("<div>").text(i))},100)))},menuselect:function(e,t){var i=t.item.data("ui-autocomplete-item"),s=this.previous;this.element[0]!==o.ui.safeActiveElement(this.document[0])&&(this.element.trigger("focus"),this.previous=s,this._delay(function(){this.previous=s,this.selectedItem=i})),!1!==this._trigger("select",e,{item:i})&&this._value(i.value),this.term=this._value(),this.close(e),this.selectedItem=i}}),this.liveRegion=o("<div>",{role:"status","aria-live":"assertive","aria-relevant":"additions"}).appendTo(this.document[0].body),this._addClass(this.liveRegion,null,"ui-helper-hidden-accessible"),this._on(this.window,{beforeunload:function(){this.element.removeAttr("autocomplete")}})},_destroy:function(){clearTimeout(this.searching),this.element.removeAttr("autocomplete"),this.menu.element.remove(),this.liveRegion.remove()},_setOption:function(e,t){this._super(e,t),"source"===e&&this._initSource(),"appendTo"===e&&this.menu.element.appendTo(this._appendTo()),"disabled"===e&&t&&this.xhr&&this.xhr.abort()},_isEventTargetInWidget:function(e){var t=this.menu.element[0];return e.target===this.element[0]||e.target===t||o.contains(t,e.target)},_closeOnClickOutside:function(e){this._isEventTargetInWidget(e)||this.close()},_appendTo:function(){var e=this.options.appendTo;return e=(e=(e=e&&(e.jquery||e.nodeType?o(e):this.document.find(e).eq(0)))&&e[0]?e:this.element.closest(".ui-front, dialog")).length?e:this.document[0].body},_initSource:function(){var i,s,n=this;Array.isArray(this.options.source)?(i=this.options.source,this.source=function(e,t){t(o.ui.autocomplete.filter(i,e.term))}):"string"==typeof this.options.source?(s=this.options.source,this.source=function(e,t){n.xhr&&n.xhr.abort(),n.xhr=o.ajax({url:s,data:e,dataType:"json",success:function(e){t(e)},error:function(){t([])}})}):this.source=this.options.source},_searchTimeout:function(s){clearTimeout(this.searching),this.searching=this._delay(function(){var e=this.term===this._value(),t=this.menu.element.is(":visible"),i=s.altKey||s.ctrlKey||s.metaKey||s.shiftKey;e&&(t||i)||(this.selectedItem=null,this.search(null,s))},this.options.delay)},search:function(e,t){return e=null!=e?e:this._value(),this.term=this._value(),e.length<this.options.minLength?this.close(t):!1!==this._trigger("search",t)?this._search(e):void 0},_search:function(e){this.pending++,this._addClass("ui-autocomplete-loading"),this.cancelSearch=!1,this.source({term:e},this._response())},_response:function(){var t=++this.requestIndex;return function(e){t===this.requestIndex&&this.__response(e),this.pending--,this.pending||this._removeClass("ui-autocomplete-loading")}.bind(this)},__response:function(e){e=e&&this._normalize(e),this._trigger("response",null,{content:e}),!this.options.disabled&&e&&e.length&&!this.cancelSearch?(this._suggest(e),this._trigger("open")):this._close()},close:function(e){this.cancelSearch=!0,this._close(e)},_close:function(e){this._off(this.document,"mousedown"),this.menu.element.is(":visible")&&(this.menu.element.hide(),this.menu.blur(),this.isNewMenu=!0,this._trigger("close",e))},_change:function(e){this.previous!==this._value()&&this._trigger("change",e,{item:this.selectedItem})},_normalize:function(e){return e.length&&e[0].label&&e[0].value?e:o.map(e,function(e){return"string"==typeof e?{label:e,value:e}:o.extend({},e,{label:e.label||e.value,value:e.value||e.label})})},_suggest:function(e){var t=this.menu.element.empty();this._renderMenu(t,e),this.isNewMenu=!0,this.menu.refresh(),t.show(),this._resizeMenu(),t.position(o.extend({of:this.element},this.options.position)),this.options.autoFocus&&this.menu.next(),this._on(this.document,{mousedown:"_closeOnClickOutside"})},_resizeMenu:function(){var e=this.menu.element;e.outerWidth(Math.max(e.width("").outerWidth()+1,this.element.outerWidth()))},_renderMenu:function(i,e){var s=this;o.each(e,function(e,t){s._renderItemData(i,t)})},_renderItemData:function(e,t){return this._renderItem(e,t).data("ui-autocomplete-item",t)},_renderItem:function(e,t){return o("<li>").append(o("<div>").text(t.label)).appendTo(e)},_move:function(e,t){this.menu.element.is(":visible")?this.menu.isFirstItem()&&/^previous/.test(e)||this.menu.isLastItem()&&/^next/.test(e)?(this.isMultiLine||this._value(this.term),this.menu.blur()):this.menu[e](t):this.search(null,t)},widget:function(){return this.menu.element},_value:function(){return this.valueMethod.apply(this.element,arguments)},_keyEvent:function(e,t){this.isMultiLine&&!this.menu.element.is(":visible")||(this._move(e,t),t.preventDefault())},_isContentEditable:function(e){var t;return!!e.length&&("inherit"===(t=e.prop("contentEditable"))?this._isContentEditable(e.parent()):"true"===t)}}),o.extend(o.ui.autocomplete,{escapeRegex:function(e){return e.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")},filter:function(e,t){var i=new RegExp(o.ui.autocomplete.escapeRegex(t),"i");return o.grep(e,function(e){return i.test(e.label||e.value||e)})}}),o.widget("ui.autocomplete",o.ui.autocomplete,{options:{messages:{noResults:"No search results.",results:function(e){return e+(1<e?" results are":" result is")+" available, use up and down arrow keys to navigate."}}},__response:function(e){var t;this._superApply(arguments),this.options.disabled||this.cancelSearch||(t=e&&e.length?this.options.messages.results(e.length):this.options.messages.noResults,clearTimeout(this.liveRegionTimer),this.liveRegionTimer=this._delay(function(){this.liveRegion.html(o("<div>").text(t))},100))}}),o.ui.autocomplete});
!function(t,e){"object"==typeof module&&module.exports?module.exports=e():t.EvEmitter=e()}("undefined"!=typeof window?window:this,(function(){function t(){}let e=t.prototype;return e.on=function(t,e){if(!t||!e)return this;let i=this._events=this._events||{},s=i[t]=i[t]||[];return s.includes(e)||s.push(e),this},e.once=function(t,e){if(!t||!e)return this;this.on(t,e);let i=this._onceEvents=this._onceEvents||{};return(i[t]=i[t]||{})[e]=!0,this},e.off=function(t,e){let i=this._events&&this._events[t];if(!i||!i.length)return this;let s=i.indexOf(e);return-1!=s&&i.splice(s,1),this},e.emitEvent=function(t,e){let i=this._events&&this._events[t];if(!i||!i.length)return this;i=i.slice(0),e=e||[];let s=this._onceEvents&&this._onceEvents[t];for(let n of i){s&&s[n]&&(this.off(t,n),delete s[n]),n.apply(this,e)}return this},e.allOff=function(){return delete this._events,delete this._onceEvents,this},t})),
function(t,e){"object"==typeof module&&module.exports?module.exports=e(t,require("ev-emitter")):t.imagesLoaded=e(t,t.EvEmitter)}("undefined"!=typeof window?window:this,(function(t,e){let i=t.jQuery,s=t.console;function n(t,e,o){if(!(this instanceof n))return new n(t,e,o);let r=t;var h;("string"==typeof t&&(r=document.querySelectorAll(t)),r)?(this.elements=(h=r,Array.isArray(h)?h:"object"==typeof h&&"number"==typeof h.length?[...h]:[h]),this.options={},"function"==typeof e?o=e:Object.assign(this.options,e),o&&this.on("always",o),this.getImages(),i&&(this.jqDeferred=new i.Deferred),setTimeout(this.check.bind(this))):s.error(`Bad element for imagesLoaded ${r||t}`)}n.prototype=Object.create(e.prototype),n.prototype.getImages=function(){this.images=[],this.elements.forEach(this.addElementImages,this)};const o=[1,9,11];n.prototype.addElementImages=function(t){"IMG"===t.nodeName&&this.addImage(t),!0===this.options.background&&this.addElementBackgroundImages(t);let{nodeType:e}=t;if(!e||!o.includes(e))return;let i=t.querySelectorAll("img");for(let t of i)this.addImage(t);if("string"==typeof this.options.background){let e=t.querySelectorAll(this.options.background);for(let t of e)this.addElementBackgroundImages(t)}};const r=/url\((['"])?(.*?)\1\)/gi;function h(t){this.img=t}function d(t,e){this.url=t,this.element=e,this.img=new Image}return n.prototype.addElementBackgroundImages=function(t){let e=getComputedStyle(t);if(!e)return;let i=r.exec(e.backgroundImage);for(;null!==i;){let s=i&&i[2];s&&this.addBackground(s,t),i=r.exec(e.backgroundImage)}},n.prototype.addImage=function(t){let e=new h(t);this.images.push(e)},n.prototype.addBackground=function(t,e){let i=new d(t,e);this.images.push(i)},n.prototype.check=function(){if(this.progressedCount=0,this.hasAnyBroken=!1,!this.images.length)return void this.complete();let t=(t,e,i)=>{setTimeout((()=>{this.progress(t,e,i)}))};this.images.forEach((function(e){e.once("progress",t),e.check()}))},n.prototype.progress=function(t,e,i){this.progressedCount++,this.hasAnyBroken=this.hasAnyBroken||!t.isLoaded,this.emitEvent("progress",[this,t,e]),this.jqDeferred&&this.jqDeferred.notify&&this.jqDeferred.notify(this,t),this.progressedCount===this.images.length&&this.complete(),this.options.debug&&s&&s.log(`progress: ${i}`,t,e)},n.prototype.complete=function(){let t=this.hasAnyBroken?"fail":"done";if(this.isComplete=!0,this.emitEvent(t,[this]),this.emitEvent("always",[this]),this.jqDeferred){let t=this.hasAnyBroken?"reject":"resolve";this.jqDeferred[t](this)}},h.prototype=Object.create(e.prototype),h.prototype.check=function(){this.getIsImageComplete()?this.confirm(0!==this.img.naturalWidth,"naturalWidth"):(this.proxyImage=new Image,this.img.crossOrigin&&(this.proxyImage.crossOrigin=this.img.crossOrigin),this.proxyImage.addEventListener("load",this),this.proxyImage.addEventListener("error",this),this.img.addEventListener("load",this),this.img.addEventListener("error",this),this.proxyImage.src=this.img.currentSrc||this.img.src)},h.prototype.getIsImageComplete=function(){return this.img.complete&&this.img.naturalWidth},h.prototype.confirm=function(t,e){this.isLoaded=t;let{parentNode:i}=this.img,s="PICTURE"===i.nodeName?i:this.img;this.emitEvent("progress",[this,s,e])},h.prototype.handleEvent=function(t){let e="on"+t.type;this[e]&&this[e](t)},h.prototype.onload=function(){this.confirm(!0,"onload"),this.unbindEvents()},h.prototype.onerror=function(){this.confirm(!1,"onerror"),this.unbindEvents()},h.prototype.unbindEvents=function(){this.proxyImage.removeEventListener("load",this),this.proxyImage.removeEventListener("error",this),this.img.removeEventListener("load",this),this.img.removeEventListener("error",this)},d.prototype=Object.create(h.prototype),d.prototype.check=function(){this.img.addEventListener("load",this),this.img.addEventListener("error",this),this.img.src=this.url,this.getIsImageComplete()&&(this.confirm(0!==this.img.naturalWidth,"naturalWidth"),this.unbindEvents())},d.prototype.unbindEvents=function(){this.img.removeEventListener("load",this),this.img.removeEventListener("error",this)},d.prototype.confirm=function(t,e){this.isLoaded=t,this.emitEvent("progress",[this,this.element,e])},n.makeJQueryPlugin=function(e){(e=e||t.jQuery)&&(i=e,i.fn.imagesLoaded=function(t,e){return new n(this,t,e).jqDeferred.promise(i(this))})},n.makeJQueryPlugin(),n}));
!function(t,e){"function"==typeof define&&define.amd?define("jquery-bridget/jquery-bridget",["jquery"],function(i){return e(t,i)}):"object"==typeof module&&module.exports?module.exports=e(t,require("jquery")):t.jQueryBridget=e(t,t.jQuery)}(window,function(t,e){"use strict";function i(i,r,a){function h(t,e,n){var o,r="$()."+i+'("'+e+'")';return t.each(function(t,h){var u=a.data(h,i);if(!u)return void s(i+" not initialized. Cannot call methods, i.e. "+r);var d=u[e];if(!d||"_"==e.charAt(0))return void s(r+" is not a valid method");var l=d.apply(u,n);o=void 0===o?l:o}),void 0!==o?o:t}function u(t,e){t.each(function(t,n){var o=a.data(n,i);o?(o.option(e),o._init()):(o=new r(n,e),a.data(n,i,o))})}a=a||e||t.jQuery,a&&(r.prototype.option||(r.prototype.option=function(t){a.isPlainObject(t)&&(this.options=a.extend(!0,this.options,t))}),a.fn[i]=function(t){if("string"==typeof t){var e=o.call(arguments,1);return h(this,t,e)}return u(this,t),this},n(a))}function n(t){!t||t&&t.bridget||(t.bridget=i)}var o=Array.prototype.slice,r=t.console,s="undefined"==typeof r?function(){}:function(t){r.error(t)};return n(e||t.jQuery),i}),function(t,e){"function"==typeof define&&define.amd?define("ev-emitter/ev-emitter",e):"object"==typeof module&&module.exports?module.exports=e():t.EvEmitter=e()}("undefined"!=typeof window?window:this,function(){function t(){}var e=t.prototype;return e.on=function(t,e){if(t&&e){var i=this._events=this._events||{},n=i[t]=i[t]||[];return-1==n.indexOf(e)&&n.push(e),this}},e.once=function(t,e){if(t&&e){this.on(t,e);var i=this._onceEvents=this._onceEvents||{},n=i[t]=i[t]||{};return n[e]=!0,this}},e.off=function(t,e){var i=this._events&&this._events[t];if(i&&i.length){var n=i.indexOf(e);return-1!=n&&i.splice(n,1),this}},e.emitEvent=function(t,e){var i=this._events&&this._events[t];if(i&&i.length){i=i.slice(0),e=e||[];for(var n=this._onceEvents&&this._onceEvents[t],o=0;o<i.length;o++){var r=i[o],s=n&&n[r];s&&(this.off(t,r),delete n[r]),r.apply(this,e)}return this}},e.allOff=function(){delete this._events,delete this._onceEvents},t}),function(t,e){"function"==typeof define&&define.amd?define("get-size/get-size",e):"object"==typeof module&&module.exports?module.exports=e():t.getSize=e()}(window,function(){"use strict";function t(t){var e=parseFloat(t),i=-1==t.indexOf("%")&&!isNaN(e);return i&&e}function e(){}function i(){for(var t={width:0,height:0,innerWidth:0,innerHeight:0,outerWidth:0,outerHeight:0},e=0;u>e;e++){var i=h[e];t[i]=0}return t}function n(t){var e=getComputedStyle(t);return e||a("Style returned "+e+". Are you running this code in a hidden iframe on Firefox? See https://bit.ly/getsizebug1"),e}function o(){if(!d){d=!0;var e=document.createElement("div");e.style.width="200px",e.style.padding="1px 2px 3px 4px",e.style.borderStyle="solid",e.style.borderWidth="1px 2px 3px 4px",e.style.boxSizing="border-box";var i=document.body||document.documentElement;i.appendChild(e);var o=n(e);s=200==Math.round(t(o.width)),r.isBoxSizeOuter=s,i.removeChild(e)}}function r(e){if(o(),"string"==typeof e&&(e=document.querySelector(e)),e&&"object"==typeof e&&e.nodeType){var r=n(e);if("none"==r.display)return i();var a={};a.width=e.offsetWidth,a.height=e.offsetHeight;for(var d=a.isBorderBox="border-box"==r.boxSizing,l=0;u>l;l++){var c=h[l],f=r[c],m=parseFloat(f);a[c]=isNaN(m)?0:m}var p=a.paddingLeft+a.paddingRight,g=a.paddingTop+a.paddingBottom,y=a.marginLeft+a.marginRight,v=a.marginTop+a.marginBottom,_=a.borderLeftWidth+a.borderRightWidth,z=a.borderTopWidth+a.borderBottomWidth,E=d&&s,b=t(r.width);b!==!1&&(a.width=b+(E?0:p+_));var x=t(r.height);return x!==!1&&(a.height=x+(E?0:g+z)),a.innerWidth=a.width-(p+_),a.innerHeight=a.height-(g+z),a.outerWidth=a.width+y,a.outerHeight=a.height+v,a}}var s,a="undefined"==typeof console?e:function(t){console.error(t)},h=["paddingLeft","paddingRight","paddingTop","paddingBottom","marginLeft","marginRight","marginTop","marginBottom","borderLeftWidth","borderRightWidth","borderTopWidth","borderBottomWidth"],u=h.length,d=!1;return r}),function(t,e){"use strict";"function"==typeof define&&define.amd?define("desandro-matches-selector/matches-selector",e):"object"==typeof module&&module.exports?module.exports=e():t.matchesSelector=e()}(window,function(){"use strict";var t=function(){var t=window.Element.prototype;if(t.matches)return"matches";if(t.matchesSelector)return"matchesSelector";for(var e=["webkit","moz","ms","o"],i=0;i<e.length;i++){var n=e[i],o=n+"MatchesSelector";if(t[o])return o}}();return function(e,i){return e[t](i)}}),function(t,e){"function"==typeof define&&define.amd?define("fizzy-ui-utils/utils",["desandro-matches-selector/matches-selector"],function(i){return e(t,i)}):"object"==typeof module&&module.exports?module.exports=e(t,require("desandro-matches-selector")):t.fizzyUIUtils=e(t,t.matchesSelector)}(window,function(t,e){var i={};i.extend=function(t,e){for(var i in e)t[i]=e[i];return t},i.modulo=function(t,e){return(t%e+e)%e};var n=Array.prototype.slice;i.makeArray=function(t){if(Array.isArray(t))return t;if(null===t||void 0===t)return[];var e="object"==typeof t&&"number"==typeof t.length;return e?n.call(t):[t]},i.removeFrom=function(t,e){var i=t.indexOf(e);-1!=i&&t.splice(i,1)},i.getParent=function(t,i){for(;t.parentNode&&t!=document.body;)if(t=t.parentNode,e(t,i))return t},i.getQueryElement=function(t){return"string"==typeof t?document.querySelector(t):t},i.handleEvent=function(t){var e="on"+t.type;this[e]&&this[e](t)},i.filterFindElements=function(t,n){t=i.makeArray(t);var o=[];return t.forEach(function(t){if(t instanceof HTMLElement){if(!n)return void o.push(t);e(t,n)&&o.push(t);for(var i=t.querySelectorAll(n),r=0;r<i.length;r++)o.push(i[r])}}),o},i.debounceMethod=function(t,e,i){i=i||100;var n=t.prototype[e],o=e+"Timeout";t.prototype[e]=function(){var t=this[o];clearTimeout(t);var e=arguments,r=this;this[o]=setTimeout(function(){n.apply(r,e),delete r[o]},i)}},i.docReady=function(t){var e=document.readyState;"complete"==e||"interactive"==e?setTimeout(t):document.addEventListener("DOMContentLoaded",t)},i.toDashed=function(t){return t.replace(/(.)([A-Z])/g,function(t,e,i){return e+"-"+i}).toLowerCase()};var o=t.console;return i.htmlInit=function(e,n){i.docReady(function(){var r=i.toDashed(n),s="data-"+r,a=document.querySelectorAll("["+s+"]"),h=document.querySelectorAll(".js-"+r),u=i.makeArray(a).concat(i.makeArray(h)),d=s+"-options",l=t.jQuery;u.forEach(function(t){var i,r=t.getAttribute(s)||t.getAttribute(d);try{i=r&&JSON.parse(r)}catch(a){return void(o&&o.error("Error parsing "+s+" on "+t.className+": "+a))}var h=new e(t,i);l&&l.data(t,n,h)})})},i}),function(t,e){"function"==typeof define&&define.amd?define("outlayer/item",["ev-emitter/ev-emitter","get-size/get-size"],e):"object"==typeof module&&module.exports?module.exports=e(require("ev-emitter"),require("get-size")):(t.Outlayer={},t.Outlayer.Item=e(t.EvEmitter,t.getSize))}(window,function(t,e){"use strict";function i(t){for(var e in t)return!1;return e=null,!0}function n(t,e){t&&(this.element=t,this.layout=e,this.position={x:0,y:0},this._create())}function o(t){return t.replace(/([A-Z])/g,function(t){return"-"+t.toLowerCase()})}var r=document.documentElement.style,s="string"==typeof r.transition?"transition":"WebkitTransition",a="string"==typeof r.transform?"transform":"WebkitTransform",h={WebkitTransition:"webkitTransitionEnd",transition:"transitionend"}[s],u={transform:a,transition:s,transitionDuration:s+"Duration",transitionProperty:s+"Property",transitionDelay:s+"Delay"},d=n.prototype=Object.create(t.prototype);d.constructor=n,d._create=function(){this._transn={ingProperties:{},clean:{},onEnd:{}},this.css({position:"absolute"})},d.handleEvent=function(t){var e="on"+t.type;this[e]&&this[e](t)},d.getSize=function(){this.size=e(this.element)},d.css=function(t){var e=this.element.style;for(var i in t){var n=u[i]||i;e[n]=t[i]}},d.getPosition=function(){var t=getComputedStyle(this.element),e=this.layout._getOption("originLeft"),i=this.layout._getOption("originTop"),n=t[e?"left":"right"],o=t[i?"top":"bottom"],r=parseFloat(n),s=parseFloat(o),a=this.layout.size;-1!=n.indexOf("%")&&(r=r/100*a.width),-1!=o.indexOf("%")&&(s=s/100*a.height),r=isNaN(r)?0:r,s=isNaN(s)?0:s,r-=e?a.paddingLeft:a.paddingRight,s-=i?a.paddingTop:a.paddingBottom,this.position.x=r,this.position.y=s},d.layoutPosition=function(){var t=this.layout.size,e={},i=this.layout._getOption("originLeft"),n=this.layout._getOption("originTop"),o=i?"paddingLeft":"paddingRight",r=i?"left":"right",s=i?"right":"left",a=this.position.x+t[o];e[r]=this.getXValue(a),e[s]="";var h=n?"paddingTop":"paddingBottom",u=n?"top":"bottom",d=n?"bottom":"top",l=this.position.y+t[h];e[u]=this.getYValue(l),e[d]="",this.css(e),this.emitEvent("layout",[this])},d.getXValue=function(t){var e=this.layout._getOption("horizontal");return this.layout.options.percentPosition&&!e?t/this.layout.size.width*100+"%":t+"px"},d.getYValue=function(t){var e=this.layout._getOption("horizontal");return this.layout.options.percentPosition&&e?t/this.layout.size.height*100+"%":t+"px"},d._transitionTo=function(t,e){this.getPosition();var i=this.position.x,n=this.position.y,o=t==this.position.x&&e==this.position.y;if(this.setPosition(t,e),o&&!this.isTransitioning)return void this.layoutPosition();var r=t-i,s=e-n,a={};a.transform=this.getTranslate(r,s),this.transition({to:a,onTransitionEnd:{transform:this.layoutPosition},isCleaning:!0})},d.getTranslate=function(t,e){var i=this.layout._getOption("originLeft"),n=this.layout._getOption("originTop");return t=i?t:-t,e=n?e:-e,"translate3d("+t+"px, "+e+"px, 0)"},d.goTo=function(t,e){this.setPosition(t,e),this.layoutPosition()},d.moveTo=d._transitionTo,d.setPosition=function(t,e){this.position.x=parseFloat(t),this.position.y=parseFloat(e)},d._nonTransition=function(t){this.css(t.to),t.isCleaning&&this._removeStyles(t.to);for(var e in t.onTransitionEnd)t.onTransitionEnd[e].call(this)},d.transition=function(t){if(!parseFloat(this.layout.options.transitionDuration))return void this._nonTransition(t);var e=this._transn;for(var i in t.onTransitionEnd)e.onEnd[i]=t.onTransitionEnd[i];for(i in t.to)e.ingProperties[i]=!0,t.isCleaning&&(e.clean[i]=!0);if(t.from){this.css(t.from);var n=this.element.offsetHeight;n=null}this.enableTransition(t.to),this.css(t.to),this.isTransitioning=!0};var l="opacity,"+o(a);d.enableTransition=function(){if(!this.isTransitioning){var t=this.layout.options.transitionDuration;t="number"==typeof t?t+"ms":t,this.css({transitionProperty:l,transitionDuration:t,transitionDelay:this.staggerDelay||0}),this.element.addEventListener(h,this,!1)}},d.onwebkitTransitionEnd=function(t){this.ontransitionend(t)},d.onotransitionend=function(t){this.ontransitionend(t)};var c={"-webkit-transform":"transform"};d.ontransitionend=function(t){if(t.target===this.element){var e=this._transn,n=c[t.propertyName]||t.propertyName;if(delete e.ingProperties[n],i(e.ingProperties)&&this.disableTransition(),n in e.clean&&(this.element.style[t.propertyName]="",delete e.clean[n]),n in e.onEnd){var o=e.onEnd[n];o.call(this),delete e.onEnd[n]}this.emitEvent("transitionEnd",[this])}},d.disableTransition=function(){this.removeTransitionStyles(),this.element.removeEventListener(h,this,!1),this.isTransitioning=!1},d._removeStyles=function(t){var e={};for(var i in t)e[i]="";this.css(e)};var f={transitionProperty:"",transitionDuration:"",transitionDelay:""};return d.removeTransitionStyles=function(){this.css(f)},d.stagger=function(t){t=isNaN(t)?0:t,this.staggerDelay=t+"ms"},d.removeElem=function(){this.element.parentNode.removeChild(this.element),this.css({display:""}),this.emitEvent("remove",[this])},d.remove=function(){return s&&parseFloat(this.layout.options.transitionDuration)?(this.once("transitionEnd",function(){this.removeElem()}),void this.hide()):void this.removeElem()},d.reveal=function(){delete this.isHidden,this.css({display:""});var t=this.layout.options,e={},i=this.getHideRevealTransitionEndProperty("visibleStyle");e[i]=this.onRevealTransitionEnd,this.transition({from:t.hiddenStyle,to:t.visibleStyle,isCleaning:!0,onTransitionEnd:e})},d.onRevealTransitionEnd=function(){this.isHidden||this.emitEvent("reveal")},d.getHideRevealTransitionEndProperty=function(t){var e=this.layout.options[t];if(e.opacity)return"opacity";for(var i in e)return i},d.hide=function(){this.isHidden=!0,this.css({display:""});var t=this.layout.options,e={},i=this.getHideRevealTransitionEndProperty("hiddenStyle");e[i]=this.onHideTransitionEnd,this.transition({from:t.visibleStyle,to:t.hiddenStyle,isCleaning:!0,onTransitionEnd:e})},d.onHideTransitionEnd=function(){this.isHidden&&(this.css({display:"none"}),this.emitEvent("hide"))},d.destroy=function(){this.css({position:"",left:"",right:"",top:"",bottom:"",transition:"",transform:""})},n}),function(t,e){"use strict";"function"==typeof define&&define.amd?define("outlayer/outlayer",["ev-emitter/ev-emitter","get-size/get-size","fizzy-ui-utils/utils","./item"],function(i,n,o,r){return e(t,i,n,o,r)}):"object"==typeof module&&module.exports?module.exports=e(t,require("ev-emitter"),require("get-size"),require("fizzy-ui-utils"),require("./item")):t.Outlayer=e(t,t.EvEmitter,t.getSize,t.fizzyUIUtils,t.Outlayer.Item)}(window,function(t,e,i,n,o){"use strict";function r(t,e){var i=n.getQueryElement(t);if(!i)return void(h&&h.error("Bad element for "+this.constructor.namespace+": "+(i||t)));this.element=i,u&&(this.$element=u(this.element)),this.options=n.extend({},this.constructor.defaults),this.option(e);var o=++l;this.element.outlayerGUID=o,c[o]=this,this._create();var r=this._getOption("initLayout");r&&this.layout()}function s(t){function e(){t.apply(this,arguments)}return e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e}function a(t){if("number"==typeof t)return t;var e=t.match(/(^\d*\.?\d*)(\w*)/),i=e&&e[1],n=e&&e[2];if(!i.length)return 0;i=parseFloat(i);var o=m[n]||1;return i*o}var h=t.console,u=t.jQuery,d=function(){},l=0,c={};r.namespace="outlayer",r.Item=o,r.defaults={containerStyle:{position:"relative"},initLayout:!0,originLeft:!0,originTop:!0,resize:!0,resizeContainer:!0,transitionDuration:"0.4s",hiddenStyle:{opacity:0,transform:"scale(0.001)"},visibleStyle:{opacity:1,transform:"scale(1)"}};var f=r.prototype;n.extend(f,e.prototype),f.option=function(t){n.extend(this.options,t)},f._getOption=function(t){var e=this.constructor.compatOptions[t];return e&&void 0!==this.options[e]?this.options[e]:this.options[t]},r.compatOptions={initLayout:"isInitLayout",horizontal:"isHorizontal",layoutInstant:"isLayoutInstant",originLeft:"isOriginLeft",originTop:"isOriginTop",resize:"isResizeBound",resizeContainer:"isResizingContainer"},f._create=function(){this.reloadItems(),this.stamps=[],this.stamp(this.options.stamp),n.extend(this.element.style,this.options.containerStyle);var t=this._getOption("resize");t&&this.bindResize()},f.reloadItems=function(){this.items=this._itemize(this.element.children)},f._itemize=function(t){for(var e=this._filterFindItemElements(t),i=this.constructor.Item,n=[],o=0;o<e.length;o++){var r=e[o],s=new i(r,this);n.push(s)}return n},f._filterFindItemElements=function(t){return n.filterFindElements(t,this.options.itemSelector)},f.getItemElements=function(){return this.items.map(function(t){return t.element})},f.layout=function(){this._resetLayout(),this._manageStamps();var t=this._getOption("layoutInstant"),e=void 0!==t?t:!this._isLayoutInited;this.layoutItems(this.items,e),this._isLayoutInited=!0},f._init=f.layout,f._resetLayout=function(){this.getSize()},f.getSize=function(){this.size=i(this.element)},f._getMeasurement=function(t,e){var n,o=this.options[t];o?("string"==typeof o?n=this.element.querySelector(o):o instanceof HTMLElement&&(n=o),this[t]=n?i(n)[e]:o):this[t]=0},f.layoutItems=function(t,e){t=this._getItemsForLayout(t),this._layoutItems(t,e),this._postLayout()},f._getItemsForLayout=function(t){return t.filter(function(t){return!t.isIgnored})},f._layoutItems=function(t,e){if(this._emitCompleteOnItems("layout",t),t&&t.length){var i=[];t.forEach(function(t){var n=this._getItemLayoutPosition(t);n.item=t,n.isInstant=e||t.isLayoutInstant,i.push(n)},this),this._processLayoutQueue(i)}},f._getItemLayoutPosition=function(){return{x:0,y:0}},f._processLayoutQueue=function(t){this.updateStagger(),t.forEach(function(t,e){this._positionItem(t.item,t.x,t.y,t.isInstant,e)},this)},f.updateStagger=function(){var t=this.options.stagger;return null===t||void 0===t?void(this.stagger=0):(this.stagger=a(t),this.stagger)},f._positionItem=function(t,e,i,n,o){n?t.goTo(e,i):(t.stagger(o*this.stagger),t.moveTo(e,i))},f._postLayout=function(){this.resizeContainer()},f.resizeContainer=function(){var t=this._getOption("resizeContainer");if(t){var e=this._getContainerSize();e&&(this._setContainerMeasure(e.width,!0),this._setContainerMeasure(e.height,!1))}},f._getContainerSize=d,f._setContainerMeasure=function(t,e){if(void 0!==t){var i=this.size;i.isBorderBox&&(t+=e?i.paddingLeft+i.paddingRight+i.borderLeftWidth+i.borderRightWidth:i.paddingBottom+i.paddingTop+i.borderTopWidth+i.borderBottomWidth),t=Math.max(t,0),this.element.style[e?"width":"height"]=t+"px"}},f._emitCompleteOnItems=function(t,e){function i(){o.dispatchEvent(t+"Complete",null,[e])}function n(){s++,s==r&&i()}var o=this,r=e.length;if(!e||!r)return void i();var s=0;e.forEach(function(e){e.once(t,n)})},f.dispatchEvent=function(t,e,i){var n=e?[e].concat(i):i;if(this.emitEvent(t,n),u)if(this.$element=this.$element||u(this.element),e){var o=u.Event(e);o.type=t,this.$element.trigger(o,i)}else this.$element.trigger(t,i)},f.ignore=function(t){var e=this.getItem(t);e&&(e.isIgnored=!0)},f.unignore=function(t){var e=this.getItem(t);e&&delete e.isIgnored},f.stamp=function(t){t=this._find(t),t&&(this.stamps=this.stamps.concat(t),t.forEach(this.ignore,this))},f.unstamp=function(t){t=this._find(t),t&&t.forEach(function(t){n.removeFrom(this.stamps,t),this.unignore(t)},this)},f._find=function(t){return t?("string"==typeof t&&(t=this.element.querySelectorAll(t)),t=n.makeArray(t)):void 0},f._manageStamps=function(){this.stamps&&this.stamps.length&&(this._getBoundingRect(),this.stamps.forEach(this._manageStamp,this))},f._getBoundingRect=function(){var t=this.element.getBoundingClientRect(),e=this.size;this._boundingRect={left:t.left+e.paddingLeft+e.borderLeftWidth,top:t.top+e.paddingTop+e.borderTopWidth,right:t.right-(e.paddingRight+e.borderRightWidth),bottom:t.bottom-(e.paddingBottom+e.borderBottomWidth)}},f._manageStamp=d,f._getElementOffset=function(t){var e=t.getBoundingClientRect(),n=this._boundingRect,o=i(t),r={left:e.left-n.left-o.marginLeft,top:e.top-n.top-o.marginTop,right:n.right-e.right-o.marginRight,bottom:n.bottom-e.bottom-o.marginBottom};return r},f.handleEvent=n.handleEvent,f.bindResize=function(){t.addEventListener("resize",this),this.isResizeBound=!0},f.unbindResize=function(){t.removeEventListener("resize",this),this.isResizeBound=!1},f.onresize=function(){this.resize()},n.debounceMethod(r,"onresize",100),f.resize=function(){this.isResizeBound&&this.needsResizeLayout()&&this.layout()},f.needsResizeLayout=function(){var t=i(this.element),e=this.size&&t;return e&&t.innerWidth!==this.size.innerWidth},f.addItems=function(t){var e=this._itemize(t);return e.length&&(this.items=this.items.concat(e)),e},f.appended=function(t){var e=this.addItems(t);e.length&&(this.layoutItems(e,!0),this.reveal(e))},f.prepended=function(t){var e=this._itemize(t);if(e.length){var i=this.items.slice(0);this.items=e.concat(i),this._resetLayout(),this._manageStamps(),this.layoutItems(e,!0),this.reveal(e),this.layoutItems(i)}},f.reveal=function(t){if(this._emitCompleteOnItems("reveal",t),t&&t.length){var e=this.updateStagger();t.forEach(function(t,i){t.stagger(i*e),t.reveal()})}},f.hide=function(t){if(this._emitCompleteOnItems("hide",t),t&&t.length){var e=this.updateStagger();t.forEach(function(t,i){t.stagger(i*e),t.hide()})}},f.revealItemElements=function(t){var e=this.getItems(t);this.reveal(e)},f.hideItemElements=function(t){var e=this.getItems(t);this.hide(e)},f.getItem=function(t){for(var e=0;e<this.items.length;e++){var i=this.items[e];if(i.element==t)return i}},f.getItems=function(t){t=n.makeArray(t);var e=[];return t.forEach(function(t){var i=this.getItem(t);i&&e.push(i)},this),e},f.remove=function(t){var e=this.getItems(t);this._emitCompleteOnItems("remove",e),e&&e.length&&e.forEach(function(t){t.remove(),n.removeFrom(this.items,t)},this)},f.destroy=function(){var t=this.element.style;t.height="",t.position="",t.width="",this.items.forEach(function(t){t.destroy()}),this.unbindResize();var e=this.element.outlayerGUID;delete c[e],delete this.element.outlayerGUID,u&&u.removeData(this.element,this.constructor.namespace)},r.data=function(t){t=n.getQueryElement(t);var e=t&&t.outlayerGUID;return e&&c[e]},r.create=function(t,e){var i=s(r);return i.defaults=n.extend({},r.defaults),n.extend(i.defaults,e),i.compatOptions=n.extend({},r.compatOptions),i.namespace=t,i.data=r.data,i.Item=s(o),n.htmlInit(i,t),u&&u.bridget&&u.bridget(t,i),i};var m={ms:1,s:1e3};return r.Item=o,r}),function(t,e){"function"==typeof define&&define.amd?define(["outlayer/outlayer","get-size/get-size"],e):"object"==typeof module&&module.exports?module.exports=e(require("outlayer"),require("get-size")):t.Masonry=e(t.Outlayer,t.getSize)}(window,function(t,e){var i=t.create("masonry");i.compatOptions.fitWidth="isFitWidth";var n=i.prototype;return n._resetLayout=function(){this.getSize(),this._getMeasurement("columnWidth","outerWidth"),this._getMeasurement("gutter","outerWidth"),this.measureColumns(),this.colYs=[];for(var t=0;t<this.cols;t++)this.colYs.push(0);this.maxY=0,this.horizontalColIndex=0},n.measureColumns=function(){if(this.getContainerWidth(),!this.columnWidth){var t=this.items[0],i=t&&t.element;this.columnWidth=i&&e(i).outerWidth||this.containerWidth}var n=this.columnWidth+=this.gutter,o=this.containerWidth+this.gutter,r=o/n,s=n-o%n,a=s&&1>s?"round":"floor";r=Math[a](r),this.cols=Math.max(r,1)},n.getContainerWidth=function(){var t=this._getOption("fitWidth"),i=t?this.element.parentNode:this.element,n=e(i);this.containerWidth=n&&n.innerWidth},n._getItemLayoutPosition=function(t){t.getSize();var e=t.size.outerWidth%this.columnWidth,i=e&&1>e?"round":"ceil",n=Math[i](t.size.outerWidth/this.columnWidth);n=Math.min(n,this.cols);for(var o=this.options.horizontalOrder?"_getHorizontalColPosition":"_getTopColPosition",r=this[o](n,t),s={x:this.columnWidth*r.col,y:r.y},a=r.y+t.size.outerHeight,h=n+r.col,u=r.col;h>u;u++)this.colYs[u]=a;return s},n._getTopColPosition=function(t){var e=this._getTopColGroup(t),i=Math.min.apply(Math,e);return{col:e.indexOf(i),y:i}},n._getTopColGroup=function(t){if(2>t)return this.colYs;for(var e=[],i=this.cols+1-t,n=0;i>n;n++)e[n]=this._getColGroupY(n,t);return e},n._getColGroupY=function(t,e){if(2>e)return this.colYs[t];var i=this.colYs.slice(t,t+e);return Math.max.apply(Math,i)},n._getHorizontalColPosition=function(t,e){var i=this.horizontalColIndex%this.cols,n=t>1&&i+t>this.cols;i=n?0:i;var o=e.size.outerWidth&&e.size.outerHeight;return this.horizontalColIndex=o?i+t:this.horizontalColIndex,{col:i,y:this._getColGroupY(i,t)}},n._manageStamp=function(t){var i=e(t),n=this._getElementOffset(t),o=this._getOption("originLeft"),r=o?n.left:n.right,s=r+i.outerWidth,a=Math.floor(r/this.columnWidth);a=Math.max(0,a);var h=Math.floor(s/this.columnWidth);h-=s%this.columnWidth?0:1,h=Math.min(this.cols-1,h);for(var u=this._getOption("originTop"),d=(u?n.top:n.bottom)+i.outerHeight,l=a;h>=l;l++)this.colYs[l]=Math.max(d,this.colYs[l])},n._getContainerSize=function(){this.maxY=Math.max.apply(Math,this.colYs);var t={height:this.maxY};return this._getOption("fitWidth")&&(t.width=this._getContainerFitWidth()),t},n._getContainerFitWidth=function(){for(var t=0,e=this.cols;--e&&0===this.colYs[e];)t++;return(this.cols-t)*this.columnWidth-this.gutter},n.needsResizeLayout=function(){var t=this.containerWidth;return this.getContainerWidth(),t!=this.containerWidth},i});
!function(a){"use strict";var b=a.Masonry;b.prototype._remapV2Options=function(){this._remapOption("gutterWidth","gutter"),this._remapOption("isResizable","isResizeBound"),this._remapOption("isRTL","isOriginLeft",function(a){return!a});var a=this.options.isAnimated;if(void 0!==a&&(this.options.transitionDuration=a?this.options.transitionDuration:0),void 0===a||a){var b=this.options.animationOptions,c=b&&b.duration;c&&(this.options.transitionDuration="string"==typeof c?c:c+"ms")}},b.prototype._remapOption=function(a,b,c){var d=this.options[a];void 0!==d&&(this.options[b]=c?c(d):d)};var c=b.prototype._create;b.prototype._create=function(){var a=this;this._remapV2Options(),c.apply(this,arguments),setTimeout(function(){jQuery(a.element).addClass("masonry")},0)};var d=b.prototype.layout;b.prototype.layout=function(){this._remapV2Options(),d.apply(this,arguments)};var e=b.prototype.option;b.prototype.option=function(){e.apply(this,arguments),this._remapV2Options()};var f=b.prototype._itemize;b.prototype._itemize=function(a){var b=f.apply(this,arguments);return jQuery(a).addClass("masonry-brick"),b};var g=b.prototype.measureColumns;b.prototype.measureColumns=function(){var a=this.options.columnWidth;a&&"function"==typeof a&&(this.getContainerWidth(),this.columnWidth=a(this.containerWidth)),g.apply(this,arguments)},b.prototype.reload=function(){this.reloadItems.apply(this,arguments),this.layout.apply(this)};var h=b.prototype.destroy;b.prototype.destroy=function(){var a=this.getItemElements();jQuery(this.element).removeClass("masonry"),jQuery(a).removeClass("masonry-brick"),h.apply(this,arguments)}}(window);
(()=>{var t={41523(t){!function(e,o){const i=[];o.addResizeCallback=function(t,e){return-1===i.indexOf(t)&&(t.$$scope=e,i.push(t)),o},t.exports=function(){let t=o.$window.width();o.$window.off("resize.tar").on("resize.tar",function(){o.$window.width()!==t&&(e.each(i,function(t,e){e.call(e.$$scope||this)}),t=o.$window.width())})}}(ThriveGlobal.$j,TCB_Front)},49110(t){!function(e,o){const i=[];o.add_scroll_callback=function(t,e){return-1===i.indexOf(t)&&(t.$$scope=e,i.push(t)),o},t.exports=function(){let t=o.$document.scrollTop(),n="";o.$window.off("scroll.tar").on("scroll.tar",function(){const s=o.$document.scrollTop(),r=s>=t?"down":"up",a=n!==r;t=s,n=r,e.each(i,function(t,e){e.call(e.$$scope||this,s,r,a)})}),o.$window.trigger("scroll")}}(ThriveGlobal.$j,TCB_Front)},11481(){!function(t){"use strict";const e=function(e,o){this.el=t(e),this.options=t.extend({},t.fn.typed.defaults,o),this.isInput=this.el.is("input"),this.attr=this.options.attr,this.showCursor=!this.isInput&&this.options.showCursor,this.elContent=this.attr?this.el.attr(this.attr):this.el.text(),this.contentType=this.options.contentType,this.typeSpeed=this.options.typeSpeed,this.startDelay=this.options.startDelay,this.backSpeed=this.options.backSpeed,this.backDelay=this.options.backDelay,this.stringsElement=this.options.stringsElement,this.strings=this.options.strings,this.strPos=0,this.arrayPos=0,this.stopNum=0,this.loop=this.options.loop,this.loopCount=this.options.loopCount,this.curLoop=0,this.stop=!1,this.cursorChar=this.options.cursorChar,this.shuffle=this.options.shuffle,this.sequence=[],this.build()};e.prototype={constructor:e,init(t){void 0===t&&(t="delete");const e=this;function o(){for(let t=0;t<e.strings.length;++t)e.sequence[t]=t;e.shuffle&&(e.sequence=e.shuffleArray(e.sequence)),"delete"===t?(e.strPos=e.strings[e.sequence[e.arrayPos]].length,e.options.highlightClass?e.highlight(e.strings[e.sequence[e.arrayPos]],e.strPos):e.backspace(e.strings[e.sequence[e.arrayPos]],e.strPos)):(e.strPos=0,e.typewrite(e.strings[e.sequence[e.arrayPos]],e.strPos))}"delete"===t?e.timeout=setTimeout(o,e.startDelay):o()},build(){const e=this;if(!0===this.showCursor&&(this.cursor=t('<span class="typed-cursor">'+this.cursorChar+"</span>"),this.el.after(this.cursor)),this.stringsElement){e.strings=[],this.stringsElement.hide();const o=this.stringsElement.find("p");t.each(o,function(o,i){e.strings.push(t(i).html())})}this.init()},typewrite(t,e){if(!0===this.stop)return;const o=this.typeSpeed,i=this;i.timeout=setTimeout(function(){let o=0,n=t.substr(e);if("^"===n.charAt(0)){let i=1;/^\^\d+/.test(n)&&(n=/\d+/.exec(n)[0],i+=n.length,o=parseInt(n)),t=t.substring(0,e)+t.substring(e+i)}if("html"===i.contentType){const o=t.substr(e).charAt(0);if("<"===o||"&"===o){const i="<"===o?">":";";for(;t.substr(e).charAt(0)!==i;)e++;e++}}i.timeout=setTimeout(function(){if(e===t.length){if(i.options.onStringTyped(i.arrayPos),i.arrayPos===i.strings.length-1&&(i.options.callback(),i.curLoop++,!1===i.loop||i.curLoop===i.loopCount))return;i.timeout=setTimeout(function(){i.options.highlightClass?i.highlight(t,e):i.backspace(t,e)},i.backDelay)}else{0===e&&i.options.preStringTyped(i.arrayPos);const o=t.substr(0,e+1);i.attr?i.el.attr(i.attr,o):i.isInput?i.el.val(o):"html"===i.contentType?i.el.html(o):i.el.text(o),e++,i.typewrite(t,e)}},o)},o)},highlight(t,e){if(!0===this.stop)return;const o=this.backSpeed,i=this;i.timeout=setTimeout(function(){if("html"===i.contentType&&">"===t.substr(e).charAt(0)){for(;"<"!==t.substr(e).charAt(0);)e--;e--}const o=t.substr(0,e),n=t.substr(e);i.attr?i.el.attr(i.attr,o):i.el.html(o+'<span class="'+i.options.highlightClass+'" style="'+(i.options.highlightStyle||"")+'">'+n+"</span>"),e>i.stopNum?(e--,i.highlight(t,e)):e<=i.stopNum&&setTimeout(function(){i.arrayPos++,i.arrayPos===i.strings.length?(i.arrayPos=0,i.init("write")):i.typewrite(i.strings[i.sequence[i.arrayPos]],e)},200)},o)},backspace(e,o){if(!0===this.stop)return;const i=this.backSpeed,n=this,s=t(n.el);n.timeout=setTimeout(function(){if("html"===n.contentType&&">"===e.substr(o).charAt(0)){for(;"<"!==e.substr(o).charAt(0);)o--;o--}const t=e.substr(0,o);n.attr?n.el.attr(n.attr,t):n.isInput?n.el.val(t):"html"===n.contentType?n.el.html(t):n.el.text(t),o>n.stopNum?(o--,n.backspace(e,o)):o<=n.stopNum&&(n.arrayPos++,n.arrayPos===n.strings.length?(n.arrayPos=0,n.shuffle&&(n.sequence=n.shuffleArray(n.sequence)),n.init("write")):n.typewrite(n.strings[n.sequence[n.arrayPos]],o),n.options.highlightClass&&s.is("."+n.options.highlightClass)&&s.removeClass(n.options.highlightClass))},i)},shuffleArray(t){let e,o,i=t.length;if(i)for(;--i;)o=Math.floor(Math.random()*(i+1)),e=t[o],t[o]=t[i],t[i]=e;return t},pause(){this.stop=!0,clearInterval(this.timeout)},start(){!1!==this.stop&&(this.stop=!1,this.init())},reset(){clearInterval(this.timeout);const t=this.el.attr("id");this.el.after('<span id="'+t+'"/>'),this.el.remove(),void 0!==this.cursor&&this.cursor.remove(),this.options.resetCallback()}},t.fn.typed=function(o){return this.each(function(){const i=t(this),n="object"==typeof o&&o;let s=i.data("typed");s||(s=new e(this,n),i.data("typed",s)),"string"==typeof o&&s[o]()})},t.fn.typed.defaults={strings:["These are the default values...","You know what you should do?","Use your own!","Have a great day!"],stringsElement:null,typeSpeed:0,startDelay:0,backSpeed:0,shuffle:!1,backDelay:500,loop:!1,loopCount:!1,showCursor:!0,cursorChar:"|",attr:null,contentType:"html",callback(){},preStringTyped(){},onStringTyped(){},resetCallback(){}}}(window.jQuery)},46967(t){t.exports={_keyStr:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",encode(t){let e,o,i,n,s,r,a,l="",c=0;for(t=this._utf8_encode(t);c<t.length;)e=t.charCodeAt(c++),o=t.charCodeAt(c++),i=t.charCodeAt(c++),n=e>>2,s=(3&e)<<4|o>>4,r=(15&o)<<2|i>>6,a=63&i,isNaN(o)?r=a=64:isNaN(i)&&(a=64),l=l+this._keyStr.charAt(n)+this._keyStr.charAt(s)+this._keyStr.charAt(r)+this._keyStr.charAt(a);return l},decode(t){let e,o,i,n,s,r,a,l="",c=0;for(t=t.replace(/[^A-Za-z0-9\+\/\=]/g,"");c<t.length;)n=this._keyStr.indexOf(t.charAt(c++)),s=this._keyStr.indexOf(t.charAt(c++)),r=this._keyStr.indexOf(t.charAt(c++)),a=this._keyStr.indexOf(t.charAt(c++)),e=n<<2|s>>4,o=(15&s)<<4|r>>2,i=(3&r)<<6|a,l+=String.fromCharCode(e),64!=r&&(l+=String.fromCharCode(o)),64!=a&&(l+=String.fromCharCode(i));return l=this._utf8_decode(l),l},_utf8_encode(t){t=t.replace(/\r\n/g,"\n");let e="";for(let o=0;o<t.length;o++){const i=t.charCodeAt(o);i<128?e+=String.fromCharCode(i):i>127&&i<2048?(e+=String.fromCharCode(i>>6|192),e+=String.fromCharCode(63&i|128)):(e+=String.fromCharCode(i>>12|224),e+=String.fromCharCode(i>>6&63|128),e+=String.fromCharCode(63&i|128))}return e},_utf8_decode(t){let e="",o=0,i=0,n=0,s=0;for(;o<t.length;)i=t.charCodeAt(o),i<128?(e+=String.fromCharCode(i),o++):i>191&&i<224?(n=t.charCodeAt(o+1),e+=String.fromCharCode((31&i)<<6|63&n),o+=2):(n=t.charCodeAt(o+1),s=t.charCodeAt(o+2),e+=String.fromCharCode((15&i)<<12|(63&n)<<6|63&s),o+=3);return e}}},41954(t){!function(e,o){function i(t=o.$body){t.find(".thrv_wrapper > div[data-clip-id]").each((o,i)=>{const n=getComputedStyle(i).getPropertyValue("clip-path"),s=e(i.parentElement);s.removeClass("safari-ios-decoration-fix");try{n&&"none"!==n&&!n.includes("#null")&&t.find(n.match(/"(#[^']+)"/)[1]).length>0&&(s.closest(".tve_ea_thrive_animation").length>0||s.addClass("safari-ios-decoration-fix"))}catch(t){}})}function n(){if(!this.dataset.href||this.dataset.href.includes("javascript:void(0)")||this.classList.contains("tcb-during-drag"))return!0;if("_blank"===this.dataset.target)window.open(this.dataset.href,"_blank","noopener");else{let t;if(this.dataset.hash)try{t=e(this.dataset.hash)}catch(t){}t&&t.length?TCB_Front.jumpScrollTo(t,this):location.href=this.dataset.href}return!1}t.exports=function(t){tve_frontend_options.is_editor_page||(function(){if(!document.getElementById("tve-frontend-compat-css")){const t=document.createElement("style");let e=".thrv-page-section.safari-ios-decoration-fix, .thrv-content-box.safari-ios-decoration-fix { -webkit-transform: translate3d(0, 0, 0) !important;}";TCB_Front.browser&&(TCB_Front.browser.mozilla?e=".safari-ios-decoration-fix .tve-page-section-out[data-clip-id], .safari-ios-decoration-fix .tve-content-box-background[data-clip-id]{transform: unset !important}":(TCB_Front.browser.safari||TCB_Front.browser.ios)&&(e+=".tve_ea_thrive_animation > a.tcb-button-link {-webkit-mask-image: -webkit-radial-gradient(#fff, #fff);-webkit-mask-size: 100%, 100%; -webkit-mask-position: 0, 0;  }",e+=".tcb-flex-col .tcb-col .thrv_wrapper.thrv_icon {max-height: var(--tve-icon-size, 25px);}",TCB_Front.browser.version&&parseFloat(TCB_Front.browser.version)<16&&(e+=".slick-list{overflow-x: hidden;}"))),e+=".thrv_wrapper + #thrive-header { position: static;}",t.type="text/css",t.id="tve-frontend-compat-css",t.appendChild(document.createTextNode(e)),document.head.appendChild(t)}}(),i(t),o.addResizeCallback(i),function(t){t.find("a > .tcb-col, a > .thrv-content-box").each(function(){const t=this.parentNode,o={"data-href":t.href,"data-hash":t.hash,"jump-animation":t.getAttribute("jump-animation"),"data-target":t.getAttribute("target")||""};t.classList.contains("tve-dynamic-link")&&(o["data-shortcode-id"]=t.getAttribute("data-shortcode-id"),o["data-dynamic-link"]=t.getAttribute("data-dynamic-link")),e(this).unwrap().css("cursor","pointer").off("click.tcb-block").on("click.tcb-block",n).toggleClass("tve-jump-scroll",t.classList.contains("tve-jump-scroll")).attr(o)}),TCB_Front.$document.trigger("unwrapBlockLinks")}(t),function(t){const e=t.find(".thrv-search-form");e.length&&!TCB_Front.js_modules["search-form"]&&e.find(".thrv-sf-input").show(),t.find('[style*="--tve-border-width"]').each((t,e)=>{o.inlineCssVariable(e,"--tve-border-width","")})}(t))}}(ThriveGlobal.$j,TCB_Front)},18684(t){var e;e=ThriveGlobal.$j,t.exports=function(t=TCB_Front.$body){if(tve_frontend_options.is_editor_page)return;const o=e("#wpadminbar").height()||0,i=t.find(".thrv_footer"),n=i.parents("#tve_editor"),s=()=>{const e=i.height();i.length&&t.height()>0&&(i.css({position:"",top:""}),n.css({"min-height":"","padding-bottom":"","box-sizing":""}),document.documentElement.clientHeight-t.height()-o>1&&(i.css({position:"absolute",bottom:0,"padding-bottom":0,"z-index":3}),n.css({"min-height":"calc(100vh - "+e+"px) ","padding-bottom":e,"box-sizing":"unset"}),t.css("overflow-x","visible")))};"undefined"!=typeof ResizeObserver?new ResizeObserver(()=>{s()}).observe(window.document.body):s()}},43569(t){!function(e,o){const i="tve-default-state",n="tve-scroll-state",s="-1000px";let r,a,l,c,d=e();function h(t){if(function(){const t=d.data("scroll_config");return!t||!t.disabled.includes(TCB_Front.getDisplayType())}()){const e={opacity:0,"z-index":c-1,overflow:"hidden"},o={opacity:1,"z-index":c,overflow:"",top:0};let i="";t>=r?(l.css(e),a.css(o),i=a.outerHeight()):(a.css(e),l.css(o),d.data("cloneSticky")&&d.data("cloneSticky")[0].style.setProperty("height",`${l.outerHeight()}px`)),d[0]&&d[0].style.setProperty("height",i?`${i}px`:"")}}function p(){r=o.getMediaAttr(l,"data-switch-on-scroll",TCB_Front.getDisplayType()),o.add_scroll_callback(h)}function u(t){if(0===parseInt(t.currentTarget.style.opacity)){t.currentTarget.style.top=s;const o=e(t.currentTarget).find(".tve-m-trigger");o.length>0&&o.each((t,o)=>{const i=e(o);i.hasClass("tve-triggered-icon")&&i.trigger("click")})}}t.exports=function(t){if(d=t.find(".thrv_header"),d.data("init")||!d.length)return;d.data("init",1),l=d.find(".thrive-symbol-shortcode"),a=l.clone(),l.addClass(i),c=l.css("z-index")||15;const r=o.getMediaAttr(l,"data-switch-on-scroll",TCB_Front.getDisplayType());if(r&&!isNaN(r)){a.addClass(n).removeClass(i);const t={position:"absolute",opacity:0,width:"100%","box-sizing":"border-box",left:0,top:s};a.css(t).addClass("thrive-symbol-shortcode-scroll").insertAfter(l),a=d.find(".thrive-symbol-shortcode.thrive-symbol-shortcode-scroll"),e(`.${n}`).removeClass(i),a.find(`.${i}`).remove(),a.find(`.${n}`).css("display",""),l.find(`.${n}`).remove(),d.addClass(`${i} ${n}`),d.find(".thrive-symbol-shortcode").css("transition","opacity .4s ease-in-out").on("transitionend webkitTransitionEnd oTransitionEnd",u),o.addResizeCallback(p),p(),d.on("tcb.sticky.ensure_placeholder",function(){if("mobile"!==TCB_Front.getDisplayType())return;const t=d.data("cloneSticky");if(!t||!t.length)return;const e=l.outerHeight();"number"!=typeof e||e<=0||(t[0].style.setProperty("height",`${e}px`),d.hasClass("tve-sticky-default")&&d[0].style.setProperty("height",`${e}px`))})}TCB_Front.event_triggers(d)}}(ThriveGlobal.$j,TCB_Front)},89322(t){t.exports=()=>new class{constructor(){this.filterCallbacks={},this.actionCallbacks={}}addFilter(t,e,o=10){void 0===this.filterCallbacks[t]&&(this.filterCallbacks[t]=[]),this.filterCallbacks[t].push({fn:e,priority:parseInt(o)})}applyFilters(t,e){if(arguments.length<1)return void 0!==e?e:null;if(this.CURRENT_FILTERS=this.CURRENT_FILTERS||[],this.hasFilter(t)){this.CURRENT_FILTERS.push(t);let o=[];arguments.length>2&&(o=Array.prototype.slice.call(arguments,2)),this.filterCallbacks[t].sort((t,e)=>t.priority-e.priority).forEach(t=>{if(t.fn)switch(t.fn){case"__return_true":e=!0;break;case"__return_false":e=!1;break;case"__return_null":e=null;break;case"__return_empty_string":e="";break;default:e=t.fn.apply(null,[e,...o])}}),this.CURRENT_FILTERS.pop()}return e}hasFilter(t){return this.filterCallbacks&&this.filterCallbacks[t]&&this.filterCallbacks[t].length}addAction(t,e,o=10){return this.actionCallbacks[t]||(this.actionCallbacks[t]=[]),this.actionCallbacks[t].push({fn:e,priority:parseInt(o)}),this}doAction(t){if(this.CURRENT_ACTIONS=this.CURRENT_ACTIONS||[],this.hasAction(t)){const e=arguments.length>1?Array.prototype.slice.call(arguments,1):[];this.CURRENT_ACTIONS.push(t),this.actionCallbacks[t].sort((t,e)=>t.priority-e.priority).forEach(t=>{t.fn&&t.fn.apply(null,e)}),this.CURRENT_ACTIONS.pop()}}hasAction(t){return this.actionCallbacks&&this.actionCallbacks[t]&&this.actionCallbacks[t].length}}},64743(){var t,e;t=ThriveGlobal.$j,e=TCB_Front,t.fn.tve_form_loading=function(t){const o=this,i=o.find("[type=submit]").parent();let n=o.find(".tcb-form-loader");return void 0!==t&&t?(n.fadeOut(),o.find("input,select,textarea").removeAttr("disabled"),i.find("button").fadeIn(),o.find(".tve-form-button .tve-form-button-submit").fadeIn(),i.find(".thrv_icon").fadeIn(),this):(n.length||(n=ThriveGlobal.$j('<div class="tcb-form-loader"><span class="tcb-form-loader-icon thrv-svg-icon">'+e.icons.get("spinner9")+"</span></div>").appendTo(i),i.css({position:"relative",width:i.width()+"px",height:i.height()+"px"})),i.find("button").hide(),o.find(".tve-form-button .tve-form-button-submit").hide(),i.find(".thrv_icon").hide(),n.show(),this)}},74468(){!function(t,e){if(e.$document.on("click","a.tve-jump-scroll",function(o){if(this.hash.includes("comments")&&this.href!==this.hash)return!0;if(t(this).hasClass("tve-toc-anchor"))return!0;let i;o.preventDefault(),o.stopPropagation();const n=t(this),s=t(o.target).closest(".tve-item-dropdown-trigger").length,r=n.closest("li.menu-item");try{i=t(this.hash)}catch(t){}if(r.length){if(s){const e=t.Event("click");return e.clickedTarget=o.target,void r.trigger(e)}r.trigger("menu_item_anchor_clicked")}if(i&&i.length){if(history&&history.pushState){let t=location.href;t.indexOf("#")>-1&&(t=t.substring(0,t.lastIndexOf("#"))),history.pushState({},document.title,t+this.hash)}return e.jumpScrollTo(i,this),!1}}),e.$document.on("click",".tve-jump-scroll[data-target]",function(o){let i;o.preventDefault(),o.stopPropagation();const n=this.getAttribute("data-target");try{i=t(n)}catch(t){}if(i&&i.length){if(history&&history.pushState){let t=location.href;t.indexOf("#")>-1&&(t=t.substring(0,t.lastIndexOf("#"))),history.pushState({},document.title,t+n)}return e.jumpScrollTo(i,this),!1}}),TCB_Front.jumpScrollTo=(o,i)=>{const n=t(i.closest(".tve_lb_open.tve-scroll")),s="smooth"===i.getAttribute("jump-animation")?1500:100,r=o.offset().left,a=t(".thrv_header.tve-scroll-sticky"),l=(a.length?a.outerHeight():0)+(t("#wpadminbar").outerHeight()||0);let c=null,d=!1,h=l,p=t(),u=t("html, body");function f(){const i=o.offset().top;h=l,p.each(function(){const e=t(this),o=e.hasClass("tve-sticky-element"),n=o?e.data("stop-target"):t(),s=n.length?n.offset().top:0,a=e.offset().left+e.outerWidth();(!o||o&&s>i)&&r<=a&&(h=Math.max(h,e.data("scroll_config").top+e.outerHeight()))}),c&&(d?(c.end=i-e.$body.offset().top-h,d=!1):c.end=c.initial_end-h)}n.length&&n.find(o).length&&(u=n),e.$body.off("tcb-sticky-remove tcb-sticky-add tcb-sticky-scroll-down").on("tcb-sticky-add",function(t,e){(e=e.filter(":not(.tve-toc)")).length>0&&o.closest(e.data("append-target")).length>0&&(p=p.add(e)),f()}).on("tcb-sticky-remove",(t,e)=>{p=p.not(e),f()}),e.$body.off("tcb.body.resize").on("tcb.body.resize",()=>{d=!0,f()}),(t=>{if(0===t.closest(".tve-state-expanded").length&&t.hasClass("thrv_toggle_title")){const e=t.closest(".thrv_toggle");e.hasClass("tve-toggle-auto-collapse")&&e.find(".thrv_toggle_title").tcbToggle("hide")}else if(t.closest(".tve_tab_content:not(.tve-tc-visible)").length){const e=t.closest(".tve_tab_content:not(.tve-tc-visible)").index();t.closest(".thrv-tabbed-content").find(".tve_scT li").eq(e-1).tcbTabsToggle()}})(o),u.stop(!0,!1).animate({scrollTop:o.offset().top-e.$body.offset().top-l},{duration:s,step:(t,e)=>{e.initial_end||(e.initial_end=e.end+l);const o=!c;c=c||e,o&&f()}}).promise().then(()=>{0===o.closest(".tve-state-expanded").length&&(o.hasClass("thrv_toggle_title")?o.trigger("click"):o.is(".tve_tab_title_item")&&o.tcbTabsToggle()),e.$body.trigger("tcb-jumplink-done",[o,i])})},!TCB_Front.Utils.isEditorPage()){const o=function(){if(!location.hash)return;let o;try{o=t(location.hash)}catch(t){return}if(o&&o.length){const t={getAttribute:()=>null,closest:()=>null,classList:{contains:()=>!1}};e.jumpScrollTo(o,t)}};location.hash&&t(window).on("load",function(){setTimeout(o,100)}),t(window).on("hashchange",function(){setTimeout(o,100)});let i=!1,n=0,s=null;t(window).on("blur",function(){i=!0,n=Date.now()}).on("focus",function(){const t=Date.now(),e=n&&t-n<2e3;i&&location.hash&&e?(i=!1,n=0,null!==s&&clearTimeout(s),s=setTimeout(function(){s=null,o()},150)):i=!1})}}(ThriveGlobal.$j,TCB_Front)},91806(t){var e;e=ThriveGlobal.$j,t.exports=function(t,o){if(0===t.length||t.hasClass("tve_lb_open")||t.hasClass("tve_lb_opening"))return;const i=e("body"),n=e("html"),s="tve-o-hidden tve-l-open tve-hide-overflow",r=TCB_Front.Utils.getBrowserScrollSize().width,a=parseInt(i.css("padding-right"));function l(t,o){TCB_Front.$window.trigger("tve_after_content_toggle",[t,!1]),e(window).trigger("tcb_before_lightbox_close",t),void 0===o&&1===e(".tve_lb_open").length&&(i.removeClass(s).css("padding-right",""),n.removeClass(s),t.data("doc-scroll-top")?(document.documentElement.scrollTop=t.data("doc-scroll-top"),t.data("doc-scroll-top","")):t.data("bdy-scroll-top")&&(document.body.scrollTop=t.data("bdy-scroll-top"),t.data("doc-scroll-top",""))),t.removeClass("tve_lb_open tve_lb_opening").addClass("tve_lb_closing"),setTimeout(function(){t.removeClass("tve_lb_closing").css("display","none").find("tve_p_lb_content").trigger("tve.lightbox-close")},300),e("#tve-lg-error-container").hide()}function c(o){const i=t.find(".tve_p_lb_content"),n=TCB_Front.$window.height(),s=void 0!==o&&o?"animate":"css",r=i.outerHeight(!0),a=(n-r)/2;e(window).trigger("tcb_before_lightbox_reposition"),t.find(".tve_p_lb_overlay")[s]({height:r+80+"px","min-height":n+"px"},200),i[s]({top:(a<40?40:a)+"px"},200),r+40>n&&t.addClass("tve-scroll")}if(t.off().on("click",".tve_p_lb_close",function(){return l(t),!1}),i.off("keyup.tve_lb_close").on("keyup.tve_lb_close",function(e){if(27===e.which)return l(t),!1}),t.children(".tve_p_lb_overlay").off("click.tve_lb_close").on("click.tve_lb_close",function(){return l(t),!1}),l(e(".tve_p_lb_background.tve_lb_open"),!0),"instant"!==o&&t.addClass("tve_p_lb_background tve_lb_anim_"+o),t.data("doc-scroll-top",document.documentElement.scrollTop),t.data("bdy-scroll-top",document.body.scrollTop),i.addClass(s),n.addClass(s),TCB_Front.$window.height()<TCB_Front.$document.height()&&i.css("padding-right",a+r+"px"),t.find(".tve_scT").length&&(TCB_Front.Utils.isEditorPage()||t.find(".tve_scT").each(function(){const t=e(this),o=parseInt(t.attr("data-selected"));if(!TCB_Front.Utils.isEditorPage()){let e=t.find("> ul li").eq(isNaN(o)?0:o);e.length||(e=t.find("> ul li").first()),e.tcbTabsToggle()}})),setTimeout(function(){t.css("display",""),t.addClass("tve_lb_opening"),setTimeout(function(){"instant"===o&&t.addClass("tve_p_lb_background tve_lb_anim_"+o),c(),TCB_Front.$window.trigger("tve_after_content_toggle",[t])},0)},20),t.find(".tve_p_lb_content").trigger("tve.before-lightbox-open"),"none"===t.css("display")||t.hasClass("tve_lb_closing")?(t.removeClass("tve_lb_open"),i.removeClass(s).css("padding-right",""),n.removeClass(s)):setTimeout(function(){t.removeClass("tve_lb_opening").addClass("tve_lb_open").find(".tve_p_lb_content").trigger("tve.lightbox-open"),t.find("form").each(function(){e(this).find('input[required], textarea[required], select[required], input[data-required="true"], textarea[data-required="true"], select[data-required="true"]').each(function(){const t=e(this);"none"===t.css("display")&&t.css("display",""),"hidden"===t.css("visibility")&&t.css("visibility",""),t.parentsUntil(".tve_p_lb_content").filter(function(){return"none"===e(this).css("display")||"hidden"===e(this).css("visibility")}).css("display","").css("visibility","");const o=t.attr("tabindex");o&&parseInt(o)<0&&t.removeAttr("tabindex")})})},300),TCB_Front.$window.resize(function(){c()}),t.on("lbresize",function(){c(!0)}),"undefined"!=typeof ResizeObserver){const e=new ResizeObserver(()=>{c(!0)});t.find("iframe").each(function(){e.observe(this)})}else t.find("iframe").each(function(){this.src=this.src,this.onload=()=>{c(!0)}});e(window).trigger("tcb_after_lightbox_open",t)}},15039(t){var e,o;e=ThriveGlobal.$j,o=TCB_Front,t.exports=class{constructor(){if(this.position="top-center",this.$customNotificationWrapper=e(".notifications-content-wrapper"),this.isCustomNotification=this.$customNotificationWrapper.length>0,this.$notificationWrapper=this.isCustomNotification?this.$customNotificationWrapper:e(".tvd-toast"),this.isCustomNotification){const t=this.$notificationWrapper.attr("data-animation");t&&"none"!==t&&this.$notificationWrapper.addClass("tcb-animated")}(!this.isNotificationPage()||this.isNotificationPage()&&!this.isEditorPage())&&this.render(),this.isNotificationPage()&&this.isEditorPage()&&this.$notificationWrapper.addClass("notification-edit-mode")}isNotificationPage(){let t="tve_notifications"===tve_frontend_options.post_type;return this.isEditorPage()&&(t=TVE.apply_filters("tcb.is_notification_editor_page",t)),t}isEditorPage(){return!!tve_frontend_options.is_editor_page}render(){this.$notificationWrapper.hide(),this.$notificationWrapper.removeClass("tcb-permanently-hidden animated");const t=o.queryString.get("content_template");o.queryString.get("preview")&&(this.isNotificationPage()||t&&t.includes("notification"))&&this.toggle()}toggle(t="",e="",o){this.$notificationWrapper.show(),this.isCustomNotification?this.toggleCustomNotification(t,e,o):this.toggleDefaultNotification(t,e,o)}toggleCustomNotification(t,o,i){const n=this.$notificationWrapper.attr("data-animation"),s=this.$notificationWrapper.attr("data-timer"),r=e(`.notification-${o} .thrv-notification_message`);t&&r.length>0&&r.empty().append(t),o&&this.$notificationWrapper.attr("data-state",o),this.$notificationWrapper.removeAttr("data-animation"),setTimeout(()=>{n&&"none"!==n?this.$notificationWrapper.attr("data-animation",n):this.$notificationWrapper.hide(),"function"==typeof i&&i()},s)}toggleDefaultNotification(t,o,i){const n=e(".tve-toast-message-container"),s=e(".tve-toast-icon-container");switch(t&&n.empty().append(t),s.removeClass("tve-toast-error"),s.find(".thrv-svg-icon").empty(),o){case"success":s.find(".thrv-svg-icon").append(TCB_Front.icons.get("checkmark"));break;case"warning":case"error":s.find(".thrv-svg-icon").append(TCB_Front.icons.get("cross")),s.addClass("tve-toast-error")}setTimeout(()=>{this.$notificationWrapper.hide(),"function"==typeof i&&i()},3e3)}}},69810(t){"undefined"==typeof URLSearchParams&&(window.URLSearchParams=function(t){const e=this;e.searchString=t,e.get=function(t){const o=new RegExp("[?&]"+t+"=([^&#]*)").exec(e.searchString);return null===o?null:decodeURI(o[1])||0}}),t.exports={get:t=>("string"!=typeof t&&(t=""),new URLSearchParams(window.location.search).get(t)),setUrlParam(t,e,o){const i=new URL(t);return Array.isArray(o)?o.forEach((t,o)=>i.searchParams.append(`${e}[${o}]`,t)):o?i.searchParams.set(e,o):i.searchParams.delete(e),i.toString()}}},68382(t){t.exports=["attachment","attachment_id","author","author_name","calendar","cat","category","category__and","category__in","category__not_in","category_name","comments_per_page","comments_popup","custom","customize_messenger_channel","customized","cpage","day","debug","embed","error","exact","feed","fields","hour","link_category","m","minute","monthnum","more","name","nav_menu","nonce","nopaging","offset","order","orderby","p","page","page_id","paged","pagename","pb","perm","post","post__in","post__not_in","post_format","post_mime_type","post_status","post_tag","post_type","posts","posts_per_archive_page","posts_per_page","preview","robots","s","search","second","sentence","showposts","static","status","subpost","subpost_id","tag","tag__and","tag__in","tag__not_in","tag_id","tag_slug__and","tag_slug__in","taxonomy","tb","term","terms","theme","title","type","types","w","withcomments","withoutcomments","year"]},5540(t){var e,o;e=ThriveGlobal.$j,o=TCB_Front,t.exports={init(t){tve_frontend_options.is_editor_page?(t.find("input[data-hide],textarea[data-hide]").each((t,e)=>{this.handleInput(e,!1)}),TVE.add_action("tve.conditional_display.activate",t=>this.handleSmartComplete(t))):(setTimeout(()=>this.handleSmartComplete(t)),o.$document.on("switchstate",(t,e)=>{this.handleSmartComplete(e)}),e(window).on("tcb_after_lightbox_open",(t,o)=>{this.handleSmartComplete(e(o))}),e(window).on("tl_after_lightbox_open",(t,o)=>{this.handleSmartComplete(e(o))}))},handleSmartComplete(t){t.find("[default-value]:not([data-complete-type])").each((t,e)=>{e.value=e.getAttribute("default-value")}),t.find("[data-complete-type]").each((t,e)=>{let i=e.dataset.completeValue;switch(e.dataset.completeType){case"user":if(e.dataset.completeValue)if(e.dataset.completeValue.includes("wp"))i=tve_frontend_options.current_user[e.dataset.completeValue.replace("wp.","")];else if("ip"===e.dataset.completeValue)i=tve_frontend_options.ip;else{const t=TCB_Front.detectBrowser();i=Object.keys(t).filter(e=>t[e]&&"webkit"!==e).toString(),i.includes("version")&&(i=i.replace("version",TCB_Front.browser.version))}break;case"time":i=this.convertDate((e.dataset.completeValue||"")+" HH:mm:ss");break;case"query":i=TCB_Front.queryString.get(e.dataset.completeValue);break;case"post":i=tve_frontend_options.post_request_data[e.dataset.completeValue];break;case"cookie":i=o.getCookie(e.dataset.completeValue);break;case"content":i=tve_frontend_options[e.dataset.completeValue];break;case"source":i=document.referrer;break;case"shortcode":e.parentNode.dataset.completeValue&&(i=e.parentNode.dataset.completeValue),i=i.replace(/\[(.*?)\]/g,"")}!i&&e.getAttribute("data-hide")&&this.handleInput(e,!1),i=i||e.getAttribute("default-value"),i&&(e.value=i)}),t.find('[type="radio"][default-value]').each(function(){this.checked=this.value===this.getAttribute("default-value")}),t.find('[type="checkbox"][default-value]').each(function(){this.checked="checked"===this.getAttribute("default-value")})},handleInput(t,e=!0){const o=e?"add":"remove",i=t.closest("form").querySelector(`[data-label-for="${t.parentElement.getAttribute("data-label")}"]`);t.parentElement.classList[o]("tcb-permanently-hidden"),t.parentElement.previousElementSibling&&"label"===t.parentElement.previousElementSibling.tagName.toLowerCase()&&t.parentElement.previousElementSibling.classList[o]("tcb-permanently-hidden"),i&&i.classList[o]("tcb-permanently-hidden")},convertDate(t){const e=new Date;function o(t,e){let o=t+"";for(e=e||2;o.length<e;)o="0"+o;return o}const i=e.getFullYear();t=(t=(t=t.replace(/(^|[^\\])yyyy+/g,"$1"+i)).replace(/(^|[^\\])yy/g,"$1"+i.toString().substr(2,2))).replace(/(^|[^\\])y/g,"$1"+i);const n=e.getMonth()+1;t=(t=(t=(t=t.replace(/(^|[^\\])MMMM+/g,"$1"+["\0","January","February","March","April","May","June","July","August","September","October","November","December"][n])).replace(/(^|[^\\])MMM/g,"$1"+["","Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"][n])).replace(/(^|[^\\])MM/g,"$1"+o(n))).replace(/(^|[^\\])M/g,"$1"+n);const s=e.getDate();t=(t=(t=(t=t.replace(/(^|[^\\])dddd+/g,"$1"+["","Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"][s])).replace(/(^|[^\\])ddd/g,"$1"+["","Sun","Mon","Tue","Wed","Thu","Fri","Sat"][s])).replace(/(^|[^\\])dd/g,"$1"+o(s))).replace(/(^|[^\\])d/g,"$1"+s);const r=e.getHours();let a;a=r>12?r-12:0===parseInt(r)?12:r,t=(t=(t=t.replace(/(^|[^\\])HH+/g,"$1"+o(r))).replace(/(^|[^\\])H/g,"$1"+r)).replace(/(^|[^\\])hh+/g,"$1"+o(a));const l=e.getMinutes();t=t.replace(/(^|[^\\])mm+/g,"$1"+o(l));const c=e.getSeconds();return t.replace(/(^|[^\\])ss+/g,"$1"+o(c))}}},98079(t){function e(t,e){var o=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),o.push.apply(o,i)}return o}function o(t){for(var o=1;o<arguments.length;o++){var n=null!=arguments[o]?arguments[o]:{};o%2?e(Object(n),!0).forEach(function(e){i(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):e(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function i(t,e,o){return(e=function(t){var e=function(t){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var o=e.call(t,"string");if("object"!=typeof o)return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[e]=o,t}!function(e,i){i.identifiers=o(o({},i.identifiers||{}),{},{parentStickyParent:".tcb-col,.tve-cb,.tve-page-section-in,#tve_editor",pageStickyParent:"#tve_editor,.symbol-section-in,.thrv_wrapper.section,.thrive-symbol-shortcode,.tcb-post-list",stickyParentType:".tcb-col,.tve-cb,.tve-page-section-in",parentZindexFix:""});const n={boxSizing:"",marginTop:"",marginLeft:"",height:"",top:"",bottom:"",position:"",opacity:"",minWidth:"",maxWidth:"",textDecoration:"",zIndex:""},s=function(){return window.visualViewport?window.visualViewport.height:window.innerHeight},r=function(t){return s()-t.data("defaultTop")-t.outerHeight()},a=function(t,e){const o=r(t);return o!==t.data("previousTop")&&(t[0].style.setProperty("top",`${o}px`),t.data("previousTop",o),e.top=o,!0)},l=function(t,e){let o;return function(){const i=arguments,n=this;clearTimeout(o),b?t.apply(n,i):o=setTimeout(function(){t.apply(n,i)},e)}},c=l(function(t,e){t&&t.stop().animate(e,200)},200);let d,h,p,u,f,g,_,m=e(),b=!1,v=!1,y=0,w="",T="left";const C={},$={};function k(t){return Math.min(h.top+d.data("$$position").top+t-g.top+d.data("marginTop"),(d.data("append-target")||d.parent()).height()-d.outerHeight())}function x(t,e,o){b=o,m.each(function(){if(j(this),!function(){if(!h.disabled||!h.disabled.length)return!0;if(_){let t=!0;return h.disabled.forEach(e=>{("desktop"===e&&!TCB_Front.$body.is(".preview-tablet,.preview-mobile")||i.$body.hasClass(`preview-${e}`))&&(t=!1)}),t}const t=i.$window.width();return t<=767?-1===h.disabled.indexOf("mobile"):t<=1023?-1===h.disabled.indexOf("tablet"):-1===h.disabled.indexOf("desktop")}()||v||!d.hasClass(`tve-sticky-${h.end}-hidden`)&&!d.is(":visible"))return v&&d.removeData("clone-sticky"),C.on_scroll_up_default(t,!0),"parallax"===h.mode&&S(d,v),void d.removeClass(`tve-scroll-${h.mode}`);"parallax"!==h.mode&&(u||(d.data("$$offset",d.offset()),d.data("marginTop",Number(d.css("margin-top").replace("px",""))),d.data("$$position",d.position()),d.data("$$scroll",t),"element"===h.end&&d.data("$$stop-offset",d.data("stop-target").offset()||{top:1e6})),g=d.data("$$offset")),C["on_scroll_"+e+"_"+h.end].call(C,t)})}function S(t=i.$body,e=!1){t.each((t,o)=>{i.inlineCssVariable(o,{"--parallaxR":e?"":"0","--parallaxB":e?"":"0","--parallaxS":e?"":"1","--parallaxO":e?"":"1","--parallaxTX":e?"":"0","--parallaxTY":e?"":"0","--parallaxRY":e?"":"0","--parallaxP":e?"":"1000px"})})}function B(){const t=TCB_Front.$body.hasClass("visible-off-screen-sidebar");m.each(function(){const o=e(this),n=o.data("scroll_config")||{};if("parallax"===n.mode)return;const s=n.end||"default",r="tve-sticky-"+s;if(!o.hasClass(r))return;const a=o.data("clone-sticky");if(!a||!a.length)return;if(o.hasClass("thrv_header")&&i.$body.hasClass("tcb-full-header"))return;const l="fixed"===o.css("position")?function(t,e,o,n){if(n&&"over"===w&&"right"!==T)return parseInt(y);if(t[0].classList.contains("tcb-window-width"))return function(t){"function"==typeof TCB_Front.resizePageSection&&TCB_Front.resizePageSection(t)}(t),0;if("center"===(t.css("--tve-alignment")||"").trim()&&"default"===o){const e=function(t){let e=t.data("append-target");return e&&e.length?e:(e=t.closest(i.identifiers.pageStickyParent),e&&e.length?e:i.$body)}(t),o=e[0].getBoundingClientRect();return Math.max(0,Math.round(o.left+(o.width-t.outerWidth())/2))}return(e.offset()||{left:0}).left}(o,a,s,t):function(t,e,o){const i=t.offsetParent(),n=i&&i.length,s=n&&i.offset()?i.offset():{left:0},r=(e.offset()||{left:0}).left-s.left;if("center"===(t.css("--tve-alignment")||"").trim()&&"parent"===o&&n){const e=i.innerWidth(),o=t.outerWidth(),n=Math.max(0,Math.round((e-o)/2)),s=function(t){try{const e=window.getComputedStyle(t[0]).transform;if(!e||"none"===e)return 0;const o=e.match(/^matrix\(([^)]+)\)$/);if(!o)return 0;const i=o[1].split(",").map(t=>parseFloat(t));if(6!==i.length)return 0;const n=i[4];return isNaN(n)?0:n}catch(t){return 0}}(t),r=Math.abs(s+o/2)<3?Math.round(o/2):0;return Math.max(0,n+r)}return r}(o,a,s);"number"==typeof l&&(o.css("left",`${l}px`),o.css({"margin-left":"","margin-right":"",right:""}))})}function F(t=!0,e="default"){const o=d;if(t&&o.hasClass(`tve-sticky-${e}-hidden`))return void o[0].style.setProperty("display","none","important");const i={duration:600,complete:()=>{const e=t?"none":o.data("defaultDisplay");o[0].style.setProperty("display",e,"important"),o[0].style.setProperty("position","fixed","important")}},n=`tve-sticky-${e}-hidden`;t?o.addClass(n).fadeOut(i):o.removeClass(n).fadeIn(i)}function j(t){d=e(t),h=d.data("scroll_config")||{},"parallax"!==h.mode?("bottom"===h.stickyPosition&&(h.top=r(d),d.data("scroll_config",h)),p="tve-sticky-"+h.end,u=t.classList.contains(p),f=d.data("clone-sticky")||e()):f=e()}e(window).on("resize",function(){void 0!==f&&f.css({height:d.outerHeight()})}),C.on_scroll_down_default=function(t,o){let n=0,r=!0;const l=(o=o||{}).position||"fixed";"appear"===h.mode&&(o.top=-d.outerHeight(),n=-o.top);let _=t+h.top>g.top+n;if(d.hasClass("thrv_header")){if(i.$body.hasClass("tve-tl-gr-anim"))return void C.on_scroll_up_default(t,!0);_=t+h.top>=g.top+n}if(_&&i.$body.trigger("tcb-sticky-initialized",d),"bottom"===h.stickyPosition&&(_=t+s()>g.top+d.height()+Number(d.data("defaultTop")),r=!1,i.isBottomScroll(t)&&F(!0,"default"),u&&!i.isBottomScroll(t)&&a(d,h)),u)return"appear"===h.mode&&c(d,o),void(r&&i.$body.trigger("tcb-sticky-add",[d]));if(_){!function(){if(f=d.data("clone-sticky"),!f){let t=d.outerHeight();d.parent().hasClass("tcb-clear")&&(t=d.parent().outerHeight()),f=e('<div class="thrv_wrapper"></div>').css({boxSizing:"border-box",padding:0,width:d.outerWidth(),height:t,marginTop:d.css("margin-top"),marginBottom:d.css("margin-bottom"),marginLeft:d.css("margin-left"),marginRight:d.css("margin-right"),position:d.css("position"),left:d.css("left"),float:d.css("float")}),d.data("clone-sticky",f),d.trigger("tcb.sticky.ensure_placeholder")}}(),d.addClass(p),delete o.position,d.before(f);const t=f.offset(),n=TCB_Front.$body.hasClass("visible-off-screen-sidebar"),s=d.prevAll("[data-position=top]");let a;a=n&&"over"===w&&"right"!==T?parseInt(y):d[0].classList.contains("tcb-window-width")?0:t.left,e(f).remove(),d.data("$$offset",t),d.data("saved_props",{offset:t,width:d[0].style.width||"",left:d[0].style.left||""});let c=d.width();const g=d.hasClass("thrv_header")&&i.$body.hasClass("tcb-full-header");n&&(d.hasClass("tcb-window-width")||g)&&(c=Math.max(f.width(),c));const _={width:c,height:d.height(),top:`calc(${h.top}px + var(--tcb-header-extra-offset,0px))`};g||(_.left=`${a}px`),d.css(e.extend(_,o));let m="0px";if("parent"===h.end){const t=d.css("margin-left");t===d.css("margin-left")&&(m=t)}g||d[0].style.setProperty("margin-left",m,"important"),d[0].style.setProperty("margin-top","0px","important"),d[0].style.setProperty("min-width","0","important"),d[0].style.setProperty("max-width","none","important"),d[0].style.setProperty("position",l,"important"),d[0].style.setProperty("box-sizing","content-box","important");const b=Number(d.css("z-index"));d[0].style.setProperty("z-index",isNaN(b)?"14":Math.max(b,14),"important"),d.closest(i.identifiers.parentZindexFix).css("z-index",isNaN(b)?"14":Math.max(b,14)),d.before(f),u=!0,d.data("append-target")&&(d.appendTo(d.data("append-target")),d.data("$parent").is("a")&&(d.wrap(d.data("$parent").clone().empty().addClass("tcb-sticky-anchor")),d[0].style.setProperty("text-decoration","inherit","important"))),d.hasClass("thrv_header")&&d[0].style.setProperty("z-index",90,"important"),r&&i.$body.trigger("tcb-sticky-add",[d]),s.length>0&&s.css("z-index","91"),B()}},C.on_scroll_up_default=function(t,e){if(!f||!f.length||!u)return;(e=!!e)||"appear"!==h.mode||c(d,{top:h.top});let o=f.offset().top||0;d.data("saved_props")&&(o=d.data("saved_props").offset.top);let r=t+h.top<=o,l=!0;d.hasClass("thrv_header")&&(r=t+h.top<o),"bottom"===h.stickyPosition&&(u&&a(d,h),r=t+s()<=o+d.height()+Number(d.data("defaultTop")),l=!1,F(i.isBottomScroll(t))),e||r?(u=!1,d.removeClass(p).stop().css(Object.assign({},n,d.data("saved_props"))),document.contains(f[0])&&d.data("append-target")&&f.before(d),f.detach(),i.$body.find(".tcb-sticky-anchor:empty").remove(),l&&i.$body.trigger("tcb-sticky-remove",d),d.hasClass("tcb-window-width")&&TCB_Front.resizePageSection(d)):l&&i.$body.trigger("tcb-sticky-add",[d])},C.on_scroll_down_parent=function(t){const o=d.data("prevTop"),n=o||0,s=k(t);if(t&&"bottom"===h.stickyPosition&&s&&s===n&&(F(!0,"parent"),d.data("hideTop",s)),o&&d.data("prevTop",o?s:"0"),u)d.css({top:s}),"bottom"!==h.stickyPosition&&i.$body.trigger("tcb-sticky-add",[d]);else{const o=d.data("appendTarget")||e(),n=o.length&&(o.is(d.data("$parent"))||o.is(i.identifiers.stickyParentType))||["left","right"].includes(d.css("float"));C.on_scroll_down_default(t,{position:"absolute",left:d.data(n?"$$position":"$$offset").left,top:s})}},C.on_scroll_up_parent=function(t){if(!f||!f.length||!u)return;const e=k(t);e<=d.data("$$position").top+d.data("marginTop")?C.on_scroll_up_default(t):("bottom"===h.stickyPosition&&d.hasClass("tve-sticky-parent-hidden")&&(d.data("hideTop")!==e?(F(!1,"parent"),d.data("prevTop",0),d.data("hideTop",0)):d[0].style.setProperty("display","none","important")),d.css("top",e),"bottom"!==h.stickyPosition&&i.$body.trigger("tcb-sticky-add",[d]))},C.on_scroll_down_element=function(t){const e=d.data("$$stop-offset").top-t-d.outerHeight(),o=Math.min(h.top,e),n={top:o};t&&"bottom"===h.stickyPosition&&o&&o===e&&F(!0,"element"),u?(d.css("top",n.top),"bottom"!==h.stickyPosition&&i.$body.trigger("tcb-sticky-add",[d])):C.on_scroll_down_default(t,n)},C.on_scroll_up_element=function(t){if(C.on_scroll_up_default(t),u){const e=Math.min(h.top,d.data("$$stop-offset").top-t-d.outerHeight());d.css("top",e),"bottom"===h.stickyPosition?d.hasClass("tve-sticky-element-hidden")&&e===h.top&&F(!1,"element"):i.$body.trigger("tcb-sticky-add",[d])}},C.on_scroll_down_parallax=C.on_scroll_up_parallax=t=>{const e=d.data("elem_data"),o=d.data("parallaxSettings");if(!o||!Object.keys(o).length||!e)return;const n=[],r=function(t,e){const o=e.top-t-s();return 100/e.elementRange*(-1*o)}(t,e);let a;function l(t,e){return t*e/100}Object.keys(o).forEach(t=>{const e=o[t];let s="";if(r>e.start){let o;a=Number(r>e.end?e.end:r);const c=function(t,e){let o,i=e.direction;if(["in-out","out-in"].includes(i)&&(i=i.split("-")[t<=e.middle?"0":"1"],"in-out"===e.direction)){const o=e.middle-e.start;"in"===i?t+=o:t-=o,t===e.middle&&(t="in"===i?-1:101)}var n;return t<e.start?o="in"===i?0:100:t<e.end?(n=e.end-e.start,o=+((t-e.start)/n*100).toFixed(2),"out"===i&&(o=100-o)):o="out"===i?0:100,o}(a,e);switch(t){case"vertical":case"horizontal":case"rotate":a="in"===e.direction?-1*a:a,o=function(t,e){return t*e}(a,e.speed);break;case"scale":o=1+e.speed*c/1e3;break;case"blur":o=e.speed-l(e.speed,c);break;case"transparency":const t=e.speed/10;o=1-t+l(t,c);break;case"3dperspective":e.perspective=Number(e.perspective),"from"===e.direction?o=(1e3-e.perspective)*(a-e.start)/100*e.speed+e.perspective:(a=100-a,o=Math.max(e.perspective,e.perspective*a/100*e.speed)),o=Math.max(o,100),i.inlineCssVariable(d,"--parallaxRY")!==`${e.degrees}deg`&&n.push({key:"RY",value:`${e.degrees}deg`})}s=`${o}${e.settings.um}`}n.push({key:e.settings.key,value:s})}),n.length&&n.forEach(t=>{i.inlineCssVariable(d,`--parallax${t.key}`,t.value)})};const P=l(function(){m.each(function(){j(this),C.on_scroll_up_default(0,!0);const t=e(this).data("clone-sticky");t&&t.css({width:d.outerWidth()})}),x(i.$document.scrollTop(),"down",!0),B(),setTimeout(function(){B()},50)},50),E=l(B,16);$.initSticky=function(t=i.$body,o=!1){_=o,function(t,o=!1){(t=t[o?"filter":"find"]("[data-tve-scroll]")).filter(`:not(.tcb-${i.getDisplayType()}-hidden)`).each(function(){try{const t=JSON.parse(this.dataset.tveScroll);let o=e(this);if(o.hasClass("thrive-symbol-shortcode")&&(o=o.parent()),o.addClass(`tve-scroll-${t.mode}`),"parallax"===t.mode){if(!t.parallax||!Object.keys(t.parallax).length)return;const e=o.offset(),i=o.outerHeight(),n={width:o.outerWidth(),height:i,top:e.top,left:e.left,elementRange:i/2+s()};o.data("parallaxSettings",t.parallax),o.data("elem_data",n)}else if(_)return;if(o.data("$parent",o.parent()),t.top=parseInt(t.top||"0"),t.end=t.end||"default",t.stickyPosition=t.stickyPosition||"top","bottom"===t.stickyPosition){let e=o.css("display").trim();"none"===e&&(e="block"),o.data("defaultTop",t.top),o.data("previousTop",t.top),o.data("defaultDisplay",e),t.top=s()-t.top-o.outerHeight()}else t.top+=i.body_offset?i.body_offset.top:e("body").offset().top;"desktop"!==i.getDisplayType()&&(t.top=t.top-(e("#wpadminbar").height()||0)),o.data("scroll_config",t).data("append-target",function(t,e){return!(t.find("iframe,video").length||t.find(".tcb-video-background-el").length||t.hasClass("thrv_header"))&&("parent"===e?t.parent().closest(i.identifiers.parentStickyParent):t.closest(i.identifiers.pageStickyParent))}(o,t.end)),"element"===t.end&&o.data("stop-target",e("#"+(t.el_id&&t.el_id.replace("#","")||"some-not-found-id"))),_||delete this.dataset.tveScroll,m=m.add(o)}catch(t){console.warn(t)}})}(t),m.length&&(S(),_||(i.$body[0].style.overflowX="hidden")),i.add_scroll_callback(x),i.addResizeCallback(P),TCB_Front.$window.on("orientationchange",l(P,100)),window.visualViewport&&window.visualViewport.addEventListener("resize",l(function(){x(i.$document.scrollTop(),"down",!0)},16)),i.$body.on("tcb.body.resize",E),i.$body.on("tcb-sticky-add tcb-sticky-remove",E),i.$body.length&&(y=i.inlineCssVariable(i.$body,"--off-screen-sidebar-size")),w=i.$body.attr("data-off-screen-type"),T=i.$body.attr("data-off-screen-side")},$.destroyScrollBehavior=function(){v=!0,TCB_Front.$window.trigger("scroll"),m=e(),v=!1},$.resetElementsPosition=()=>{v=!0,TCB_Front.$window.trigger("scroll"),v=!1,TCB_Front.$window.trigger("scroll")},$.forceAddElement=function(t){m=m.add(t)},$.updateStickyLeftOffsets=B,t.exports=$}(ThriveGlobal.$j,TCB_Front)},73771(t){(e=>{const o={get(t){const e=this.icons[t]||"";return e?'<svg xmlns="http://www.w3.org/2000/svg" class="tcb-{icon}" viewBox="{viewbox}">{html}</svg>'.replace("{viewbox}",e.viewbox||"0 0 32 32").replace("{icon}",t).replace("{html}",e.html||e):""},render(t,e,o="html",i=!0){t[o](this.get(e)),i&&t.addClass("thrv-svg-icon")},migrate(t){const o=["cross","forward"],i={tve_s_fb_share:"facebook",tve_s_x_share:"x",tve_s_in_share:"linkedin",tve_s_pin_share:"pinterest",tve_s_xing_share:"xing",tve_s_bluesky_share:"bluesky"};t.find('[class^="thrv-icon-"], [class*=" thrv-icon-"], .tve_s_item').not(".thrv-svg-icon").each((t,n)=>{o.some(t=>!!n.className.includes(t)&&(this.render(e(n),t),!0))||Object.keys(i).forEach(t=>{n.className.includes(t)&&!n.querySelector(".tcb-icon")&&this.render(e(n).find(".tve_s_icon"),i[t])})}),this.render(t.find(".rv_button_rounded_rectangle_light .overlay_play_button:empty"),"yt-play")},icons:{spinner9:'<path d="M16 0c-8.711 0-15.796 6.961-15.995 15.624 0.185-7.558 5.932-13.624 12.995-13.624 7.18 0 13 6.268 13 14 0 1.657 1.343 3 3 3s3-1.343 3-3c0-8.837-7.163-16-16-16zM16 32c8.711 0 15.796-6.961 15.995-15.624-0.185 7.558-5.932 13.624-12.995 13.624-7.18 0-13-6.268-13-14 0-1.657-1.343-3-3-3s-3 1.343-3 3c0 8.837 7.163 16 16 16z"></path>',cross:'<path d="M31.708 25.708c-0-0-0-0-0-0l-9.708-9.708 9.708-9.708c0-0 0-0 0-0 0.105-0.105 0.18-0.227 0.229-0.357 0.133-0.356 0.057-0.771-0.229-1.057l-4.586-4.586c-0.286-0.286-0.702-0.361-1.057-0.229-0.13 0.048-0.252 0.124-0.357 0.228 0 0-0 0-0 0l-9.708 9.708-9.708-9.708c-0-0-0-0-0-0-0.105-0.104-0.227-0.18-0.357-0.228-0.356-0.133-0.771-0.057-1.057 0.229l-4.586 4.586c-0.286 0.286-0.361 0.702-0.229 1.057 0.049 0.13 0.124 0.252 0.229 0.357 0 0 0 0 0 0l9.708 9.708-9.708 9.708c-0 0-0 0-0 0-0.104 0.105-0.18 0.227-0.229 0.357-0.133 0.355-0.057 0.771 0.229 1.057l4.586 4.586c0.286 0.286 0.702 0.361 1.057 0.229 0.13-0.049 0.252-0.124 0.357-0.229 0-0 0-0 0-0l9.708-9.708 9.708 9.708c0 0 0 0 0 0 0.105 0.105 0.227 0.18 0.357 0.229 0.356 0.133 0.771 0.057 1.057-0.229l4.586-4.586c0.286-0.286 0.362-0.702 0.229-1.057-0.049-0.13-0.124-0.252-0.229-0.357z"></path>',checkmark:'<path d="M27 4l-15 15-7-7-5 5 12 12 20-20z"></path>',forward:{viewbox:"0 0 18 18",html:'<path d="M16.711 8.29l-6-5.996c-0.391-0.391-1.026-0.391-1.417 0s-0.391 1.025 0 1.417l4.293 4.29h-11.59c-0.553 0-1.001 0.448-1.001 1s0.448 1 1.001 1h11.59l-4.292 4.29c-0.391 0.391-0.391 1.025 0.001 1.417s1.026 0.391 1.417 0l6-5.997c0.196-0.196 0.294-0.453 0.294-0.71s-0.097-0.514-0.294-0.71z"></path>'},sort:{viewbox:"0 0 16 28",html:'<path d="M16 17q0 0.406-0.297 0.703l-7 7q-0.297 0.297-0.703 0.297t-0.703-0.297l-7-7q-0.297-0.297-0.297-0.703t0.297-0.703 0.703-0.297h14q0.406 0 0.703 0.297t0.297 0.703zM16 11q0 0.406-0.297 0.703t-0.703 0.297h-14q-0.406 0-0.703-0.297t-0.297-0.703 0.297-0.703l7-7q0.297-0.297 0.703-0.297t0.703 0.297l7 7q0.297 0.297 0.297 0.703z"></path>'},"sort-desc":{viewbox:"0 0 16 28",html:'<path d="M16 17q0 0.406-0.297 0.703l-7 7q-0.297 0.297-0.703 0.297t-0.703-0.297l-7-7q-0.297-0.297-0.297-0.703t0.297-0.703 0.703-0.297h14q0.406 0 0.703 0.297t0.297 0.703z"></path>'},"sort-asc":{viewbox:"0 0 16 28",html:'<path d="M16 11q0 0.406-0.297 0.703t-0.703 0.297h-14q-0.406 0-0.703-0.297t-0.297-0.703 0.297-0.703l7-7q0.297-0.297 0.703-0.297t0.703 0.297l7 7q0.297 0.297 0.297 0.703z"></path>'},facebook:{viewbox:"0 0 16 28",html:'<path d="M14.984 0.187v4.125h-2.453q-1.344 0-1.813 0.562t-0.469 1.687v2.953h4.578l-0.609 4.625h-3.969v11.859h-4.781v-11.859h-3.984v-4.625h3.984v-3.406q0-2.906 1.625-4.508t4.328-1.602q2.297 0 3.563 0.187z"></path>'},x:{viewbox:"0 0 24 24",html:'<path d="M18.244 2.25h3.308l-7.227 8.26 8.502 11.24H16.17l-5.214-6.817L4.99 21.75H1.68l7.73-8.835L1.254 2.25H8.08l4.713 6.231zm-1.161 17.52h1.833L7.084 4.126H5.117z"></path>'},linkedin:{viewbox:"0 0 28 28",html:'<path d="M5.453 9.766v15.484h-5.156v-15.484h5.156zM5.781 4.984q0.016 1.141-0.789 1.906t-2.117 0.766h-0.031q-1.281 0-2.063-0.766t-0.781-1.906q0-1.156 0.805-1.914t2.102-0.758 2.078 0.758 0.797 1.914zM24 16.375v8.875h-5.141v-8.281q0-1.641-0.633-2.57t-1.977-0.93q-0.984 0-1.648 0.539t-0.992 1.336q-0.172 0.469-0.172 1.266v8.641h-5.141q0.031-6.234 0.031-10.109t-0.016-4.625l-0.016-0.75h5.141v2.25h-0.031q0.313-0.5 0.641-0.875t0.883-0.812 1.359-0.68 1.789-0.242q2.672 0 4.297 1.773t1.625 5.195z"></path>'},pinterest:'<path d="M16 0c-8.837 0-16 7.163-16 16 0 6.778 4.217 12.568 10.169 14.899-0.14-1.266-0.266-3.208 0.055-4.59 0.291-1.249 1.876-7.953 1.876-7.953s-0.479-0.958-0.479-2.375c0-2.225 1.29-3.886 2.895-3.886 1.365 0 2.024 1.025 2.024 2.254 0 1.373-0.874 3.425-1.325 5.327-0.377 1.593 0.799 2.892 2.369 2.892 2.844 0 5.030-2.999 5.030-7.327 0-3.831-2.753-6.509-6.683-6.509-4.552 0-7.225 3.415-7.225 6.943 0 1.375 0.53 2.85 1.191 3.651 0.131 0.158 0.15 0.297 0.111 0.459-0.121 0.506-0.391 1.593-0.444 1.815-0.070 0.293-0.232 0.355-0.535 0.214-1.998-0.93-3.248-3.852-3.248-6.198 0-5.047 3.667-9.682 10.572-9.682 5.55 0 9.864 3.955 9.864 9.241 0 5.514-3.477 9.952-8.302 9.952-1.621 0-3.145-0.842-3.667-1.837 0 0-0.802 3.055-0.997 3.803-0.361 1.39-1.337 3.132-1.989 4.195 1.497 0.463 3.088 0.713 4.738 0.713 8.836-0 16-7.163 16-16s-7.163-16-16-16z"></path>',xing:{viewbox:"0 0 22 28",html:'<path d="M9.328 10.422q-0.156 0.281-4.016 7.125-0.422 0.719-1.016 0.719h-3.734q-0.328 0-0.484-0.266t0-0.562l3.953-7q0.016 0 0-0.016l-2.516-4.359q-0.187-0.344-0.016-0.578 0.141-0.234 0.5-0.234h3.734q0.625 0 1.031 0.703zM21.922 0.391q0.172 0.25 0 0.578l-8.25 14.594v0.016l5.25 9.609q0.172 0.313 0.016 0.578-0.156 0.234-0.5 0.234h-3.734q-0.656 0-1.031-0.703l-5.297-9.719q0.281-0.5 8.297-14.719 0.391-0.703 1-0.703h3.766q0.344 0 0.484 0.234z"></path>'},"yt-play":{viewbox:"0 0 28 28",html:'<path d="M20 14q0-0.578-0.469-0.844l-8-5q-0.484-0.313-1.016-0.031-0.516 0.281-0.516 0.875v10q0 0.594 0.516 0.875 0.25 0.125 0.484 0.125 0.313 0 0.531-0.156l8-5q0.469-0.266 0.469-0.844zM28 14q0 1.5-0.016 2.344t-0.133 2.133-0.352 2.305q-0.25 1.141-1.078 1.922t-1.937 0.906q-3.469 0.391-10.484 0.391t-10.484-0.391q-1.109-0.125-1.945-0.906t-1.086-1.922q-0.219-1.016-0.336-2.305t-0.133-2.133-0.016-2.344 0.016-2.344 0.133-2.133 0.352-2.305q0.25-1.141 1.078-1.922t1.937-0.906q3.469-0.391 10.484-0.391t10.484 0.391q1.109 0.125 1.945 0.906t1.086 1.922q0.219 1.016 0.336 2.305t0.133 2.133 0.016 2.344z"></path>'},"arrow-left":{viewbox:"0 0 12 22",html:'<path d="M14.653 43.496l9.92-9.919c.379-.379.379-.992 0-1.37l-9.92-9.92c-.613-.613-1.653-.178-1.653.685v19.839c0 .863 1.04 1.298 1.653.685z" transform="translate(-19573 -418) translate(19560 396) matrix(-1 0 0 1 37.857 0)"/>'},"arrow-right":{viewbox:"0 0 12 22",html:'<path d="M14.653 43.496l9.92-9.919c.379-.379.379-.992 0-1.37l-9.92-9.92c-.613-.613-1.653-.178-1.653.685v19.839c0 .863 1.04 1.298 1.653.685z" transform="translate(-20901 -418) matrix(-1 0 0 1 20926 396) matrix(-1 0 0 1 37.857 0)"/>'},"chevron-left-solid":{viewbox:"0 0 320 512",html:'<path d="M34.52 239.03L228.87 44.69c9.37-9.37 24.57-9.37 33.94 0l22.67 22.67c9.36 9.36 9.37 24.52.04 33.9L131.49 256l154.02 154.75c9.34 9.38 9.32 24.54-.04 33.9l-22.67 22.67c-9.37 9.37-24.57 9.37-33.94 0L34.52 272.97c-9.37-9.37-9.37-24.57 0-33.94z"></path>'},"chevron-right-solid":{viewbox:"0 0 320 512",html:'<path d="M285.476 272.971L91.132 467.314c-9.373 9.373-24.569 9.373-33.941 0l-22.667-22.667c-9.357-9.357-9.375-24.522-.04-33.901L188.505 256 34.484 101.255c-9.335-9.379-9.317-24.544.04-33.901l22.667-22.667c9.373-9.373 24.569-9.373 33.941 0L285.475 239.03c9.373 9.372 9.373 24.568.001 33.941z"></path>'},dot:{viewbox:"0 0 24 24",html:'<path d="M12,8A4,4 0 0,0 8,12A4,4 0 0,0 12,16A4,4 0 0,0 16,12A4,4 0 0,0 12,8Z"/>'},star:{viewbox:"0 0 576 512",html:'<path d="M259.3 17.8L194 150.2 47.9 171.5c-26.2 3.8-36.7 36.1-17.7 54.6l105.7 103-25 145.5c-4.5 26.3 23.2 46 46.4 33.7L288 439.6l130.7 68.7c23.2 12.2 50.9-7.4 46.4-33.7l-25-145.5 105.7-103c19-18.5 8.5-50.8-17.7-54.6L382 150.2 316.7 17.8c-11.7-23.6-45.6-23.9-57.4 0z"></path>'}}};t.exports=o})(ThriveGlobal.$j)},22138(t){!function(e,o){function i(t){try{n.each(function(){const i=e(this);if(!i.data("typed"))return;const n=o.$window.height();t+n>=i.offset().top&&i.offset().top>t||"start"===i.attr("data-typefocus")?i.typed("start"):(i.attr("data-typefocus"),i.typed("pause"))})}catch(t){console.log(t)}}let n=e();t.exports=function(t){n=n.add(t.find(".tve_typefocus")),setTimeout(function(){try{n.each(function(){let t=[];const o=e(this);if(0===o.attr("data-typist").length)return;const i=parseInt(o.attr("data-speed")),n=o.attr("data-colors");t.push(o.text()),t=t.concat(o.attr("data-typist").split("|")),o.typed({strings:t,loop:!0,typeSpeed:125,backSpeed:50,highlightClass:1===parseInt(o.attr("data-highlight"))?"tve_selected_typist":"",highlightStyle:1===parseInt(o.attr("data-highlight"))&&n?"background-color:"+n:"",backDelay:i,contentType:"text",startDelay:800,showCursor:o.hasClass("tve_typefocus_cursor")})})}catch(t){console.log(t)}},1e3),o.add_scroll_callback(i)}}(ThriveGlobal.$j,TCB_Front)},66640(t){(e=>{class o{static isEditorPage(){return tve_frontend_options.is_editor_page}static isExternal(t){return o.getDomain(location.href)!==o.getDomain(t)}static getDomain(t){return t.replace("http://","").replace("https://","").split("/")[0]}static restAjax({type:t="POST",route:o="",data:i}){return e.ajax({headers:{"X-WP-Nonce":tve_frontend_options.nonce},url:o,type:t,data:i})}static handleContent(t,o=!0){e(window).trigger(o?"tcb_on_content_show":"tcb_on_content_hide"),e(window).trigger("tve_after_content_toggle",[t,o])}static jsonParse(t,e,o=null,i={}){if(null==o){let o;try{o=JSON.parse(t.attr(e)||JSON.stringify(i))}catch(e){console.warn("Could not get json data for element:",t),o=i}return o}return t.attr(e,JSON.stringify(o))}static toast(t,e,o){"string"!=typeof t&&(t=t.message||t.error||t.success),e||(e=!1),TCB_Front.notificationElement.toggle(t,e?"error":"success",o)}static windowWidth(){let t,e;try{e=window.parent&&window.parent.TVE&&window.parent.TVE.main,t=e&&window.parent.TVE.main.$frame.width()||TCB_Front.$window[0].innerWidth}catch(o){t=TCB_Front.$window[0].innerWidth,e=!1}let o=window.screen.width;return window.matchMedia("(orientation:landscape)").matches&&window.screen.height>o&&(o=window.screen.height),e||t>o+20&&t>window.outerWidth+20&&(t=o),t}static getBrowserScrollSize(){const t={border:"none",height:"200px",margin:"0",padding:"0",width:"200px"},o=e("<div>").css(e.extend({},t)),i=e("<div>").css(e.extend({left:"-1000px",overflow:"scroll",position:"absolute",top:"-1000px"},t)).append(o).appendTo("body").scrollLeft(1e3).scrollTop(1e3),n={height:i.offset().top-o.offset().top||0,width:i.offset().left-o.offset().left||0};return i.remove(),n}static hasAdminBar(){return e("#wpadminbar").length>0}static appendFormParamsToURL(t,i){return!Array.isArray(i)&&i.jquery&&(i=o.buildFormParams(i)),t+(t.split("?")[1]?"&":"?")+e.param(i)}static buildFormParams(t){let e=[];return t.find(".tve_lg_input_container input:not([name=user_consent]), .tve_lg_input_container textarea").not("input[type=hidden]").not("input[type=password]").each((t,o)=>{const i=ThriveGlobal.$j(o).serializeArray();if(i[0]){o.dataset.name&&(i[0].name=o.dataset.name.replace(/\s/g,"_")),TCB_Front.reservedTerms.includes(i[0].name.toLowerCase())&&(i[0].name="tve_"+i[0].name);const t=e.findIndex(t=>t.name===i[0].name);t>=0?e[t].value=e[t].value+", "+i[0].value:e=e.concat(i)}}),e}static appendRandomParamToURL(t){return t+(t.split("?")[1]?"&":"?")+"_="+Math.floor(1e3*Math.random())}static isEmail(t){return/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/.test(String(t).toLowerCase())}static addHttp(t){return!(t=t.trim())||0===t.indexOf("#")||/^mailto/.test(t)||/^tel/.test(t)||/^(?:f|ht)tps?\:\/\//.test(t)||(t="https://"+t),t}static unserialize(t){const e="undefined"!=typeof window?window:globalThis,o=function(t){let e=t.length;for(let o=t.length-1;o>=0;o--){const i=t.charCodeAt(o);i>127&&i<=2047?e++:i>2047&&i<=65535&&(e+=2),i>=56320&&i<=57343&&o--}return e-1},i=function(t,o,i,n){throw new e[t](o,i,n)},n=function(t,e,o){const n=[];let s=2,r=t.slice(e,e+1);for(;r!==o;)s+e>t.length&&i("Error","Invalid"),n.push(r),r=t.slice(e+(s-1),e+s),s+=1;return[n.length,n.join("")]};return function t(e,s){let r,a,l,c,d,h,p,u,f,g,_,m,b,v,y,w,T,C=0,$=function(t){return t};const k=e.slice(s,s+1).toLowerCase();switch(s||(s=0),r=s+2,k){case"i":$=function(t){return parseInt(t,10)},u=n(e,r,";"),C=u[0],p=u[1],r+=C+1;break;case"b":$=function(t){return 0!==parseInt(t,10)},u=n(e,r,";"),C=u[0],p=u[1],r+=C+1;break;case"d":$=function(t){return parseFloat(t)},u=n(e,r,";"),C=u[0],p=u[1],r+=C+1;break;case"n":p=null;break;case"s":f=n(e,r,":"),C=f[0],g=f[1],r+=C+2,u=function(t,e,i){const n=[];let s,r;for(s=0;s<i;s++)r=t.slice(e+(s-1),e+s),n.push(r),i-=o(r);return[n.length,n.join("")]}(e,r+1,parseInt(g,10)),C=u[0],p=u[1],r+=C+2,C!==parseInt(g,10)&&C!==p.length&&i("SyntaxError","String length mismatch");break;case"a":for(p={},a=n(e,r,":"),C=a[0],l=a[1],r+=C+2,d=parseInt(l,10),c=!0,_=0;_<d;_++)b=t(e,r),v=b[1],m=b[2],r+=v,y=t(e,r),w=y[1],T=y[2],r+=w,m!==_&&(c=!1),p[m]=T;if(c){for(h=new Array(d),_=0;_<d;_++)h[_]=p[_];p=h}r+=1;break;default:i("SyntaxError","Unknown / Unhandled data type(s): "+k)}return[k,r-s,$(p)]}(t+"",0)[2]}static validateImageUrl(t){return!!t.match(/.*\.(gif|jpe?g|bmp|png)$/gim)}static getQueryStrings(){return window.location.search.replace("?","").split("&").reduce((t,e)=>{const o=e.split("=");return t[o[0]]=o[1],t},{})}static parseJwt(t){const[,e=""]=t.split("."),o=e.replace(/-/g,"+").replace(/_/g,"/");let i;try{i=JSON.parse(decodeURIComponent(window.atob(o).split("").map(t=>"%"+("00"+t.charCodeAt(0).toString(16)).slice(-2)).join("")))}catch(t){i={}}return i}static insertHeadScripts(t,e,o){const i=document.getElementsByTagName("head")[0],n=document.createElement("script");n.async=!0,"function"==typeof o&&(n.onload=n.onreadystatechange=o),void 0!==e&&(n.id=e),n.src=t,i.insertBefore(n,i.firstChild)}static insertStylesheet(t,e){const o=document.getElementsByTagName("head")[0],i=document.createElement("link");i.rel="stylesheet",i.id=e,i.type="text/css",i.href=t,o.insertBefore(i,o.firstChild)}static hasResource(t,e){return null!==document.getElementById(t)||null!==document.querySelector(`[src="${e}"],[href="${e}"]`)}static getAttr(t){const o={};return e.each(t[0].attributes,function(t,e){o[e.name]=e.value}),o}}o.checkCustomHtmlPreview=function(){ThriveGlobal.$j(".thrv_custom_html_shortcode").each(function(){const t=ThriveGlobal.$j(this),e=t.find(".tve_shortcode_overlay");if(!o.isEditorPage||!o.isEditorPage())return void(e.length&&e.remove());e.length&&e.remove();const i=t.clone();i.find("script, style, .tve_shortcode_overlay, code.tve_js_placeholder, code.tve_css_placeholder").remove();const n=i.text().trim(),s=t.find("img").filter(function(){return 0===ThriveGlobal.$j(this).closest("code.tve_noscript").length}).length>0;n.length>0||s||t.append('<div class="tve_shortcode_overlay" data-tcb-preview-overlay="1"><span>No preview available.</span></div>')})},function(){if("undefined"==typeof window)return;const t=o.isEditorPage&&o.isEditorPage(),e=ThriveGlobal.$j(document);e.ready(function(){o.checkCustomHtmlPreview()}),t&&(e.on("tcb:template:loaded tcb:content:changed",function(){setTimeout(o.checkCustomHtmlPreview,50)}),ThriveGlobal.$j(window).on("load",function(){setTimeout(o.checkCustomHtmlPreview,100)}))}(),t.exports=o,window.TCB_Front.toast=o.toast,window.tve_is_email=o.isEmail,window.TCB_Front.checkCustomHtmlPreview=o.checkCustomHtmlPreview})(ThriveGlobal.$j)}};const e={};function o(i){const n=e[i];if(void 0!==n)return n.exports;const s=e[i]={exports:{}};return t[i](s,s.exports,o),s.exports}if(!window.ThriveGlobal||!window.ThriveGlobal.$j){const t=window.$;window.ThriveGlobal={$j:jQuery.noConflict()},t&&(window.$=t)}window.TCB_Front=window.TCB_Front||{},TCB_Front.Hooks=o(89322)(ThriveGlobal.$j),window.addEventListener("load",function(){tve_frontend_options.is_editor_page||(TCB_Front.sticky.initSticky(TCB_Front.$body,!!tve_frontend_options.is_editor_page),TCB_Front.add_scroll_callback(TCB_Front.showDataElements,TCB_Front))}),void 0===TCB_Front.js_modules&&(TCB_Front.js_modules={}),ThriveGlobal.$j.extend(window.TCB_Front,{browser:null,detectBrowser(){const t={},e=function(){let t,e,o=-1;return"Microsoft Internet Explorer"===navigator.appName?(t=navigator.userAgent,e=new RegExp("MSIE ([0-9]{1,}[\\.0-9]{0,})"),null!==e.exec(t)&&(o=parseFloat(RegExp.$1))):"Netscape"===navigator.appName&&(t=navigator.userAgent,e=new RegExp("Trident/.*rv:([0-9]{1,}[\\.0-9]{0,})"),null!==e.exec(t)&&(o=parseFloat(RegExp.$1))),o}();if(e>0)t.msie=!0;else{const e=navigator.userAgent.toLowerCase(),o=/(edge)[ \/]([\w.]+)/.exec(e)||/(edg)[ \/]([\w.]+)/.exec(e)||/(chrome)[ \/]([\w.]+)/.exec(e)||/(webkit)[ \/]([\w.]+)/.exec(e)||/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(e)||/(msie) ([\w.]+)/.exec(e)||e.indexOf("compatible")<0&&/(mozilla)(?:.*? rv:([\w.]+)|)/.exec(e)||[],i={browser:o[1]||"",version:o[2]||"0"};"edg"===i.browser&&(i.browser="edge"),o[1]&&(t[i.browser]=!0),t.chrome?t.webkit=!0:t.webkit&&(t.safari=!0)}return t.msie&&(t.version=e),t.ios=["iPad Simulator","iPhone Simulator","iPod Simulator","iPad","iPhone","iPod"].includes(navigator.platform)||navigator.userAgent.includes("Mac")&&"ontouchend"in document,t.version||(t.version=this.getBrowserVersion(t)),t},getBrowserVersion(t={}){const e=navigator.userAgent;let o="";return o=t.chrome?/(?:chrome|crios|crmo)\/(\d+(\.?_?\d+)+)/i:t.mozilla?/(?:firefox|fxios)\/(\d+(\.?_?\d+)+)/i:/version\/(\d+(\.?_?\d+)+)/i,(t=>{const o=e.match(t);return o&&o.length>0&&o[1]||""})(o)},getCookie(t){const e=`${t}=`,o=document.cookie.split(";");for(let t=0;t<o.length;t++){let i=o[t];for(;" "===i.charAt(0);)i=i.substring(1,i.length);if(0===i.indexOf(e))return i.substring(e.length,i.length)}return null},setCookie(t,e,o){if("number"==typeof o.expires){const t=o.expires,e=o.expires=new Date;e.setTime(+e+864e5*t)}return document.cookie=[encodeURIComponent(t),"=",encodeURIComponent(e),o.expires?"; expires="+o.expires.toUTCString():"",o.path?"; path="+o.path:"",o.domain?"; domain="+o.domain:"",o.secure?"; secure":""].join("")},isInViewport(t,e=0,o=!1){(t instanceof ThriveGlobal.$j||t.jquery)&&(t=t[0]);const i=t.getBoundingClientRect();let n=!(i.bottom<0||i.top>window.innerHeight-e);return o&&n&&(n=t.offsetLeft>0&&t.offsetLeft+i.width<window.innerHeight),n},isBottomScroll(t){const e=t+window.innerHeight,o=ThriveGlobal.$j(document).height();return window.innerHeight>0&&o-e<=100},inlineCssVariable(t,e,o,i=""){t=t.jquery?t[0]:t;const n=window.getComputedStyle(t,i);if(Array.isArray(e)){const t={};return e.forEach(e=>t[e]=n.getPropertyValue(e)),t}if("string"==typeof e)return void 0!==o?void t.style.setProperty(e,o,i):n.getPropertyValue(e);ThriveGlobal.$j.isPlainObject(e)&&Object.keys(e).forEach(o=>t.style.setProperty(o,e[o],i))},bodyOffsetTop(){const t=TCB_Front.$body.find("#mm-preview-settings-bar");let e=TCB_Front.$body.length?TCB_Front.$body.offset().top:0;return t.length&&(e+=t.height()),e||0},handleIframes(t=TCB_Front.$body,e=!0){const o=e?"src":"data-src",i=e?"data-src":"src",n=e?"remove":"add",s=["iframe"+(e&&!tve_frontend_options.allow_video_src?":visible":""),`.tcb-lazy-load[data-type="external"]${e?":visible":""} source`];t.find(s.join(", ")).not(".thrv_social_default iframe").each(function(){if(!e&&this.classList.contains("tcb-dr-done"))return;if(TCB_Front.Hooks.applyFilters("tcb.is_iframe_load_prevented",!1,this,e))return;const t=this.getAttribute(i);t&&"null"!==t&&(this.setAttribute(o,t),e&&"SOURCE"===this.tagName&&ThriveGlobal.$j(this).closest("video")[0].load()),this.removeAttribute(i),this.classList[n]("tcb-dr-done")}),t.find(".thrv_wrapper.thrv-google-map-embedded-code > iframe:not(:visible)").each(function(){const t=ThriveGlobal.$j(this).attr("src");t&&!t.includes("google.com/maps")&&ThriveGlobal.$j(this).attr("src","")})},getMediaAttr(t,e,o=this.getDisplayType()){const i=[o];let n=t.attr(e+o.charAt(0));switch(o){case"tablet":i.push("desktop");break;case"mobile":i.push("tablet"),i.push("desktop")}for(;(void 0===n||!n.length)&&i.length;)n=t.attr(`${e}-${i.shift().charAt(0)}`);return void 0===n&&(n=t.attr(e)),n},getDisplayType(){let t="desktop";if(tve_frontend_options.is_editor_page)TVE&&TVE.main&&TVE.main.device?t=TVE.main.device:TCB_Front.$body.is(".preview-tablet")?t="tablet":TCB_Front.$body.is(".preview-mobile")&&(t="mobile");else{const e=this.Utils.windowWidth();e<=767?t="mobile":e<=1023&&(t="tablet")}return t},isValidUrl:t=>/(http|https):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?/.test(t),pageSectionHeight(){const t=TCB_Front.$window;ThriveGlobal.$j(".pdfbg.pdwbg").css({"box-sizing":"border-box",height:t.height()+"px"}),ThriveGlobal.$j(".pddbg").css("max-width",t.width()+"px"),ThriveGlobal.$j(".pddbg.pdfbg").each(function(){const t=ThriveGlobal.$j(this).css("height",""),e=t.attr("data-height"),o=t.attr("data-width");if(void 0!==e&&void 0!==o){const i=t.parent().width(),n=i*e/o;i<=o?t.css("min-height",n+"px"):t.css({"min-height":e+"px"})}})},openLightbox:o(91806),event_triggers(t){!tve_frontend_options.is_editor_page&&window.TVE_Event_Manager_Registered_Callbacks&&t.find(".tve_evt_manager_listen").each(function(){const t=ThriveGlobal.$j(this);let e=t.attr("data-tcb-events");if(e||(e=t.closest(".thrv_wrapper").attr("data-tcb-events")),e)try{e=JSON.parse(e.replace("__TCB_EVENT_","").replace("_TNEVE_BCT__","")),ThriveGlobal.$j.each(e,function(e,o){if(TVE_Event_Manager_Registered_Callbacks[o.a]){const e="mouseover"===o.t?"mouseenter":o.t;t.off(e+".tcbevt"+o.t).on(e+".tcbevt"+o.t,function(){return TVE_Event_Manager_Registered_Callbacks[o.a].call(t[0],o.t,o.a,o.config||o.c||{})})}})}catch(t){console.warn(t,"Could not parse events!")}})},showDataElements(t){ThriveGlobal.$j(".thrv_data_element").not(".thrv_data_element_start").each(function(){const e=ThriveGlobal.$j(this),o=TCB_Front.$window.height();t+o>=e.offset().top+e.outerHeight()&&"hidden"!==e.css("visibility")&&e.addClass("thrv_data_element_start").trigger("tve.start-animation")})},onDOMReady(t){if(this.$body=ThriveGlobal.$j("body"),this.isRTL="rtl"===ThriveGlobal.$j("html").attr("dir"),this.body_offset=this.$body.offset(),void 0===t&&(t=this.$body),this.notificationElement=new this.notification,TCB_Front.$window.on("tve_after_content_toggle",(t,e,o=!0)=>{setTimeout(()=>{TCB_Front.handleIframes(e,o)},100)}),TCB_Front.$window.trigger("tve_after_content_toggle",[t]),this.icons.migrate(t),this.$body.addClass(`tve-${this.getDisplayType()}-browser`),Object.keys(TCB_Front.browser).length&&Object.keys(TCB_Front.browser).forEach(t=>{-1===t.indexOf("webkit")&&TCB_Front.browser[t]&&this.$body.addClass(`tve-${t}-browser`)}),this.smartComplete.init(t),tve_frontend_options.is_editor_page&&ThriveGlobal.$j("head").append('<div id="tve-clipboard-container" style="display:none !important;"></div>'),tve_frontend_options.is_editor_page||(this.add_scroll_callback(this.showDataElements,this),this.header(t),this.sticky.initSticky(t,!!tve_frontend_options.is_editor_page)),this.fix_compat_issues(t),this.replaceDynamicContent(),tve_frontend_options.is_editor_page||("undefined"!=typeof ResizeObserver?new ResizeObserver(()=>{this.$body.trigger("tcb.body.resize"),TCB_Front.resizePageSection()}).observe(document.body):TCB_Front.addResizeCallback(TCB_Front.resizePageSection)),tve_frontend_options.is_editor_page)try{ThriveGlobal.$j("html").getNiceScroll().remove()}catch(t){}else{if(void 0===window.tcb_autofill){window.tcb_autofill=TCB_Front.getCookie("account_create_fields");try{window.tcb_autofill&&(window.tcb_autofill=decodeURIComponent(window.tcb_autofill),window.tcb_autofill=JSON.parse(window.tcb_autofill))}catch(t){window.tcb_autofill=null}window.tcb_autofill||(window.tcb_autofill=null)}window.tcb_autofill&&ThriveGlobal.$j.isArray(window.tcb_autofill)&&(ThriveGlobal.$j.each(window.tcb_autofill,function(e,o){-1===o.name.indexOf("[]")&&t.find("input[name="+o.name+"]").each(function(){const t=ThriveGlobal.$j(this);t.data("tcb-autofill")||(t.val(o.value).hide(),t.parent().append('<div class="tve-editable-field"><p>'+o.value+'</p><span class="tve_sc_icon icon-lock tve-edit-field"></span></div>'),t.data("tcb-autofill",1))})}),setTimeout(function(){TCB_Front.setCookie("account_create_fields",null,{path:"/"})},2500)),ThriveGlobal.$j("input[type=password], input[name=confirm_password]").on("keyup",function(){const t=ThriveGlobal.$j(this),o=this.value.trim(),i=t.siblings(".tve-password-strength-wrapper");let n,s="#e3ecef",r="";if(i.find(".tve-password-strength").css({"background-color":"#e3ecef"}),!o)return void i.find(".tve-password-strength").css("background-color","");const a=e(o);a<30?(s="#ef5350",r="Weak",n=i.find(".tve-password-strength:lt(1)")):a>=30&&a<60?(s="#ffa726",r="So-so",n=i.find(".tve-password-strength:lt(2)")):a>=60&&a<80?(s="#8bc34a",r="Good",n=i.find(".tve-password-strength:lt(3)")):(s="#4caf50",r="Great!",n=i.find(".tve-password-strength:lt(4)")),n.each(function(){ThriveGlobal.$j(this).css({"background-color":s})}),i.attr("data-score",a).find(".tve-password-strength-text").text(r).css({color:s})});const e=function(t){let e=0;if(!t||t.length<5||/(passwd|mypass|password|wordpress)/g.test(t))return e;e=5*String.prototype.concat(...new Set(t)).length,/[a-z]/.test(t)&&(e+=10),/[A-Z]/.test(t)&&(e+=10);const o=t.match(/\d/g);o&&(e+=2*o.length);const i=t.match(/\W/g);return i&&(e+=10*i.length),parseInt(e)};TCB_Front.$document.on("click",".tve-edit-field",function(){ThriveGlobal.$j(this).parent().hide().prev().show()}),TCB_Front.$document.on("click",".tve-close-error-message",function(){ThriveGlobal.$j(this).parent().hide().prev().show()}),TCB_Front.$document.on("click",".tve-image-overlay",function(){const t=ThriveGlobal.$j(this).parent();t.is("a")||t.find("img").trigger("click")}),TCB_Front.$document.on("mouseenter mouseout",".tve-image-overlay",function(t){ThriveGlobal.$j(this).parent().find("img").trigger(t.type)}),TCB_Front.queryString.get("tcb_lightbox")||TCB_Front.$window.trigger("tve_after_content_toggle",[ThriveGlobal.$j(".tve_p_lb_content"),!1]),this.init_typefocus(t)}if(TCB_Front.remove_empty_symbols(t),TCB_Front.footer_styling(t),!tve_frontend_options.is_editor_page){const t=ThriveGlobal.$j(".tve-fb-comments");t.length&&(ThriveGlobal.$j("#fb-root").length&&ThriveGlobal.$j("head").append('<div id="fb-root"></div>'),t.each(function(){const t=this.parentNode;""===this.getAttribute("data-href")&&(this.setAttribute("data-href",window.location.href.split("?")[0]),this.setAttribute("data-width","100%")),this.classList.add("fb-comments"),setTimeout(()=>{FB.XFBML.parse(t)},200)}));const e=ThriveGlobal.$j(".thrv_disqus_comments #disqus_thread");e.length&&(window.disqus_shortname=e.attr("data-disqus_shortname"),""===e.attr("data-disqus_url")?window.disqus_url=window.location:window.disqus_url=e.attr("data-disqus_url"),window.disqus_identifier=window.disqus_url,"undefined"==typeof DISQUS&&ThriveGlobal.$j.getScript("//"+disqus_shortname+".disqus.com/embed.js"))}window.mejs&&ThriveGlobal.$j(".tcb-video-shortcode").not(".mejs-container").filter(function(){return!ThriveGlobal.$j(this).parent().hasClass(".mejs-mediaelement")}).mediaelementplayer(),this.resizePageSection(),setTimeout(()=>{try{window.dispatchEvent(new CustomEvent("resize",{detail:{fromTcb:!0}}))}catch(t){}}),this.init_scroll(),this.initResize(),this.enableHighlightViewportAnimations(t),TCB_Front.add_scroll_callback(e=>{e>0&&this.enableHighlightViewportAnimations(t)}),this.handleAds(),setTimeout(this.handleAds,5e3),ThriveGlobal.$j(window).trigger("tcb_after_dom_ready")},handleAds(){TCB_Front.$body.find('ins[data-adsbygoogle-status="done"]').each((t,e)=>{ThriveGlobal.$j(e).parentsUntil("body").each((t,e)=>{e.style.setProperty("height",""),e.style.setProperty("min-height","")})})},enableHighlightViewportAnimations(t){t.find('[data-tcb-highlight-animation^="viewport"]').each((t,e)=>{const o=ThriveGlobal.$j(e),i=o.data("tcb-highlight-animation"),n=e.classList.contains("tcb-animated");TCB_Front.isInViewport(e)?(n||tve_frontend_options.is_editor_page||this.refreshCachedSvg(o),o.addClass("tcb-animated")):n&&"viewport_repeat"===i&&e.classList.remove("tcb-animated")})},refreshCachedSvg(t){let e=t.css("--tve-highlight-background");void 0!==e&&e.length&&(e=decodeURIComponent(e.replace('url("data:image/svg+xml,',"").replace('")',"")),e=e.replace("</svg>",`<span id="tcb-${Math.random()}"></span></svg>`),t.css("--tve-highlight-background",`url("data:image/svg+xml,${encodeURIComponent(e)}")`))},replaceDynamicContent(){const t=TCB_Front.detectBrowser();ThriveGlobal.$j(".tve-browser-data").text(Object.keys(t).filter(e=>t[e]&&"webkit"!==e).toString())},resizePageSection(t){void 0===t&&(t=ThriveGlobal.$j(".tcb-window-width"));const e=!!TCB_Front.$body.length&&TCB_Front.inlineCssVariable(TCB_Front.$body,"--off-screen-sidebar-size");let o=tve_frontend_options.is_editor_page?TCB_Front.$body.outerWidth():TCB_Front.$window.width(),i=0;e&&("left"===TCB_Front.$body.attr("data-off-screen-side")?(i=parseInt(TCB_Front.$body.css("padding-left")),o-=i):o-=parseInt(TCB_Front.$body.css("padding-right"))),o+="px",t.each((t,e)=>{const n=ThriveGlobal.$j(e);let s=n.css("left");s="auto"===s?0:Number(n.css("left").replace("px","")),s=s+i-n.offset().left,n.css({width:o,left:s+"px"})})},remove_empty_symbols(t){t.find("div.thrv_symbol").each(function(){const t=jQuery(this);if(t.closest(".tve-symbol-container").length)return;const e=t.clone();e.find(".thrive-shortcode-config").remove(),""===e.html()&&t.remove()})},footer_styling:o(18684),init_scroll:o(49110),initResize:o(41523),sticky:o(98079),fix_compat_issues:o(41954),reservedTerms:o(68382),init_typefocus:o(22138),header:o(43569),queryString:o(69810),smartComplete:o(5540),icons:o(73771),notification:o(15039)}),"undefined"!=typeof ThriveGlobal&&(TCB_Front.$window=ThriveGlobal.$j(window),TCB_Front.$document=ThriveGlobal.$j(document),TCB_Front.$body=ThriveGlobal.$j("body"),TCB_Front.browser=TCB_Front.detectBrowser(),TCB_Front.$document.ready(function(){setTimeout(function t(){if(void 0!==Object.values(TCB_Front.js_modules).find(t=>!t.loaded))return console.log("Thrive Architect - not all JS modules are loaded, re-trying in 20ms..."),void setTimeout(t,20);let e=ThriveGlobal.$j(tve_frontend_options.is_editor_page?"#tve_editor":"body");"undefined"!=typeof TVE&&"function"==typeof TVE.apply_filters&&(e=TVE.apply_filters("editor_wrapper",e)),TCB_Front.$window.trigger("tve_after_content_toggle",[e]),tve_frontend_options.is_editor_page||"undefined"!=typeof TVE_Event_Manager_Registered_Callbacks&&(TCB_Front.event_triggers(e),tve_frontend_options.page_events&&ThriveGlobal.$j.each(tve_frontend_options.page_events,function(t,e){TVE_Event_Manager_Registered_Callbacks[e.a]&&TCB_Front.$document.on("tve-page-event-"+e.t,function(t,o){let i=!0;return"timer"===e.t&&o&&e.config&&e.config.t_delay!==o&&(i=!1),!!i&&TVE_Event_Manager_Registered_Callbacks[e.a].call(document,e.t,e.a,e.config?e.config:{})})})),"undefined"==typeof ThriveApp&&(TCB_Front.pageSectionHeight(),TCB_Front.addResizeCallback(TCB_Front.pageSectionHeight)),TCB_Front.onDOMReady()})})),TCB_Front.isModuleLoaded=t=>TCB_Front.js_modules[t]&&TCB_Front.js_modules[t].loaded,TCB_Front.setModuleLoadedStatus=(t,e)=>{void 0===TCB_Front.js_modules[t]&&(TCB_Front.js_modules[t]={}),TCB_Front.js_modules[t].loaded=e},TCB_Front.Utils=o(66640),TCB_Front.Base64=o(46967),o(64743),o(11481),o(74468)})();
window._lodash_tmp=!1,"_"in window&&function(n,o){if(!n||window[n])return!1;const e=o.filter((function(o){return n[o]&&"function"==typeof n[o]}));return o.length===e.length}(window._,["get","set","at","cloneDeep","some","every"])&&(window._lodash_tmp=_),window.tec=window.tec||{},window.tec.common=window.tec.common||{},window.tec.common.underscoreBefore={};
!function(n,t){var r,e;"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define("underscore",t):(n="undefined"!=typeof globalThis?globalThis:n||self,r=n._,(e=n._=t()).noConflict=function(){return n._=r,e})}(this,function(){var n="1.13.8",t="object"==typeof self&&self.self===self&&self||"object"==typeof global&&global.global===global&&global||Function("return this")()||{},e=Array.prototype,V=Object.prototype,F="undefined"!=typeof Symbol?Symbol.prototype:null,P=e.push,f=e.slice,s=V.toString,q=V.hasOwnProperty,r="undefined"!=typeof ArrayBuffer,u="undefined"!=typeof DataView,U=Array.isArray,W=Object.keys,z=Object.create,L=r&&ArrayBuffer.isView,$=isNaN,C=isFinite,K=!{toString:null}.propertyIsEnumerable("toString"),J=["valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"],G=Math.pow(2,53)-1;function l(u,i){return i=null==i?u.length-1:+i,function(){for(var n=Math.max(arguments.length-i,0),t=Array(n),r=0;r<n;r++)t[r]=arguments[r+i];switch(i){case 0:return u.call(this,t);case 1:return u.call(this,arguments[0],t);case 2:return u.call(this,arguments[0],arguments[1],t)}for(var e=Array(i+1),r=0;r<i;r++)e[r]=arguments[r];return e[i]=t,u.apply(this,e)}}function i(n){var t=typeof n;return"function"==t||"object"==t&&!!n}function H(n){return void 0===n}function Q(n){return!0===n||!1===n||"[object Boolean]"===s.call(n)}function o(n){var t="[object "+n+"]";return function(n){return s.call(n)===t}}var X=o("String"),Y=o("Number"),Z=o("Date"),nn=o("RegExp"),tn=o("Error"),rn=o("Symbol"),en=o("ArrayBuffer"),a=o("Function"),t=t.document&&t.document.childNodes,p=a="function"!=typeof/./&&"object"!=typeof Int8Array&&"function"!=typeof t?function(n){return"function"==typeof n||!1}:a,t=o("Object"),un=u&&(!/\[native code\]/.test(String(DataView))||t(new DataView(new ArrayBuffer(8)))),a="undefined"!=typeof Map&&t(new Map),u=o("DataView");var h=un?function(n){return null!=n&&p(n.getInt8)&&en(n.buffer)}:u,c=U||o("Array");function v(n,t){return null!=n&&q.call(n,t)}var on=o("Arguments"),an=(!function(){on(arguments)||(on=function(n){return v(n,"callee")})}(),on);function fn(n){return Y(n)&&$(n)}function cn(n){return function(){return n}}function ln(t){return function(n){n=t(n);return"number"==typeof n&&0<=n&&n<=G}}function sn(t){return function(n){return null==n?void 0:n[t]}}var y=sn("byteLength"),pn=ln(y),hn=/\[object ((I|Ui)nt(8|16|32)|Float(32|64)|Uint8Clamped|Big(I|Ui)nt64)Array\]/;var vn=r?function(n){return L?L(n)&&!h(n):pn(n)&&hn.test(s.call(n))}:cn(!1),d=sn("length");function yn(n,t){t=function(t){for(var r={},n=t.length,e=0;e<n;++e)r[t[e]]=!0;return{contains:function(n){return!0===r[n]},push:function(n){return r[n]=!0,t.push(n)}}}(t);var r=J.length,e=n.constructor,u=p(e)&&e.prototype||V,i="constructor";for(v(n,i)&&!t.contains(i)&&t.push(i);r--;)(i=J[r])in n&&n[i]!==u[i]&&!t.contains(i)&&t.push(i)}function g(n){if(!i(n))return[];if(W)return W(n);var t,r=[];for(t in n)v(n,t)&&r.push(t);return K&&yn(n,r),r}function dn(n,t){var r=g(t),e=r.length;if(null==n)return!e;for(var u=Object(n),i=0;i<e;i++){var o=r[i];if(t[o]!==u[o]||!(o in u))return!1}return!0}function b(n){return n instanceof b?n:this instanceof b?void(this._wrapped=n):new b(n)}function gn(n){return new Uint8Array(n.buffer||n,n.byteOffset||0,y(n))}b.VERSION=n,b.prototype.valueOf=b.prototype.toJSON=b.prototype.value=function(){return this._wrapped},b.prototype.toString=function(){return String(this._wrapped)};var bn="[object DataView]";function m(n){if(!i(n))return[];var t,r=[];for(t in n)r.push(t);return K&&yn(n,r),r}function mn(e){var u=d(e);return function(n){if(null==n)return!1;var t=m(n);if(d(t))return!1;for(var r=0;r<u;r++)if(!p(n[e[r]]))return!1;return e!==wn||!p(n[jn])}}var jn="forEach",t=["clear","delete"],u=["get","has","set"],U=t.concat(jn,u),wn=t.concat(u),r=["add"].concat(t,jn,"has"),u=a?mn(U):o("Map"),t=a?mn(wn):o("WeakMap"),U=a?mn(r):o("Set"),a=o("WeakSet");function j(n){for(var t=g(n),r=t.length,e=Array(r),u=0;u<r;u++)e[u]=n[t[u]];return e}function _n(n){for(var t={},r=g(n),e=0,u=r.length;e<u;e++)t[n[r[e]]]=r[e];return t}function An(n){var t,r=[];for(t in n)p(n[t])&&r.push(t);return r.sort()}function xn(f,c){return function(n){var t=arguments.length;if(c&&(n=Object(n)),!(t<2||null==n))for(var r=1;r<t;r++)for(var e=arguments[r],u=f(e),i=u.length,o=0;o<i;o++){var a=u[o];c&&void 0!==n[a]||(n[a]=e[a])}return n}}var Sn=xn(m),w=xn(g),On=xn(m,!0);function Mn(n){var t;return i(n)?z?z(n):((t=function(){}).prototype=n,n=new t,t.prototype=null,n):{}}function En(n){return c(n)?n:[n]}function _(n){return b.toPath(n)}function Bn(n,t){for(var r=t.length,e=0;e<r;e++){if(null==n)return;n=n[t[e]]}return r?n:void 0}function Nn(n,t,r){n=Bn(n,_(t));return H(n)?r:n}function kn(n){return n}function A(t){return t=w({},t),function(n){return dn(n,t)}}function In(t){return t=_(t),function(n){return Bn(n,t)}}function x(u,i,n){if(void 0===i)return u;switch(null==n?3:n){case 1:return function(n){return u.call(i,n)};case 3:return function(n,t,r){return u.call(i,n,t,r)};case 4:return function(n,t,r,e){return u.call(i,n,t,r,e)}}return function(){return u.apply(i,arguments)}}function Tn(n,t,r){return null==n?kn:p(n)?x(n,t,r):(i(n)&&!c(n)?A:In)(n)}function Dn(n,t){return Tn(n,t,1/0)}function S(n,t,r){return b.iteratee!==Dn?b.iteratee(n,t):Tn(n,t,r)}function Rn(){}function Vn(n,t){return null==t&&(t=n,n=0),n+Math.floor(Math.random()*(t-n+1))}b.toPath=En,b.iteratee=Dn;var O=Date.now||function(){return(new Date).getTime()};function Fn(t){function r(n){return t[n]}var n="(?:"+g(t).join("|")+")",e=RegExp(n),u=RegExp(n,"g");return function(n){return e.test(n=null==n?"":""+n)?n.replace(u,r):n}}var r={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","`":"&#x60;"},Pn=Fn(r),r=Fn(_n(r)),qn=b.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g},Un=/(.)^/,Wn={"'":"'","\\":"\\","\r":"r","\n":"n","\u2028":"u2028","\u2029":"u2029"},zn=/\\|'|\r|\n|\u2028|\u2029/g;function Ln(n){return"\\"+Wn[n]}var $n=/^\s*(\w|\$)+\s*$/;var Cn=0;function Kn(n,t,r,e,u){return e instanceof t?(e=Mn(n.prototype),i(t=n.apply(e,u))?t:e):n.apply(r,u)}var M=l(function(u,i){function o(){for(var n=0,t=i.length,r=Array(t),e=0;e<t;e++)r[e]=i[e]===a?arguments[n++]:i[e];for(;n<arguments.length;)r.push(arguments[n++]);return Kn(u,o,this,this,r)}var a=M.placeholder;return o}),Jn=(M.placeholder=b,l(function(t,r,e){var u;if(p(t))return u=l(function(n){return Kn(t,u,r,this,e.concat(n))});throw new TypeError("Bind must be called on a function")})),E=ln(d);function B(n,t,r){t||0===t||(t=1/0);for(var e=[],u=0,i=0,o=d(n)||0,a=[];;){if(o<=i){if(a.length){var f=a.pop(),i=f.i,o=d(n=f.v);continue}break}f=n[i++];t<=a.length?e[u++]=f:E(f)&&(c(f)||an(f))?(a.push({i:i,v:n}),i=0,o=d(n=f)):r||(e[u++]=f)}return e}var Gn=l(function(n,t){var r=(t=B(t,!1,!1)).length;if(r<1)throw new Error("bindAll must be passed function names");for(;r--;){var e=t[r];n[e]=Jn(n[e],n)}return n});var Hn=l(function(n,t,r){return setTimeout(function(){return n.apply(null,r)},t)}),Qn=M(Hn,b,1);function Xn(n){return function(){return!n.apply(this,arguments)}}function Yn(n,t){var r;return function(){return 0<--n&&(r=t.apply(this,arguments)),n<=1&&(t=null),r}}var Zn=M(Yn,2);function nt(n,t,r){t=S(t,r);for(var e,u=g(n),i=0,o=u.length;i<o;i++)if(t(n[e=u[i]],e,n))return e}function tt(i){return function(n,t,r){t=S(t,r);for(var e=d(n),u=0<i?0:e-1;0<=u&&u<e;u+=i)if(t(n[u],u,n))return u;return-1}}var rt=tt(1),et=tt(-1);function ut(n,t,r,e){for(var u=(r=S(r,e,1))(t),i=0,o=d(n);i<o;){var a=Math.floor((i+o)/2);r(n[a])<u?i=a+1:o=a}return i}function it(i,o,a){return function(n,t,r){var e=0,u=d(n);if("number"==typeof r)0<i?e=0<=r?r:Math.max(r+u,e):u=0<=r?Math.min(r+1,u):r+u+1;else if(a&&r&&u)return n[r=a(n,t)]===t?r:-1;if(t!=t)return 0<=(r=o(f.call(n,e,u),fn))?r+e:-1;for(r=0<i?e:u-1;0<=r&&r<u;r+=i)if(n[r]===t)return r;return-1}}var ot=it(1,rt,ut),at=it(-1,et);function ft(n,t,r){t=(E(n)?rt:nt)(n,t,r);if(void 0!==t&&-1!==t)return n[t]}function N(n,t,r){if(t=x(t,r),E(n))for(u=0,i=n.length;u<i;u++)t(n[u],u,n);else for(var e=g(n),u=0,i=e.length;u<i;u++)t(n[e[u]],e[u],n);return n}function k(n,t,r){t=S(t,r);for(var e=!E(n)&&g(n),u=(e||n).length,i=Array(u),o=0;o<u;o++){var a=e?e[o]:o;i[o]=t(n[a],a,n)}return i}function ct(f){return function(n,t,r,e){var u=3<=arguments.length;return function(n,t,r,e){var u=!E(n)&&g(n),i=(u||n).length,o=0<f?0:i-1;for(e||(r=n[u?u[o]:o],o+=f);0<=o&&o<i;o+=f){var a=u?u[o]:o;r=t(r,n[a],a,n)}return r}(n,x(t,e,4),r,u)}}var lt=ct(1),st=ct(-1);function I(n,e,t){var u=[];return e=S(e,t),N(n,function(n,t,r){e(n,t,r)&&u.push(n)}),u}function pt(n,t,r){t=S(t,r);for(var e=!E(n)&&g(n),u=(e||n).length,i=0;i<u;i++){var o=e?e[i]:i;if(!t(n[o],o,n))return!1}return!0}function ht(n,t,r){t=S(t,r);for(var e=!E(n)&&g(n),u=(e||n).length,i=0;i<u;i++){var o=e?e[i]:i;if(t(n[o],o,n))return!0}return!1}function T(n,t,r,e){return E(n)||(n=j(n)),0<=ot(n,t,r="number"==typeof r&&!e?r:0)}var vt=l(function(n,r,e){var u,i;return p(r)?i=r:(r=_(r),u=r.slice(0,-1),r=r[r.length-1]),k(n,function(n){var t=i;if(!t){if(null==(n=u&&u.length?Bn(n,u):n))return;t=n[r]}return null==t?t:t.apply(n,e)})});function yt(n,t){return k(n,In(t))}function dt(n,e,t){var r,u,i=-1/0,o=-1/0;if(null==e||"number"==typeof e&&"object"!=typeof n[0]&&null!=n)for(var a=0,f=(n=E(n)?n:j(n)).length;a<f;a++)null!=(r=n[a])&&i<r&&(i=r);else e=S(e,t),N(n,function(n,t,r){u=e(n,t,r),(o<u||u===-1/0&&i===-1/0)&&(i=n,o=u)});return i}var gt=/[^\ud800-\udfff]|[\ud800-\udbff][\udc00-\udfff]|[\ud800-\udfff]/g;function bt(n){return n?c(n)?f.call(n):X(n)?n.match(gt):E(n)?k(n,kn):j(n):[]}function mt(n,t,r){if(null==t||r)return(n=E(n)?n:j(n))[Vn(n.length-1)];for(var e=bt(n),r=d(e),u=(t=Math.max(Math.min(t,r),0),r-1),i=0;i<t;i++){var o=Vn(i,u),a=e[i];e[i]=e[o],e[o]=a}return e.slice(0,t)}function D(i,t){return function(r,e,n){var u=t?[[],[]]:{};return e=S(e,n),N(r,function(n,t){t=e(n,t,r);i(u,n,t)}),u}}var jt=D(function(n,t,r){v(n,r)?n[r].push(t):n[r]=[t]}),wt=D(function(n,t,r){n[r]=t}),_t=D(function(n,t,r){v(n,r)?n[r]++:n[r]=1}),At=D(function(n,t,r){n[r?0:1].push(t)},!0);function xt(n,t,r){return t in r}var St=l(function(n,t){var r={},e=t[0];if(null!=n){p(e)?(1<t.length&&(e=x(e,t[1])),t=m(n)):(e=xt,t=B(t,!1,!1),n=Object(n));for(var u=0,i=t.length;u<i;u++){var o=t[u],a=n[o];e(a,o,n)&&(r[o]=a)}}return r}),Ot=l(function(n,r){var t,e=r[0];return p(e)?(e=Xn(e),1<r.length&&(t=r[1])):(r=k(B(r,!1,!1),String),e=function(n,t){return!T(r,t)}),St(n,e,t)});function Mt(n,t,r){return f.call(n,0,Math.max(0,n.length-(null==t||r?1:t)))}function Et(n,t,r){return null==n||n.length<1?null==t||r?void 0:[]:null==t||r?n[0]:Mt(n,n.length-t)}function R(n,t,r){return f.call(n,null==t||r?1:t)}var Bt=l(function(n,t){return t=B(t,!0,!0),I(n,function(n){return!T(t,n)})}),Nt=l(function(n,t){return Bt(n,t)});function kt(n,t,r,e){Q(t)||(e=r,r=t,t=!1),null!=r&&(r=S(r,e));for(var u=[],i=[],o=0,a=d(n);o<a;o++){var f=n[o],c=r?r(f,o,n):f;t&&!r?(o&&i===c||u.push(f),i=c):r?T(i,c)||(i.push(c),u.push(f)):T(u,f)||u.push(f)}return u}var It=l(function(n){return kt(B(n,!0,!0))});function Tt(n){for(var t=n&&dt(n,d).length||0,r=Array(t),e=0;e<t;e++)r[e]=yt(n,e);return r}var Dt=l(Tt);function Rt(n,t){return n._chain?b(t).chain():t}function Vt(r){return N(An(r),function(n){var t=b[n]=r[n];b.prototype[n]=function(){var n=[this._wrapped];return P.apply(n,arguments),Rt(this,t.apply(b,n))}}),b}N(["pop","push","reverse","shift","sort","splice","unshift"],function(t){var r=e[t];b.prototype[t]=function(){var n=this._wrapped;return null!=n&&(r.apply(n,arguments),"shift"!==t&&"splice"!==t||0!==n.length||delete n[0]),Rt(this,n)}}),N(["concat","join","slice"],function(n){var t=e[n];b.prototype[n]=function(){var n=this._wrapped;return Rt(this,n=null!=n?t.apply(n,arguments):n)}});n=Vt({__proto__:null,VERSION:n,restArguments:l,isObject:i,isNull:function(n){return null===n},isUndefined:H,isBoolean:Q,isElement:function(n){return!(!n||1!==n.nodeType)},isString:X,isNumber:Y,isDate:Z,isRegExp:nn,isError:tn,isSymbol:rn,isArrayBuffer:en,isDataView:h,isArray:c,isFunction:p,isArguments:an,isFinite:function(n){return!rn(n)&&C(n)&&!isNaN(parseFloat(n))},isNaN:fn,isTypedArray:vn,isEmpty:function(n){var t;return null==n||("number"==typeof(t=d(n))&&(c(n)||X(n)||an(n))?0===t:0===d(g(n)))},isMatch:dn,isEqual:function(n,t){for(var r=[{a:n,b:t}],e=[],u=[];r.length;){var i=r.pop();if(!0===i)e.pop(),u.pop();else{if((n=i.a)===(t=i.b)){if(0!==n||1/n==1/t)continue;return!1}if(null==n||null==t)return!1;if(n!=n){if(t!=t)continue;return!1}i=typeof n;if("function"!=i&&"object"!=i&&"object"!=typeof t)return!1;n instanceof b&&(n=n._wrapped),t instanceof b&&(t=t._wrapped);i=s.call(n);if(i!==s.call(t))return!1;if(un&&"[object Object]"==i&&h(n)){if(!h(t))return!1;i=bn}switch(i){case"[object RegExp]":case"[object String]":if(""+n==""+t)continue;return!1;case"[object Number]":r.push({a:+n,b:+t});continue;case"[object Date]":case"[object Boolean]":if(+n==+t)continue;return!1;case"[object Symbol]":if(F.valueOf.call(n)===F.valueOf.call(t))continue;return!1;case"[object ArrayBuffer]":case bn:r.push({a:gn(n),b:gn(t)});continue}i="[object Array]"===i;if(!i&&vn(n)){if(y(n)!==y(t))return!1;if(n.buffer===t.buffer&&n.byteOffset===t.byteOffset)continue;i=!0}if(!i){if("object"!=typeof n||"object"!=typeof t)return!1;var o=n.constructor,a=t.constructor;if(o!==a&&!(p(o)&&o instanceof o&&p(a)&&a instanceof a)&&"constructor"in n&&"constructor"in t)return!1}for(var f=e.length;f--;)if(e[f]===n){if(u[f]===t)break;return!1}if(!(0<=f))if(e.push(n),u.push(t),r.push(!0),i){if((f=n.length)!==t.length)return!1;for(;f--;)r.push({a:n[f],b:t[f]})}else{var c,l=g(n),f=l.length;if(g(t).length!==f)return!1;for(;f--;){if(!v(t,c=l[f]))return!1;r.push({a:n[c],b:t[c]})}}}}return!0},isMap:u,isWeakMap:t,isSet:U,isWeakSet:a,keys:g,allKeys:m,values:j,pairs:function(n){for(var t=g(n),r=t.length,e=Array(r),u=0;u<r;u++)e[u]=[t[u],n[t[u]]];return e},invert:_n,functions:An,methods:An,extend:Sn,extendOwn:w,assign:w,defaults:On,create:function(n,t){return n=Mn(n),t&&w(n,t),n},clone:function(n){return i(n)?c(n)?n.slice():Sn({},n):n},tap:function(n,t){return t(n),n},get:Nn,has:function(n,t){for(var r=(t=_(t)).length,e=0;e<r;e++){var u=t[e];if(!v(n,u))return!1;n=n[u]}return!!r},mapObject:function(n,t,r){t=S(t,r);for(var e=g(n),u=e.length,i={},o=0;o<u;o++){var a=e[o];i[a]=t(n[a],a,n)}return i},identity:kn,constant:cn,noop:Rn,toPath:En,property:In,propertyOf:function(t){return null==t?Rn:function(n){return Nn(t,n)}},matcher:A,matches:A,times:function(n,t,r){var e=Array(Math.max(0,n));t=x(t,r,1);for(var u=0;u<n;u++)e[u]=t(u);return e},random:Vn,now:O,escape:Pn,unescape:r,templateSettings:qn,template:function(i,n,t){n=On({},n=!n&&t?t:n,b.templateSettings);var r,t=RegExp([(n.escape||Un).source,(n.interpolate||Un).source,(n.evaluate||Un).source].join("|")+"|$","g"),o=0,a="__p+='";if(i.replace(t,function(n,t,r,e,u){return a+=i.slice(o,u).replace(zn,Ln),o=u+n.length,t?a+="'+\n((__t=("+t+"))==null?'':_.escape(__t))+\n'":r?a+="'+\n((__t=("+r+"))==null?'':__t)+\n'":e&&(a+="';\n"+e+"\n__p+='"),n}),a+="';\n",t=n.variable){if(!$n.test(t))throw new Error("variable is not a bare identifier: "+t)}else a="with(obj||{}){\n"+a+"}\n",t="obj";a="var __t,__p='',__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,'');};\n"+a+"return __p;\n";try{r=new Function(t,"_",a)}catch(n){throw n.source=a,n}function e(n){return r.call(this,n,b)}return e.source="function("+t+"){\n"+a+"}",e},result:function(n,t,r){var e=(t=_(t)).length;if(!e)return p(r)?r.call(n):r;for(var u=0;u<e;u++){var i=null==n?void 0:n[t[u]];void 0===i&&(i=r,u=e),n=p(i)?i.call(n):i}return n},uniqueId:function(n){var t=++Cn+"";return n?n+t:t},chain:function(n){return(n=b(n))._chain=!0,n},iteratee:Dn,partial:M,bind:Jn,bindAll:Gn,memoize:function(e,u){function i(n){var t=i.cache,r=""+(u?u.apply(this,arguments):n);return v(t,r)||(t[r]=e.apply(this,arguments)),t[r]}return i.cache={},i},delay:Hn,defer:Qn,throttle:function(r,e,u){function i(){l=!1===u.leading?0:O(),o=null,c=r.apply(a,f),o||(a=f=null)}function n(){var n=O(),t=(l||!1!==u.leading||(l=n),e-(n-l));return a=this,f=arguments,t<=0||e<t?(o&&(clearTimeout(o),o=null),l=n,c=r.apply(a,f),o||(a=f=null)):o||!1===u.trailing||(o=setTimeout(i,t)),c}var o,a,f,c,l=0;return u=u||{},n.cancel=function(){clearTimeout(o),l=0,o=a=f=null},n},debounce:function(t,r,e){function u(){var n=O()-o;n<r?i=setTimeout(u,r-n):(i=null,e||(f=t.apply(c,a)),i||(a=c=null))}var i,o,a,f,c,n=l(function(n){return c=this,a=n,o=O(),i||(i=setTimeout(u,r),e&&(f=t.apply(c,a))),f});return n.cancel=function(){clearTimeout(i),i=a=c=null},n},wrap:function(n,t){return M(t,n)},negate:Xn,compose:function(){var r=arguments,e=r.length-1;return function(){for(var n=e,t=r[e].apply(this,arguments);n--;)t=r[n].call(this,t);return t}},after:function(n,t){return function(){if(--n<1)return t.apply(this,arguments)}},before:Yn,once:Zn,findKey:nt,findIndex:rt,findLastIndex:et,sortedIndex:ut,indexOf:ot,lastIndexOf:at,find:ft,detect:ft,findWhere:function(n,t){return ft(n,A(t))},each:N,forEach:N,map:k,collect:k,reduce:lt,foldl:lt,inject:lt,reduceRight:st,foldr:st,filter:I,select:I,reject:function(n,t,r){return I(n,Xn(S(t)),r)},every:pt,all:pt,some:ht,any:ht,contains:T,includes:T,include:T,invoke:vt,pluck:yt,where:function(n,t){return I(n,A(t))},max:dt,min:function(n,e,t){var r,u,i=1/0,o=1/0;if(null==e||"number"==typeof e&&"object"!=typeof n[0]&&null!=n)for(var a=0,f=(n=E(n)?n:j(n)).length;a<f;a++)null!=(r=n[a])&&r<i&&(i=r);else e=S(e,t),N(n,function(n,t,r){((u=e(n,t,r))<o||u===1/0&&i===1/0)&&(i=n,o=u)});return i},shuffle:function(n){return mt(n,1/0)},sample:mt,sortBy:function(n,e,t){var u=0;return e=S(e,t),yt(k(n,function(n,t,r){return{value:n,index:u++,criteria:e(n,t,r)}}).sort(function(n,t){var r=n.criteria,e=t.criteria;if(r!==e){if(e<r||void 0===r)return 1;if(r<e||void 0===e)return-1}return n.index-t.index}),"value")},groupBy:jt,indexBy:wt,countBy:_t,partition:At,toArray:bt,size:function(n){return null==n?0:(E(n)?n:g(n)).length},pick:St,omit:Ot,first:Et,head:Et,take:Et,initial:Mt,last:function(n,t,r){return null==n||n.length<1?null==t||r?void 0:[]:null==t||r?n[n.length-1]:R(n,Math.max(0,n.length-t))},rest:R,tail:R,drop:R,compact:function(n){return I(n,Boolean)},flatten:function(n,t){return B(n,t,!1)},without:Nt,uniq:kt,unique:kt,union:It,intersection:function(n){for(var t=[],r=arguments.length,e=0,u=d(n);e<u;e++){var i=n[e];if(!T(t,i)){for(var o=1;o<r&&T(arguments[o],i);o++);o===r&&t.push(i)}}return t},difference:Bt,unzip:Tt,transpose:Tt,zip:Dt,object:function(n,t){for(var r={},e=0,u=d(n);e<u;e++)t?r[n[e]]=t[e]:r[n[e][0]]=n[e][1];return r},range:function(n,t,r){null==t&&(t=n||0,n=0),r=r||(t<n?-1:1);for(var e=Math.max(Math.ceil((t-n)/r),0),u=Array(e),i=0;i<e;i++,n+=r)u[i]=n;return u},chunk:function(n,t){if(null==t||t<1)return[];for(var r=[],e=0,u=n.length;e<u;)r.push(f.call(n,e,e+=t));return r},mixin:Vt,default:b});return n._=n});
!1!==window._lodash_tmp&&"function"==typeof window._lodash_tmp&&(window.underscore=_.noConflict(),window._=window._lodash_tmp),window.tec=window.tec||{},window.tec.common=window.tec.common||{},window.tec.common.underscoreAfter={};
!function(n){var s="object"==typeof self&&self.self===self&&self||"object"==typeof global&&global.global===global&&global;if("function"==typeof define&&define.amd)define(["underscore","jquery","exports"],function(t,e,i){s.Backbone=n(s,i,t,e)});else if("undefined"!=typeof exports){var t,e=require("underscore");try{t=require("jquery")}catch(t){}n(s,exports,e,t)}else s.Backbone=n(s,{},s._,s.jQuery||s.Zepto||s.ender||s.$)}(function(t,h,b,e){function a(t,e,i,n,s){var r,o=0;if(i&&"object"==typeof i){void 0!==n&&"context"in s&&void 0===s.context&&(s.context=n);for(r=b.keys(i);o<r.length;o++)e=a(t,e,r[o],i[r[o]],s)}else if(i&&l.test(i))for(r=i.split(l);o<r.length;o++)e=t(e,r[o],n,s);else e=t(e,i,n,s);return e}function x(t,e,i){i=Math.min(Math.max(i,0),t.length);for(var n=Array(t.length-i),s=e.length,r=0;r<n.length;r++)n[r]=t[r+i];for(r=0;r<s;r++)t[r+i]=e[r];for(r=0;r<n.length;r++)t[r+s+i]=n[r]}function s(i,n,t,s){b.each(t,function(t,e){n[e]&&(i.prototype[e]=function(n,t,s,r){switch(t){case 1:return function(){return n[s](this[r])};case 2:return function(t){return n[s](this[r],t)};case 3:return function(t,e){return n[s](this[r],T(t,this),e)};case 4:return function(t,e,i){return n[s](this[r],T(t,this),e,i)};default:return function(){var t=u.call(arguments);return t.unshift(this[r]),n[s].apply(n,t)}}}(n,t,e,s))})}var o,i=t.Backbone,u=Array.prototype.slice,e=(h.VERSION="1.6.1",h.$=e,h.noConflict=function(){return t.Backbone=i,this},h.emulateHTTP=!1,h.emulateJSON=!1,h.Events={}),l=/\s+/,n=(e.on=function(t,e,i){return this._events=a(n,this._events||{},t,e,{context:i,ctx:this,listening:o}),o&&(((this._listeners||(this._listeners={}))[o.id]=o).interop=!1),this},e.listenTo=function(t,e,i){if(t){var n=t._listenId||(t._listenId=b.uniqueId("l")),s=this._listeningTo||(this._listeningTo={}),r=o=s[n],s=(r||(this._listenId||(this._listenId=b.uniqueId("l")),r=o=s[n]=new g(this,t)),c(t,e,i,this));if(o=void 0,s)throw s;r.interop&&r.on(e,i)}return this},function(t,e,i,n){var s,r;return i&&(e=t[e]||(t[e]=[]),s=n.context,r=n.ctx,(n=n.listening)&&n.count++,e.push({callback:i,context:s,ctx:s||r,listening:n})),t}),c=function(t,e,i,n){try{t.on(e,i,n)}catch(t){return t}},r=(e.off=function(t,e,i){return this._events&&(this._events=a(r,this._events,t,e,{context:i,listeners:this._listeners})),this},e.stopListening=function(t,e,i){var n=this._listeningTo;if(n){for(var s=t?[t._listenId]:b.keys(n),r=0;r<s.length;r++){var o=n[s[r]];if(!o)break;o.obj.off(e,i,this),o.interop&&o.off(e,i)}b.isEmpty(n)&&(this._listeningTo=void 0)}return this},function(t,e,i,n){if(t){var s,r=n.context,o=n.listeners,h=0;if(e||r||i){for(s=e?[e]:b.keys(t);h<s.length;h++){var a=t[e=s[h]];if(!a)break;for(var u=[],l=0;l<a.length;l++){var c=a[l];i&&i!==c.callback&&i!==c.callback._callback||r&&r!==c.context?u.push(c):(c=c.listening)&&c.off(e,i)}u.length?t[e]=u:delete t[e]}return t}for(s=b.keys(o);h<s.length;h++)o[s[h]].cleanup()}}),d=(e.once=function(t,e,i){var n=a(d,{},t,e,this.off.bind(this));return this.on(n,e="string"==typeof t&&null==i?void 0:e,i)},e.listenToOnce=function(t,e,i){e=a(d,{},e,i,this.stopListening.bind(this,t));return this.listenTo(t,e)},function(t,e,i,n){var s;return i&&((s=t[e]=b.once(function(){n(e,s),i.apply(this,arguments)}))._callback=i),t}),f=(e.trigger=function(t){if(this._events){for(var e=Math.max(0,arguments.length-1),i=Array(e),n=0;n<e;n++)i[n]=arguments[n+1];a(f,this._events,t,void 0,i)}return this},function(t,e,i,n){var s,r;return t&&(s=t[e],r=t.all,s&&(r=r&&r.slice()),s&&p(s,n),r)&&p(r,[e].concat(n)),t}),p=function(t,e){var i,n=-1,s=t.length,r=e[0],o=e[1],h=e[2];switch(e.length){case 0:for(;++n<s;)(i=t[n]).callback.call(i.ctx);return;case 1:for(;++n<s;)(i=t[n]).callback.call(i.ctx,r);return;case 2:for(;++n<s;)(i=t[n]).callback.call(i.ctx,r,o);return;case 3:for(;++n<s;)(i=t[n]).callback.call(i.ctx,r,o,h);return;default:for(;++n<s;)(i=t[n]).callback.apply(i.ctx,e);return}},g=function(t,e){this.id=t._listenId,this.listener=t,this.obj=e,this.interop=!0,this.count=0,this._events=void 0},v=(g.prototype.on=e.on,g.prototype.off=function(t,e){t=this.interop?(this._events=a(r,this._events,t,e,{context:void 0,listeners:void 0}),!this._events):(this.count--,0===this.count);t&&this.cleanup()},g.prototype.cleanup=function(){delete this.listener._listeningTo[this.obj._listenId],this.interop||delete this.obj._listeners[this.id]},e.bind=e.on,e.unbind=e.off,b.extend(h,e),h.Model=function(t,e){var i=t||{},n=(e=e||{},this.preinitialize.apply(this,arguments),this.cid=b.uniqueId(this.cidPrefix),this.attributes={},e.collection&&(this.collection=e.collection),e.parse&&(i=this.parse(i,e)||{}),b.result(this,"defaults")),i=b.defaults(b.extend({},n,i),n);this.set(i,e),this.changed={},this.initialize.apply(this,arguments)}),m=(b.extend(v.prototype,e,{changed:null,validationError:null,idAttribute:"id",cidPrefix:"c",preinitialize:function(){},initialize:function(){},toJSON:function(t){return b.clone(this.attributes)},sync:function(){return h.sync.apply(this,arguments)},get:function(t){return this.attributes[t]},escape:function(t){return b.escape(this.get(t))},has:function(t){return null!=this.get(t)},matches:function(t){return!!b.iteratee(t,this)(this.attributes)},set:function(t,e,i){if(null!=t){var n;if("object"==typeof t?(n=t,i=e):(n={})[t]=e,!this._validate(n,i=i||{}))return!1;var s,r,o=i.unset,t=i.silent,h=[],a=this._changing,u=(this._changing=!0,a||(this._previousAttributes=b.clone(this.attributes),this.changed={}),this.attributes),l=this.changed,c=this._previousAttributes;for(s in n)e=n[s],b.isEqual(u[s],e)||h.push(s),b.isEqual(c[s],e)?delete l[s]:l[s]=e,o?delete u[s]:u[s]=e;if(this.idAttribute in n&&(r=this.id,this.id=this.get(this.idAttribute),this.id!==r)&&this.trigger("changeId",this,r,i),!t){h.length&&(this._pending=i);for(var d=0;d<h.length;d++)this.trigger("change:"+h[d],this,u[h[d]],i)}if(!a){if(!t)for(;this._pending;)i=this._pending,this._pending=!1,this.trigger("change",this,i);this._pending=!1,this._changing=!1}}return this},unset:function(t,e){return this.set(t,void 0,b.extend({},e,{unset:!0}))},clear:function(t){var e,i={};for(e in this.attributes)i[e]=void 0;return this.set(i,b.extend({},t,{unset:!0}))},hasChanged:function(t){return null==t?!b.isEmpty(this.changed):b.has(this.changed,t)},changedAttributes:function(t){if(!t)return!!this.hasChanged()&&b.clone(this.changed);var e,i,n=this._changing?this._previousAttributes:this.attributes,s={};for(i in t){var r=t[i];b.isEqual(n[i],r)||(s[i]=r,e=!0)}return!!e&&s},previous:function(t){return null!=t&&this._previousAttributes?this._previousAttributes[t]:null},previousAttributes:function(){return b.clone(this._previousAttributes)},fetch:function(i){i=b.extend({parse:!0},i);var n=this,s=i.success;return i.success=function(t){var e=i.parse?n.parse(t,i):t;if(!n.set(e,i))return!1;s&&s.call(i.context,n,t,i),n.trigger("sync",n,t,i)},N(this,i),this.sync("read",this,i)},save:function(t,e,i){null==t||"object"==typeof t?(n=t,i=e):(n={})[t]=e;var n,s=(i=b.extend({validate:!0,parse:!0},i)).wait;if(n&&!s){if(!this.set(n,i))return!1}else if(!this._validate(n,i))return!1;var r=this,o=i.success,h=this.attributes,t=(i.success=function(t){r.attributes=h;var e=i.parse?r.parse(t,i):t;if((e=s?b.extend({},n,e):e)&&!r.set(e,i))return!1;o&&o.call(i.context,r,t,i),r.trigger("sync",r,t,i)},N(this,i),n&&s&&(this.attributes=b.extend({},h,n)),this.isNew()?"create":i.patch?"patch":"update"),e=("patch"!=t||i.attrs||(i.attrs=n),this.sync(t,this,i));return this.attributes=h,e},destroy:function(e){e=e?b.clone(e):{};function i(){n.stopListening(),n.trigger("destroy",n,n.collection,e)}var n=this,s=e.success,r=e.wait,t=!(e.success=function(t){r&&i(),s&&s.call(e.context,n,t,e),n.isNew()||n.trigger("sync",n,t,e)});return this.isNew()?b.defer(e.success):(N(this,e),t=this.sync("delete",this,e)),r||i(),t},url:function(){var t,e=b.result(this,"urlRoot")||b.result(this.collection,"url")||M();return this.isNew()?e:(t=this.get(this.idAttribute),e.replace(/[^\/]$/,"$&/")+encodeURIComponent(t))},parse:function(t,e){return t},clone:function(){return new this.constructor(this.attributes)},isNew:function(){return!this.has(this.idAttribute)},isValid:function(t){return this._validate({},b.extend({},t,{validate:!0}))},_validate:function(t,e){if(!e.validate||!this.validate)return!0;t=b.extend({},this.attributes,t);t=this.validationError=this.validate(t,e)||null;return!t||(this.trigger("invalid",this,t,b.extend(e,{validationError:t})),!1)}}),h.Collection=function(t,e){e=e||{},this.preinitialize.apply(this,arguments),e.model&&(this.model=e.model),void 0!==e.comparator&&(this.comparator=e.comparator),this._reset(),this.initialize.apply(this,arguments),t&&this.reset(t,b.extend({silent:!0},e))}),w={add:!0,remove:!0,merge:!0},_={add:!0,remove:!1},y=(b.extend(m.prototype,e,{model:v,preinitialize:function(){},initialize:function(){},toJSON:function(e){return this.map(function(t){return t.toJSON(e)})},sync:function(){return h.sync.apply(this,arguments)},add:function(t,e){return this.set(t,b.extend({merge:!1},e,_))},remove:function(t,e){e=b.extend({},e);var i=!b.isArray(t),t=(t=i?[t]:t.slice(),this._removeModels(t,e));return!e.silent&&t.length&&(e.changes={added:[],merged:[],removed:t},this.trigger("update",this,e)),i?t[0]:t},set:function(t,e){if(null!=t){(e=b.extend({},w,e)).parse&&!this._isModel(t)&&(t=this.parse(t,e)||[]);for(var i=!b.isArray(t),n=(t=i?[t]:t.slice(),e.at),s=((n=(n=null!=n?+n:n)>this.length?this.length:n)<0&&(n+=this.length+1),[]),r=[],o=[],h=[],a={},u=e.add,l=e.merge,c=e.remove,d=!1,f=this.comparator&&null==n&&!1!==e.sort,p=b.isString(this.comparator)?this.comparator:null,g=0;g<t.length;g++){var v,m=t[g],_=this.get(m);_?(l&&m!==_&&(v=this._isModel(m)?m.attributes:m,e.parse&&(v=_.parse(v,e)),_.set(v,e),o.push(_),f)&&!d&&(d=_.hasChanged(p)),a[_.cid]||(a[_.cid]=!0,s.push(_)),t[g]=_):u&&(m=t[g]=this._prepareModel(m,e))&&(r.push(m),this._addReference(m,e),a[m.cid]=!0,s.push(m))}if(c){for(g=0;g<this.length;g++)a[(m=this.models[g]).cid]||h.push(m);h.length&&this._removeModels(h,e)}var y=!1;if(s.length&&(!f&&u&&c)?(y=this.length!==s.length||b.some(this.models,function(t,e){return t!==s[e]}),this.models.length=0,x(this.models,s,0),this.length=this.models.length):r.length&&(f&&(d=!0),x(this.models,r,null==n?this.length:n),this.length=this.models.length),d&&this.sort({silent:!0}),!e.silent){for(g=0;g<r.length;g++)null!=n&&(e.index=n+g),(m=r[g]).trigger("add",m,this,e);(d||y)&&this.trigger("sort",this,e),(r.length||h.length||o.length)&&(e.changes={added:r,removed:h,merged:o},this.trigger("update",this,e))}return i?t[0]:t}},reset:function(t,e){e=e?b.clone(e):{};for(var i=0;i<this.models.length;i++)this._removeReference(this.models[i],e);return e.previousModels=this.models,this._reset(),t=this.add(t,b.extend({silent:!0},e)),e.silent||this.trigger("reset",this,e),t},push:function(t,e){return this.add(t,b.extend({at:this.length},e))},pop:function(t){var e=this.at(this.length-1);return this.remove(e,t)},unshift:function(t,e){return this.add(t,b.extend({at:0},e))},shift:function(t){var e=this.at(0);return this.remove(e,t)},slice:function(){return u.apply(this.models,arguments)},get:function(t){if(null!=t)return this._byId[t]||this._byId[this.modelId(this._isModel(t)?t.attributes:t,t.idAttribute)]||t.cid&&this._byId[t.cid]},has:function(t){return null!=this.get(t)},at:function(t){return t<0&&(t+=this.length),this.models[t]},where:function(t,e){return this[e?"find":"filter"](t)},findWhere:function(t){return this.where(t,!0)},sort:function(t){var e=this.comparator;if(!e)throw new Error("Cannot sort a set without a comparator");t=t||{};var i=e.length;return b.isFunction(e)&&(e=e.bind(this)),1===i||b.isString(e)?this.models=this.sortBy(e):this.models.sort(e),t.silent||this.trigger("sort",this,t),this},pluck:function(t){return this.map(t+"")},fetch:function(i){var n=(i=b.extend({parse:!0},i)).success,s=this;return i.success=function(t){var e=i.reset?"reset":"set";s[e](t,i),n&&n.call(i.context,s,t,i),s.trigger("sync",s,t,i)},N(this,i),this.sync("read",this,i)},create:function(t,e){var n=(e=e?b.clone(e):{}).wait;if(!(t=this._prepareModel(t,e)))return!1;n||this.add(t,e);var s=this,r=e.success;return e.success=function(t,e,i){n&&(t.off("error",s._forwardPristineError,s),s.add(t,i)),r&&r.call(i.context,t,e,i)},n&&t.once("error",this._forwardPristineError,this),t.save(null,e),t},parse:function(t,e){return t},clone:function(){return new this.constructor(this.models,{model:this.model,comparator:this.comparator})},modelId:function(t,e){return t[e||this.model.prototype.idAttribute||"id"]},values:function(){return new E(this,S)},keys:function(){return new E(this,I)},entries:function(){return new E(this,k)},_reset:function(){this.length=0,this.models=[],this._byId={}},_prepareModel:function(t,e){return this._isModel(t)?(t.collection||(t.collection=this),t):(t=((e=e?b.clone(e):{}).collection=this).model.prototype?new this.model(t,e):this.model(t,e)).validationError?(this.trigger("invalid",this,t.validationError,e),!1):t},_removeModels:function(t,e){for(var i=[],n=0;n<t.length;n++){var s,r,o=this.get(t[n]);o&&(s=this.indexOf(o),this.models.splice(s,1),this.length--,delete this._byId[o.cid],null!=(r=this.modelId(o.attributes,o.idAttribute))&&delete this._byId[r],e.silent||(e.index=s,o.trigger("remove",o,this,e)),i.push(o),this._removeReference(o,e))}return 0<t.length&&!e.silent&&delete e.index,i},_isModel:function(t){return t instanceof v},_addReference:function(t,e){this._byId[t.cid]=t;var i=this.modelId(t.attributes,t.idAttribute);null!=i&&(this._byId[i]=t),t.on("all",this._onModelEvent,this)},_removeReference:function(t,e){delete this._byId[t.cid];var i=this.modelId(t.attributes,t.idAttribute);null!=i&&delete this._byId[i],this===t.collection&&delete t.collection,t.off("all",this._onModelEvent,this)},_onModelEvent:function(t,e,i,n){if(e){if(("add"===t||"remove"===t)&&i!==this)return;var s,r;"destroy"===t&&this.remove(e,n),"changeId"===t&&(s=this.modelId(e.previousAttributes(),e.idAttribute),r=this.modelId(e.attributes,e.idAttribute),null!=s&&delete this._byId[s],null!=r)&&(this._byId[r]=e)}this.trigger.apply(this,arguments)},_forwardPristineError:function(t,e,i){this.has(t)||this._onModelEvent("error",t,e,i)}}),"function"==typeof Symbol&&Symbol.iterator),E=(y&&(m.prototype[y]=m.prototype.values),function(t,e){this._collection=t,this._kind=e,this._index=0}),S=1,I=2,k=3,y=(y&&(E.prototype[y]=function(){return this}),E.prototype.next=function(){if(this._collection){var t,e;if(this._index<this._collection.length)return t=this._collection.at(this._index),this._index++,{value:this._kind===S?t:(e=this._collection.modelId(t.attributes,t.idAttribute),this._kind===I?e:[e,t]),done:!1};this._collection=void 0}return{value:void 0,done:!0}},h.View=function(t){this.cid=b.uniqueId("view"),this.preinitialize.apply(this,arguments),b.extend(this,b.pick(t,P)),this._ensureElement(),this.initialize.apply(this,arguments)}),A=/^(\S+)\s*(.*)$/,P=["model","collection","el","id","attributes","className","tagName","events"],T=(b.extend(y.prototype,e,{tagName:"div",$:function(t){return this.$el.find(t)},preinitialize:function(){},initialize:function(){},render:function(){return this},remove:function(){return this._removeElement(),this.stopListening(),this},_removeElement:function(){this.$el.remove()},setElement:function(t){return this.undelegateEvents(),this._setElement(t),this.delegateEvents(),this},_setElement:function(t){this.$el=t instanceof h.$?t:h.$(t),this.el=this.$el[0]},delegateEvents:function(t){if(t=t||b.result(this,"events"))for(var e in this.undelegateEvents(),t){var i=t[e];(i=b.isFunction(i)?i:this[i])&&(e=e.match(A),this.delegate(e[1],e[2],i.bind(this)))}return this},delegate:function(t,e,i){return this.$el.on(t+".delegateEvents"+this.cid,e,i),this},undelegateEvents:function(){return this.$el&&this.$el.off(".delegateEvents"+this.cid),this},undelegate:function(t,e,i){return this.$el.off(t+".delegateEvents"+this.cid,e,i),this},_createElement:function(t){return document.createElement(t)},_ensureElement:function(){var t;this.el?this.setElement(b.result(this,"el")):(t=b.extend({},b.result(this,"attributes")),this.id&&(t.id=b.result(this,"id")),this.className&&(t.class=b.result(this,"className")),this.setElement(this._createElement(b.result(this,"tagName"))),this._setAttributes(t))},_setAttributes:function(t){this.$el.attr(t)}}),function(e,t){return b.isFunction(e)?e:b.isObject(e)&&!t._isModel(e)?H(e):b.isString(e)?function(t){return t.get(e)}:e}),H=function(t){var e=b.matches(t);return function(t){return e(t.attributes)}},$=(b.each([[m,{forEach:3,each:3,map:3,collect:3,reduce:0,foldl:0,inject:0,reduceRight:0,foldr:0,find:3,detect:3,filter:3,select:3,reject:3,every:3,all:3,some:3,any:3,include:3,includes:3,contains:3,invoke:0,max:3,min:3,toArray:1,size:1,first:3,head:3,take:3,initial:3,rest:3,tail:3,drop:3,last:3,without:0,difference:0,indexOf:3,shuffle:1,lastIndexOf:3,isEmpty:1,chain:1,sample:3,partition:3,groupBy:3,countBy:3,sortBy:3,indexBy:3,findIndex:3,findLastIndex:3},"models"],[v,{keys:1,values:1,pairs:1,invert:1,pick:0,omit:0,chain:1,isEmpty:1},"attributes"]],function(t){var i=t[0],e=t[1],n=t[2];i.mixin=function(t){var e=b.reduce(b.functions(t),function(t,e){return t[e]=0,t},{});s(i,t,e,n)},s(i,b,e,n)}),h.sync=function(t,e,n){var i,s=$[t],r=(b.defaults(n=n||{},{emulateHTTP:h.emulateHTTP,emulateJSON:h.emulateJSON}),{type:s,dataType:"json"}),o=(n.url||(r.url=b.result(e,"url")||M()),null!=n.data||!e||"create"!==t&&"update"!==t&&"patch"!==t||(r.contentType="application/json",r.data=JSON.stringify(n.attrs||e.toJSON(n))),n.emulateJSON&&(r.contentType="application/x-www-form-urlencoded",r.data=r.data?{model:r.data}:{}),!n.emulateHTTP||"PUT"!==s&&"DELETE"!==s&&"PATCH"!==s||(r.type="POST",n.emulateJSON&&(r.data._method=s),i=n.beforeSend,n.beforeSend=function(t){if(t.setRequestHeader("X-HTTP-Method-Override",s),i)return i.apply(this,arguments)}),"GET"===r.type||n.emulateJSON||(r.processData=!1),n.error),t=(n.error=function(t,e,i){n.textStatus=e,n.errorThrown=i,o&&o.call(n.context,t,e,i)},n.xhr=h.ajax(b.extend(r,n)));return e.trigger("request",e,t,n),t},{create:"POST",update:"PUT",patch:"PATCH",delete:"DELETE",read:"GET"}),C=(h.ajax=function(){return h.$.ajax.apply(h.$,arguments)},h.Router=function(t){t=t||{},this.preinitialize.apply(this,arguments),t.routes&&(this.routes=t.routes),this._bindRoutes(),this.initialize.apply(this,arguments)}),j=/\((.*?)\)/g,O=/(\(\?)?:\w+/g,U=/\*\w+/g,z=/[\-{}\[\]+?.,\\\^$|#\s]/g,R=(b.extend(C.prototype,e,{preinitialize:function(){},initialize:function(){},route:function(e,i,n){b.isRegExp(e)||(e=this._routeToRegExp(e)),b.isFunction(i)&&(n=i,i=""),n=n||this[i];var s=this;return h.history.route(e,function(t){t=s._extractParameters(e,t);!1!==s.execute(n,t,i)&&(s.trigger.apply(s,["route:"+i].concat(t)),s.trigger("route",i,t),h.history.trigger("route",s,i,t))}),this},execute:function(t,e,i){t&&t.apply(this,e)},navigate:function(t,e){return h.history.navigate(t,e),this},_bindRoutes:function(){if(this.routes){this.routes=b.result(this,"routes");for(var t,e=b.keys(this.routes);null!=(t=e.pop());)this.route(t,this.routes[t])}},_routeToRegExp:function(t){return t=t.replace(z,"\\$&").replace(j,"(?:$1)?").replace(O,function(t,e){return e?t:"([^/?]+)"}).replace(U,"([^?]*?)"),new RegExp("^"+t+"(?:\\?([\\s\\S]*))?$")},_extractParameters:function(t,e){var i=t.exec(e).slice(1);return b.map(i,function(t,e){return e===i.length-1?t||null:t?decodeURIComponent(t):null})}}),h.History=function(){this.handlers=[],this.checkUrl=this.checkUrl.bind(this),"undefined"!=typeof window&&(this.location=window.location,this.history=window.history)}),q=/^[#\/]|\s+$/g,F=/^\/+|\/+$/g,B=/#.*$/,M=(R.started=!1,b.extend(R.prototype,e,{interval:50,atRoot:function(){return this.location.pathname.replace(/[^\/]$/,"$&/")===this.root&&!this.getSearch()},matchRoot:function(){return this.decodeFragment(this.location.pathname).slice(0,this.root.length-1)+"/"===this.root},decodeFragment:function(t){return decodeURI(t.replace(/%25/g,"%2525"))},getSearch:function(){var t=this.location.href.replace(/#.*/,"").match(/\?.+/);return t?t[0]:""},getHash:function(t){t=(t||this).location.href.match(/#(.*)$/);return t?t[1]:""},getPath:function(){var t=this.decodeFragment(this.location.pathname+this.getSearch()).slice(this.root.length-1);return"/"===t.charAt(0)?t.slice(1):t},getFragment:function(t){return(t=null==t?this._usePushState||!this._wantsHashChange?this.getPath():this.getHash():t).replace(q,"")},start:function(t){if(R.started)throw new Error("Backbone.history has already been started");if(R.started=!0,this.options=b.extend({root:"/"},this.options,t),this.root=this.options.root,this._trailingSlash=this.options.trailingSlash,this._wantsHashChange=!1!==this.options.hashChange,this._hasHashChange="onhashchange"in window&&(void 0===document.documentMode||7<document.documentMode),this._useHashChange=this._wantsHashChange&&this._hasHashChange,this._wantsPushState=!!this.options.pushState,this._hasPushState=!(!this.history||!this.history.pushState),this._usePushState=this._wantsPushState&&this._hasPushState,this.fragment=this.getFragment(),this.root=("/"+this.root+"/").replace(F,"/"),this._wantsHashChange&&this._wantsPushState){if(!this._hasPushState&&!this.atRoot())return t=this.root.slice(0,-1)||"/",this.location.replace(t+"#"+this.getPath()),!0;this._hasPushState&&this.atRoot()&&this.navigate(this.getHash(),{replace:!0})}this._hasHashChange||!this._wantsHashChange||this._usePushState||(this.iframe=document.createElement("iframe"),this.iframe.src="javascript:0",this.iframe.style.display="none",this.iframe.tabIndex=-1,(t=(t=document.body).insertBefore(this.iframe,t.firstChild).contentWindow).document.open(),t.document.close(),t.location.hash="#"+this.fragment);t=window.addEventListener||function(t,e){return attachEvent("on"+t,e)};if(this._usePushState?t("popstate",this.checkUrl,!1):this._useHashChange&&!this.iframe?t("hashchange",this.checkUrl,!1):this._wantsHashChange&&(this._checkUrlInterval=setInterval(this.checkUrl,this.interval)),!this.options.silent)return this.loadUrl()},stop:function(){var t=window.removeEventListener||function(t,e){return detachEvent("on"+t,e)};this._usePushState?t("popstate",this.checkUrl,!1):this._useHashChange&&!this.iframe&&t("hashchange",this.checkUrl,!1),this.iframe&&(document.body.removeChild(this.iframe),this.iframe=null),this._checkUrlInterval&&clearInterval(this._checkUrlInterval),R.started=!1},route:function(t,e){this.handlers.unshift({route:t,callback:e})},checkUrl:function(t){var e=this.getFragment();if((e=e===this.fragment&&this.iframe?this.getHash(this.iframe.contentWindow):e)===this.fragment)return!this.matchRoot()&&this.notfound();this.iframe&&this.navigate(e),this.loadUrl()},loadUrl:function(e){return this.matchRoot()&&(e=this.fragment=this.getFragment(e),b.some(this.handlers,function(t){if(t.route.test(e))return t.callback(e),!0}))||this.notfound()},notfound:function(){return this.trigger("notfound"),!1},navigate:function(t,e){if(!R.started)return!1;e&&!0!==e||(e={trigger:!!e}),t=this.getFragment(t||"");var i=this.root,i=(i=this._trailingSlash||""!==t&&"?"!==t.charAt(0)?i:i.slice(0,-1)||"/")+t,n=(t=t.replace(B,""),this.decodeFragment(t));if(this.fragment!==n){if(this.fragment=n,this._usePushState)this.history[e.replace?"replaceState":"pushState"]({},document.title,i);else{if(!this._wantsHashChange)return this.location.assign(i);this._updateHash(this.location,t,e.replace),this.iframe&&t!==this.getHash(this.iframe.contentWindow)&&(n=this.iframe.contentWindow,e.replace||(n.document.open(),n.document.close()),this._updateHash(n.location,t,e.replace))}return e.trigger?this.loadUrl(t):void 0}},_updateHash:function(t,e,i){i?(i=t.href.replace(/(javascript:|#).*$/,""),t.replace(i+"#"+e)):t.hash="#"+e}}),h.history=new R,v.extend=m.extend=C.extend=y.extend=R.extend=function(t,e){var i=this,n=t&&b.has(t,"constructor")?t.constructor:function(){return i.apply(this,arguments)};return b.extend(n,i,e),n.prototype=b.create(i.prototype,t),(n.prototype.constructor=n).__super__=i.prototype,n},function(){throw new Error('A "url" property or function must be specified')}),N=function(e,i){var n=i.error;i.error=function(t){n&&n.call(i.context,e,t,i),e.trigger("error",e,t,i)}};return h._debug=function(){return{root:t,_:b}},h});
(()=>{var e,t={7e3:e=>{e.exports=Backbone.Collection.extend({model:ThriveQuizB.models.Question})}},i={};function s(e){var n=i[e];if(void 0!==n)return n.exports;var o=i[e]={exports:{}};return t[e](o,o.exports,s),o.exports}window.ThriveQuizB=window.ThriveQuizB||{},ThriveQuizB.views=ThriveQuizB.views||{},ThriveQuizB.flows=ThriveQuizB.flows||{},e=jQuery,"ontouchstart"in document.documentElement||(document.documentElement.className+=" no-touch"),ThriveQuizB.loadedShortcodes=[],ThriveQuizB.templateSettings={evaluate:/<#([\s\S]+?)#>/g,interpolate:/<#=([\s\S]+?)#>/g,escape:/<#-([\s\S]+?)#>/g},ThriveQuizB.ajaxurl=function(e){var t=-1!==TQB_Front.ajax_url.indexOf("?")?"&":"?";return e&&e.length?(e=e.replace(/^(\?|&)/,""),e+="&_nonce="+TQB_Front.nonce,e+="&tqb-post-id="+TQB_Front.post_id,TQB_Front.ajax_url+t+e):TQB_Front.ajax_url+t+"_nonce="+ThriveQuizB.admin_nonce},ThriveQuizB.tpl=function(t,i){var s=e("script#"+t.replace(/\//g,"-")).html()||"";return s=s.replace(/(\n|\t|\r)/g,""),i?_.template(s,ThriveQuizB.templateSettings)(i):_.template(s,ThriveQuizB.templateSettings)},ThriveQuizB.getQueryParams=function(){var e=window.location.search||"",t={};if(e=e.substr(1),window.tqb_restart_quiz&&(t.restart_quiz=1),!e.length)return t;var i=e.split("&");return _.each(i,(function(e){var i=e.split("=")[0];i&&(t[i]=decodeURIComponent(e.split("=")[1]))})),t},ThriveQuizB.setupViewportImpressions=function(e,t){e&&e.deferred_impression&&(ThriveQuizB.viewport_impressions=ThriveQuizB.viewport_impressions||{},ThriveQuizB.viewport_impressions[t]=e.deferred_impression)},ThriveQuizB.trackViewportImpression=function(e,t){e&&ThriveQuizB.viewport_impressions&&ThriveQuizB.viewport_impressions[e]&&(ThriveQuizB.viewport_impressions[e]._tracked||(ThriveQuizB.viewport_impressions[e]._tracked=!0,ThriveGlobal.$j.ajax({url:TQB_Front.ajax_url,type:"POST",data:{action:"tqb_frontend_ajax_controller",route:"shortcode",custom_action:"viewport_impression",page_id:ThriveQuizB.viewport_impressions[e].page_id,variation_id:ThriveQuizB.viewport_impressions[e].variation_id,user_unique:ThriveQuizB.viewport_impressions[e].user_unique,_nonce:TQB_Front.nonce,"tqb-post-id":ThriveQuizB.viewport_impressions[e].post_id||TQB_Front.post_id},success:function(){t&&ThriveQuizB.viewportObserver&&(ThriveQuizB.viewportObserver.unobserve(t),ThriveQuizB.viewportObservedElements.delete(t))},error:function(){delete ThriveQuizB.viewport_impressions[e]._tracked}})))},ThriveQuizB.initViewportObservers=function(){ThriveQuizB.viewport_impressions&&0!==Object.keys(ThriveQuizB.viewport_impressions).length&&("IntersectionObserver"in window?(ThriveQuizB.viewportObserver||(ThriveQuizB.viewportObservedElements=ThriveQuizB.viewportObservedElements||new WeakSet,ThriveQuizB.viewportObserver=new IntersectionObserver((function(e){e.forEach((function(e){if(e.isIntersecting&&e.intersectionRatio>=.45){var t=e.target,i=ThriveGlobal.$j(t).attr("data-unique");i&&ThriveQuizB.viewport_impressions[i]&&ThriveQuizB.trackViewportImpression(i,t)}}))}),{threshold:.5})),Object.keys(ThriveQuizB.viewport_impressions).forEach((function(e){if(!ThriveQuizB.viewport_impressions[e]._tracked){var t=ThriveGlobal.$j('.tqb-shortcode-wrapper[data-unique="'+e+'"]');if(t.length){var i=t[0];ThriveQuizB.viewportObservedElements.has(i)||(ThriveQuizB.viewportObservedElements.add(i),ThriveQuizB.viewportObserver.observe(i))}}}))):Object.keys(ThriveQuizB.viewport_impressions).forEach((function(e){ThriveQuizB.trackViewportImpression(e)})))},e.fn.tqb=function(t,i){if(t||(t={}),i=i||!1,window.TQB_Front=window.TQB_Front||window.TQB_Front_Ajax||null,window.TQB_Front){if(e.each(t,(function(e,i){-1!==ThriveQuizB.loadedShortcodes.indexOf(e)&&delete t[e],ThriveQuizB.loadedShortcodes.push(e)})),0===Object.keys(t).length)return!1;!0!==i?window.TVE_Dash&&!TVE_Dash.ajax_sent?e(document).on("tve-dash.load",(function(e){o()})):o():ThriveGlobal.$j.ajax({url:TQB_Front.ajax_url,type:"get",data:_.extend(n(),{route:"get_quiz_data"})}).done(s)}function s(e,t){void 0!==t&&t.lazy_load_conditional_preview&&tcb_condition_sets&&(tcb_condition_sets=tcb_condition_sets.concat(t.lazy_load_conditional_preview));var i=new ThriveQuizB.collections.Shortcodes;Object.keys(e).forEach((function(t){TQB_Front.quiz_options[e[t].quiz_id]={feedback_settings:e[t].feedback_settings,highlight_settings:e[t].highlight_settings,progress_settings:e[t].progress_settings,scroll_settings:e[t].scroll_settings,quiz_style:e[t].quiz_style},e[t].id=t,e[t].deferred_impression&&ThriveQuizB.setupViewportImpressions(e[t],t);var s=new ThriveQuizB.models.Shortcode(e[t]);i.add([s])})),ThriveQuizB.shortcode_list&&ThriveQuizB.shortcode_list.destroy(),ThriveQuizB.shortcode_list=new ThriveQuizB.views.ShortcodeList({collection:i}),ThriveQuizB.shortcode_list.render(),window.requestAnimationFrame?window.requestAnimationFrame((function(){ThriveQuizB.initViewportObservers()})):setTimeout((function(){ThriveQuizB.initViewportObservers()}),100)}function n(){return _.extend({},{quiz_ids:t,tqb_scripts_loaded:!0},ThriveQuizB.getQueryParams())}function o(){window.TVE_Dash&&TVE_Dash.add_load_item("tqb_lazy_load",n(),s)}},e((function(){var t=e(this);ThriveGlobal.$j(window).on("conditional_display_loaded",(function(){ThriveQuizB.shortcode_list&&ThriveQuizB.shortcode_list.render(),window.requestAnimationFrame?window.requestAnimationFrame((function(){ThriveQuizB.initViewportObservers()})):setTimeout((function(){ThriveQuizB.initViewportObservers()}),100)})),ThriveGlobal.$j(document).on("tqb_quiz_loaded",(function(i,s){var n={};_.each([s.quiz_id],(function(t){var i=e("[data-quiz-id="+t+"]"),s=i.attr("data-unique");n[s]=i.attr("data-quiz-id")})),t.tqb(n,!0),window.requestAnimationFrame?window.requestAnimationFrame((function(){ThriveQuizB.initViewportObservers()})):setTimeout((function(){ThriveQuizB.initViewportObservers()}),100)}));var i={};e(".tqb-shortcode-wrapper").each((function(){i[this.getAttribute("data-unique")]=this.getAttribute("data-quiz-id")})),t.tqb(i),window.requestAnimationFrame?window.requestAnimationFrame((function(){ThriveQuizB.initViewportObservers()})):setTimeout((function(){ThriveQuizB.initViewportObservers()}),100)})),window.ThriveQuizB=window.ThriveQuizB||{},ThriveQuizB.models=ThriveQuizB.models||{},ThriveQuizB.collections=ThriveQuizB.collections||{},function(e){e((function(){ThriveQuizB.models.Base=Backbone.Model.extend({idAttribute:"ID",validation_error:function(e,t){return{field:e,message:t}},custom_action:function(e,t,i){t||(t={});var s=_.extend({type:"post",dataType:"json",url:this.url()+"&custom_action="+i,data:t},e);return jQuery.ajax(s)}}),ThriveQuizB.collections.Base=Backbone.Collection.extend({last:function(){return this.at(this.size()-1)}}),ThriveQuizB.models.Shortcode=ThriveQuizB.models.Base.extend({idAttribute:"id",defaults:{id:null,quiz_id:null,user_unique:null,page_type:"",page:{page_id:null,variation_id:null,html:"",css:"",fonts:""},question:null,chosenAnswers:{},userAnswers:{}},parse:function(t){return e(TCB_Front).trigger("tqb_shortcode_response",t),t},url:function(){return ThriveQuizB.ajaxurl("&route=shortcode")},logSocialShareConversion:function(e,t){this.custom_action(e,t,"log_social_share_conversion")},saveUserCustomSocialShareBadge:function(e,t){this.custom_action(e,t,"save_user_custom_social_share_badge")},initialize:function(e){this.set("results_settings",new ThriveQuizB.models.ResultsSettings(e.results_settings||{}))},has_optin_page:function(){return this.get("structure")&&this.get("structure").optin},tpl:function(t){var i=this.get("tve_qna_templates");return(i=(i=i&&i[this.get("quiz_style")])&&i[t])?(i=e("<textarea/>").html(i).text(),_.template(i,ThriveQuizB.templateSettings)):null},hasQnaTpl:function(){var e=this.get("tve_qna_templates");return(e=e&&e[this.get("quiz_style")])&&Object.keys(e).length>0},getSharedStyles:function(){var e="";return this.get("tve_shared_styles")&&(e=this.get("tve_shared_styles")[this.get("page_type")]),e},shouldDisplayFeedbackUntilNext:function(){var e="right_wrong"===this.get("quiz_type")&&this.get("highlight_settings").load_next_question;return this.get("feedback_settings")&&1===this.get("feedback_settings").press_next&&!e},shouldDisplayFeedbackUntilTime:function(){var e="right_wrong"===this.get("quiz_type")&&this.get("highlight_settings").load_next_question;return!("survey"===this.get("quiz_type"))&&this.get("feedback_settings")&&1===this.get("feedback_settings").display_feedback&&!e},shouldShowNavButtons:function(){return!0===this.get("feedback_settings").nav_buttons},shouldDisplayProgress:function(){return this.get("progress_settings")&&1===this.get("progress_settings").display_progress},handleBranchSwitched:function(e,t){var i=this;if(!e.isOpenEndedType()&&!e.allowMultipleAnswers()){var s=this.get("userAnswers");if(parseInt(s[e.get("id")])!==t&&!e.get("next_question_id")){var n=parseInt(s[e.get("id")]),o=e.get("answers").find((function(e){return e.id===n.toString()})),r=e.get("answers").find((function(e){return e.id===t.toString()}));o&&o.next_question_id&&o.next_question_id!==r.next_question_id&&function(){s[e.get("id")]=t;for(var n,r,a=i.get("all_questions").find((function(e){return e.id===o.next_question_id}));a&&s[a.id];)n=s[a.id],r=a.next_question_id?a.next_question_id:a.answers.find((function(e){return e.id===n})).next_question_id,delete s[a.id],a=i.get("all_questions").find((function(e){return e.id===r}))}()}}},getShowFeedbackTime:function(){return 1e3*parseInt(this.get("feedback_settings").display_feedback_time)}}),ThriveQuizB.models.ResultsSettings=ThriveQuizB.models.Base.extend({initialize:function(e){this.set("message",new Backbone.Model(e.message)),e.links&&this.set("links",new Backbone.Collection(e.links))},get_type:function(){return this.get("type")},isURL:function(){return"url"===this.get_type()},get_redirect_url:function(t,i){var s="",n={tqb_email:(i=i||{}).email||"",tqb_name:_.escape(i.name)||"",tqb_quiz_result:"personality"===t.quiz_type||"percentage"===t.quiz_type?t.explicit:t.user_points};t=_.extend({result_id:null,user_points:0,min_points:0,max_points:0},t||{});var o=parseInt(t.user_points);if(t.result_id){var r=this.get("links").findWhere({result_id:t.result_id});s=r.get("link")}else if("percentage"===this.get("quiz_type")){var a;a=t.min_points===t.max_points?100:100*(o-parseInt(t.min_points))/(parseInt(t.max_points)-parseInt(t.min_points)),this.get("links").each((function(e){a>=parseInt(e.get("lower_bound"))&&a<=parseInt(e.get("upper_bound"))&&(s=e.get("link"))}))}else this.get("links").each((function(e){o>=parseInt(e.get("lower_bound"))&&o<=parseInt(e.get("upper_bound"))&&(s=e.get("link"))}));return s.length&&this.get("forward_results")&&(s+="?"+e.param(n)),s}}),ThriveQuizB.models.Image=ThriveQuizB.models.Base.extend({defaults:_.extend({},ThriveQuizB.models.Base.prototype.defaults,{sizes:{thumbnail:{url:null}}}),initialize:function(e){"string"==typeof e&&this.set(_.extend({},this.defaults,{sizes:{full:{url:e},thumbnail:{url:e}},url:e}))},get_thumb:function(){return this.attributes.sizes.thumbnail?this.attributes.sizes.thumbnail.url||this.get("url")||null:this.get("url")||null}}),ThriveQuizB.models.Media=ThriveQuizB.models.Base.extend({defaults:_.extend({},ThriveQuizB.models.Base.prototype.defaults,{display_type:0,type:"",source:"",url:"",color:"",style:"",options:[]})}),ThriveQuizB.models.Video=ThriveQuizB.models.Media.extend({defaults:_.extend({},ThriveQuizB.models.Media.prototype.defaults,{video_id:"",style:{},thumb:"",source:"youtube",url:""}),initialize:function(e){this.get("thumb")&&this.set("thumb",new ThriveQuizB.models.Image(this.get("thumb"))),e.url&&0!==e.url.length||this.setDefaults(),this.buildEmbedCode()},setDefaults:function(){this.attributes.source="youtube"},buildEmbedCode:function(){if(this.attributes.url){var e=this.videoIdAndParams(),t=this.videoLibraryId();e&&this.set("video_id",e),t&&this.set("library_id",t)}},videoIdAndParams:function(){var e="";switch(this.attributes.source){case"youtube":var t=this.attributes.url.match(/^.*((youtu.be\/)|(v\/)|(\/u\/\w\/)|(embed\/)|(watch\?))\??v?=?([^#\&\?]*).*/);e=t&&11==t[7].length?t[7]:"";break;case"vimeo":case"wistia":case"bunnynet":e=this.attributes.url.substring(this.attributes.url.lastIndexOf("/")+1)}return this.buildVideoParams(e)},videoLibraryId:function(){var e="";if(this.attributes.source){var t=this.attributes.url.split("/");e=t[t.length-2]}return e},buildVideoParams:function(e){var t=void 0!==this.attributes.options?this.attributes.options:[],i=void 0!==this.attributes.players?this.attributes.players:[],s=this.attributes.source,n=this.attributes.color?this.attributes.color.replace("#",""):"ffffff",o=[];if("vimeo"===s&&o.push("color="+this.attributes.color.replace("#","")),"wistia"===s&&(o.push("chromeless=false"),o.push("controlsVisibleOnLoad=true"),o.push("playerColor="+n)),"youtube"===s){var r=t&&1===parseInt(t.hide_logo.value)?1:0;o.push("modestbranding="+r)}return _.each(i[s],(function(e,i){var n=i,r=e,a=void 0!==t[n]?t[n].value:"0";switch(i){case"autoplay":if(["youtube","wistia","vimeo","bunnynet"].includes(s)&&"true"==(a=1===parseInt(a)?"true":"false"))switch(s){case"youtube":o.push("mute=1");break;case"vimeo":case"wistia":o.push("muted=1")}break;case"hide_logo":case"hide_controls":a=1===parseInt(a)?0:1;break;case"hide_full_screens":a=1===parseInt(a)?0:1,"wistia"===s&&(a=1===parseInt(a)?"true":"false");break;case"disable_playbar":a=1===parseInt(a)?0:1,"wistia"!==s&&"vimeo"!==s||(a=1===parseInt(a)?"true":"false");break;case"muted":case"loop":"bunnynet"===s&&(a=0===parseInt(a)?"false":"true");break;case"preload":"bunnynet"===s&&(a=1===parseInt(a)?"true":"false")}"youtube"===s&&"hide_logo"===i||"bunnynet"===s&&"preload"===i&&"false"===a&&t.autoplay||o.push(r+"="+a)})),"wistia"===s&&o.push("videoFoam=true"),o.length>1?e+="?"+o.join("&"):e}}),ThriveQuizB.models.Audio=ThriveQuizB.models.Video.extend({buildEmbedCode:function(){if(this.attributes.url){var e=this.videoIdAndParams();e&&this.set("video_id",e)}},videoIdAndParams:function(){return this.buildVideoParams("")},buildVideoParams:function(e){var t=void 0!==this.attributes.options?this.attributes.options:[],i=void 0!==this.attributes.players?this.attributes.players:[],s=this.attributes.audio_source,n=[];return"spotify"===s&&(e=this.attributes.url.replace("https://open.spotify.com","")),_.each(i[s],(function(e,i){var o=i,r=e,a=void 0!==t[o]?t[o].value:"0";switch(i){case"show_user":case"show_artwork":"soundcloud"===s&&(a=1===parseInt(a)?"false":"true");break;default:a=1===parseInt(a)?"true":"false"}n.push(r+"="+a)})),n.length>1?e+=n.join("&"):e}}),ThriveQuizB.models.Question=ThriveQuizB.models.Base.extend({idAttribute:"id",defaults:{id:null,question_id:null,type:null,text:"",image:"",description:""},initialize:function(e){this.set("settings",new ThriveQuizB.models.QuestionSettings(e.settings)),null!==e.display_settings&&("video"===e.display_settings.type?this.set("display_settings",new ThriveQuizB.models.Video(e.display_settings)):this.set("display_settings",new ThriveQuizB.models.Audio(e.display_settings)))},get_image:function(){return"string"==typeof this.get("image")?this.get("image"):this.get("image").sizes.full.url},isTypeOf:function(e){var t=!1;return["button","image","open"].indexOf(e)>=0&&("button"===e&&1===parseInt(this.get("q_type"))||"image"===e&&2===parseInt(this.get("q_type"))||"open"===e&&3===parseInt(this.get("q_type")))&&(t=!0),t},isOpenEndedType:function(){return this.isTypeOf("open")},showFeedback:function(){return!0===this.get("settings").get("display_question_feedback")},getAllowedAnswers:function(){var e=this.get("settings").get("allowed_answers");return e||(e=1),parseInt(e)},allowMultipleAnswers:function(){return this.getAllowedAnswers()>1},isLastQuestion:function(){return!(this.get("next_question_id")||this.get("answers")[0].next_question_id)}}),ThriveQuizB.models.FeedbackSettings=ThriveQuizB.models.Base.extend({defaults:{display_feedback:1,display_feedback_time:2,press_next:0,nav_buttons:!1},getFeedbackTime:function(){return parseInt(this.get("display_feedback_time"))},showFeedback:function(){return 1===this.get("display_feedback")||1===this.get("press_next")},showNextButton:function(){return 1===this.get("press_next")}}),ThriveQuizB.models.HilightSettings=ThriveQuizB.models.Base.extend({defaults:{highlight_answer:1,load_next_question:0,highlight_and_show_feedback:0},highlight:function(){return 0===this.get("load_next_question")},showFeedback:function(){return 1===this.get("highlight_and_show_feedback")},loadNext:function(){return 1===this.get("load_next_question")}}),ThriveQuizB.models.Answer=ThriveQuizB.models.Base.extend({idAttribute:"id",defaults:{id:null,order:null,text:"",image:""},initialize:function(){var e=TQB_Front.quiz_options[this.get("quiz_id")];e.feedback_settings.quiz_type=this.get("quiz_type"),e.highlight_settings.quiz_type=this.get("quiz_type"),this.set("highlight_settings",new ThriveQuizB.models.HilightSettings(e.highlight_settings)),this.set("feedback_settings",new ThriveQuizB.models.FeedbackSettings(e.feedback_settings))},highlight:function(){return this.get("highlight_settings")},feedback:function(){return this.get("feedback_settings")},isRightWrong:function(){return"right_wrong"===this.get("quiz_type")},hasFeedback:function(){return this.get("feedback")&&this.get("feedback").length>0},showFeedback:function(){return!!this.hasFeedback()&&(this.isRightWrong()?this.highlight().showFeedback():this.feedback().showFeedback())},showNextButton:function(){return this.isRightWrong()?this.highlight().loadNext():this.feedback().showNextButton()&&this.hasFeedback()},highlightAnswer:function(){return this.isRightWrong()&&(1===this.highlight().get("highlight_answer")||1===this.highlight().get("highlight_and_show_feedback"))},getShowFeedbackTime:function(){return 1e3*this.feedback().getFeedbackTime()},getDelayFeedbackTime:function(){return 1===parseInt(this.get("is_right"))?0:this.isRightWrong()?2e3:0},getTimeBeforeNextQuestion:function(){return this.showFeedback()||this.highlightAnswer()?this.getShowFeedbackTime():0},get_image:function(){return"string"==typeof this.get("image")?this.get("image"):this.get("image").sizes.full.url},validate:function(e,t){var i=[];if(!0===t.get("required")){var s=this.get("answer_text");if(!(s=e||s)||s.length<t.get_min_value())return[t.min_error()]}if(i.length)return i}}),ThriveQuizB.models.QuestionSettings=Backbone.Model.extend({get_max_value:function(){return parseInt(this.get("answer_limits").max.value)},get_min_value:function(){return parseInt(this.get("answer_limits").min.value)},min_error:function(){return this.get("answer_limits").min.error_message.replace("(limit)",this.get_min_value())},max_error:function(){return this.get("answer_limits").max.error_message.replace("(limit)",this.get_max_value())}}),ThriveQuizB.collections.Shortcodes=ThriveQuizB.collections.Base.extend({model:ThriveQuizB.models.Shortcode}),ThriveQuizB.collections.Answers=ThriveQuizB.collections.Base.extend({model:ThriveQuizB.models.Answer}),ThriveQuizB.models.ProgressSettings=ThriveQuizB.models.Base.extend({defaults:function(){return{quiz_id:"",display_progress:0}},getPercentToDisplay:function(){return"percentage_completed"===this.get("percent_type")?this.get("percentage"):100-this.get("percentage")}}),ThriveQuizB.models.ScrollSetting=ThriveQuizB.models.Base.extend({defaults:function(){return{enable_scroll:0}}})}))}(jQuery),(()=>{function e(t){return e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e(t)}window.ThriveQuizB=window.ThriveQuizB||{},ThriveQuizB.views=ThriveQuizB.views||{};var t=function(e){return{initQuizFlows:function(){return e.each((function(e){var t=this;e.on("tqb.count",(function(e){Object.keys(e).forEach((function(i){Object.keys(e[i].flows.items).length&&(e[i].count=t._getHighestCount(e[i])+1)}))}))}),this),_.extend({first_question:this.getFirstQuestion().get("text")},{flows:{items:this.setQuestionFlows(this.getFirstQuestion())}})},_getHighestCount:function(e){var t=1;return Object.keys(e.flows.items).forEach((function(i){e.flows.items[i].count>t&&(t=e.flows.items[i].count)})),t},_setQuestionFlow:function(e){var t={};return null!==e.get("next_question_id")&&(t=this.setQuestionFlows(this.getQuestion(e.get("next_question_id")))),t},setQuestionFlows:function(e){if(void 0===e)return{};var t={},i="q_"+e.get("id");return t[i]={question:e.get("text"),count:1,flows:{items:this._setQuestionFlow(e)}},e.get("answers").each((function(e){var i=this.setAnswerFlows(e);t["a_"+e.get("id")]={answer:e.get("text"),flows:i,count:1}}),this),e.trigger("tqb.count",t),t},setAnswerFlows:function(e){var t={items:{}};return null!==e.get("next_question_id")&&0!==parseInt(e.get("next_question_id"))&&(t=_.extend({items:this.setQuestionFlows(this.getQuestion(e.get("next_question_id")))},{count:1,next_question_id:e.get("next_question_id")})),t},calculateFlows:function(){var e="quiz_"+this.getQuizId();ThriveQuizB.flows[e]=_.extend({flowsSet:!1},this.initQuizFlows()),ThriveQuizB.flows[e].flowsSet=!0},getFirstQuestion:function(){return e.findWhere({start:"1"})},getQuestion:function(t){return e.findWhere({id:t})},getQuizId:function(){return parseInt(this.getFirstQuestion().get("quiz_id"))}}},i=function(e,t){t=t||1e3,e.parents(".tve-leads-lightbox")&&setTimeout((function(){ThriveGlobal.$j(window).trigger("resize")}),t)};window.addEventListener("scroll",(function(){window.tqbLastScrollTime=(new Date).getTime()})),function(n){n((function(){ThriveQuizB.views.Base=Backbone.View.extend({render:function(){return this}}),ThriveQuizB.views.ShortcodeList=ThriveQuizB.views.Base.extend({events:{},el:n("body"),children:[],render:function(){return this.collection.each(this.renderOne,this),this},renderOne:function(e){if(e.get("page").html||e.get("question")){var t=this.$el.find("#tqb-shortcode-wrapper-".concat(e.get("quiz_id"),"-").concat(e.get("id").replace(".","\\.")));t.length||(t=this.$el.find('[id^="tqb-shortcode-wrapper-'.concat(e.get("quiz_id"),'"]')));var i=new ThriveQuizB.views.Shortcode({model:e,collection:this.collection,questions:e.get("all_questions"),el:t});i.render(),this.children.push(i),t.data("tcbQuiz",i)}e.get("error")&&TQB_Front.is_preview&&this.$el.find("#tqb-shortcode-wrapper-"+e.get("quiz_id")+"-"+e.get("id")).find(".tqb-frontend-error-message").html(e.get("error"))},destroy:function(){this.undelegateEvents(),_.each(this.children,(function(e){e.undelegateEvents()}))}}),ThriveQuizB.views.Shortcode=ThriveQuizB.views.Base.extend({events:{"click .tqb-shortcode-new-content .tqb-shortcode-submit-action":"nextPage","click .tqb-shortcode-new-content .tve_evt_manager_listen":"runEvent","click .tqb-shortcode-new-content .tve-dynamic-link":"restartQuiz"},to_load:0,sec_delay:1,powered_by_tqb:ThriveQuizB.tpl("powered-by-thrive-themes"),questions:null,quiz_type:null,render_count:0,initialize:function(e){this.questions=new(s(7e3))(e.questions),this.quiz_type=this.model.get("quiz_type"),this.percentage=0;var t=this.model.get("user_answers"),o=this.model.get("userAnswers");t&&(t.forEach((function(e){t.filter((function(t){return e.question_id===t.question_id&&e.id!==t.id})).length?o[e.question_id]?o[e.question_id].push(e.answer_id):o[e.question_id]=[e.answer_id]:o[e.question_id]=null===e.answer_text||void 0===e.answer_text?e.answer_id:e.answer_text})),this.model.set("chosenAnswers",o)),e.model.get("restarted")&&this.deleteCachedAnswers(),this.generateQuizFlows();var r="quiz_"+this.model.get("quiz_id");this.flows=ThriveQuizB.flows[r]?ThriveQuizB.flows[r].flows.items:{},this.listenTo(this.questions,"remove next-question",this.renderNextQuestion),this.listenTo(this.questions,"prev-question",this.renderPrevQuestion),this.model.get("resume_flow")&&Array.isArray(this.model.get("resume_flow"))&&this.model.get("resume_flow").forEach(function(e,t){if(0===t||this.model.get("resume_flow")[t].question_id!==this.model.get("resume_flow")[t-1].question_id){var i="q_"+e.question_id,s="a_"+e.answer_id,n={},o=1,r=this.questions.findWhere({id:e.question_id}).get("answers").find((function(t){return t.id===e.answer_id}));null!==r.next_question_id&&0!==parseInt(r.next_question_id)&&this.flows[s].count?(n=this.flows[s].flows.items,o=this.flows[s].count):(n=this.flows[i].flows.items,o=this.flows[i].count);var a=this.percentage+(100-this.percentage)/o;a=Math.round(a),this.percentage=a,this.flows=n}}.bind(this)),this.questions.on("tqb.set_progress",(function(e){var t,i,s="a_"+e.selectedAnswer.get("id"),n="q_"+this.questions.findWhere({id:e.selectedAnswer.get("question_id")}).get("id");if(this.model.shouldShowNavButtons()&&!this.flows[n]){var o=ThriveQuizB.flows[r]?ThriveQuizB.flows[r]:{},a=this.calculateCurrentFlow(o);t=this.flows.flows.items,i=this.flows.count,this.percentage=a>1?100/(i+a-1)*(a-1):0}else null!==e.selectedAnswer.get("next_question_id")&&0!==parseInt(e.selectedAnswer.get("next_question_id"))&&this.flows[s].count?(t=this.flows[s].flows.items,i=this.flows[s].count):(t=this.flows[n].flows.items,i=this.flows[n].count);var d=this.percentage+(100-this.percentage)/i;d=Math.round(d),e.percentage=this.percentage=d,this.flows=t}),this),ThriveGlobal.$j(".tve_p_lb_content").on("tve.lightbox-open",(function(){i(n(this).find(".tqb-shortcode-wrapper"),3e3)}))},render:function(){return this.showLoader(),this.loadScripts(),this.initListeners(this.model),this.hideLoader(),this.render_count>0&&this.scrollQuiz(),this.render_count++,"ontouchstart"in document.documentElement||this.$el.addClass("no-touch"),this},generateQuizFlows:function(){var i=TQB_Front.quiz_options[this.model.get("quiz_id")],s=i.progress_settings;if(s=(s="object"===e(s)&&i.progress_settings)&&1===parseInt(i.progress_settings.display_progress))try{new t(this.getDataForProgress()).calculateFlows()}catch(e){}},getDataForProgress:function(){var e=JSON.parse(JSON.stringify(this.questions));return(e=new Backbone.Collection(e)).each((function(e){e.set("answers",new Backbone.Collection(e.get("answers")))})),e},saveAnswers:function(e,t){var i=t.get("user_answer_ids");return new Promise((function(s){n.ajax({type:"post",url:ThriveQuizB.ajaxurl("&route=shortcode&custom_action=register_question_answer"),data:{user_unique:e.model.get("user_unique"),quiz_id:e.model.get("quiz_id"),answer_ids:i,answer_text:t.get("user_answer_model")?t.get("user_answer_model").get("answer_text"):""},success:function(t){if("boolean"!=typeof t){var i={};Object.values(t).forEach((function(e){i[e.question_id]=e.answer_id})),e.model.set("userAnswers",i)}s()}})}))},renderNextQuestion:function(e){var t=new Backbone.Collection(e.get("answers")),i=e.get("user_answer_ids"),s=e.allowMultipleAnswers()?e.get("user_answer_model"):t.findWhere({id:i[0]}),n=e.get("next_question_id")?e.get("next_question_id"):e.get("answers").find((function(e){return parseInt(e.id)===parseInt(i[0])})).next_question_id,o=this.questions.findWhere({id:n}),r=TQB_Front.settings.tqb_answer_submission_mode||!1;o&&(o.set("previous_question_id",e.get("id")),this.model.set("navigatedBack",!1)),setTimeout((function(t){o?(t.renderQuestion(o),t.scrollQuiz(),e.set("answersEdited",!1),r?t.requestQueue.push({question:e}):t.saveAnswers(t,e)):(s.set("answer_text",e.get("user_answer_model").get("answer_text")),r?t.requestQueue.push({userAnswerModel:s}):t.shortcodeAction(s),t.showQuizLoading(s)),r&&t.processQueue()}),this._get_delay(),this)},requestQueue:[],isProcessing:!1,processQueue:function(){var e=this;return new Promise((function(t){if(!e.isProcessing&&e.requestQueue.length>0){e.isProcessing=!0;var i=e.requestQueue.shift();i.question?e.saveAnswers(e,i.question).then((function(){e.isProcessing=!1,e.processQueue(),t()})):i.userAnswerModel?e.shortcodeAction(i.userAnswerModel).then((function(){e.isProcessing=!1,e.processQueue(),t()})):t()}else t()}))},getPreviousQuestion:function(t){var i=this.model.get("chosenAnswers");if(t.get("previous_question_id")&&i[parseInt(t.get("previous_question_id"))])return this.questions.findWhere({id:t.get("previous_question_id")});var s=this.questions.filter((function(s){var n=i[parseInt(s.get("id"))];return!(!n&&""!==n||(s.get("next_question_id")?s.get("next_question_id")!==t.get("id"):!s.get("answers").filter((function(i){var s;return s="object"===e(n)?Object.values(n).indexOf(i.id)>-1:n===i.id,i.next_question_id===t.get("id")&&(s||t.isOpenEndedType())})).length))}));return s.length?s[0]:null},renderPrevQuestion:function(e){var t=this.getPreviousQuestion(e),i=new Backbone.Collection(e.get("answers")),s=e.allowMultipleAnswers()?e.get("user_answer_model"):i.findWhere({id:e.get("user_answer_ids")}),n=TQB_Front.settings.tqb_answer_submission_mode||!1;t&&this.model.set("navigatedBack",!0),setTimeout((function(i){t?(i.renderQuestion(t),i.scrollQuiz(),e.get("answersEdited")&&(n?i.requestQueue.push({question:e}):i.saveAnswers(i,e))):(s.set("answer_text",e.get("user_answer_model").get("answer_text")),n?i.requestQueue.push({userAnswerModel:s}):i.shortcodeAction(s),i.showQuizLoading(s)),n&&i.processQueue()}),this._get_delay(),this)},loadScripts:function(){var e=this,t=this.model.get("page"),i=[],s=n("head"),o=this.$(".tqb-shortcode-new-content");if(t&&t.optimized_assets){if(t.optimized_assets.style){var r=document.createElement("style");document.head.prepend(r),r.setAttribute("data-tqb-variation",t.variation_id),r.appendChild(document.createTextNode(t.optimized_assets.style))}if(t.optimized_assets.files)for(var a in t.optimized_assets.files){var d="flat"===a;(!s.find('link[href*="thrive_flat.css"]').length&&d||!d)&&s.append(t.optimized_assets.files[a])}t.optimized_assets.js&&n(t.optimized_assets.js).each((function(){0===n("html").find('script[src*="'+this.src+'"]').length&&s.append(this)}))}if(o.html("").append(this.model.getSharedStyles()),this.model.get("tve_custom_style")){var l=n("<style/>").addClass("tve_custom_style").html(this.model.get("tve_custom_style"));o.append(l)}t&&(i=(i=i.concat(t.css)).concat(t.fonts)),this.model.get("question")&&(i=i.concat(this.model.get("question").css)),this.to_load=i.length,_.each(i,(function(t,s,o){var r=n('<link rel="stylesheet" type="text/css" media="all" href="'+t+'">');e.$(".tqb-shortcode-new-content").append(r),r.on("load",(function(){e.to_load--,s===i.length-1&&e.check_loaded()}))}))},loadHTML:function(){var e=this;if(1!=navigator.userAgent.toLowerCase().indexOf("firefox")>-1||!0!==(window.tqbLastScrollTime&&(new Date).getTime()<window.tqbLastScrollTime+100)||!this.$el.closest(".tve-scroll-sticky").length){if(_.isEmpty(this.model.get("page"))){this.template=ThriveQuizB.tpl("question-wrapper");var t=this.model.get("tve_qna_templates");if(t){var i=t[this.model.get("quiz_style")];i&&i.questionWrapper&&(this.template=_.template(i.questionWrapper,ThriveQuizB.templateSettings))}this.$el.find(".tqb-shortcode-new-content").append(this.template()),this.renderQuestion(),this.model.trigger("tqb:close_loader",this.model)}else{this.template=_.template(this.model.get("page").html,ThriveQuizB.templateSettings),this.$el.find(".tqb-shortcode-new-content").append(this.template(this.model.toJSON())),this.$el.find(".tqb-shortcode-new-content").append('<style type="text/css">'+this.model.get("page").user_css.replace(/\\/g,"")+"</style>"),this.setUserIdentifier(),this.listener(),TQB_Front.settings.tqb_promotion_badge&&this.$el.find(".tqb-shortcode-new-content .tve-tqb-page-type").after(this.powered_by_tqb()),"results"===this.model.get("page_type")?this.model.get("results_settings").isURL()?this.$el.find(".tqb-shortcode-new-content").html(this.redirectToResultHTML()):this.resultPageListener():this.model.trigger("tqb:close_loader",this.model);var s=this.model.get("page")&&this.model.get("page").quiz_user_result;"optin"!==this.model.get("page_type")&&"results"!==this.model.get("page_type")||void 0===s||this.$(".thrv_lead_generation form").append('<input type="hidden" name="tqb-quiz-user-result" value="'+s+'">')}setTimeout((function(e){e.hideLoader(),e.setOverlayHeight(),e.$el.offset().top,"splash"!==e.model.get("page_type")&&e.scrollQuiz()}),50,this),TCB_Front.onDOMReady(ThriveGlobal.$j(this.$el)),setTimeout((function(){TCB_Front.handleIframes(ThriveGlobal.$j(e.$el),!0)}),100),ThriveGlobal.$j(TCB_Front).trigger("content_loaded.thrive",[this.$el.find(".tqb-shortcode-new-content")])}},check_loaded:function(){var e,t=this;if(this.to_load<=0)return this.loadHTML(),void clearTimeout(e);e=setTimeout((function(){t.check_loaded()}),50)},scrollQuiz:function(){var e,t=this.$el.parents(".thrive-quiz-builder-shortcode");if(t.length&&t.data("enable_scroll"))e="on"===t.data("enable_scroll");else{var i=TQB_Front.quiz_options[parseInt(this.model.get("quiz_id"))].scroll_settings,s=new ThriveQuizB.models.ScrollSetting(i);e=1===parseInt(s.get("enable_scroll"))}if(!0===e&&!this.$el.closest(".thrv-leads-slide-in").length)if(this.$el.parents(".tve_p_lb_background").length)n(".tve_p_lb_background").animate({scrollTop:0});else{var o=this;setTimeout((function(){var e=n(".thrv_header.tve-scroll-sticky").length?n(".thrv_header.tve-scroll-sticky").outerHeight():0;n("html,body").animate({scrollTop:o.$el.offset().top-e})}),500)}},runEvent:function(e){var t=n(e.currentTarget),i=t.attr("data-tcb-events");if("string"==typeof t.data("shortcode-id")&&t.data("shortcode-id").includes("next_step_in_quiz"))return e.preventDefault(),void this.shortcodeAction();if("string"==typeof i){var s=!1,o=ThriveGlobal.$j.parseJSON(i.replace("__TCB_EVENT_","").replace("_TNEVE_BCT__",""));t.is("a")&&t.closest(".tve_ea_thrive_quiz_next_step ").length&&e.preventDefault(),e.stopPropagation();for(var r=0,a=o.length;r<a;r++)if("thrive_quiz_next_step"===o[r].a)s=!0;else if("thrive_animation"===o[r].a){var d=t.is("a")?t:t.parent("a"),l=d.attr("href");l&&(d.attr("target")?window.open(l,"_blank"):window.location.href=l)}s&&(e.preventDefault(),this.shortcodeAction())}},deleteCachedAnswers:function(){this.model.set({chosenAnswers:{},userAnswers:{}})},forceRestartQuiz:function(){this.deleteCachedAnswers(),this.model.trigger("tqb:show_loader"),this.undelegateEvents();var e={},t=this.$el.data("unique");e[t]=this.$el.data("quiz-id"),Object.keys(ThriveQuizB.loadedShortcodes).forEach((function(t){"undefined"!==e[t]&&delete ThriveQuizB.loadedShortcodes[t]})),window.tqb_restart_quiz=1,n(this).tqb(e),delete window.tqb_restart_quiz},restartQuiz:function(e){"tqb_quiz_options"===this.$(e.currentTarget).data("dynamic-link")&&(e.preventDefault(),this.$(e.currentTarget).data("shortcode-id").includes("restart_quiz")?this.forceRestartQuiz():this.$(e.currentTarget).data("shortcode-id").includes("next_step_in_quiz")&&this.runEvent(e))},setUserIdentifier:function(){this.$el.find(".tqb-hidden-form-info.tqb-hidden-user-unique").val(this.model.get("user_unique"))},setOverlayHeight:function(){var e=this.$el.find(".tqb-shortcode-new-content").outerHeight();this.$el.find(".tqb-loading-overlay").css({height:e+"px"})},listener:function(){var e=this,t=this.$el.find(".tve_et_tve-viewport"),i=function(t){e.model.set("form_data",_.extend({email:"",name:""},t.form_data||{})),e.model.set({$leadGeneration:t.$leadGeneration,$form:t.$form}),e.nextPage()};ThriveGlobal.$j(this.$el).off("lead_conversion_error_code.tcb").on("lead_conversion_error_code.tcb",".thrv_lead_generation",(function(e){if("no_connection"===e.errorCode){if(e.$form&&e.$form.length){var t=e.$form.find(".tcb-lg-consent"),s=t.find('input[type="checkbox"]');if(t.length&&"none"!==t.css("display")&&s.length&&parseInt(s.attr("data-required"))&&!s.is(":checked"))return void e.$form.tve_form_loading(!0)}i(e)}})),ThriveGlobal.$j(this.$el).off("lead_conversion_success.tcb").on("lead_conversion_success.tcb",".thrv_lead_generation",(function(t){t.content_unlocked="results"!==e.model.get("page_type"),i(t)})),ThriveGlobal.$j(this.$el).off("should_submit_form.tcb").on("should_submit_form.tcb",".thrv_lead_generation",(function(e){return e.flag_need_data=!0,!0})),this.$el.find(".tqb-shortcode-new-content").addClass("ajax-content"),"function"==typeof window.tar_trigger_viewport&&"function"==typeof window.tar_trigger_exit_viewport&&(jQuery(window).scroll((function(){window.tar_trigger_viewport(t.filter(":not(.tve-viewport-triggered)")),window.tar_trigger_exit_viewport(t.filter(".tve-viewport-triggered"))})),setTimeout((function(){window.tar_trigger_viewport(t),e.$el.find(".tqb-shortcode-new-content").trigger("content-inserted.tcb").removeClass("ajax-content")}),200)),TCB_Front.onDOMReady(ThriveGlobal.$j(e.$el.find(".tqb-shortcode-new-content"))),TCB_Front.event_triggers(e.$el.find(".tqb-shortcode-new-content"))},switchContent:function(){var e=this.$el.find(".tqb-shortcode-old-content"),t=this.$el.find(".tqb-shortcode-new-content");e.html(t.html())},nextPage:function(){this.shortcodeAction()},showQuizLoading:function(e){var t=e?this.getQuestionData(e):this.getPageData(),i=this.model.has_optin_page()&&void 0===e&&"optin"===t.page_type;(i=i||!this.model.has_optin_page()&&void 0!==e&&"splash"===t.page_type)&&this.model.get("results_settings").isURL()&&this.model.get("results_settings").get("display_message")?this.model.trigger("tqb:show_redirect_loader",this.model):this.model.trigger("tqb:show_loader",this.model)},shortcodeAction:function(e){var t=this,s=this;return new Promise((function(n){if("results"!==t.model.get("page_type")){t.hideErrorToast();var o=e?t.getQuestionData(e):t.getPageData(),r=t.model.has_optin_page()&&void 0===e&&"optin"===o.page_type;o=_.extend({},o,ThriveQuizB.getQueryParams()),(r=r||!t.model.has_optin_page()&&void 0!==e&&"splash"===o.page_type)&&t.model.get("results_settings").isURL()&&t.model.get("results_settings").get("display_message")?t.model.trigger("tqb:show_redirect_loader",t.model):t.model.trigger("tqb:show_loader",t.model),o.form_data=t.model.get("form_data");var a=t.model.get("$leadGeneration");a&&a.length&&(o.form_data._tcb_id=a.attr("data-settings-id")),t.model.fetch({data:o,success:function(e){var t=!1;if(TCB_Front&&(t=TCB_Front.Hooks.applyFilters("tqb.stop_render_quiz_page",!1,e,s.$el)),t)n();else{if("results"===e.get("page_type")&&e.get("results_settings").isURL()){var o=e.get("results_settings").get("message"),r=parseInt(o.get("duration"));r=isNaN(r)?0:r,r*=1e3,e.get("results_settings").get("display_message")||(r=0),setTimeout((function(e){s.redirectToResultURL(e)}),r,e)}else s.render();i(s.$el),n()}}})}else n()}))},isSavingUserProgress:function(){var e=this.$el.attr("data-save-user-progress");return e&&1===Number(e)},redirectToResultHTML:function(){return new ThriveQuizB.views.ResultRedirect({view:this,model:new Backbone.Model({results_label:this.$el.attr("data-red-results-label"),retake_quiz:parseInt(this.$el.attr("data-red-retake-quiz")),retake_quiz_label:this.$el.attr("data-red-retake-quiz-label"),completed_quiz_label:this.$el.attr("data-red-quiz-completed-label")})}).render().$el},redirectToResultURL:function(e){var t=(e=e||this.model).get("results_settings").get_redirect_url(e.get("points"),e.get("form_data"));t.length&&(window.location=t)},hideErrorToast:function(){n("#tve-lg-error-container").hide()},getQuestionData:function(e){return{user_unique:this.model.get("user_unique"),quiz_id:this.model.get("quiz_id"),page_type:this.model.get("page_type"),answer_ids:Array.isArray(e.get("id"))?e.get("id"):[e.get("id")],answer_text:e.get("answer_text")||""}},getPageData:function(){var e=this.model.get("page");return{user_unique:this.model.get("user_unique"),quiz_id:this.model.get("quiz_id"),page_type:this.model.get("page_type"),variation:{page_id:e&&e.page_id||"",id:e&&e.variation_id||""}}},renderQuestion:function(e){e=void 0===e?this.questions.findWhere({start:"1"}):e,1===this.model.get("resume")&&this.model.get("question")&&(e=this.questions.findWhere({id:this.model.get("question").data.id}),this.model.set("resume",0)),_.each(e.get("answers"),(function(e){e.quiz_type=this.quiz_type}),this);var t=new ThriveQuizB.collections.Answers(e.get("answers"));new ThriveQuizB.views.Question({model:e,questions:this.questions,collection:t,quiz_type:this.quiz_type,flows:this.flows,percentage:this.percentage,shortcode:this.model,el:this.$el.find(".tqb-shortcode-new-content .tqb-question-wrapper")}).render()},resultPageListener:function(){var e=this;ThriveGlobal.$j(tve_frontend_options.is_editor_page?"#tve_editor":"body").on("click",".thrv_social_custom .tve_s_link",(function(){e.model.logSocialShareConversion({},{page_id:e.model.get("page").page_id,quiz_id:e.model.get("page").quiz_id,variation_id:e.model.get("page").variation_id,"tqb-variation-user_unique":e.model.get("user_unique")})}));var t=this.model.get("page").badge_url||null,i=e.model.get("page").has_social_badge&&1==e.model.get("page").has_social_badge&&e.model.get("page").html_canvas&&!t,s=n('<div id="tie-preloader-gif"></div>'),o=e.$(".tqb-social-share-badge-container"),r=o.find(".tve_s_fb_share"),a=o.find("img"),d=n('<div id="tie-html-canvas" style="overflow: visible; position: absolute; z-index: -1; visibility: hidden;">'+(e.model.get("page").html_canvas?e.model.get("page").html_canvas:"")+"</div>"),l=((new Date).getTime(),0);function h(){r.removeAttr("data-image"),a.removeAttr("src"),o.children().hide(),o.append(s),n("style[onLoad]").removeAttr("onLoad")}function u(t){l++,a.attr("src",t),2===l&&r.attr("data-image",t);var i,s,n,h,u,g=function(t){var i=e.model.get("quiz_url"),s=c(),n=(e.model.get("page").result||"0").replace(/[^a-zA-Z0-9]/g,""),o=["tqb_redirect_post_id="+TQB_Front.post_id,"image_url="+encodeURIComponent(t),"description="+encodeURIComponent(s),"r="+n].join("&"),r=-1===i.indexOf("?")?"?":"&";return i+r+o}(t),_=c();!function(e,t){r.attr("data-href",e),r.attr("data-image",t)}(g,t),i=g,s=_,(u=o.find(".tve_s_x_share")).length&&((new Image).src=i,u.attr("data-href",i),s&&u.attr("data-post",s),n=i,(h=u).length&&n&&(h.data("tqb-prepared")||(h.data("tqb-prepared",!0),ThriveGlobal.$j.ajax({type:"POST",url:ThriveQuizB.ajaxurl("&route=shortcode&custom_action=prewarm_twitter_share"),data:{share_url:n}})))),function(t,i,s){var n=o.find(".tve_s_pin_share");n.length&&(n.attr("data-media",i),n.attr("data-href",t),s&&n.attr("data-description",s),ThriveGlobal.$j(tve_frontend_options.is_editor_page?"#tve_editor":"body").on("click",".tqb-social-share-badge-container .tve_s_link",(function(t){if("1"===ThriveGlobal.$j(this).attr("data-tqb-disabled"))return t.preventDefault(),t.stopImmediatePropagation(),!1;e.model.logSocialShareConversion({},{page_id:e.model.get("page").page_id,quiz_id:e.model.get("page").quiz_id,variation_id:e.model.get("page").variation_id,"tqb-variation-user_unique":e.model.get("user_unique")});var i=ThriveGlobal.$j(this).parents(".tve_s_item"),s=i.attr("data-s");TCB_Front.onSocialCustomClick[s]&&TCB_Front.onSocialCustomClick[s](i)})),d.remove())}(g,t,_)}function c(){var e=r.attr("data-description");return"I got: "===e?"":e}ThriveGlobal.$j(document).trigger("tve_shortcode_content_loaded",this),t&&(h(),u(t)),i&&(e.$el.find(".tqb-shortcode-new-content").parents().each((function(e,t){n(t).addClass("tqb-overflow-visible-badge")})),n("body").append(d),h(),setTimeout((function(){html2canvas([d.get(0)],{logging:void 0!==ThriveQuizB.html2canvas,onrendered:function(t){var i=t.toDataURL("image/png");e.$el.find(".tqb-shortcode-new-content").parents().each((function(e,t){n(t).removeClass("tqb-overflow-visible-badge")}));var r=function(e){for(var t=atob(e.split(",")[1]),i=[],s=0;s<t.length;)i.push(t.charCodeAt(s)),s++;return new Blob([new Uint8Array(i)],{type:"image/jpg"})}(i),d=new FormData,l=e.model.get("quiz_id"),h=e.model.get("user_id"),c=e.model.get("page").result;d.append("user_badge",r,c+"-"+l+".png"),d.append("quiz_id",l),d.append("user_id",h),d.append("result",c),d.append("action","tqb_frontend_ajax_controller"),n.ajax({type:"post",url:ThriveQuizB.ajaxurl("&route=shortcode&custom_action=save_user_custom_social_share_badge"),data:d,processData:!1,contentType:!1,success:function(e){u(e),a.load((function(){s.remove(),o.children().fadeIn(),(new Date).getTime()}))}})}})}),500))},showLoader:function(){this.$el.find(".tqb-loading-overlay").show(),this.$el.find(".tqb-shortcode-new-content").html("")},showRedirectLoader:function(){var e=this.$el.find(".tqb-loading-overlay"),t=ThriveQuizB.tpl("loaders/redirect");e.html(t({display_message:this.model.get("results_settings").get("display_message"),item:this.model.get("results_settings").get("message")})),e.show(),this.$el.find(".tqb-shortcode-new-content").html("")},hideLoader:function(){this.$(".tqb-loading-overlay").hide(),this.$el.css({"--tqb-placeholder-height-m":"","--tqb-placeholder-height-t":"","--tqb-placeholder-height-d":""})},initListeners:function(e){e.off("tqb:show_loader").on("tqb:show_loader",_.bind(this.showLoader,this)).off("tqb:show_redirect_loader").on("tqb:show_redirect_loader",_.bind(this.showRedirectLoader,this)),e.off("tqb:close_loader").on("tqb:close_loader",_.bind(this.hideLoader,this))},_get_delay:function(){var e=0;return"right_wrong"===this.quiz_type&&1===this.highlight_answer&&(e=1e3*this.sec_delay),e},calculateCurrentFlow:function(e){var t=this.model.get("userAnswers"),i=e.flows.items,s=Object.keys(i).filter((function(e){return e.startsWith("q")}));if(t[s=(s=s.length?s[0].match(/\d+/):"").length?s[0]:""]){var n;return n=this.model.get("all_questions").find((function(e){return e.id===s})).next_question_id?"q_"+s:"a_"+t[s],1+this.calculateCurrentFlow(i[n])}return this.flows=e,0}}),ThriveQuizB.views.VideoImageOverlay=Backbone.View.extend({template:ThriveQuizB.tpl("video/image-overlay"),events:{"click .tqb_video_overlay_image":"hideOverlayImage"},render:function(){var e=this.model.get("thumb")instanceof Backbone.Model&&this.model.get("thumb"),t=e?e.get("url"):"",i=this.model.get("source");return this.$el.find(".tqb-video-container-responsive").prepend(this.template({source:i,url:t})),this},hideOverlayImage:function(){this.$(".tqb_video_overlay_image").hide();var e,t=this.$el.find("iframe"),i=t.attr("src"),s=this.model.get("source");switch(s){case"youtube":i=(i=i.replace("&autoplay=0","")).replace("&autoplay=false","&autoplay=1"),e="&autoplay=true";break;case"vimeo":e="&autoplay=true";break;case"wistia":e="&autoPlay=true"}if(["youtube","vimeo","wistia","bunnynet"].includes(s))t=this.$el.find("iframe"),0!==i.length&&t.attr("src",i+e);else if((!TCB_Front.browser.safari||0===parseInt(data_controls)&&1===parseInt(data_overlay))&&("custom"===s||"self"===s)){var n=this.$el.find("video").get(0);n.paused?n.play():n.pause()}}}),ThriveQuizB.views.Media=Backbone.View.extend({renderVideoImageOverlay:function(){var e=this.model.get("thumb"),t=this.model.get("options");0==e instanceof Backbone.Model||void 0===t||void 0!==t.autoplay&&1===t.autoplay.value||new ThriveQuizB.views.VideoImageOverlay({model:this.model,el:this.$el}).render()},showLoader:function(){this.$el.find(".tqb-loading-overlay").show(),this.$el.find(".tqb-shortcode-new-content").html("")},hideLoader:function(){this.$el.find(".tqb-loading-overlay").hide()}}),ThriveQuizB.views.YotubeEmbededVideo=ThriveQuizB.views.Media.extend({template:ThriveQuizB.tpl("video/youtube"),render:function(){return this.showLoader(),this.$el.html(this.template({item:this.model})),this.renderVideoImageOverlay(),this.hideLoader(),this}}),ThriveQuizB.views.WistiaEmbededVideo=ThriveQuizB.views.Media.extend({template:ThriveQuizB.tpl("video/wistia"),render:function(){return this.showLoader(),this.$el.html(this.template({item:this.model})),this.renderVideoImageOverlay(),this.hideLoader(),this}}),ThriveQuizB.views.VimeoEmbededVideo=ThriveQuizB.views.Media.extend({template:ThriveQuizB.tpl("video/vimeo"),render:function(){return this.showLoader(),this.$el.html(this.template({item:this.model})),this.renderVideoImageOverlay(),this.hideLoader(),this}}),ThriveQuizB.views.CustomEmbededVideo=ThriveQuizB.views.Media.extend({template:ThriveQuizB.tpl("video/custom"),allowedMimeTypes:{asf:"video/x-ms-asf",asx:"video/x-ms-asf",wmv:"video/x-ms-wmv",wmx:"video/x-ms-wmx",wm:"video/x-ms-wm",avi:"video/avi",divx:"video/divx",flv:"video/x-flv",mov:"video/quicktime",qt:"video/quicktime",mpeg:"video/mpeg",mpg:"video/mpeg",mpe:"video/mpeg",mp4:"video/mp4",m4v:"video/mp4",ogv:"video/ogg",webm:"video/webm",mkv:"video/x-matroska"},render:function(){var e=this.media_mime();return this.$el.html(this.template({mime:e,item:this.model})),this.renderVideoImageOverlay(),this},media_mime:function(){var e=this.model.get("url").split(".").pop().toLowerCase();return"string"==typeof this.allowedMimeTypes[e]?this.allowedMimeTypes[e]:""}}),ThriveQuizB.views.BunnyNetEmbededVideo=ThriveQuizB.views.Media.extend({template:ThriveQuizB.tpl("video/bunny-net"),render:function(){return this.showLoader(),this.$el.html(this.template({item:this.model})),this.renderVideoImageOverlay(),this.hideLoader(),this}}),ThriveQuizB.views.CustomEmbededAudio=ThriveQuizB.views.CustomEmbededVideo.extend({allowedMimeTypes:{mp3:"audio/mpeg",mpeg:"audio/mpeg",m4a:"audio/m4a",m4b:"audio/mpeg",ra:"audio/x-realaudio",ram:"audio/x-realaudio",wav:"audio/wav",ogg:"audio/ogg",oga:"audio/ogg",mid:"audio/midi",midi:"audio/midi",wma:"audio/x-ms-wma",wax:"audio/x-ms-wax",mka:"audio/x-matroska"},template:ThriveQuizB.tpl("audio/custom")}),ThriveQuizB.views.SpotifyEmbededAudio=ThriveQuizB.views.CustomEmbededVideo.extend({template:ThriveQuizB.tpl("audio/spotify"),render:function(){var e="//open.spotify.com/embed"+this.model.get("video_id");return this.$el.html(this.template({item:this.model,src:e})),this}}),ThriveQuizB.views.SoundcloudEmbededAudio=ThriveQuizB.views.CustomEmbededVideo.extend({template:ThriveQuizB.tpl("audio/soundcloud")}),ThriveQuizB.views.Question=ThriveQuizB.views.Base.extend({template:ThriveQuizB.tpl("question"),powered_by_tqb:ThriveQuizB.tpl("powered-by-thrive-themes"),answersView:null,nextButtonClicked:!1,events:{"click .tqb-next-button, .tqb-finish-button":"nextClicked","click .tqb-check-button":"checkClicked","click .tqb-prev-button":"prevClicked"},initialize:function(e){this.questions=e.questions,this.quiz_type=e.quiz_type,this.flows=e.flows,this.percentage=e.percentage,this.shortcode=e.shortcode,this.allowedAnswers=this.model.getAllowedAnswers(),this.collection.on("tqb:disable_answer",_.bind(this.disableAllAnswers,this)).on("tqb:enable_answer",_.bind(this.enableAnswer,this)).on("tqb:show_nav_buttons",_.bind(this.showNavButtons,this)).on("tqb:enable_next",_.bind(this.enableNext,this)).on("tqb:disable_next",_.bind(this.disableNext,this)).on("tqb:show_right_answer",_.bind(this.showRightAnswer,this)).on("tqb:handle_progress",_.bind(this.handleProgress,this)).on("tqb:deselect_active_answers",_.bind(this.deselectActiveAnswers,this)).on("tqb:switch_next_with_check_button",_.bind(this.switchNextWithCheckButton,this))},deselectActiveAnswers:function(){var e=this.$(".tqb-active-answer");e.removeClass("tqb-active-answer").find(".tqb-answer-action").removeClass("tqe-selected-answer"),e.attr("data-clicked",0),e.find(".tqb-answer-feedback").addClass("tqb-hide")},showRightAnswer:function(e){_.each(this.collection.where({is_right:"1"}),(function(e){var t=this.$("#tqb-answer-"+e.get("id"));t.addClass("tqb-right tqb-right-answer tqb-rw"),t.attr("data-css",this.$("tqb-active-answer").attr("data-css"))}),this),"1"!==e.get("is_right")&&this.$("#tqb-answer-"+e.get("id")).addClass("tqb-wrong tqb-wrong-answer tqb-rw")},showNavButtons:function(){this.$(".tqb-button-holder").removeClass("tqb-hide").addClass("tqb-clear"),!this.model.isLastQuestion()||this.model.allowMultipleAnswers()&&this.shortcode.shouldDisplayFeedbackUntilNext()?!this.model.allowMultipleAnswers()||!this.shortcode.shouldDisplayFeedbackUntilNext()||this.shortcode.get("navigatedBack")||this.model.get("answersConfirmed")&&!this.model.isLastQuestion()?this.$(".tqb-next-button").removeClass("tqb-hide").addClass("tqb-clear"):this.$(".tqb-check-button").removeClass("tqb-disabled tqb-hide").addClass("tqb-clear"):this.$(".tqb-finish-button").removeClass("tqb-disabled tqb-hide").addClass("tqb-clear"),this.$(".tqb-prev-button").toggleClass("tqb-hide",1===parseInt(this.model.get("start"))||!this.shortcode.shouldShowNavButtons()),this.$("#tqb-thrv-label").css({position:"relative","z-index":"-1"})},prepareDataForNextQuestion:function(e){var t,i=this.model.isOpenEndedType()?this.$el.find("#tqb-open-type-answer").val():"";t=this.model.allowMultipleAnswers()?Array.from(e.map((function(e,t){return parseInt(t.getAttribute("data-id"))}))):e.length?[e[0].getAttribute("data-id")]:[this.collection.first().get("id")],this.model.set({user_answer_ids:t,user_answer_model:new Backbone.Model({answer_text:i,id:t})})},cacheUserAnswers:function(e){var t=this.shortcode.get("chosenAnswers"),i=this.model.isOpenEndedType()?this.$el.find("#tqb-open-type-answer").val():"";if(this.model.isOpenEndedType())t[this.model.get("id")]=i;else{var s=Array.from(e.map((function(e,t){return t.getAttribute("data-id")})));t[this.model.get("id")]&&!this.model.get("next_question_id")&&this.shortcode.handleBranchSwitched(this.model,s[0]),t[this.model.get("id")]=s}},feedbackWasDisplayed:function(e){var t=this;if(!e.length)return!1;var i=!1;return Array.from(e.map((function(e,t){return parseInt(t.getAttribute("data-id"))}))).forEach((function(e){var s=t.answersView.getAnswerView(e);s&&(i=i||s.displayFeedback())})),i},confirmAnswers:function(e){var t=this;e.length&&(Array.from(e.map((function(e,t){return parseInt(t.getAttribute("data-id"))}))).forEach((function(e){var i=t.answersView.getAnswerView(e);i&&(i.highlightAnswer(),i.handleFeedback())})),this.shortcode.shouldShowNavButtons()?this.disableAnswers():this.disableAllAnswers(),this.model.set("answersConfirmed",!0))},checkClicked:function(){var e=this.$(".tqb-active-answer");e.length&&(this.confirmAnswers(e),this.$(".tqb-prev-button").removeClass("tqb-disabled"),this.switchCheckWithNextButton())},validateOpenEndedAnswer:function(){if(this.model.isOpenEndedType()){var e=this.model.isOpenEndedType()?this.$el.find("#tqb-open-type-answer").val():"",t=this.collection.first(),i=t.validate(e,this.model.get("settings"));return!i||(t.trigger("invalid",t,[i]),!1)}return!0},handleDataForUpcomingQuestion:function(e){this.prepareDataForNextQuestion(e);var t=this.model.get("user_answer_ids");if(this.shortcode.shouldShowNavButtons()&&this.cacheUserAnswers(e),this.model.allowMultipleAnswers()||this.shortcode.shouldShowNavButtons()||this.model.isOpenEndedType()){var i=TQB_Front.quiz_options[this.model.get("quiz_id")];if(i.progress_settings&&1===i.progress_settings.display_progress){var s=t[0],n=1===this.collection.length?this.collection.first():this.collection.findWhere({id:s.toString()});this.handleProgress(n)}}this.disableAllAnswers(),this.disableNext(!0)},prevClicked:function(e){var t=this,i=this.$(".tqb-active-answer");!this.shortcode.shouldShowNavButtons()||this.model.get("answersEdited")&&!this.validateOpenEndedAnswer()||(this.model.get("answersEdited")&&this.handleDataForUpcomingQuestion(i),this.shortcode.shouldDisplayFeedbackUntilTime()&&this.shortcode.getShowFeedbackTime()&&!this.model.isOpenEndedType()&&this.model.get("answersEdited")?(this.disableNext(),this.confirmAnswers(i),this.$(".tqb-prev-button").addClass("tqb-disabled"),setTimeout((function(){t.questions.trigger("prev-question",t.model)}),this.shortcode.getShowFeedbackTime())):this.questions.trigger("prev-question",this.model),this.$el.off("click"))},nextClicked:function(e){var t=this,i=this.$(".tqb-active-answer");(i.length||this.model.isOpenEndedType())&&this.validateOpenEndedAnswer()&&(this.handleDataForUpcomingQuestion(i),this.$el.off("click"),this.shortcode.shouldDisplayFeedbackUntilTime()&&this.shortcode.getShowFeedbackTime()&&!this.model.isOpenEndedType()&&this.model.get("answersEdited")?(this.confirmAnswers(i),this.$(".tqb-prev-button").addClass("tqb-disabled"),setTimeout((function(){t.triggerGoToNextQuestion()}),this.shortcode.shouldDisplayFeedbackUntilTime()||this.feedbackWasDisplayed(i)?this.shortcode.getShowFeedbackTime():0)):this.triggerGoToNextQuestion())},triggerGoToNextQuestion:function(){var t=this.model.get("user_answer_ids");if(this.shortcode.shouldShowNavButtons())this.questions.trigger("next-question",this.model);else{if(!t)return;var i=this.collection.findWhere({id:t[0].toString()});"object"===e(i)&&i.trigger("tqb:choose_answer",i)}},enableNext:function(){this.$(".tqb-next-button, .tqb-check-button, .tqb-finish-button").removeClass("tqb-disabled")},disableNext:function(e){(this.shortcode.shouldShowNavButtons()&&0===this.$(".tqb-active-answer").length||e)&&this.$(".tqb-next-button, .tqb-check-button, .tqb-finish-button").addClass("tqb-disabled")},switchCheckWithNextButton:function(){this.model.isLastQuestion()?(this.$(".tqb-check-button").addClass("tqb-disabled tqb-hide").removeClass("tqb-clear"),this.$(".tqb-finish-button").removeClass("tqb-disabled tqb-hide").addClass("tqb-clear")):(this.$(".tqb-check-button").addClass("tqb-disabled tqb-hide").removeClass("tqb-clear"),this.$(".tqb-next-button").removeClass("tqb-disabled tqb-hide").addClass("tqb-clear"))},switchNextWithCheckButton:function(){this.shortcode.shouldDisplayFeedbackUntilNext()&&(this.model.isLastQuestion()?(this.$(".tqb-finish-button").addClass("tqb-disabled tqb-hide").removeClass("tqb-clear"),this.$(".tqb-check-button").removeClass("tqb-disabled tqb-hide").addClass("tqb-clear")):(this.$(".tqb-next-button").addClass("tqb-disabled tqb-hide").removeClass("tqb-clear"),this.$(".tqb-check-button").removeClass("tqb-disabled tqb-hide").addClass("tqb-clear")))},disableAllAnswers:function(){this.$(".tqb-answer-inner-wrapper").addClass("tqb-disable-answer")},disableAnswers:function(){this.shortcode.shouldShowNavButtons()&&this.$(".tqb-answer-inner-wrapper").not(".tqb-active-answer, .tqb-open-ended-wrapper").addClass("tqb-disable-answer")},enableAnswer:function(){this.$(".tqb-answer-inner-wrapper").removeClass("tqb-disable-answer")},handleProgress:function(e){this.selectedAnswer=e,this.questions.trigger("tqb.set_progress",this),this.renderProgress()},_qnaHtml:function(){if(this.shortcode.hasQnaTpl()){var e=this.model.get("display_settings")instanceof Backbone.Model&&this.model.get("display_settings"),t=e&&e.get("type")?e.get("type"):"";this.$el.html(jQuery(this.shortcode.tpl("questionWrapper")({item:this.model,display_type:t})).html()),this.$(".tqb-question-container").replaceWith(this.shortcode.tpl("questionContainer")({item:this.model,display_type:t})),this.$(".tqb-question-text").replaceWith(this.shortcode.tpl("questionText")({item:this.model})),this.$(".tqb-question-description").replaceWith(this.shortcode.tpl("questionDescription")({item:this.model})),"text"===t&&this.model.get("image")&&this.$(".tqb-question-container").append('<div class="tqb-question-image-container"><img src="'+this.model.get_image()+'" alt="question-image"></div>'),this.$(".tqb-answers-container").replaceWith(this.shortcode.tpl("answersContainer")())}},_html:function(){var e=this.model.get("display_settings")instanceof Backbone.Model&&this.model.get("display_settings"),t=e&&e.get("type")?e.get("type"):"";this.$el.html(this.template({item:this.model,shortcode:this.shortcode,display_type:t}))},render:function(){return this._html(),this._qnaHtml(),this.renderMedia(),this.renderProgress(),this.renderAnswers(),this.shortcode.shouldShowNavButtons()&&(this.showNavButtons(),this.model.set("answersEdited",!1),this.model.get("user_answer_ids")&&this.model.get("user_answer_ids").length>=this.model.getAllowedAnswers()&&this.model.allowMultipleAnswers()&&this.disableAnswers()),(this.allowedAnswers>1&&this.shortcode.shouldDisplayFeedbackUntilNext()||this.model.isOpenEndedType())&&this.showNavButtons(),this.shortcode.hasQnaTpl()&&this.renderNavButtons(),TQB_Front.settings.tqb_promotion_badge&&!this.$("#tqb-thrv-label").length&&(this.$el.append(this.powered_by_tqb()),this.$("#tqb-thrv-label").addClass("tqb-clear")),"1"!==this.model.get("start")&&this.model.isOpenEndedType()&&(this.$("#tqb-open-type-answer").trigger("focus"),this.collection.trigger("tqb:enable_next")),this.allowedAnswers>1&&!this.shortcode.get("chosenAnswers")[this.model.get("id")]&&(this.$(".tqb-next-button, .tqb-check-button").addClass("tqb-disabled"),this.shortcode.shouldDisplayFeedbackUntilNext()||(this.showNavButtons(),this.disableNext(!0))),i(this.$el),this},renderNavButtons:function(){this.model.isOpenEndedType()&&0!==this.$(".tqb-open-type-button").length&&this.$(".tqb-open-type-button").remove(),this.$(".tqb-button-holder").replaceWith(this.shortcode.tpl("nextQuestion")()),this.$(".tqb-open-ended-wrapper").removeClass("tqb-hide");var e=this.$(".tqb-button-holder");(this.shortcode.shouldDisplayFeedbackUntilNext()||this.model.isOpenEndedType()||this.model.allowMultipleAnswers()||this.shortcode.shouldShowNavButtons())&&e.removeClass("tqb-hide"),0===e.find(".tqb-prev-button").length&&(this.shortcode.shouldShowNavButtons()||this.shortcode.shouldDisplayFeedbackUntilNext())&&(e.prepend(ThriveQuizB.tpl("previous-button")()),e.append(ThriveQuizB.tpl("confirmation-buttons")())),0===this.$(".tqb-active-answer").length&&this.$(".tqb-next-button").addClass("tqb-disabled"),this.$(".tqb-prev-button").toggleClass("tqb-hide",1===parseInt(this.model.get("start"))||!this.shortcode.shouldShowNavButtons()),this.$(".tqb-next-button").toggleClass("tqb-hide",this.model.isLastQuestion()),this.model.isLastQuestion()&&(this.shortcode.shouldShowNavButtons()||this.shortcode.shouldDisplayFeedbackUntilNext())&&(this.$(".tqb-next-button").addClass("tqb-hide"),this.$(".tqb-finish-button").removeClass("tqb-hide")),this.model.isLastQuestion()&&this.model.isOpenEndedType()&&this.$(".tqb-finish-button").removeClass("tqb-hide");var t=e.find(".tqb-next-button").attr("data-css");this.$(".tqb-finish-button, .tqb-check-button").attr("data-css",t),this.allowedAnswers>1&&this.switchNextWithCheckButton()},renderMedia:function(){var e=this.model.get("display_settings");if(null!==e)switch(parseInt(e.get("display_type"))){case 0:default:this.renderText();break;case 1:this.renderVideo();break;case 2:this.renderAudio()}},renderText:function(){},renderAudio:function(){var e=e||this.$el.find(".tqb-question-media"),t=this.model.get("display_settings");switch(t.get("audio_source")){case"soundcloud":var i=new ThriveQuizB.views.SoundcloudEmbededAudio({model:t,el:e});break;case"spotify":i=new ThriveQuizB.views.SpotifyEmbededAudio({model:t,el:e});break;default:i=new ThriveQuizB.views.CustomEmbededAudio({model:t,el:e})}i.render()},renderVideo:function(e){e=e||this.$el.find(".tqb-question-media");var t=this.model.get("display_settings");switch(t.get("source")){case"youtube":var i=new ThriveQuizB.views.YotubeEmbededVideo({model:t,el:e});break;case"vimeo":i=new ThriveQuizB.views.VimeoEmbededVideo({model:t,el:e});break;case"wistia":default:i=new ThriveQuizB.views.WistiaEmbededVideo({model:t,el:e});break;case"custom":i=new ThriveQuizB.views.CustomEmbededVideo({model:t,el:e});break;case"bunnynet":i=new ThriveQuizB.views.BunnyNetEmbededVideo({model:t,el:e})}i.render()},renderProgress:function(){var e=TQB_Front.quiz_options[this.model.get("quiz_id")],t=new ThriveQuizB.models.ProgressSettings(e.progress_settings);1===parseInt(t.get("display_progress"))&&(t.set("percentage",this.percentage),this.$(".tqb-progress-container").remove(),"position_top"===e.progress_settings.progress_position?this.$el.prepend('<div class="tqb-progress-container tqb-hide"></div>'):this.$el.append('<div class="tqb-progress-container tqb-hide"></div>'),new ThriveQuizB.views.ProgressBar({template:this.shortcode.tpl("progressbarContainer"),shortcode:this.shortcode,model:t,flows:this.flows,hasSelectedAnswer:!!this.selectedAnswer,el:this.$(".tqb-progress-container"),quizId:this.model.get("quiz_id")}).render())},renderAnswers:function(){2===parseInt(this.model.get("q_type"))&&this.$el.find(".tqb-answers-container").addClass("tqb-answer-has-image"),this.answersView=new ThriveQuizB.views.Answers({model:this.model,collection:this.collection,questions:this.questions,quiz_type:this.quiz_type,shortcode:this.shortcode,el:this.$el.find(".tqb-answers-container")}),this.answersView.render()}}),ThriveQuizB.views.Answers=ThriveQuizB.views.Base.extend({events:{},views:{},initialize:function(e){this.questions=e.questions,this.quiz_type=e.quiz_type,this.shortcode=e.shortcode},render:function(){return this.$el.empty(),this.collection.each(this.renderOne,this),this},getAnswerView:function(e){return this.views[e]},renderOne:function(e){return e.on("tqb:choose_answer",(function(){var t=this.questions.findWhere({id:e.get("question_id")}),i=TQB_Front.quiz_options[this.model.get("quiz_id")];if(parseInt(e.get("next_question_id"))&&t.set({next_question_id:e.get("next_question_id")}),t.get("user_answer_ids")&&t.get("user_answer_ids").length||(t.set("user_answer_ids",[e.get("id")]),t.set("user_answer_model",e)),this.questions.remove(t),!0!==i.press_next&&"right_wrong"===this.quiz_type&&0===parseInt(e.get("is_right"))){var s=this.collection.findWhere({is_right:"1"});s instanceof ThriveQuizB.models.Answer&&s.trigger("tqb:indicate-right")}}),this),this.views[e.get("id")]=new ThriveQuizB.views.Answer({model:e,question:this.model,quiz_type:this.quiz_type,collection:this.collection,shortcode:this.shortcode}),this.$el.append(this.views[e.get("id")].render().$el),this}}),ThriveQuizB.views.Answer=ThriveQuizB.views.Base.extend({className:"tqb-answer-inner-wrapper",template:ThriveQuizB.tpl("answer"),template_image:ThriveQuizB.tpl("answer-image"),template_open:ThriveQuizB.tpl("answer-open"),events:{"click .tqb-answer-action":"answerAction","keyup textarea":function(e){var t=this.question.get("settings"),i=this.$(".tqb-answer-status"),s=t.get_max_value()-e.currentTarget.value.length;s<0?(e.currentTarget.value=e.currentTarget.value.substr(0,t.get_max_value()),this.model.trigger("invalid",this.model,[t.max_error()])):(i.html(TQB_Front.t.chars+": %s".replace("%s",s)),this.set_status("typing"),this.question.set("answersEdited",!0))}},right_class:"tqb-right-answer",wrong_class:"tqb-wrong-answer",quiz_type:null,$status:null,initialize:function(e){this.shortcode=e.shortcode,e.quiz_type&&(this.quiz_type=e.quiz_type),e.question&&e.question instanceof ThriveQuizB.models.Question&&(this.question=e.question),this.model.on("tqb:indicate-right",this.indicate_right,this),this.model.on("invalid",(function(e,t){this.set_status("error").html(t.shift())}),this)},indicate_right:function(){this.$el.addClass(this.right_class)},_tpl:function(e){var t=this.template,i=this.shortcode.tpl("answerItem");this.isQnaTpl=!1,this.question.isTypeOf("image")?(i=this.shortcode.tpl("answerImageItem"),t=this.template_image):this.question.isTypeOf("open")&&(i=this.shortcode.tpl("answerOpenItem"),t=this.template_open),i&&i.length&&(t=i,this.isQnaTpl=!0);var s=t(e);if(this.isQnaTpl){var o=n(s);this.$el.attr("data-css",o.data("css")),this.$el.addClass("tqb-editor-answer-wrapper"),o.find(".tqb-answer-icon").replaceWith(this.shortcode.tpl("answerIcon")()),o.find(".tcb-icon").removeClass("tcb-icon"),this.model.get("image")&&(o.find(".tqb-fancy-icon").addClass("tqb-fancy-rel"),o.find(".tqb-answer-image-container").html('<img src="'+this.model.get_image()+'" alt="" class="tqb-answer-image">')),s=o.find(".tqb-answer-content")[0].outerHTML}return s},_html:function(){var e=this._tpl({item:this.model,question:this.question,settings:this.question.get("settings")});this.isQnaTpl&&this.$el.attr("data-css",n(e).data("css")),this.$el.html(e)},render:function(){var e=this.shortcode.get("chosenAnswers"),t=this.question.get("id"),i=this.model.get("id");if(this._html(),this.question.isTypeOf("open")&&this.$el.addClass("tqb-open-ended-wrapper"),this.$status=this.$(".tqb-answer-status"),this.$el.attr("id","tqb-answer-"+this.model.get("id")),this.$el.attr("data-id",this.model.get("id")),e[t]||""===e[t]){var s=e[t].includes(i),n=this.question.isOpenEndedType()&&"string"==typeof e[t];s?(this.$el.find(".tqb-answer-action").addClass("tqe-selected-answer"),this.$el.addClass("tqb-active-answer"),this.highlightAnswer(),this.handleFeedback()):n&&this.$el.find("#tqb-open-type-answer").val(e[t]),this.collection.trigger("tqb:enable_next")}return this},answerAction:function(e){if(this.question.allowMultipleAnswers()){var t=this.$el.hasClass("tqb-active-answer"),i=this.$el.siblings(),s=this.$el.closest(".tqb-answers-container"),o=s.siblings(".tqb-button-holder"),r=o.find(".tqb-next-button"),a=o.find(".tqb-prev-button");return this.shortcode.shouldShowNavButtons()&&r.length&&this.shortcode.get("navigatedBack")&&(this.question.set("answersConfirmed",!1),this.shortcode.set("navigatedBack",!1),this.collection.trigger("tqb:switch_next_with_check_button")),t?(this.$el.removeClass("tqb-active-answer").find(".tqb-answer-action").removeClass("tqe-selected-answer"),i.removeClass("tqb-disable-answer"),s.find(".tqb-answer-feedback").not(".tqb-prev-button").addClass("tqb-hide"),this.question.set("answersConfirmed",!1),this.shortcode.shouldShowNavButtons()&&this.collection.trigger("tqb:switch_next_with_check_button"),0===s.find(".tqb-active-answer").length&&o.find(".tqb-nav-button").addClass("tqb-disabled")):s.find(".tqb-active-answer").length<this.question.getAllowedAnswers()&&(this.$el.addClass("tqb-active-answer").find(".tqb-answer-action").addClass("tqe-selected-answer"),o.find(".tqb-nav-button").not(".tqb-prev-button").removeClass("tqb-disabled"),s.find(".tqb-active-answer").length===this.question.getAllowedAnswers()&&i.not(".tqb-active-answer").addClass("tqb-disable-answer")),this.shortcode.shouldShowNavButtons()&&this.shortcode.shouldDisplayFeedbackUntilNext()&&a.addClass("tqb-disabled"),void this.question.set("answersEdited",!0)}if(this.shortcode.shouldShowNavButtons()&&(this.collection.trigger("tqb:deselect_active_answers"),this.collection.trigger("tqb:enable_next"),this.question.set("answersEdited",!0)),(this.showNextButton()||this.question.isOpenEndedType()||this.shortcode.shouldDisplayFeedbackUntilNext())&&(this.collection.trigger("tqb:show_nav_buttons"),this.collection.trigger("tqb:enable_next")),"BUTTON"!==e.target.tagName&&!n(e.target).is(".tqb-next-icon")||(this.model.set("answer_text",this.$("textarea").val()),!1!==this.model.isValid(this.question.get("settings")))){var d=e.currentTarget.classList.contains("tqb-open-ended-wrapper");if(d=(d=d&&"BUTTON"!==e.target.tagName)&&!n(e.target).is(".tqb-next-icon"))return e.stopPropagation();this.$el.data("clicked")||(this.$el.attr("data-clicked",1),this.handleProgress()&&!this.shortcode.shouldShowNavButtons()&&this.collection.trigger("tqb:handle_progress",this.model),this.$el.find(".tqb-answer-action").addClass("tqe-selected-answer"),this.$el.addClass("tqb-active-answer"),this.question.isOpenEndedType()||(this.shortcode.shouldShowNavButtons()||this.collection.trigger("tqb:disable_answer",this.model),(this.shortcode.shouldDisplayFeedbackUntilNext()||this.shortcode.shouldDisplayFeedbackUntilTime()&&!this.shortcode.shouldShowNavButtons())&&(this.highlightAnswer(),this.handleFeedback())),this.shortcode.shouldShowNavButtons()||this.shortcode.shouldDisplayFeedbackUntilNext()||this.next())}else this.$("textarea").focus()},next:function(){if(!this.showNextButton()){var e=this;setTimeout((function(){e.model.trigger("tqb:choose_answer",e.model)}),this.getTimeBeforeNextQuestion())}},getTimeBeforeNextQuestion:function(){var e=(this.model.highlightAnswer()||this.model.showFeedback())&&this.question.showFeedback(),t=!this.question.isOpenEndedType()&&e?this.model.getTimeBeforeNextQuestion():0;return"right_wrong"!==this.quiz_type||0!==t||this.model.highlight().loadNext()||this.question.isOpenEndedType()||(t=this.model.getShowFeedbackTime()),t},showNextButton:function(){var e=!this.question.isOpenEndedType()&&!this.model.highlight().loadNext();return"right_wrong"===this.quiz_type?e&&this.model.feedback().showNextButton():e&&this.hasFeedback()&&this.model.feedback().showNextButton()&&this.question.showFeedback()},hasFeedback:function(){return this.model.get("feedback")&&this.model.get("feedback").length>0},displayFeedback:function(){return!0===this.question.get("settings").get("display_question_feedback")&&this.model.showFeedback()},highlightAnswer:function(){!1===this.model.highlightAnswer()&&!1===this.question.isOpenEndedType()||this.collection.trigger("tqb:show_right_answer",this.model)},handleFeedback:function(){if(this.displayFeedback()){var e=this,t=this.shortcode.get("chosenAnswers"),i=this.question.get("id"),s=this.question.get("answersEdited");this.renderFeedback(),setTimeout((function(){e.$(".tqb-answer-feedback").removeClass("tqb-hide")}),0),this.showNextButton()||t[i]&&!s||setTimeout((function(){e.$(".tqb-answer-feedback").addClass("tqb-hide")}),this.model.getShowFeedbackTime())}},renderFeedback:function(){if(this.model.hasFeedback()){var e="";_.each(this.model.get("feedback").split("\n"),(function(t){e+='<p class="tqb-feedback-text">'+_.escape(t)+"</p>"}),this),this.$(".tqb-feedback-inner").html(e)}},set_status:function(e){switch(this.$status.removeAttr("class"),e){case"typing":this.$status.addClass("tqb-typing-text");break;case"error":this.$status.addClass("tqb-error-text")}return this.$status.addClass("tqb-answer-status"),this.$status},handleProgress:function(){var e=TQB_Front.quiz_options[this.model.get("quiz_id")];return e.progress_settings&&1===e.progress_settings.display_progress}}),ThriveQuizB.views.ResultRedirect=ThriveQuizB.views.Base.extend({template:ThriveQuizB.tpl("result-redirect"),events:{"click .tqb-restart-quiz":"restartQuiz","click .tqb-show-results":"redirectToResultURL"},initialize:function(e){this.ShortcodeView=e.view},restartQuiz:function(e){this.ShortcodeView.restartQuiz(e)},redirectToResultURL:function(e){this.ShortcodeView.redirectToResultURL()},render:function(){return this.$el.html(this.template({model:this.model})),this}}),ThriveQuizB.views.ProgressBar=Backbone.View.extend({template:function(e){return e._template&&e._template.length?e._template(e):ThriveQuizB.tpl("progress-bar-skin-"+TQB_Front.quiz_options[this.quizId].quiz_style)(e)},initialize:function(e){this._template=e.template,this.shortcode=e.shortcode,this.flows=e.flows,this.hasSelectedAnswer=e.hasSelectedAnswer,this.quizId=e.quizId},render:function(){var e=this.model.get("percentage"),t=!0!==this.hasSelectedAnswer?Math.round((100-this.model.get("percentage"))/this.getHighestCount()):0,i=100-this.model.get("percentage")>t?Math.round(100-t-this.model.get("percentage")):0,s=n(this.template({_template:this._template,model:this.model,completed:e,estimatedProgress:t,remaining:i}));return this.shortcode.hasQnaTpl()?(this.$el.attr("data-css",s.attr("data-css")),this.$el.html(s.html())):this.$el.html(s[0].outerHTML),this.$(".tqb-progress-completed").css("background-color",this.model.get("fill_color")),this.$(".tqb-progress-label").css("color",this.model.get("label_color")),this.$(".tqb-progress-label, .tqb-next-item, .tqb-remaining-progress").css("font-size",parseInt(this.model.get("font_size"))),this.$(".tqb-next-item").css("background-color",this.model.get("next_step_color")),this.$(".tqb-remaining-progress").css({width:"calc("+i+"%)","background-color":this.model.get("background_color")}),this.$(".tqb-next-item").toggleClass("tqb-hide",!0===this.hasSelectedAnswer),this.$el.removeClass("tqb-hide"),this},getHighestCount:function(e){var t=1;return e=e||this.flows,Object.keys(e).forEach((function(i){e[i].count>t&&(t=e[i].count)})),t}})}))}(jQuery)})()})();