var $jscomp=$jscomp||{};$jscomp.scope={};$jscomp.arrayIteratorImpl=function(a){var c=0;return function(){return c":">",'"':""","'":"'","/":"/"};return"string"!=typeof a?a:String(a).replace(/[&<>"'\/\\]/g,function(a){return b[a]})};c.__cache={};var p=0;return c.GetUniqueElementId=function(a){var b=a.getAttribute("data-select2-id");return null!=b||(b=a.id?"select2-data-"+a.id:"select2-data-"+(++p).toString()+"-"+c.generateChars(4),a.setAttribute("data-select2-id",b)),b},c.StoreData=function(a,b,d){a=c.GetUniqueElementId(a); c.__cache[a]||(c.__cache[a]={});c.__cache[a][b]=d},c.GetData=function(b,d){var g=c.GetUniqueElementId(b);return d?c.__cache[g]&&null!=c.__cache[g][d]?c.__cache[g][d]:a(b).data(d):c.__cache[g]},c.RemoveData=function(a){var b=c.GetUniqueElementId(a);null!=c.__cache[b]&&delete c.__cache[b];a.removeAttribute("data-select2-id")},c.copyNonInternalCssClasses=function(a,b){var c=(c=a.getAttribute("class").trim().split(/\s+/)).filter(function(a){return 0===a.indexOf("select2-")});b=(b=b.getAttribute("class").trim().split(/\s+/)).filter(function(a){return 0!==a.indexOf("select2-")});b=c.concat(b);a.setAttribute("class",b.join(" "))},c}),r.define("select2/results",["jquery","./utils"],function(a,b){function c(a,b,d){this.$element=a;this.data=d;this.options=b;c.__super__.constructor.call(this)}return b.Extend(c,b.Observable),c.prototype.render=function(){var b=a('');return this.options.get("multiple")&&b.attr("aria-multiselectable","true"),this.$results=b},c.prototype.clear=function(){this.$results.empty()}, c.prototype.displayMessage=function(b){var c=this.options.get("escapeMarkup");this.clear();this.hideLoading();var d=a(''),e=this.options.get("translations").get(b.message);d.append(c(e(b.args)));d[0].className+=" select2-results__message";this.$results.append(d)},c.prototype.hideMessages=function(){this.$results.find(".select2-results__message").remove()},c.prototype.append=function(a){this.hideLoading();var b=[];if(null!=a.results&&0!==a.results.length){a.results=this.sort(a.results);for(var c=0;c",{class:"select2-results__options select2-results__options--nested", role:"none"});e.append(f);w.append(g);w.append(e)}else this.template(c,d);return b.StoreData(d,"data",c),d},c.prototype.bind=function(c,d){var g=this;this.$results.attr("id",c.id+"-results");c.on("results:all",function(a){g.clear();g.append(a.data);c.isOpen()&&(g.setClasses(),g.highlightFirstItem())});c.on("results:append",function(a){g.append(a.data);c.isOpen()&&g.setClasses()});c.on("query",function(a){g.hideMessages();g.showLoading(a)});c.on("select",function(){c.isOpen()&&(g.setClasses(),g.options.get("scrollAfterSelect")&& g.highlightFirstItem())});c.on("unselect",function(){c.isOpen()&&(g.setClasses(),g.options.get("scrollAfterSelect")&&g.highlightFirstItem())});c.on("open",function(){g.$results.attr("aria-expanded","true");g.$results.attr("aria-hidden","false");g.setClasses();g.ensureHighlightVisible()});c.on("close",function(){g.$results.attr("aria-expanded","false");g.$results.attr("aria-hidden","true");g.$results.removeAttr("aria-activedescendant")});c.on("results:toggle",function(){var a=g.getHighlightedResults(); 0!==a.length&&a.trigger("mouseup")});c.on("results:select",function(){var a,c=g.getHighlightedResults();0!==c.length&&(a=b.GetData(c[0],"data"),c.hasClass("select2-results__option--selected")?g.trigger("close",{}):g.trigger("select",{data:a}))});c.on("results:previous",function(){var a,b=g.getHighlightedResults(),c=g.$results.find(".select2-results__option--selectable"),d=c.index(b);0>=d||(a=d-1,0===b.length&&(a=0),(d=c.eq(a)).trigger("mouseenter"),b=g.$results.offset().top,c=d.offset().top,d=g.$results.scrollTop()+ (c-b),0===a?g.$results.scrollTop(0):0>c-b&&g.$results.scrollTop(d))});c.on("results:next",function(){var a,b=g.getHighlightedResults(),c=g.$results.find(".select2-results__option--selectable"),d=c.index(b)+1;d>=c.length||((a=c.eq(d)).trigger("mouseenter"),b=g.$results.offset().top+g.$results.outerHeight(!1),c=a.offset().top+a.outerHeight(!1),a=g.$results.scrollTop()+c-b,0===d?g.$results.scrollTop(0):b=b-a.deltaY;c=0>a.deltaY&&c<=g.$results.height();b?(g.$results.scrollTop(0),a.preventDefault(),a.stopPropagation()):c&&(g.$results.scrollTop(g.$results.get(0).scrollHeight-g.$results.height()),a.preventDefault(),a.stopPropagation())});this.$results.on("mouseup", ".select2-results__option--selectable",function(c){var d=a(this),e=b.GetData(this,"data");d.hasClass("select2-results__option--selected")?g.options.get("multiple")?g.trigger("unselect",{originalEvent:c,data:e}):g.trigger("close",{}):g.trigger("select",{originalEvent:c,data:e})});this.$results.on("mouseenter",".select2-results__option--selectable",function(c){c=b.GetData(this,"data");g.getHighlightedResults().removeClass("select2-results__option--highlighted").attr("aria-selected","false");g.trigger("results:focus", {data:c,element:a(this)})})},c.prototype.getHighlightedResults=function(){return this.$results.find(".select2-results__option--highlighted")},c.prototype.destroy=function(){this.$results.remove()},c.prototype.ensureHighlightVisible=function(){var a,b,c,d,e=this.getHighlightedResults();0!==e.length&&(a=this.$results.find(".select2-results__option--selectable").index(e),d=this.$results.offset().top,b=e.offset().top,c=this.$results.scrollTop()+(b-d),d=b-d,c-=2*e.outerHeight(!1),2>=a?this.$results.scrollTop(0): (d>this.$results.outerHeight()||0>d)&&this.$results.scrollTop(c))},c.prototype.template=function(b,c){var d=this.options.get("templateResult"),e=this.options.get("escapeMarkup");b=d(b,c);null==b?c.style.display="none":"string"==typeof b?c.innerHTML=e(b):a(c).append(b)},c}),r.define("select2/keys",[],function(){return{BACKSPACE:8,TAB:9,ENTER:13,SHIFT:16,CTRL:17,ALT:18,ESC:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,DELETE:46}}),r.define("select2/selection/base", ["jquery","../utils","../keys"],function(a,b,c){function d(a,b){this.$element=a;this.options=b;d.__super__.constructor.call(this)}return b.Extend(d,b.Observable),d.prototype.render=function(){var c=a('');return this._tabindex=0,null!=b.GetData(this.$element[0],"old-tabindex")?this._tabindex=b.GetData(this.$element[0],"old-tabindex"):null!=this.$element.attr("tabindex")&&(this._tabindex=this.$element.attr("tabindex")), c.attr("title",this.$element.attr("title")),c.attr("tabindex",this._tabindex),c.attr("aria-disabled","false"),this.$selection=c},d.prototype.bind=function(a,b){var d=this,g=a.id+"-results";this.container=a;this.$selection.on("focus",function(a){d.trigger("focus",a)});this.$selection.on("blur",function(a){d._handleBlur(a)});this.$selection.on("keydown",function(a){d.trigger("keypress",a);a.which===c.SPACE&&a.preventDefault()});a.on("results:focus",function(a){d.$selection.attr("aria-activedescendant", a.data._resultId)});a.on("selection:update",function(a){d.update(a.data)});a.on("open",function(){d.$selection.attr("aria-expanded","true");d.$selection.attr("aria-owns",g);d._attachCloseHandler(a)});a.on("close",function(){d.$selection.attr("aria-expanded","false");d.$selection.removeAttr("aria-activedescendant");d.$selection.removeAttr("aria-owns");d.$selection.trigger("focus");d._detachCloseHandler(a)});a.on("enable",function(){d.$selection.attr("tabindex",d._tabindex);d.$selection.attr("aria-disabled", "false")});a.on("disable",function(){d.$selection.attr("tabindex","-1");d.$selection.attr("aria-disabled","true")})},d.prototype._handleBlur=function(b){var c=this;window.setTimeout(function(){document.activeElement==c.$selection[0]||a.contains(c.$selection[0],document.activeElement)||c.trigger("blur",b)},1)},d.prototype._attachCloseHandler=function(c){a(document.body).on("mousedown.select2."+c.id,function(c){var d=a(c.target).closest(".select2");a(".select2.select2-container--open").each(function(){this!=d[0]&&b.GetData(this,"element").select2("close")})})},d.prototype._detachCloseHandler=function(b){a(document.body).off("mousedown.select2."+b.id)},d.prototype.position=function(a,b){b.find(".selection").append(a)},d.prototype.destroy=function(){this._detachCloseHandler(this.container)},d.prototype.update=function(a){throw Error("The `update` method must be defined in child classes.");},d.prototype.isEnabled=function(){return!this.isDisabled()},d.prototype.isDisabled=function(){return this.options.get("disabled")}, d}),r.define("select2/selection/single",["jquery","./base","../utils","../keys"],function(a,b,c,d){function e(){e.__super__.constructor.apply(this,arguments)}return c.Extend(e,b),e.prototype.render=function(){var a=e.__super__.render.call(this);return a[0].classList.add("select2-selection--single"),a.html(''),a},e.prototype.bind=function(a,b){var c=this;e.__super__.bind.apply(this, arguments);var d=a.id+"-container";this.$selection.find(".select2-selection__rendered").attr("id",d).attr("role","textbox").attr("aria-readonly","true");this.$selection.attr("aria-labelledby",d);this.$selection.attr("aria-controls",d);this.$selection.on("mousedown",function(a){1===a.which&&c.trigger("toggle",{originalEvent:a})});this.$selection.on("focus",function(a){});this.$selection.on("blur",function(a){});a.on("focus",function(b){a.isOpen()||c.$selection.trigger("focus")})},e.prototype.clear= function(){var a=this.$selection.find(".select2-selection__rendered");a.empty();a.removeAttr("title")},e.prototype.display=function(a,b){var c=this.options.get("templateSelection");return this.options.get("escapeMarkup")(c(a,b))},e.prototype.selectionContainer=function(){return a("")},e.prototype.update=function(a){var b,c;0!==a.length?(c=a[0],b=this.$selection.find(".select2-selection__rendered"),a=this.display(c,b),b.empty().append(a),(c=c.title||c.text)?b.attr("title",c):b.removeAttr("title")): this.clear()},e}),r.define("select2/selection/multiple",["jquery","./base","../utils"],function(a,b,c){function d(a,b){d.__super__.constructor.apply(this,arguments)}return c.Extend(d,b),d.prototype.render=function(){var a=d.__super__.render.call(this);return a[0].classList.add("select2-selection--multiple"),a.html('
    '),a},d.prototype.bind=function(b,e){var g=this;d.__super__.bind.apply(this,arguments);var p=b.id+"-container";this.$selection.find(".select2-selection__rendered").attr("id", p);this.$selection.on("click",function(a){g.trigger("toggle",{originalEvent:a})});this.$selection.on("click",".select2-selection__choice__remove",function(b){var d;g.isDisabled()||(d=a(this).parent(),d=c.GetData(d[0],"data"),g.trigger("unselect",{originalEvent:b,data:d}))});this.$selection.on("keydown",".select2-selection__choice__remove",function(a){g.isDisabled()||a.stopPropagation()})},d.prototype.clear=function(){var a=this.$selection.find(".select2-selection__rendered");a.empty();a.removeAttr("title")}, d.prototype.display=function(a,b){var c=this.options.get("templateSelection");return this.options.get("escapeMarkup")(c(a,b))},d.prototype.selectionContainer=function(){return a('
  • ')},d.prototype.update=function(a){if(this.clear(),0!==a.length){for(var b=[],d=this.$selection.find(".select2-selection__rendered").attr("id")+ "-choice-",e=0;e')).attr("title",g()),b.attr("aria-label",g()),b.attr("aria-describedby",e),c.StoreData(b[0],"data",d),this.$selection.prepend(b), this.$selection[0].classList.add("select2-selection--clearable"))},d}),r.define("select2/selection/search",["jquery","../utils","../keys"],function(a,b,c){function d(a,b,c){a.call(this,b,c)}return d.prototype.render=function(b){var c=this.options.get("translations").get("search"),d=a(''); this.$searchContainer=d;this.$search=d.find("textarea");this.$search.prop("autocomplete",this.options.get("autocomplete"));this.$search.attr("aria-label",c());b=b.call(this);return this._transferTabIndex(),b.append(this.$searchContainer),b},d.prototype.bind=function(a,d,e){var g=this,p=d.id+"-results",f=d.id+"-container";a.call(this,d,e);g.$search.attr("aria-describedby",f);d.on("open",function(){g.$search.attr("aria-controls",p);g.$search.trigger("focus")});d.on("close",function(){g.$search.val(""); g.resizeSearch();g.$search.removeAttr("aria-controls");g.$search.removeAttr("aria-activedescendant");g.$search.trigger("focus")});d.on("enable",function(){g.$search.prop("disabled",!1);g._transferTabIndex()});d.on("disable",function(){g.$search.prop("disabled",!0)});d.on("focus",function(a){g.$search.trigger("focus")});d.on("results:focus",function(a){a.data._resultId?g.$search.attr("aria-activedescendant",a.data._resultId):g.$search.removeAttr("aria-activedescendant")});this.$selection.on("focusin", ".select2-search--inline",function(a){g.trigger("focus",a)});this.$selection.on("focusout",".select2-search--inline",function(a){g._handleBlur(a)});this.$selection.on("keydown",".select2-search--inline",function(a){var d;a.stopPropagation();g.trigger("keypress",a);g._keyUpPrevented=a.isDefaultPrevented();a.which!==c.BACKSPACE||""!==g.$search.val()||0<(d=g.$selection.find(".select2-selection__choice").last()).length&&(d=b.GetData(d[0],"data"),g.searchRemoveChoice(d),a.preventDefault())});this.$selection.on("click", ".select2-search--inline",function(a){g.$search.val()&&a.stopPropagation()});var h=(d=document.documentMode)&&11>=d;this.$selection.on("input.searchcheck",".select2-search--inline",function(a){h?g.$selection.off("input.search input.searchcheck"):g.$selection.off("keyup.search")});this.$selection.on("keyup.search input.search",".select2-search--inline",function(a){var b;h&&"input"===a.type?g.$selection.off("input.search input.searchcheck"):(b=a.which)!=c.SHIFT&&b!=c.CTRL&&b!=c.ALT&&b!=c.TAB&&g.handleSearch(a)})}, d.prototype._transferTabIndex=function(a){this.$search.attr("tabindex",this.$selection.attr("tabindex"));this.$selection.attr("tabindex","-1")},d.prototype.createPlaceholder=function(a,b){this.$search.attr("placeholder",b.text)},d.prototype.update=function(a,b){var c=this.$search[0]==document.activeElement;this.$search.attr("placeholder","");a.call(this,b);this.resizeSearch();c&&this.$search.trigger("focus")},d.prototype.handleSearch=function(){var a;this.resizeSearch();this._keyUpPrevented||(a=this.$search.val(), this.trigger("query",{term:a}));this._keyUpPrevented=!1},d.prototype.searchRemoveChoice=function(a,b){this.trigger("unselect",{data:b});this.$search.val(b.text);this.handleSearch()},d.prototype.resizeSearch=function(){this.$search.css("width","25px");var a="100%";""===this.$search.attr("placeholder")&&(a=.75*(this.$search.val().length+1)+"em");this.$search.css("width",a)},d}),r.define("select2/selection/selectionCss",["../utils"],function(a){function b(){}return b.prototype.render=function(b){var c= b.call(this);b=this.options.get("selectionCssClass")||"";return-1!==b.indexOf(":all:")&&(b=b.replace(":all:",""),a.copyNonInternalCssClasses(c[0],this.$element[0])),c.addClass(b),c},b}),r.define("select2/selection/eventRelay",["jquery"],function(a){function b(){}return b.prototype.bind=function(b,c,d){var e=this,p="open opening close closing select selecting unselect unselecting clear clearing".split(" "),f=["opening","closing","selecting","unselecting","clearing"];b.call(this,c,d);c.on("*",function(b, c){var d;-1!==p.indexOf(b)&&(c=c||{},d=a.Event("select2:"+b,{params:c}),e.$element.trigger(d),-1!==f.indexOf(b)&&(c.prevented=d.isDefaultPrevented()))})},b}),r.define("select2/translation",["jquery","require"],function(a,b){function c(a){this.dict=a||{}}return c.prototype.all=function(){return this.dict},c.prototype.get=function(a){return this.dict[a]},c.prototype.extend=function(b){this.dict=a.extend({},b.all(),this.dict)},c._cache={},c.loadPath=function(a){var d;return a in c._cache||(d=b(a),c._cache[a]= d),new c(c._cache[a])},c}),r.define("select2/diacritics",[],function(){return{"\u24b6":"A","\uff21":"A","\u00c0":"A","\u00c1":"A","\u00c2":"A","\u1ea6":"A","\u1ea4":"A","\u1eaa":"A","\u1ea8":"A","\u00c3":"A","\u0100":"A","\u0102":"A","\u1eb0":"A","\u1eae":"A","\u1eb4":"A","\u1eb2":"A","\u0226":"A","\u01e0":"A","\u00c4":"A","\u01de":"A","\u1ea2":"A","\u00c5":"A","\u01fa":"A","\u01cd":"A","\u0200":"A","\u0202":"A","\u1ea0":"A","\u1eac":"A","\u1eb6":"A","\u1e00":"A","\u0104":"A","\u023a":"A","\u2c6f":"A", "\ua732":"AA","\u00c6":"AE","\u01fc":"AE","\u01e2":"AE","\ua734":"AO","\ua736":"AU","\ua738":"AV","\ua73a":"AV","\ua73c":"AY","\u24b7":"B","\uff22":"B","\u1e02":"B","\u1e04":"B","\u1e06":"B","\u0243":"B","\u0182":"B","\u0181":"B","\u24b8":"C","\uff23":"C","\u0106":"C","\u0108":"C","\u010a":"C","\u010c":"C","\u00c7":"C","\u1e08":"C","\u0187":"C","\u023b":"C","\ua73e":"C","\u24b9":"D","\uff24":"D","\u1e0a":"D","\u010e":"D","\u1e0c":"D","\u1e10":"D","\u1e12":"D","\u1e0e":"D","\u0110":"D","\u018b":"D", "\u018a":"D","\u0189":"D","\ua779":"D","\u01f1":"DZ","\u01c4":"DZ","\u01f2":"Dz","\u01c5":"Dz","\u24ba":"E","\uff25":"E","\u00c8":"E","\u00c9":"E","\u00ca":"E","\u1ec0":"E","\u1ebe":"E","\u1ec4":"E","\u1ec2":"E","\u1ebc":"E","\u0112":"E","\u1e14":"E","\u1e16":"E","\u0114":"E","\u0116":"E","\u00cb":"E","\u1eba":"E","\u011a":"E","\u0204":"E","\u0206":"E","\u1eb8":"E","\u1ec6":"E","\u0228":"E","\u1e1c":"E","\u0118":"E","\u1e18":"E","\u1e1a":"E","\u0190":"E","\u018e":"E","\u24bb":"F","\uff26":"F","\u1e1e":"F", "\u0191":"F","\ua77b":"F","\u24bc":"G","\uff27":"G","\u01f4":"G","\u011c":"G","\u1e20":"G","\u011e":"G","\u0120":"G","\u01e6":"G","\u0122":"G","\u01e4":"G","\u0193":"G","\ua7a0":"G","\ua77d":"G","\ua77e":"G","\u24bd":"H","\uff28":"H","\u0124":"H","\u1e22":"H","\u1e26":"H","\u021e":"H","\u1e24":"H","\u1e28":"H","\u1e2a":"H","\u0126":"H","\u2c67":"H","\u2c75":"H","\ua78d":"H","\u24be":"I","\uff29":"I","\u00cc":"I","\u00cd":"I","\u00ce":"I","\u0128":"I","\u012a":"I","\u012c":"I","\u0130":"I","\u00cf":"I", "\u1e2e":"I","\u1ec8":"I","\u01cf":"I","\u0208":"I","\u020a":"I","\u1eca":"I","\u012e":"I","\u1e2c":"I","\u0197":"I","\u24bf":"J","\uff2a":"J","\u0134":"J","\u0248":"J","\u24c0":"K","\uff2b":"K","\u1e30":"K","\u01e8":"K","\u1e32":"K","\u0136":"K","\u1e34":"K","\u0198":"K","\u2c69":"K","\ua740":"K","\ua742":"K","\ua744":"K","\ua7a2":"K","\u24c1":"L","\uff2c":"L","\u013f":"L","\u0139":"L","\u013d":"L","\u1e36":"L","\u1e38":"L","\u013b":"L","\u1e3c":"L","\u1e3a":"L","\u0141":"L","\u023d":"L","\u2c62":"L", "\u2c60":"L","\ua748":"L","\ua746":"L","\ua780":"L","\u01c7":"LJ","\u01c8":"Lj","\u24c2":"M","\uff2d":"M","\u1e3e":"M","\u1e40":"M","\u1e42":"M","\u2c6e":"M","\u019c":"M","\u24c3":"N","\uff2e":"N","\u01f8":"N","\u0143":"N","\u00d1":"N","\u1e44":"N","\u0147":"N","\u1e46":"N","\u0145":"N","\u1e4a":"N","\u1e48":"N","\u0220":"N","\u019d":"N","\ua790":"N","\ua7a4":"N","\u01ca":"NJ","\u01cb":"Nj","\u24c4":"O","\uff2f":"O","\u00d2":"O","\u00d3":"O","\u00d4":"O","\u1ed2":"O","\u1ed0":"O","\u1ed6":"O","\u1ed4":"O", "\u00d5":"O","\u1e4c":"O","\u022c":"O","\u1e4e":"O","\u014c":"O","\u1e50":"O","\u1e52":"O","\u014e":"O","\u022e":"O","\u0230":"O","\u00d6":"O","\u022a":"O","\u1ece":"O","\u0150":"O","\u01d1":"O","\u020c":"O","\u020e":"O","\u01a0":"O","\u1edc":"O","\u1eda":"O","\u1ee0":"O","\u1ede":"O","\u1ee2":"O","\u1ecc":"O","\u1ed8":"O","\u01ea":"O","\u01ec":"O","\u00d8":"O","\u01fe":"O","\u0186":"O","\u019f":"O","\ua74a":"O","\ua74c":"O","\u0152":"OE","\u01a2":"OI","\ua74e":"OO","\u0222":"OU","\u24c5":"P","\uff30":"P", "\u1e54":"P","\u1e56":"P","\u01a4":"P","\u2c63":"P","\ua750":"P","\ua752":"P","\ua754":"P","\u24c6":"Q","\uff31":"Q","\ua756":"Q","\ua758":"Q","\u024a":"Q","\u24c7":"R","\uff32":"R","\u0154":"R","\u1e58":"R","\u0158":"R","\u0210":"R","\u0212":"R","\u1e5a":"R","\u1e5c":"R","\u0156":"R","\u1e5e":"R","\u024c":"R","\u2c64":"R","\ua75a":"R","\ua7a6":"R","\ua782":"R","\u24c8":"S","\uff33":"S","\u1e9e":"S","\u015a":"S","\u1e64":"S","\u015c":"S","\u1e60":"S","\u0160":"S","\u1e66":"S","\u1e62":"S","\u1e68":"S", "\u0218":"S","\u015e":"S","\u2c7e":"S","\ua7a8":"S","\ua784":"S","\u24c9":"T","\uff34":"T","\u1e6a":"T","\u0164":"T","\u1e6c":"T","\u021a":"T","\u0162":"T","\u1e70":"T","\u1e6e":"T","\u0166":"T","\u01ac":"T","\u01ae":"T","\u023e":"T","\ua786":"T","\ua728":"TZ","\u24ca":"U","\uff35":"U","\u00d9":"U","\u00da":"U","\u00db":"U","\u0168":"U","\u1e78":"U","\u016a":"U","\u1e7a":"U","\u016c":"U","\u00dc":"U","\u01db":"U","\u01d7":"U","\u01d5":"U","\u01d9":"U","\u1ee6":"U","\u016e":"U","\u0170":"U","\u01d3":"U", "\u0214":"U","\u0216":"U","\u01af":"U","\u1eea":"U","\u1ee8":"U","\u1eee":"U","\u1eec":"U","\u1ef0":"U","\u1ee4":"U","\u1e72":"U","\u0172":"U","\u1e76":"U","\u1e74":"U","\u0244":"U","\u24cb":"V","\uff36":"V","\u1e7c":"V","\u1e7e":"V","\u01b2":"V","\ua75e":"V","\u0245":"V","\ua760":"VY","\u24cc":"W","\uff37":"W","\u1e80":"W","\u1e82":"W","\u0174":"W","\u1e86":"W","\u1e84":"W","\u1e88":"W","\u2c72":"W","\u24cd":"X","\uff38":"X","\u1e8a":"X","\u1e8c":"X","\u24ce":"Y","\uff39":"Y","\u1ef2":"Y","\u00dd":"Y", "\u0176":"Y","\u1ef8":"Y","\u0232":"Y","\u1e8e":"Y","\u0178":"Y","\u1ef6":"Y","\u1ef4":"Y","\u01b3":"Y","\u024e":"Y","\u1efe":"Y","\u24cf":"Z","\uff3a":"Z","\u0179":"Z","\u1e90":"Z","\u017b":"Z","\u017d":"Z","\u1e92":"Z","\u1e94":"Z","\u01b5":"Z","\u0224":"Z","\u2c7f":"Z","\u2c6b":"Z","\ua762":"Z","\u24d0":"a","\uff41":"a","\u1e9a":"a","\u00e0":"a","\u00e1":"a","\u00e2":"a","\u1ea7":"a","\u1ea5":"a","\u1eab":"a","\u1ea9":"a","\u00e3":"a","\u0101":"a","\u0103":"a","\u1eb1":"a","\u1eaf":"a","\u1eb5":"a", "\u1eb3":"a","\u0227":"a","\u01e1":"a","\u00e4":"a","\u01df":"a","\u1ea3":"a","\u00e5":"a","\u01fb":"a","\u01ce":"a","\u0201":"a","\u0203":"a","\u1ea1":"a","\u1ead":"a","\u1eb7":"a","\u1e01":"a","\u0105":"a","\u2c65":"a","\u0250":"a","\ua733":"aa","\u00e6":"ae","\u01fd":"ae","\u01e3":"ae","\ua735":"ao","\ua737":"au","\ua739":"av","\ua73b":"av","\ua73d":"ay","\u24d1":"b","\uff42":"b","\u1e03":"b","\u1e05":"b","\u1e07":"b","\u0180":"b","\u0183":"b","\u0253":"b","\u24d2":"c","\uff43":"c","\u0107":"c", "\u0109":"c","\u010b":"c","\u010d":"c","\u00e7":"c","\u1e09":"c","\u0188":"c","\u023c":"c","\ua73f":"c","\u2184":"c","\u24d3":"d","\uff44":"d","\u1e0b":"d","\u010f":"d","\u1e0d":"d","\u1e11":"d","\u1e13":"d","\u1e0f":"d","\u0111":"d","\u018c":"d","\u0256":"d","\u0257":"d","\ua77a":"d","\u01f3":"dz","\u01c6":"dz","\u24d4":"e","\uff45":"e","\u00e8":"e","\u00e9":"e","\u00ea":"e","\u1ec1":"e","\u1ebf":"e","\u1ec5":"e","\u1ec3":"e","\u1ebd":"e","\u0113":"e","\u1e15":"e","\u1e17":"e","\u0115":"e","\u0117":"e", "\u00eb":"e","\u1ebb":"e","\u011b":"e","\u0205":"e","\u0207":"e","\u1eb9":"e","\u1ec7":"e","\u0229":"e","\u1e1d":"e","\u0119":"e","\u1e19":"e","\u1e1b":"e","\u0247":"e","\u025b":"e","\u01dd":"e","\u24d5":"f","\uff46":"f","\u1e1f":"f","\u0192":"f","\ua77c":"f","\u24d6":"g","\uff47":"g","\u01f5":"g","\u011d":"g","\u1e21":"g","\u011f":"g","\u0121":"g","\u01e7":"g","\u0123":"g","\u01e5":"g","\u0260":"g","\ua7a1":"g","\u1d79":"g","\ua77f":"g","\u24d7":"h","\uff48":"h","\u0125":"h","\u1e23":"h","\u1e27":"h", "\u021f":"h","\u1e25":"h","\u1e29":"h","\u1e2b":"h","\u1e96":"h","\u0127":"h","\u2c68":"h","\u2c76":"h","\u0265":"h","\u0195":"hv","\u24d8":"i","\uff49":"i","\u00ec":"i","\u00ed":"i","\u00ee":"i","\u0129":"i","\u012b":"i","\u012d":"i","\u00ef":"i","\u1e2f":"i","\u1ec9":"i","\u01d0":"i","\u0209":"i","\u020b":"i","\u1ecb":"i","\u012f":"i","\u1e2d":"i","\u0268":"i","\u0131":"i","\u24d9":"j","\uff4a":"j","\u0135":"j","\u01f0":"j","\u0249":"j","\u24da":"k","\uff4b":"k","\u1e31":"k","\u01e9":"k","\u1e33":"k", "\u0137":"k","\u1e35":"k","\u0199":"k","\u2c6a":"k","\ua741":"k","\ua743":"k","\ua745":"k","\ua7a3":"k","\u24db":"l","\uff4c":"l","\u0140":"l","\u013a":"l","\u013e":"l","\u1e37":"l","\u1e39":"l","\u013c":"l","\u1e3d":"l","\u1e3b":"l","\u017f":"l","\u0142":"l","\u019a":"l","\u026b":"l","\u2c61":"l","\ua749":"l","\ua781":"l","\ua747":"l","\u01c9":"lj","\u24dc":"m","\uff4d":"m","\u1e3f":"m","\u1e41":"m","\u1e43":"m","\u0271":"m","\u026f":"m","\u24dd":"n","\uff4e":"n","\u01f9":"n","\u0144":"n","\u00f1":"n", "\u1e45":"n","\u0148":"n","\u1e47":"n","\u0146":"n","\u1e4b":"n","\u1e49":"n","\u019e":"n","\u0272":"n","\u0149":"n","\ua791":"n","\ua7a5":"n","\u01cc":"nj","\u24de":"o","\uff4f":"o","\u00f2":"o","\u00f3":"o","\u00f4":"o","\u1ed3":"o","\u1ed1":"o","\u1ed7":"o","\u1ed5":"o","\u00f5":"o","\u1e4d":"o","\u022d":"o","\u1e4f":"o","\u014d":"o","\u1e51":"o","\u1e53":"o","\u014f":"o","\u022f":"o","\u0231":"o","\u00f6":"o","\u022b":"o","\u1ecf":"o","\u0151":"o","\u01d2":"o","\u020d":"o","\u020f":"o","\u01a1":"o", "\u1edd":"o","\u1edb":"o","\u1ee1":"o","\u1edf":"o","\u1ee3":"o","\u1ecd":"o","\u1ed9":"o","\u01eb":"o","\u01ed":"o","\u00f8":"o","\u01ff":"o","\u0254":"o","\ua74b":"o","\ua74d":"o","\u0275":"o","\u0153":"oe","\u01a3":"oi","\u0223":"ou","\ua74f":"oo","\u24df":"p","\uff50":"p","\u1e55":"p","\u1e57":"p","\u01a5":"p","\u1d7d":"p","\ua751":"p","\ua753":"p","\ua755":"p","\u24e0":"q","\uff51":"q","\u024b":"q","\ua757":"q","\ua759":"q","\u24e1":"r","\uff52":"r","\u0155":"r","\u1e59":"r","\u0159":"r","\u0211":"r", "\u0213":"r","\u1e5b":"r","\u1e5d":"r","\u0157":"r","\u1e5f":"r","\u024d":"r","\u027d":"r","\ua75b":"r","\ua7a7":"r","\ua783":"r","\u24e2":"s","\uff53":"s","\u00df":"s","\u015b":"s","\u1e65":"s","\u015d":"s","\u1e61":"s","\u0161":"s","\u1e67":"s","\u1e63":"s","\u1e69":"s","\u0219":"s","\u015f":"s","\u023f":"s","\ua7a9":"s","\ua785":"s","\u1e9b":"s","\u24e3":"t","\uff54":"t","\u1e6b":"t","\u1e97":"t","\u0165":"t","\u1e6d":"t","\u021b":"t","\u0163":"t","\u1e71":"t","\u1e6f":"t","\u0167":"t","\u01ad":"t", "\u0288":"t","\u2c66":"t","\ua787":"t","\ua729":"tz","\u24e4":"u","\uff55":"u","\u00f9":"u","\u00fa":"u","\u00fb":"u","\u0169":"u","\u1e79":"u","\u016b":"u","\u1e7b":"u","\u016d":"u","\u00fc":"u","\u01dc":"u","\u01d8":"u","\u01d6":"u","\u01da":"u","\u1ee7":"u","\u016f":"u","\u0171":"u","\u01d4":"u","\u0215":"u","\u0217":"u","\u01b0":"u","\u1eeb":"u","\u1ee9":"u","\u1eef":"u","\u1eed":"u","\u1ef1":"u","\u1ee5":"u","\u1e73":"u","\u0173":"u","\u1e77":"u","\u1e75":"u","\u0289":"u","\u24e5":"v","\uff56":"v", "\u1e7d":"v","\u1e7f":"v","\u028b":"v","\ua75f":"v","\u028c":"v","\ua761":"vy","\u24e6":"w","\uff57":"w","\u1e81":"w","\u1e83":"w","\u0175":"w","\u1e87":"w","\u1e85":"w","\u1e98":"w","\u1e89":"w","\u2c73":"w","\u24e7":"x","\uff58":"x","\u1e8b":"x","\u1e8d":"x","\u24e8":"y","\uff59":"y","\u1ef3":"y","\u00fd":"y","\u0177":"y","\u1ef9":"y","\u0233":"y","\u1e8f":"y","\u00ff":"y","\u1ef7":"y","\u1e99":"y","\u1ef5":"y","\u01b4":"y","\u024f":"y","\u1eff":"y","\u24e9":"z","\uff5a":"z","\u017a":"z","\u1e91":"z", "\u017c":"z","\u017e":"z","\u1e93":"z","\u1e95":"z","\u01b6":"z","\u0225":"z","\u0240":"z","\u2c6c":"z","\ua763":"z","\u0386":"\u0391","\u0388":"\u0395","\u0389":"\u0397","\u038a":"\u0399","\u03aa":"\u0399","\u038c":"\u039f","\u038e":"\u03a5","\u03ab":"\u03a5","\u038f":"\u03a9","\u03ac":"\u03b1","\u03ad":"\u03b5","\u03ae":"\u03b7","\u03af":"\u03b9","\u03ca":"\u03b9","\u0390":"\u03b9","\u03cc":"\u03bf","\u03cd":"\u03c5","\u03cb":"\u03c5","\u03b0":"\u03c5","\u03ce":"\u03c9","\u03c2":"\u03c3","\u2019":"'"}}), r.define("select2/data/base",["../utils"],function(a){function b(a,c){b.__super__.constructor.call(this)}return a.Extend(b,a.Observable),b.prototype.current=function(a){throw Error("The `current` method must be defined in child classes.");},b.prototype.query=function(a,b){throw Error("The `query` method must be defined in child classes.");},b.prototype.bind=function(a,b){},b.prototype.destroy=function(){},b.prototype.generateResultId=function(b,c){b=b.id+"-result-";return b+=a.generateChars(4),null!=c.id?b+="-"+c.id.toString():b+="-"+a.generateChars(4),b},b}),r.define("select2/data/select",["./base","../utils","jquery"],function(a,b,c){function d(a,b){this.$element=a;this.options=b;d.__super__.constructor.call(this)}return b.Extend(d,a),d.prototype.current=function(a){var b=this;a(Array.prototype.map.call(this.$element[0].querySelectorAll(":checked"),function(a){return b.item(c(a))}))},d.prototype.select=function(a){var b,c=this;if(a.selected=!0,null!=a.element&&"option"===a.element.tagName.toLowerCase())return a.element.selected= !0,void this.$element.trigger("input").trigger("change");this.$element.prop("multiple")?this.current(function(b){var d=[];(a=[a]).push.apply(a,b);for(b=0;bthis.maximumInputLength?this.trigger("results:message",{message:"inputTooLong",args:{maximum:this.maximumInputLength,input:b.term,params:b}}):a.call(this,b,c)},a}),r.define("select2/data/maximumSelectionLength",[],function(){function a(a,b,c){this.maximumSelectionLength=c.get("maximumSelectionLength");a.call(this,b,c)}return a.prototype.bind= function(a,b,c){var d=this;a.call(this,b,c);b.on("select",function(){d._checkIfMaximumSelected()})},a.prototype.query=function(a,b,c){var d=this;this._checkIfMaximumSelected(function(){a.call(d,b,c)})},a.prototype._checkIfMaximumSelected=function(a,b){var c=this;this.current(function(a){a=null!=a?a.length:0;0=c.maximumSelectionLength?c.trigger("results:message",{message:"maximumSelected",args:{maximum:c.maximumSelectionLength}}):b&&b()})},a}),r.define("select2/dropdown", ["jquery","./utils"],function(a,b){function c(a,b){this.$element=a;this.options=b;c.__super__.constructor.call(this)}return b.Extend(c,b.Observable),c.prototype.render=function(){var b=a('');return b.attr("dir",this.options.get("dir")),this.$dropdown=b},c.prototype.bind=function(){},c.prototype.position=function(a,b){},c.prototype.destroy=function(){this.$dropdown.remove()},c}),r.define("select2/dropdown/search",["jquery"], function(a){function b(){}return b.prototype.render=function(b){var c=b.call(this),d=this.options.get("translations").get("search");b=a('');return this.$searchContainer=b,this.$search=b.find("input"),this.$search.prop("autocomplete",this.options.get("autocomplete")),this.$search.attr("aria-label", d()),c.prepend(b),c},b.prototype.bind=function(b,c,d){var e=this,f=c.id+"-results";b.call(this,c,d);this.$search.on("keydown",function(a){e.trigger("keypress",a);e._keyUpPrevented=a.isDefaultPrevented()});this.$search.on("input",function(b){a(this).off("keyup")});this.$search.on("keyup input",function(a){e.handleSearch(a)});c.on("open",function(){e.$search.attr("tabindex",0);e.$search.attr("aria-controls",f);e.$search.trigger("focus");window.setTimeout(function(){e.$search.trigger("focus")},0)}); c.on("close",function(){e.$search.attr("tabindex",-1);e.$search.removeAttr("aria-controls");e.$search.removeAttr("aria-activedescendant");e.$search.val("");e.$search.trigger("blur")});c.on("focus",function(){c.isOpen()||e.$search.trigger("focus")});c.on("results:all",function(a){null!=a.query.term&&""!==a.query.term||(e.showSearch(a)?e.$searchContainer[0].classList.remove("select2-search--hide"):e.$searchContainer[0].classList.add("select2-search--hide"))});c.on("results:focus",function(a){a.data._resultId? e.$search.attr("aria-activedescendant",a.data._resultId):e.$search.removeAttr("aria-activedescendant")})},b.prototype.handleSearch=function(a){var b;this._keyUpPrevented||(b=this.$search.val(),this.trigger("query",{term:b}));this._keyUpPrevented=!1},b.prototype.showSearch=function(a,b){return!0},b}),r.define("select2/dropdown/hidePlaceholder",[],function(){function a(a,b,c,d){this.placeholder=this.normalizePlaceholder(c.get("placeholder"));a.call(this,b,c,d)}return a.prototype.append=function(a,b){b.results= this.removePlaceholder(b.results);a.call(this,b)},a.prototype.normalizePlaceholder=function(a,b){return"string"==typeof b&&(b={id:"",text:b}),b},a.prototype.removePlaceholder=function(a,b){a=b.slice(0);for(var c=b.length-1;0<=c;c--)this.placeholder.id===b[c].id&&a.splice(c,1);return a},a}),r.define("select2/dropdown/infiniteScroll",["jquery"],function(a){function b(a,b,c,d){this.lastParams={};a.call(this,b,c,d);this.$loadingMore=this.createLoadingMore();this.loading=!1}return b.prototype.append=function(a, b){this.$loadingMore.remove();this.loading=!1;a.call(this,b);this.showLoadingMore(b)&&(this.$results.append(this.$loadingMore),this.loadMoreIfNeeded())},b.prototype.bind=function(a,b,c){var d=this;a.call(this,b,c);b.on("query",function(a){d.lastParams=a;d.loading=!0});b.on("query:append",function(a){d.lastParams=a;d.loading=!0});this.$results.on("scroll",this.loadMoreIfNeeded.bind(this))},b.prototype.loadMoreIfNeeded=function(){var b=a.contains(document.documentElement,this.$loadingMore[0]);!this.loading&& b&&(b=this.$results.offset().top+this.$results.outerHeight(!1),this.$loadingMore.offset().top+this.$loadingMore.outerHeight(!1)<=b+50&&this.loadMore())},b.prototype.loadMore=function(){this.loading=!0;var b=a.extend({},{page:1},this.lastParams);b.page++;this.trigger("query:append",b)},b.prototype.showLoadingMore=function(a,b){return b.pagination&&b.pagination.more},b.prototype.createLoadingMore=function(){var b=a('
  • '), c=this.options.get("translations").get("loadingMore");return b.html(c(this.lastParams)),b},b}),r.define("select2/dropdown/attachBody",["jquery","../utils"],function(a,b){function c(b,c,d){this.$dropdownParent=a(d.get("dropdownParent")||document.body);b.call(this,c,d)}return c.prototype.bind=function(a,b,c){var d=this;a.call(this,b,c);b.on("open",function(){d._showDropdown();d._attachPositioningHandler(b);d._bindContainerResultHandlers(b)});b.on("close",function(){d._hideDropdown();d._detachPositioningHandler(b)}); this.$dropdownContainer.on("mousedown",function(a){a.stopPropagation()})},c.prototype.destroy=function(a){a.call(this);this.$dropdownContainer.remove()},c.prototype.position=function(a,b,c){b.attr("class",c.attr("class"));b[0].classList.remove("select2");b[0].classList.add("select2-container--open");b.css({position:"absolute",top:-999999});this.$container=c},c.prototype.render=function(b){var c=a("");b=b.call(this);return c.append(b),this.$dropdownContainer=c},c.prototype._hideDropdown= function(a){this.$dropdownContainer.detach()},c.prototype._bindContainerResultHandlers=function(a,b){var c;this._containerResultsHandlersBound||(c=this,b.on("results:all",function(){c._positionDropdown();c._resizeDropdown()}),b.on("results:append",function(){c._positionDropdown();c._resizeDropdown()}),b.on("results:message",function(){c._positionDropdown();c._resizeDropdown()}),b.on("select",function(){c._positionDropdown();c._resizeDropdown()}),b.on("unselect",function(){c._positionDropdown();c._resizeDropdown()}), this._containerResultsHandlersBound=!0)},c.prototype._attachPositioningHandler=function(c,d){var e=this;c="scroll.select2."+d.id;var f="resize.select2."+d.id,h="orientationchange.select2."+d.id;d=this.$container.parents().filter(b.hasScroll);d.each(function(){b.StoreData(this,"select2-scroll-position",{x:a(this).scrollLeft(),y:a(this).scrollTop()})});d.on(c,function(c){c=b.GetData(this,"select2-scroll-position");a(this).scrollTop(c.y)});a(window).on(c+" "+f+" "+h,function(a){e._positionDropdown(); e._resizeDropdown()})},c.prototype._detachPositioningHandler=function(c,d){c="scroll.select2."+d.id;var e="resize.select2."+d.id;d="orientationchange.select2."+d.id;this.$container.parents().filter(b.hasScroll).off(c);a(window).off(c+" "+e+" "+d)},c.prototype._positionDropdown=function(){var b=a(window),c=this.$dropdown[0].classList.contains("select2-dropdown--above"),d=this.$dropdown[0].classList.contains("select2-dropdown--below"),e=null,f=this.$container.offset();f.bottom=f.top+this.$container.outerHeight(!1); var h=this.$container.outerHeight(!1);var l=f.top;h=f.top+h;var m=this.$dropdown.outerHeight(!1),k=b.scrollTop(),t=b.scrollTop()+b.height(),n=kf.bottom+m;k={left:f.left,top:h};t=this.$dropdownParent;"static"===t.css("position")&&(t=t.offsetParent());f={top:0,left:0};(a.contains(document.body,t[0])||t[0].isConnected)&&(f=t.offset());k.top-=f.top;k.left-=f.left;c||d||(e="below");b||!n||c?!n&&b&&c&&(e="below"):e="above";("above"==e||c&&"below"!==e)&&(k.top=l-f.top-m);null!=e&&(this.$dropdown[0].classList.remove("select2-dropdown--below"), this.$dropdown[0].classList.remove("select2-dropdown--above"),this.$dropdown[0].classList.add("select2-dropdown--"+e),this.$container[0].classList.remove("select2-container--below"),this.$container[0].classList.remove("select2-container--above"),this.$container[0].classList.add("select2-container--"+e));this.$dropdownContainer.css(k)},c.prototype._resizeDropdown=function(){var a={width:this.$container.outerWidth(!1)+"px"};this.options.get("dropdownAutoWidth")&&(a.minWidth=a.width,a.position="relative", a.width="auto");this.$dropdown.css(a)},c.prototype._showDropdown=function(a){this.$dropdownContainer.appendTo(this.$dropdownParent);this._positionDropdown();this._resizeDropdown()},c}),r.define("select2/dropdown/minimumResultsForSearch",[],function(){function a(a,b,c,d){this.minimumResultsForSearch=c.get("minimumResultsForSearch");0>this.minimumResultsForSearch&&(this.minimumResultsForSearch=1/0);a.call(this,b,c,d)}return a.prototype.showSearch=function(a,b){return!(function g(a){for(var b=0,c=0;c< a.length;c++){var d=a[c];d.children?b+=g(d.children):b++}return b}(b.data.results)b.length||null!=(b=a.GetData(b[0],"data")).element&&b.element.selected||null==b.element&&b.selected||this.trigger("select",{data:b})},b}),r.define("select2/dropdown/closeOnSelect",[],function(){function a(){}return a.prototype.bind=function(a,b,c){var d=this;a.call(this,b,c);b.on("select",function(a){d._selectTriggered(a)});b.on("unselect",function(a){d._selectTriggered(a)})},a.prototype._selectTriggered=function(a,b){(a=b.originalEvent)&&(a.ctrlKey||a.metaKey)||this.trigger("close",{originalEvent:a, originalSelect2Event:b})},a}),r.define("select2/dropdown/dropdownCss",["../utils"],function(a){function b(){}return b.prototype.render=function(b){var c=b.call(this);b=this.options.get("dropdownCssClass")||"";return-1!==b.indexOf(":all:")&&(b=b.replace(":all:",""),a.copyNonInternalCssClasses(c[0],this.$element[0])),c.addClass(b),c},b}),r.define("select2/dropdown/tagsSearchHighlight",["../utils"],function(a){function b(){}return b.prototype.highlightFirstItem=function(b){var c=this.$results.find(".select2-results__option--selectable:not(.select2-results__option--selected)"); if(0=c?"auto":c+"px"; if("style"!=b)return"computedstyle"!=b?b:window.getComputedStyle(a[0]).width;a=a.attr("style");if("string"!=typeof a)return null;a=a.split(";");b=0;for(var d=a.length;b');return b.attr("dir",this.options.get("dir")),this.$container=b,this.$container[0].classList.add("select2-container--"+this.options.get("theme")),c.StoreData(b[0],"element",this.$element),b},e}),r.define("select2/dropdown/attachContainer",[],function(){function a(a,b,c){a.call(this,b,c)}return a.prototype.position=function(a, b,c){c.find(".dropdown-wrapper").append(b);b[0].classList.add("select2-dropdown--below");c[0].classList.add("select2-container--below")},a}),r.define("select2/dropdown/stopPropagation",[],function(){function a(){}return a.prototype.bind=function(a,b,c){a.call(this,b,c);this.$dropdown.on("blur change click dblclick focus focusin focusout input keydown keyup keypress mousedown mouseenter mouseleave mousemove mouseover mouseup search touchend touchstart",function(a){a.stopPropagation()})},a}),r.define("select2/selection/stopPropagation", [],function(){function a(){}return a.prototype.bind=function(a,b,c){a.call(this,b,c);this.$selection.on("blur change click dblclick focus focusin focusout input keydown keyup keypress mousedown mouseenter mouseleave mousemove mouseover mouseup search touchend touchstart",function(a){a.stopPropagation()})},a}),A=function(a){function b(b){var h,g=b||window.event,l=k.call(arguments,1),m,u=0,q=0,p=0,r=0,t=0;if(b=a.event.fix(g),b.type="mousewheel","detail"in g&&(q=-1*g.detail),"wheelDelta"in g&&(q=g.wheelDelta), "wheelDeltaY"in g&&(q=g.wheelDeltaY),"wheelDeltaX"in g&&(u=-1*g.wheelDeltaX),"axis"in g&&g.axis===g.HORIZONTAL_AXIS&&(u=-1*q,q=0),m=0===q?u:q,"deltaY"in g&&(m=q=-1*g.deltaY),"deltaX"in g&&(u=g.deltaX,0===q&&(m=-1*u)),0!==q||0!==u)return 1===g.deltaMode?(m*=h=a.data(this,"mousewheel-line-height"),q*=h,u*=h):2===g.deltaMode&&(m*=h=a.data(this,"mousewheel-page-height"),q*=h,u*=h),p=Math.max(Math.abs(q),Math.abs(u)),(!f||p{{text}}\n ',props:{classes:[],link:"",text:""}});new CloudLibraryVue({el:"#tdb-modal",router:window.tdbVue.router})}window.tdbVueManager&&"undefined"!==typeof window.tdbVueManager.router&&new CloudLibraryVue({el:"#tdb-modal-website-manager",router:window.tdbVueManager.router}); (function(){function a(a,c,e,f,h,l,k){var b=jQuery(".tdb-"+a+"-templates");b.length&&"undefined"===typeof b.data("tdb-templates")&&("undefined"!==typeof l&&l.call(),tdbGetMobileTemplates(a,c,b),l="","undefined"!==typeof tdcState&&(l=tdcState.isMobileComposer()?"1":""),l={action:"tdb_get_"+a+"_templates",mobile_templates:l,_nonce:window.tdb_globals.wpRestNonce},l[a+"_id"]=c,jQuery.ajax({type:"POST",url:td_ajax_url,data:l,success:function(d,l,m){b.html("");d=jQuery.parseJSON(d);l='
    Cloud Templates
    '+ ("undefined"!==typeof f&&!0===f?'
    Global
    ':"")+'
    Mobile Template
    ';var n=m="",u=!1;_.isArray(d)&&d.length?(_.each(d,function(b,d,l){d="";"true"===b.is_current.toString()&&(d=" tdb-current",u=!0);d='
    '+b.template_id+'
    '+b.template_title+'
    Rename
    Duplicate
    Delete
    '; "undefined"!==typeof f&&!0===f&&(l="","undefined"!==typeof h&&""!==h&&(l='data-global-action="'+h+'"'),d+='
    Global
    '); d+='
    '+(""===b.mobile_template_title?"-":'Yes')+'
    ';n+=d+"
    "}),"undefined"!==typeof f&&!0===f&&(m+='
    Global Template
    '),b.append(m+l+n)):(b.append(l),b.append('
    No cloud templates. Please import one or more templates from Cloud Library.
    '));b.data("tdb-templates",!0);"undefined"!==typeof k&&k.call()},error:function(a,b,c){}}))}function c(a,c,e){var b=jQuery(window);b.resize(function(){var d=b.width();a.offset().left+c.width()>d?c.hasClass(e)||c.addClass(e): c.hasClass(e)&&c.removeClass(e)});b.resize()}jQuery(document).ready(function(){jQuery("#wp-admin-bar-tdb_template_builder_disabled a").click(function(a){a.preventDefault();alert("Please select tagDiv Builder Template from the theme panel or set a default template. The current page/post uses a template that is not editable.")});jQuery("#wp-admin-bar-new-tdb_templates").hide()});jQuery("body").on("click","#wp-admin-bar-tdb_template_load, .tdb-load-mobile-template",function(a){a.preventDefault();var b= jQuery(this),c=b.attr("class");a="";var f=!1;b.hasClass("tdb-load-mobile-template")&&(f=!0);"undefined"!==typeof c&&(0===c.indexOf("singleid-")?(a={wp_type:"single",templateType:"Single"},b=c.split(" ")[0].replace("singleid-",""),f?a.assign_mobile_to_template=b:a.assign_to_post=b):0===c.indexOf("categoryid-")?(a={wp_type:"category",templateType:"Category"},b=c.split(" ")[0].replace("categoryid-",""),f?a.assign_mobile_to_template=b:a.assign_to_category=b):0===c.indexOf("404")?(a={wp_type:"404",templateType:"404"}, b=btoa(window.location.href),f?a.assign_mobile_to_template=b:a.assign_to_404=b):0===c.indexOf("date")?(a={wp_type:"date",templateType:"Date"},b=btoa(window.location.href),f?a.assign_mobile_to_template=b:a.assign_to_archive=b):0===c.indexOf("search")?(a={wp_type:"search",templateType:"Search"},b=btoa(window.location.href),f?a.assign_mobile_to_template=b:a.assign_to_search=b):0===c.indexOf("attachment")?(a={wp_type:"attachment",templateType:"Attachment"},b=btoa(window.location.href),f?a.assign_mobile_to_template= b:a.assign_to_attachment=b):0===c.indexOf("authorid")?(a={wp_type:"author",templateType:"Author"},b=c.split(" ")[0].replace("authorid-",""),f?a.assign_mobile_to_template=b:a.assign_to_author=b):0===c.indexOf("tagid")?(a={wp_type:"tag",templateType:"Tag"},b=c.split(" ")[0].replace("tagid-",""),f?a.assign_mobile_to_template=b:a.assign_to_tag=b):0===c.indexOf("pageid")?(a={wp_type:"page",templateType:"Pages"},b=c.split(" ")[0].replace("pageid-",""),f&&(a.assign_mobile_to_template=b)):0===c.indexOf("woo_productid-")? (a={wp_type:"woo_product",templateType:"Woo Product"},b=c.split(" ")[0].replace("woo_productid-",""),f?a.assign_mobile_to_template=b:a.assign_to_woo_product=b):0===c.indexOf("woo_archive")?(a={wp_type:"woo_archive",templateType:"Woo Archive"},b=btoa(window.location.href),f?a.assign_mobile_to_template=b:a.assign_to_search=b):0===c.indexOf("woo_search_archive")?(a={wp_type:"woo_search_archive",templateType:"Woo Search"},b=btoa(window.location.href),f?a.assign_mobile_to_template=b:a.assign_to_search= b):0===c.indexOf("woo_shop_base")?(a={wp_type:"woo_shop_base",templateType:"Woo Shop Base"},b=btoa(window.location.href),f?a.assign_mobile_to_template=b:a.assign_to_search=b):0===c.indexOf("cpt_tax")?(a={wp_type:"cpt_tax",templateType:"Custom Taxonomy"},b=c.split(" ")[0].replace("templateid-",""),f?a.assign_mobile_to_template=b:a.assign_to_cpt_tax=b):0===c.indexOf("cpt")&&(a={wp_type:"cpt",templateType:"Custom Post Type"},b=c.split(" ")[0].replace("cptid-",""),f?a.assign_mobile_to_template=b:a.assign_to_cpt= b),""!==a&&(a.hide_mobile_selector="hide",window.tdbVue.router.push({name:"loadRoute",params:a})))}).on("click",".tdb-create-mobile-template",function(a){var b=jQuery(this),c=b.data("template-id"),f=b.data("type");tdConfirm.modal({caption:"Create Mobile "+("page"===f?"Page":"Template"),objectContext:window,callbackYes:function(){var a=jQuery("#tdb-new-template-name"),d=jQuery("#tdb-copy-content");jQuery.ajax({type:"POST",url:td_ajax_url,data:{action:"tdb_create_mobile_template",template_id:c,template_title:a.val(), template_type:f,copyContent:d.is(":checked")?"1":"0",_nonce:window.tdb_globals.wpRestNonce},success:function(a,d,e){a=jQuery.parseJSON(a);"undefined"!==typeof a.mobile_template_id&&(tdConfirm.close(),d=b.closest(".tdb-template-el"),d.length&&(e=d.find(".tdb-template-el-mobile:first"),d.find(".tdb-template-el-mobile-btns:first").data("mobile-template-id",a.mobile_template_id),e.html('Yes')),tdbGetMobileTemplates(f,c))},error:function(a,b,c){}})},htmlInfoContent:"Enter the mobile "+ ("page"===f?"page":"template")+' name:
    ',textYes:"Create",textNo:"Cancel"})}).on("click", "#wp-admin-bar-tdb_template_single > a, #wp-admin-bar-tdb_template_category > a, #wp-admin-bar-tdb_template_404 > a, #wp-admin-bar-tdb_template_date > a, #wp-admin-bar-tdb_template_search > a, #wp-admin-bar-tdb_template_attachment > a, #wp-admin-bar-tdb_template_author > a, #wp-admin-bar-tdb_template_tag > a, #wp-admin-bar-tdb_template_woo_product > a, #wp-admin-bar-tdb_template_woo_archive > a, #wp-admin-bar-tdb_template_woo_shop_base > a, #wp-admin-bar-tdb_template_woo_search_archive > a, #wp-admin-bar-tdb_template_cpt > a, #wp-admin-bar-tdb_template_cpt_tax > a", function(b){b.preventDefault();var d=jQuery(this),e=d.parent(),f=e.attr("class"),h="",l="",k="",m="";switch(e.attr("id")){case "wp-admin-bar-tdb_template_single":h="single";l="tdb_assign_single_template_to_post";k="tdb_assign_single_template_global";m=f.replace(h+"id-","");break;case "wp-admin-bar-tdb_template_category":h="category";l="tdb_assign_cat_template_to_cat";k="tdb_assign_cat_template_global";m=f.replace(h+"id-","");break;case "wp-admin-bar-tdb_template_404":h="404";l="tdb_assign_404_template_global"; k="";m=f.replace("templateid-","");break;case "wp-admin-bar-tdb_template_date":h="date";l="tdb_assign_date_template_global";k="";m=f.replace("templateid-","");break;case "wp-admin-bar-tdb_template_search":h="search";l="tdb_assign_search_template_global";k="";m=f.replace("templateid-","");break;case "wp-admin-bar-tdb_template_attachment":h="attachment";l="tdb_assign_attachment_template_global";k="";m=f.replace("templateid-","");break;case "wp-admin-bar-tdb_template_author":h="author";l="tdb_assign_author_template_to_author"; k="tdb_assign_author_template_global";m=f.replace(h+"id-","");break;case "wp-admin-bar-tdb_template_tag":h="tag";l="tdb_assign_tag_template_to_tag";k="tdb_assign_tag_template_global";m=f.replace(h+"id-","");break;case "wp-admin-bar-tdb_template_woo_product":h="woo_product";l="tdb_assign_woo_product_template_to_product";k="tdb_assign_woo_product_template_global";m=f.replace(h+"id-","");break;case "wp-admin-bar-tdb_template_woo_archive":h="woo_archive";l="tdb_assign_woo_archive_template_to_tax";k="tdb_assign_woo_archive_template_global"; m=f.replace(h+"id-","");break;case "wp-admin-bar-tdb_template_woo_search_archive":h="woo_search_archive";l="tdb_assign_woo_search_archive_template_global";k="";m=f.replace("templateid-","");break;case "wp-admin-bar-tdb_template_woo_shop_base":h="woo_shop_base";l="tdb_assign_woo_shop_base_template_global";k="";m=f.replace("templateid-","");break;case "wp-admin-bar-tdb_template_cpt":h="cpt";l="tdb_assign_cpt_template_to_cpt";k="tdb_assign_cpt_template_global";m=f.replace(h+"id-","");break;case "wp-admin-bar-tdb_template_cpt_tax":h= "cpt_tax",l="tdb_assign_cpt_tax_template_to_tax",k="tdb_assign_cpt_tax_template_global",m=f.replace("templateid-","")}var n=jQuery(".tdb-"+h+"-templates");n.length?b.currentTarget===this&&jQuery(b.target).parent().attr("id")==="wp-admin-bar-tdb_template_"+h&&(n.toggle(),d.toggleClass("tdb-templates-open"),d.toggleClass("tdb-templates-close")):(d.addClass("tdb-templates-loading"),n=jQuery('
    '),n.insertAfter(d),n.show());a(h,m,l, ""===k?!1:!0,k,void 0,function(){d.removeClass("tdb-templates-loading");d.addClass("tdb-templates-open");c(d,n,"tdb-templates-align-right")})}).on("click","#wp-admin-bar-tdc_page_mobile_template > a",function(a){a.preventDefault();var b=jQuery(this);a=b.parent().attr("class").replace("pageid-","");var e=jQuery("#tdb-mobile-templates");e.length?(e.toggle(),b.toggleClass("tdb-templates-open"),b.toggleClass("tdb-templates-close")):(b.addClass("tdb-templates-loading"),b.addClass("tdb-templates-open"), tdbGetMobileTemplates("page",a,b,void 0,function(){b.removeClass("tdb-templates-loading");jQuery("#tdb-mobile-templates").show();c(b,jQuery("#tdb-mobile-templates"),"tdb-mobile-templates-align-right")}))}).on("click","#wp-admin-bar-tdc_create_mobile_page",function(a){var b=jQuery(this).attr("class").split(" ")[0].replace("pageid-","");tdConfirm.modal({caption:"Create Mobile Page",objectContext:window,callbackYes:function(){var a=jQuery("#tdb-new-template-name"),c=jQuery("#tdb-copy-content");jQuery.ajax({type:"POST", url:td_ajax_url,data:{action:"tdb_create_mobile_template",template_id:b,template_title:a.val(),template_type:"page",copyContent:c.is(":checked")?"1":"0",_nonce:window.tdb_globals.wpRestNonce},success:function(c,d,e){"undefined"!==typeof jQuery.parseJSON(c).mobile_template_id&&(tdConfirm.close(),c=jQuery("#wp-admin-bar-tdc_page_mobile_template"),c.length&&c.find("a:first").html('Mobile page'+a.val()),tdbGetMobileTemplates("page",b))},error:function(a,b,c){}})}, htmlInfoContent:'Enter the mobile page name:
    ',textYes:"Create",textNo:"Cancel"})}).on("click", ".tdb-single-template-global label, .tdb-category-template-global label, .tdb-author-template-global label, .tdb-tag-template-global label, .tdb-woo_product-template-global label, .tdb-woo_archive-template-global label, .tdb-cpt-template-global label, .tdb-cpt_tax-template-global label ",function(a){a.preventDefault();a=jQuery(this);var b=a.closest(".tdb-template-el-global"),c=b.data("type"),f=b.data("global-action");b=a.parent().data(c+"-id");var h=a.parent().data("template-id"),l=jQuery(".tdb-templates"); a={action:f,template_id:h,_nonce:window.tdb_globals.wpRestNonce};switch(c){case "single":a.single_id=b;break;case "category":a.category_id=b;break;case "tag":a.tag_id=b;break;case "author":a.author_id=b;break;case "woo_product":a.woo_product_id=b;break;case "woo_archive":a.woo_term_id=b;break;case "cpt":a.cpt_id=b;break;case "cpt_tax":a.cpt_tax_id=b}jQuery.ajax({type:"POST",url:td_ajax_url,data:a,success:function(a,b,d){a=jQuery.parseJSON(a);"undefined"!==typeof a.reload&&window.location.reload(); "undefined"!==typeof a.global_template_id&&(l.find(".tdb-"+c+'-template-global > input[type="checkbox"]').removeAttr("checked"),l.find(".tdb-"+c+'-template-global[data-template-id="'+h+'"] > input[type="checkbox"]').attr("checked",!0))},error:function(a,b,c){}});return!1}).on("click",".tdb-template-el-title",function(a){a.preventDefault();if(a.target===a.currentTarget){a=jQuery(this);var b=a.data("action"),c=a.data("type"),f=a.data(c+"-id"),h=a.data("template-id");b={action:b,template_id:h,_nonce:window.tdb_globals.wpRestNonce}; "cpt"===c?b.cpt=a.data("cpt-id"):"cpt_tax"===c&&(b.cpt_tax=a.data("cpt_tax-id"));switch(c){case "single":b.single_id=f;break;case "category":b.category_id=f;break;case "author":b.author_id=f;break;case "tag":b.tag_id=f;break;case "woo_product":b.woo_product_id=f;break;case "woo_archive":b.woo_term_id=f;break;case "cpt":b.cpt_id=f;break;case "cpt_tax":b.cpt_tax_id=f}jQuery.ajax({type:"POST",url:td_ajax_url,data:b,success:function(a,b,d){"undefined"===typeof jQuery.parseJSON(a).reload&&"cpt"!==c&&"cpt_tax"!==c||window.location.reload()},error:function(a,b,c){}});return!1}}).on("change",".tdb-template-el-title-input",function(a){a.preventDefault();a=jQuery(this);var b=a.closest(".tdb-templates"),c=a.closest(".tdb-template-el"),f=c.find(".tdb-template-el-title:first");b.data("type");b=c.data("template-id");f.html();jQuery.ajax({type:"POST",url:td_ajax_url,data:{action:"tdb_change_template_name",template_id:b,template_title:a.val(),_nonce:window.tdb_globals.wpRestNonce},success:function(a,b,c){a=jQuery.parseJSON(a); "undefined"!==typeof a.template_id&&(f.html(a.template_title),f.removeData("title"))},error:function(a,b,c){}})}).on("click",".tdb-template-el-edit",function(a){a.preventDefault();var b=jQuery(this);a=b.closest(".tdb-templates");var c=b.closest(".tdb-template-el");b=c.find(".tdb-template-el-title:first");a.data("type");c.data("template-id");c=b.html();"undefined"===typeof b.data("title")&&(a.find(".tdb-template-el-title").each(function(a,b){a=jQuery(b);b=a.data("title");"undefined"!==typeof b&&(a.html(b), a.removeData("title"))}),b.data("title",b.html()),b.html(''),b.find("input").focus().select())}).on("click",".tdb-template-el-duplicate",function(b){b.preventDefault();b=jQuery(this);var c=b.closest(".tdb-templates"),e=b.closest(".tdb-template-el"),f=e.find(".tdb-template-el-title:first"),h=c.data("type");b=e.data("template-id");var l=f.html(),k=f.data(h+"-id"),m=f.data("action"),n="";0<="single category tag author woo_product woo_archive".split(" ").indexOf(h)&& (e=e.find(".tdb-template-el-global:first"),e.length&&(n=e.data("global-action")));tdbApi.run({wpNonce:window.tdb_globals.wpRestNonce,cloudEndPoint:"td-cloud-library/new_template",post:{postId:b,templateType:h,templateName:l,duplicateTemplate:!0},done:function(b){c.removeData("tdb-templates");a(h,0<="single category tag author woo_product woo_archive cpt".split(" ").indexOf(h)?k:"",m,""===n?!1:!0,n)},error:function(a){console.log("td-cloud-library/new_template(duplicate template) - ERROR",a)}}); jQuery(".tdb-template-el-title-input").trigger("change")}).on("keyup",".tdb-template-el-title-input",function(a){27===a.keyCode&&jQuery(this).trigger("change")}).on("click",".tdb-template-el-delete",function(a){a=jQuery(this);a.closest(".tdb-templates");var b=a.closest(".tdb-template-el");a=b.data("template-id");jQuery.ajax({type:"POST",url:td_ajax_url,data:{action:"tdb_delete_template",template_id:a,_nonce:window.tdb_globals.wpRestNonce},success:function(a,c,d){a=jQuery.parseJSON(a);"undefined"!==typeof a.reload&&window.location.reload();"undefined"!==typeof a.template_id&&b.remove()},error:function(a,b,c){}});jQuery(".tdb-template-el-title-input").trigger("change")}).on("click",function(a){a=jQuery(a.target);a.closest("#wp-admin-bar-tdb_template_single").length||a.closest("#wp-admin-bar-tdb_template_category").length||a.closest("#wp-admin-bar-tdb_template_404").length||a.closest("#wp-admin-bar-tdb_template_date").length||a.closest("#wp-admin-bar-tdb_template_search").length||a.closest("#wp-admin-bar-tdb_template_attachment").length|| a.closest("#wp-admin-bar-tdb_template_author").length||a.closest("#wp-admin-bar-tdb_template_tag").length||a.closest("#wp-admin-bar-tdb_template_woo_product").length||a.closest("#wp-admin-bar-tdb_template_woo_archive").length||a.closest("#wp-admin-bar-tdb_template_woo_search_archive").length||a.closest("#wp-admin-bar-tdb_template_woo_shop_base").length||a.closest("#wp-admin-bar-tdb_template_cpt").length||a.closest("#wp-admin-bar-tdb_template_cpt_tax").length||a.closest("#wp-admin-bar-tdc_page_mobile_template").length|| (a=jQuery(".tdb-templates"),a.length&&(a.hide(),a.prev("a").removeClass("tdb-templates-open").addClass("tdb-templates-close"),jQuery(".tdb-template-el-title-input").trigger("change")),a=jQuery("#tdb-mobile-templates"),a.length&&(a.hide(),a.prev("a").removeClass("tdb-templates-open").addClass("tdb-templates-close")))}).on("click","#tdb-mobile-templates .tdb-template-el-mobile-list-el",function(a){var b=jQuery(this),c=jQuery("#tdb-mobile-templates");a=b.data("template-id");var f=b.data("mobile-template-id"), h=c.closest(".tdb-template-el-mobile-btns"),l=b.closest(".tdb-template-el-mobile-wrap"),k=b.closest("#wp-admin-bar-tdc_page_mobile_template");jQuery.ajax({type:"POST",url:td_ajax_url,data:{action:"tdb_set_mobile_template",template_id:a,mobile_template_id:f,_nonce:window.tdb_globals.wpRestNonce},success:function(a,d,e){a=jQuery.parseJSON(a);_.isObject(a)&&!_.isUndefined(a.result)&&1===a.result&&(h.data("mobile-template-id",f),c.find(".tdb-template-el-mobile-list-el").removeClass("tdb-current"),c.find('.tdb-template-el-mobile-list-el[data-mobile-template-id="'+ f+'"]').addClass("tdb-current"),l.length&&(a=l.find(".tdb-template-el-mobile:first"),""===f?a.html("-"):a.html('Yes')),k.length&&(k.find("a:first").html('Mobile page'+b.find(".tdb-template-el-mobile-list-title:first").html()),"No mobile page"===b.find(".tdb-template-el-mobile-list-title:first").html()&&k.find("a:first").html('Mobile page')))}})}).on("click", "#tdb-mobile-templates .tdb-template-el-mobile-list-edit",function(a){a.stopPropagation()}).on("click","#tdb-mobile-templates .tdb-template-el-mobile-list-delete",function(a){a.stopPropagation();a=jQuery(this);var b=a.data("type"),c=a.closest(".tdb-template-el-mobile-list-el"),f=c.data("template-id");a=c.data("mobile-template-id");var h=c.hasClass("tdb-current"),l=jQuery("#tdb-mobile-templates").closest(".tdb-template-el");jQuery.ajax({type:"POST",url:td_ajax_url,data:{action:"tdb_delete_template", template_id:a,_nonce:window.tdb_globals.wpRestNonce},success:function(a,d,e){"undefined"!==typeof jQuery.parseJSON(a).template_id&&tdbGetMobileTemplates(b,f,void 0,function(){jQuery("#tdb-mobile-templates").addClass("loading")},function(){jQuery("#tdb-mobile-templates").removeClass("loading");if(h)if("page"===b){var a=jQuery("#wp-admin-bar-tdc_page_mobile_template");a.length&&a.find("a:first").html('Mobile pageNo mobile page')}else c.remove(),l.length&&l.find(".tdb-template-el-mobile:first").html("-")})}, error:function(a,b,c){}})}).on("mouseenter",".tdb-template-el-mobile-btns",function(a){a=jQuery(this);var b=a.data("mobile-template-id"),c=a.data("template-id"),f=jQuery("#tdb-mobile-templates");f.find(".tdb-template-el-mobile-list-inner").is(":empty")||(f.appendTo(a).show(),f.find(".tdb-template-el-mobile-list-el").removeClass("tdb-current"),f.find(".tdb-template-el-mobile-list-el").data("template-id",c),f.find('.tdb-template-el-mobile-list-el[data-mobile-template-id="'+b+'"]').addClass("tdb-current"))}).on("mouseleave", ".tdb-template-el-mobile-btns",function(a){a=jQuery(".tdb-templates");var b=jQuery("#tdb-mobile-templates");b.hide();b.insertBefore(a);b.find(".tdb-template-el-mobile-list-el").removeClass("tdb-current")});jQuery(".tdb-templates");window.tdbGetMobileTemplates=function(a,c,e,f,h,l,k){var b=jQuery("#tdb-mobile-templates",l);b.length||(b=jQuery(''), b.hide());"undefined"!==typeof e&&b.insertAfter(e);e={action:"tdb_get_"+a+"_mobile_templates",_nonce:window.tdb_globals.wpRestNonce};e[a+"_id"]=c;"undefined"!==typeof f&&f.call();jQuery.ajax({type:"POST",url:td_ajax_url,data:e,success:function(d,e,f){var l="";f=jQuery.parseJSON(d);d='
  • Load mobile page from Cloud Library
  • Create blank mobile page
  • ';if(_.isArray(f)&&f.length){var m=!1,n="template";e="";"page"===a&&(n="page",e=d);_.each(f,function(b,d,e){d="";_.isUndefined(b.is_current)||(d="tdb-current",m=!0);l+='
    '+b.template_title+'
    '});""!==l&&(f="",m||(f="tdb-current",m=!0),l=e+'
    No mobile '+n+"
    "+l);""!==l&&(b.html('
    '+l+'
    Documentation »'), e=b.parent(".tdb-template-el-mobile-btns"),!_.isUndefined(k)&&e.length&&(b.find(".tdb-template-el-mobile-list-el").removeClass("tdb-current"),b.find(".tdb-template-el-mobile-list-el").data("template-id",c),b.find('.tdb-template-el-mobile-list-el[data-mobile-template-id="'+k+'"]').addClass("tdb-current")),b.is(":visible")&&e.length?b.show():b.hide())}""===l&&("page"===a?b.html(d+'
    No mobile page, please import or create a new mobile page.
    Documentation »
    '): b.html(""));"undefined"!==typeof h&&h.call()}})}})(); jQuery(window).on("load",function(){var a=!1;window.parent===window.top&&"undefined"!==typeof window.name&&"tdc-live-iframe"===window.name&&"undefined"!==typeof window.parent.tdcSidebar&&(a=!0);if(window.self===window.top||a)jQuery(".tdb_single_reading_progress").each(function(){var c=jQuery(this),b=c.data("td-block-uid");c=c.data("bar-position");var d=new tdReadingProgressBar.item;d.blockUid=b;d.barPosition=c;tdReadingProgressBar.addItem(d);a&&tdReadingProgressBar.createFixedBar(d,0,30)}),a||tdReadingProgressBar.calculateBarsFill()}); var tdbMenu={}; (function(){tdbMenu={ui_events:"mouseover click keydown wheel touchmove touchstart".split(" "),items:[],item:function(){this.blockUid="";this._outsideClickArea=this._mainMenu=this._itemsWithSubmenu=null;this._outsideClickExcludedAreas="";this._openMenuClass="tdb-hover";this._openMenuBodyClass="tdb-open-menu";this.isMegaMenuParentPos=this.isMegaMenuFull=this.inComposer=!1;this.megaMenuLoadType="";this._is_initialized=!1},init:function(){tdbMenu.items=[]},_initialize_item:function(a){if(!0!==a._is_initialized){tdbMenu._setHover(a); var c=0 ul");h.show();h.each(function(){jQuery(this).css("left","");l=jQuery(this).offset();k=l.left;0>k?jQuery(this).offset({left:0}):(m=jQuery(window).width()-(k+jQuery(this).outerWidth()),0>m&&jQuery(this).offset({left:jQuery(window).width()-jQuery(this).outerWidth()}))});n||(d.find(".tdb-mega-menu-inactive").removeClass("tdb-mega-menu-inactive"),n=!0);h.hide()}var d=a.jqueryObj,e,f,h,l,k,m,n=!1; setTimeout(function(){jQuery(window).resize(function(){e=d.offset();f=e.left;b();c&&setInterval(function(){e=d.offset();e.left!==f&&(b(),f=e.left)},1E3)});jQuery(window).resize()},60)},pageMegaMenuHeight:function(a,c){function b(){f.show();f.each(function(){var a=jQuery(this),b=a.find("> li"),c=e.offset().top+e.outerHeight();b=b.outerHeight();var f=d.scrollTop(),n=d.height();c+b>n+f?a.css({height:n+f-c,"overflow-y":"auto"}):a.css({height:"auto","overflow-y":"visible"})});f.hide()}var d=jQuery(window), e=a.jqueryObj,f=e.find(".tdb-menu .tdb-mega-menu-page > ul");setTimeout(function(){d.on("resize scroll",function(){b();c&&setInterval(function(){b()},1E3)});d.resize().scroll()},1500)},_getSubmenuPosition:function(a){var c=jQuery(window).width();a=a.children(".sub-menu").first();if(0c&&(a.parent().parent().hasClass("tdb-menu")?a.css("left","-"+(b-c)+"px"):a.addClass("reversed").css("left","-"+(a.width()+0)+"px"))}},_getMouseAngleDirection:function(a,c, b,d){return Math.atan2(b-a,d-c)/Math.PI*180},_setHover:function(a){var c=a.jqueryObj.find(".tdb-menu");c.supersubs({minWidth:10,maxWidth:20,extraWidth:1,applyMin:!0});var b=c.find(".menu-item-has-children > a, .tdb-mega-menu > a");b.parent().find(".sub-menu").first().css("display","none");if(tdDetect.isTouchDevice)jQuery(document).on("touchstart","body",function(c){var d=b.parent(),e=jQuery("body");e.hasClass(a._openMenuBodyClass)&&!d.is(c.target)&&0===d.has(c.target).length&&(d.removeClass(a._openMenuClass), d.children(".sub-menu").hide(),e.removeClass(a._openMenuBodyClass))}),b.on("touchstart",function(c){c.preventDefault();c.stopPropagation();var d=jQuery(this);c=d.parent();var e=jQuery("body");c.hasClass(a._openMenuClass)?null!==d.attr("href")&&"#"!==d.attr("href")?window.location.href=d.attr("href"):((c.parent().hasClass("tdb-menu")||c.parent().hasClass("top-header-menu"))&&e.removeClass(a._openMenuBodyClass),c.removeClass(a._openMenuClass),c.find(".sub-menu").hide(),c.find("li").removeClass(a._openMenuClass)): (c.parent().hasClass("tdb-menu")||c.parent().hasClass("top-header-menu")?(b.parent().removeClass(a._openMenuClass),b.parent().children(".sub-menu").hide()):(d=c.siblings(),d.removeClass(a._openMenuClass),d.find(".sub-menu").hide(),d.find("li").removeClass(a._openMenuClass)),c.addClass(a._openMenuClass),c.children(".sub-menu").show(),tdbMenu._getSubmenuPosition(c),e.addClass(a._openMenuBodyClass))});else{var d={},e,f=!0;c.on("mouseleave",function(){b.parent().removeClass(a._openMenuClass);b.parent().children(".sub-menu").hide(); d={}});c.find(".menu-item").hover(function(){var c=jQuery(this),l="",k,m;if(c.hasClass("menu-item-has-children")||c.hasClass("tdb-mega-menu"))if(c.parent().hasClass("tdb-menu"))if(jQuery.isEmptyObject(d))c.addClass(a._openMenuClass),c.children(".sub-menu").show(),d=c;else{if(c[0]!==d[0]){var n=m=k=0;var q=null;!0===f&&(f=!1,e=setTimeout(function(){b.parent().removeClass(a._openMenuClass);b.parent().children(".sub-menu").hide();c.addClass(a._openMenuClass);c.children(".sub-menu").show();d=c},400)); c.on("mousemove",function(h){5<=k?(k=0,q=tdbMenu._getMouseAngleDirection(m,n,h.pageX,h.pageY),m=h.pageX,n=h.pageY):(k++,0===m&&0===n&&(m=h.pageX,n=h.pageY));null!==q&&(85q)&&(b.parent().removeClass(a._openMenuClass),b.parent().children(".sub-menu").hide(),c.addClass(a._openMenuClass),c.children(".sub-menu").show(),c.off("mousemove"),clearTimeout(e),f=!0,d=c)})}}else l=c.siblings(),l.removeClass(a._openMenuClass),l.find(".sub-menu").hide(),l.find("li").removeClass(a._openMenuClass),c.addClass(a._openMenuClass), c.children(".sub-menu").show(),tdbMenu._getSubmenuPosition(c);else c.parent().hasClass("tdb-menu")?jQuery.isEmptyObject(d)||(n=m=k=0,q=null,!0===f&&(f=!1,e=setTimeout(function(){b.parent().removeClass(a._openMenuClass);b.parent().children(".sub-menu").hide();d={}},400)),c.on("mousemove",function(h){5<=k?(k=0,q=tdbMenu._getMouseAngleDirection(m,n,h.pageX,h.pageY),m=h.pageX,n=h.pageY):(k++,0===m&&0===n&&(m=h.pageX,n=h.pageY));null!==q&&(85q)&&(b.parent().removeClass(a._openMenuClass),b.parent().children(".sub-menu").hide(), c.off("mousemove"),clearTimeout(e),f=!0,d={})})):(d=c.parent(),l=c.siblings(),l.removeClass(a._openMenuClass),l.find(".sub-menu").hide(),l.find("li").removeClass(a._openMenuClass))},function(){var a=jQuery(this);!1===f&&(clearTimeout(e),f=!0);a.off("mousemove")})}},unsetHover:function(a){null!==a._itemsWithSubmenu&&a._itemsWithSubmenu.off();null!==a._outsideClickArea&&a._outsideClickArea.off()}}})();var tdbMenuItemPullDown={}; (function(){tdbMenuItemPullDown={init:function(){setTimeout(function(){jQuery(".tdb-menu-items-pulldown").each(function(a,c){var b=jQuery(c),d=b.parent().attr("id");c=jQuery("."+d);var e="";"none"!==c.css("max-width")&&(e=c.css("max-width"));if(c.hasClass("tdb-menu-items-in-more")){var f=b.find(".tdb-menu:first"),h=f.parents(".tdb-menu-items-pulldown:first"),l=[];a=new tdPullDown.item;if(void 0!==c.css("display")&&"inline-block"===c.css("display")){var k=c.closest(".vc_column_container");h=k;var m= "";m=0!==k.find(".tdc-elements").length?".tdc-elements":".wpb_wrapper";k.find(m+" > .td_block_wrap").each(function(){var a=.9*k.outerWidth(!0),b=jQuery(this).outerWidth(!0);if(jQuery(this).data("td-block-uid")!==d)if(ba._last_request_results_count-1?(a.jqueryObj.find(".tdb-search-form").fadeTo(100,1),a.jqueryObj.find(".tdb-head-search-form-input").removeClass("tdb-head-search-nofocus")):(tdbSearch.remove_input_focus(a),a.jqueryObj.find(".td_module_wrap").eq(a._current_selection_index).addClass("tdb-aj-cur-element"))}, do_ajax_call:function(a){var c=a.jqueryObj.find(".tdb-head-search-form-input").val();""===c?tdbSearch.set_input_focus(a):tdLocalCache.exist("tdb-"+c)?tdbSearch.process_ajax_response(tdLocalCache.get("tdb-"+c),a):jQuery.ajax({type:"POST",url:td_ajax_url,data:{action:"td_ajax_search",module:"tdb_module_search",atts:a.blockAtts,td_string:c,limit:a._resultsLimit},success:function(b,d,e){tdLocalCache.set("tdb-"+c,b);tdbSearch.process_ajax_response(b,a)},error:function(a,c,e){window.console.log(e)}})}, process_ajax_response:function(a,c){var b=c.jqueryObj.find(".tdb-head-search-form-input").val(),d=c.jqueryObj.find(".tdb-aj-search");""===b?d.empty():(a=jQuery.parseJSON(a),a.td_search_query===b&&(c._current_selection_index=0,c._last_request_results_count=a.td_total_in_list,c._first_down_up=!0,d.html(a.td_data),"undefined"!==typeof window.tdAnimationStack&&!0===window.tdAnimationStack.activated&&(window.tdAnimationStack.check_for_new_items(".tdb-aj-search .td-animation-stack",window.tdAnimationStack.SORTED_METHOD.sort_left_to_right, !0,!1),window.tdAnimationStack.compute_items(!1))))},hideAllItems:function(){tdbSearch.items.forEach(function(a){tdbSearch.hide_search_box(a)})}}})();jQuery().ready(function(){tdbSearch.init();setTimeout(function(){jQuery(window).resize()},500)});var tdbLocationFinder={};jQuery().ready(function(){tdbLocationFinder.init()}); (function(){tdbLocationFinder={items:[],item:function(){this.blockObj=this.uid="";this.mapMarker=this.map=void 0;this.defLong=this.defLat=0;this.defZoom=3;this.defAddress="";this.errorContainer=void 0;this._is_initialized=this._in_composer=!1},init:function(){tdbLocationFinder.items=[];this._is_running=!1},_initialize_item:function(a){!0!==a._is_initialized&&(a.errorContainer=a.blockObj.find(".tdb-s-notif"),tdbLocationFinder.initMap(a),a._in_composer||(""!==a.defAddress&&tdbLocationFinder.displayLocationByAddress(a, a.defAddress),tdbLocationFinder.locationSearch(a),tdbLocationFinder.currentLocation(a)),a._is_initialized=!0)},addItem:function(a){if("undefined"===typeof a.uid)throw"item.uid is not defined";tdbLocationFinder.items.push(a);tdbLocationFinder._initialize_item(a)},locationSearch:function(a){var c=document.querySelector("#tdb-lf-search-"+a.uid),b=new google.maps.places.Autocomplete(c,{types:["address"],fields:["address_components","geometry"]});b.addListener("place_changed",function(){var d=b.getPlace(); c.classList.add("loading");c.disabled=!0;tdbLocationFinder.updateError(a,"",!1);if(d.geometry){var e=d.address_components,f="",h="",l="",k="",m="",n="",q=d.geometry.location;console.log(e);for(d=0;d
    '; a.termIsHerarchical&&(c+='
    '); c+='
    ';var f=new tdbModal.item;f.customClasses="tdb-ft-create-term-modal tdb-ft-create-term-modal-"+a.uid;f.title="Create new term";f.body=c;f.validateFormInputs=[{id:"tdb-ft-new-term-name",rules:"required"}];tdbModal.addItem(f); tdbModal.openModal(f);if(a.termIsHerarchical){var h=f.modalObj.find("#tdb-ft-new-term-parent-id");jQuery.ajax({type:"POST",url:td_ajax_url,data:{action:"tdb_ft_get_terms",_nonce:a._nonce,parentTermID:-1,termType:a.termType,depth:2,orderBy:a.orderBy,order:a.order},success:function(b){b=jQuery.parseJSON(b);Object.keys(b).length&&h.append(tdbFormTaxonomies.render_dropdown_options(b,0,[d.toString()]));h.select2({dropdownCssClass:"tdb-s-select2 tdb-s-select2-"+a.uid});h.closest(".tdb-s-form-select-wrap").removeClass("tdb-s-content-loading")}})}f.modalObj.on("tdbModal.confirming", function(){var b=f.modalObj.find(".tdb-s-fc-inner"),c=b.find("#tdb-ft-new-term-name"),d=b.find("#tdb-ft-new-term-parent-id"),h=b.find("#tdb-ft-new-term-descr");c=c.val();var q=d.length?d.val():0;d=h.val();b.find(".tdb-s-notif").remove();!0===tdbModal._validate_form_inputs(f)?jQuery.ajax({type:"POST",url:td_ajax_url,data:{action:"tdb_create_term",_nonce:a._nonce,termName:c,termType:a.termType,termDescr:d,parentTermID:q},success:function(c){c=jQuery.parseJSON(c);if(c.errors.length){var d='
    '; d+='
      ';jQuery.each(c.errors,function(a,b){d+="
    • "+b+"
    • "});d+="
    ";d+="
    ";b.append(d);f.modalObj.trigger("tdbModal.confirmingReset")}else{f.modalObj.trigger("tdbModal.confirmed");c=0==q||a.showAllTerms?e.find('.tdb-s-form-group[data-term-hierarchy="parent"]'):e.find('.tdb-s-form-group[data-parent-id="'+q+'"]');var h=c.data("display");if(c.length){var l=[];if("dropdown"===h){var k=c.find("select option:selected");k.length&&l.push(k.val())}else"checkbox"===h? (k=c.find(".tdb-s-form-check input:checked"),jQuery.each(k,function(a,b){l.push(jQuery(this).val())})):"radio"===h&&(k=c.find(".tdb-s-form-check input:checked"),k.length&&l.push(k.val()));tdbFormTaxonomies.refreshTerms(a,c,q,l,h)}else c=e.find('[value="'+q+'"]'),c.length&&(k=c.closest(".tdb-s-form-group"),h=k.data("term-hierarchy"),k=k.data("display"),"sub-child"!==h&&("dropdown"===k?c.is(":selected")&&(c=c.closest("select"),tdbFormTaxonomies.renderTermChildrenFromDropdown(a,c)):"checkbox"===k?c.is(":checked")&& (c=c.closest(".tdb-s-fc-label"),tdbFormTaxonomies.renderTermChildrenFromCheckbox(a,c,!0)):"radio"===k&&c.is(":checked")&&(c=c.closest(".tdb-s-fc-label"),tdbFormTaxonomies.renderTermChildrenFromRadio(a,c,!0))))}}}):f.modalObj.trigger("tdbModal.confirmingReset")})});a._is_initialized=!0}},addItem:function(a){if("undefined"===typeof a.uid)throw"item.uid is not defined";tdbFormTaxonomies.items.push(a);tdbFormTaxonomies._initialize_item(a)},renderTermChildrenFromDropdown:function(a,c){var b=c.closest(".tdb-s-form-group").data("term-hierarchy"), d=c.val(),e=c.find("option:selected").text().replace(/ *\([^)]*\) */g,""),f="",h="",l=c.attr("data-old-term-id");""===c.val()?tdbFormTaxonomies.removeChildTerms(a,l,b):(c.attr("data-old-term-id",d),"parent"===b?f="child":"child"===b&&(f="sub-child"),"child"===f?h=a.childDisplay:"sub-child"===f&&(h=a.subChildDisplay),tdbFormTaxonomies.removeChildTerms(a,l,b),tdbFormTaxonomies.renderTermChildren(a,d,e,b,f,h))},renderTermChildrenFromCheckbox:function(a,c,b){b=void 0===b?!1:b;var d=c.find('input[type="checkbox"]'), e=c.closest(".tdb-s-form-group").data("term-hierarchy"),f=d.val();c=c.find(".tdb-s-fc-title").text();var h="",l="",k=a.blockObj.find(".tdb-s-form");d.prop("disabled")||("parent"===e?h="child":"child"===e?h="sub-child":"sub-child"===e&&(h="last-level"),"child"===h?l=a.childDisplay:"sub-child"===h&&(l=a.subChildDisplay),d.prop("checked")&&!b?(d.prop("checked",!1),a.showAllTerms?tdbFormTaxonomies.manageLimits(a):tdbFormTaxonomies.removeChildTerms(a,f,e)):(d.prop("checked",!0),a.showAllTerms?tdbFormTaxonomies.manageLimits(a): "last-level"===h?(k.addClass("tdb-s-content-loading"),setTimeout(function(){tdbFormTaxonomies.manageLimits(a);k.removeClass("tdb-s-content-loading")},400)):tdbFormTaxonomies.renderTermChildren(a,f,c,e,h,l)))},renderTermChildrenFromRadio:function(a,c,b){b=void 0===b?!1:b;var d=c.find('input[type="radio"]'),e=c.closest(".tdb-s-form-group"),f=e.find(".tdb-ft-checkboxes");e=e.data("term-hierarchy");var h=d.val();c=c.find(".tdb-s-fc-title").text();var l="",k="",m=f.attr("data-old-term-id");f.attr("data-old-term-id", h);"parent"===e?l="child":"child"===e&&(l="sub-child");"child"===l?k=a.childDisplay:"sub-child"===l&&(k=a.subChildDisplay);d.prop("checked")?b&&(tdbFormTaxonomies.removeChildTerms(a,m,e),tdbFormTaxonomies.renderTermChildren(a,h,c,e,l,k)):(f.find('input[value="'+m+'"]').prop("checked",!1),d.prop("checked",!0),tdbFormTaxonomies.removeChildTerms(a,m,e),tdbFormTaxonomies.renderTermChildren(a,h,c,e,l,k))},renderTermChildren:function(a,c,b,d,e,f){var h=a.blockObj.find(".tdb-s-content"),l=h.find(".tdb-s-fc-inner"); h.addClass("tdb-s-content-loading");jQuery.ajax({type:"POST",url:td_ajax_url,data:{action:"tdb_ft_get_terms",_nonce:a._nonce,parentTermID:c,termType:a.termType,orderBy:a.orderBy,order:a.order},success:function(d){d=jQuery.parseJSON(d);var k="";Object.keys(d).length&&(k='
    ',k+='","dropdown"===f?(k+='
    ',k+='",k+='', k+="
    "):"checkbox"===f?(k+='
    ',k+='
    ',k+=tdbFormTaxonomies.render_checkboxes(a,d,0,[]),k+="
    ",k+="
    "):"radio"===f&&(k+='
    ',k+='
    ',k+=tdbFormTaxonomies.render_radios(a,d,0,[]),k+="
    ",k+="
    "),k+="
    ",k=jQuery(k),"dropdown"===f&&k.find("select").select2({dropdownCssClass:"tdb-s-select2 tdb-s-select2-"+a.uid}));setTimeout(function(){l.append(k); tdbFormTaxonomies.manageLimits(a);h.removeClass("tdb-s-content-loading")},200)}})},refreshTerms:function(a,c,b,d,e){var f=a.blockObj.find(".tdb-s-content");f.addClass("tdb-s-content-loading");jQuery.ajax({type:"POST",url:td_ajax_url,data:{action:"tdb_ft_get_terms",_nonce:a._nonce,parentTermID:a.showAllTerms?-1:b,termType:a.termType,orderBy:a.orderBy,order:a.order},success:function(b){var h=jQuery.parseJSON(b);setTimeout(function(){Object.keys(h).length&&("dropdown"===e?(c.find("select option:not(:first-child)").remove(), c.find("select").append(tdbFormTaxonomies.render_dropdown_options(h,0,d))):"checkbox"===e?c.find(".tdb-s-form-checkboxes-wrap").html(tdbFormTaxonomies.render_checkboxes(a,h,0,d)):"radio"===e&&c.find(".tdb-s-form-checkboxes-wrap").html(tdbFormTaxonomies.render_radios(a,h,0,d)));tdbFormTaxonomies.manageLimits(a);f.removeClass("tdb-s-content-loading")},200)}})},render_dropdown_options:function(a,c,b){var d="",e="-".repeat(c);""!==e&&(e+=" ");c++;jQuery.each(a,function(a,h){var f=-1!==jQuery.inArray(h.id.toString(), b);d+='";0';e+='";e+="";0'; f+='";f+="";0=a.parentLimit;m=-1=a.childLimit;a=-1=a.subChildLimit; k&&b.length||m&&d.length||a&&e.length?c.show():c.hide();k?(f.find('input[type="checkbox"]:not(:checked)').prop("disabled",!0),b.show()):(f.find('input[type="checkbox"]:not(:checked)').prop("disabled",!1),b.hide());m?(h.find('input[type="checkbox"]:not(:checked)').prop("disabled",!0),d.show()):(h.find('input[type="checkbox"]:not(:checked)').prop("disabled",!1),d.hide());a?(l.find('input[type="checkbox"]:not(:checked)').prop("disabled",!0),e.show()):(l.find('input[type="checkbox"]:not(:checked)').prop("disabled", !1),e.hide())},deleteItem:function(a){for(var c=0;ca.maxUploadSize?(tdbFormFileUpload.manageNotif(a,!0,"Sorry, the "+a.fileType+" exceeds the maximum upload file size limit."),c.val("")):tdbFormFileUpload.addPreview(a, b)});a.blockObj.on("click",".tdb-s-ffp-remove",function(b){b.preventDefault();tdbFormFileUpload.removePreview(a)});a._is_initialized=!0}},addItem:function(a){if("undefined"===typeof a.uid)throw"item.uid is not defined";tdbFormFileUpload.items.push(a);tdbFormFileUpload._initialize_item(a)},manageNotif:function(a,c,b){b=void 0===b?"":b;a=a.blockObj.find(".tdb-s-notif");c?a.show().text(b):a.hide().text(b)},addPreview:function(a,c){a.blockObj.find(".tdb-s-form");var b=a.blockObj.find(".tdb-s-form-file"); b.addClass("tdb-s-content-loading");setTimeout(function(){switch(a.fileType){case "image":var d=new FileReader;d.onload=function(){b.prepend('
    ')}; d.readAsDataURL(c);break;case "document":b.prepend('
    '+ c.name+'
    '); break;case "audio":var e=new FileReader;e.onload=function(){b.prepend('
    ')}; e.readAsDataURL(c);break;case "video":var f=new FileReader;f.onload=function(){b.prepend('
    ')}; f.readAsDataURL(c)}b.addClass("tdb-s-form-file-previewing");b.removeClass("tdb-s-content-loading")},600)},removePreview:function(a){var c=a.blockObj.find(".tdb-s-form-file"),b=c.find(".tdb-s-form-file-input");c.addClass("tdb-s-content-loading");setTimeout(function(){a.blockObj.attr("data-no-save","false");c.find(".tdb-s-form-file-preview").remove();b.val("");c.removeClass("tdb-s-form-file-previewing");c.removeClass("tdb-s-content-loading")},400)},deleteItem:function(a){for(var c=0;c'+tdbPostsList._stringFromBinary(a.confirmModals.publish.body).replace("%POST_TITLE%",b)+"";e.cancelBtnTxt=window.tdb_modal_cancel_alt;e.confirmBtnTxt=window.tdb_modal_confirm_alt;tdbModal.addItem(e);tdbModal.openModal(e);e.modalObj.on("tdbModal.confirming", function(){e.modalObj.trigger("tdbModal.confirmed")});e.modalObj.on("tdbModal.confirmed",function(){a.blockObj.trigger("postsList.rendering");jQuery.ajax({method:"POST",url:td_ajax_url,data:{action:"tdb_posts_list_update_post_status",_ajax_nonce:a.blockObj.find("#tdb_posts_list_nonce").val(),postID:c,newStatus:d},success:function(b){b=jQuery.parseJSON(b);if(""!==b.success){a.topNotifications.push({message:b.success,type:"success"});var d=a.blockObj.find('.tdb-plist-post[data-post-id="'+c+'"]'),e= d.find(".tdb-plist-publish-post");d.find(".tdb-s-table-col-title .tdb-plist-title-status").remove();e.prev().remove();e.remove()}""!==b.error&&a.topNotifications.push({message:b.error,type:"error"});a.blockObj.trigger("postsList.rendered")}})})},onDeletePost:function(a,c,b){var d=a.blockObj.find(".tdb-block-inner"),e=new tdbModal.item;e.customClasses="tdb-plist-confirm-modal tdb-plist-confirm-modal-"+a.uid;e.title=tdbPostsList._stringFromBinary(a.confirmModals.delete.title);e.body='
    '+ tdbPostsList._stringFromBinary(a.confirmModals.delete.body).replace("%POST_TITLE%",b)+"
    ";e.cancelBtnTxt=window.tdb_modal_cancel_alt;e.confirmBtnTxt=window.tdb_modal_confirm_alt;tdbModal.addItem(e);tdbModal.openModal(e);e.modalObj.on("tdbModal.confirming",function(){e.modalObj.trigger("tdbModal.confirmed")});e.modalObj.on("tdbModal.confirmed",function(){a.blockObj.trigger("postsList.rendering");jQuery.ajax({type:"POST",url:td_ajax_url,data:{action:"tdb_posts_list_delete_post",_ajax_nonce:a.blockObj.find("#tdb_posts_list_nonce").val(), postID:c},success:function(b){b=jQuery.parseJSON(b);""!==b.success&&(a.topNotifications.push({message:b.success,type:"success"}),1===d.find(".tdb-plist-post").length&&a.renderOptions.currentPage--,tdbPostsList.renderPosts(a));""!==b.error&&(a.topNotifications.push({message:b.error,type:"error"}),a.blockObj.trigger("postsList.rendered"))}})})},topNotifications:function(a){var c=a.blockObj.find(".tdb-block-inner"),b=c.find(".tdb-plist-notifs-top");b.length||(c.prepend('
    '), b=c.find(".tdb-plist-notifs-top"));jQuery.each(a.topNotifications,function(a,c){b.prepend('
    '+c.message+"
    ")});a.topNotifications=[];setTimeout(function(){b.remove()},5E3)},_initialize_item:function(a){if(!0!==a._is_initialized){var c=a.blockObj.find(".tdb-block-inner");a.blockObj.on("postsList.rendering",function(){c.hasClass("tdb-s-content-loading")||c.addClass("tdb-s-content-loading")});a.blockObj.on("postsList.rendered", function(){tdbPostsList.topNotifications(a);c.hasClass("tdb-s-content-loading")&&c.removeClass("tdb-s-content-loading")});a.blockObj.on("keydown",".tdb-plist-search .tdb-plist-search-keyword",function(a){13===a.keyCode&&jQuery(this).closest(".tdb-plist-search").find("button").click()});a.blockObj.on("click",".tdb-plist-search button",function(b){b.preventDefault();var c=jQuery(this).closest(".tdb-plist-search");b=c.find(".tdb-plist-search-keyword").val();c=c.find(".tdb-plist-search-in").val();tdbPostsList.onSearch(a, b,c)});a.blockObj.on("click",".tdb-s-table-header th",function(){var b=jQuery(this).data("column");tdbPostsList.onSortByColumn(a,b)});a.blockObj.on("click",".tdb-plist-publish-post",function(b){b.preventDefault();var c=jQuery(this);b=c.data("post-id");c=c.data("post-title");tdbPostsList.onChangePostStatus(a,b,c,"publish")});a.blockObj.on("click",".tdb-plist-delete-post",function(b){b.preventDefault();var c=jQuery(this);b=c.data("post-id");c=c.data("post-title");tdbPostsList.onDeletePost(a,b,c)}); a.blockObj.on("click",".tdb-s-pagination-item",function(b){b.preventDefault();b=jQuery(this).data("page");tdbPostsList.onPagination(a,b)});a._is_initialized=!0}},_stringToBinary:function(a){for(var c=new Uint16Array(a.length),b=0;b

    '+ a.title+'

    '+a.body+'
    ");c=jQuery("#tdb_modal_"+b);a.uid=b;a.modalObj=c},openModal:function(a){if(!a._is_modal_open){var c=jQuery("body");setTimeout(function(){a.modalObj.addClass("tdb-s-modal-open");a._is_modal_open=!0;c.addClass("tdb-s-modal-prevent-scroll");a.modalObj.trigger("tdbModal.open")},1)}},closeModal:function(a){if(a._is_modal_open){var c=jQuery("body");a.modalObj.removeClass("tdb-s-modal-open"); a._is_modal_open=!1;c.removeClass("tdb-s-modal-prevent-scroll");a.modalObj.trigger("tdbModal.close");setTimeout(function(){tdbModal.deleteItem(a.uid)},300)}},_initialize_item:function(a){!0!==a._is_initialized&&(tdbModal.buildModal(a),a.modalObj.on("click",".tdb-s-modal-close, .tdb-s-modal-bg",function(c){c.preventDefault();a.modalObj.trigger("tdbModal.cancel");tdbModal.closeModal(a)}),a.modalObj.on("click",".tdb-s-modal-confirm",function(c){c.preventDefault();a.modalObj.trigger("tdbModal.confirming")}), a.modalObj.on("tdbModal.confirming",function(){var c=a.modalObj.find(".tdb-s-modal-confirm"),b=a.modalObj.find(".tdb-s-modal-cancel");c.addClass("tdb-s-btn-saving");c.prop("disabled",!0);b.prop("disabled",!0)}),a.modalObj.on("tdbModal.confirmingReset",function(){var c=a.modalObj.find(".tdb-s-modal-confirm"),b=a.modalObj.find(".tdb-s-modal-cancel");c.removeClass("tdb-s-btn-saving");c.prop("disabled",!1);b.prop("disabled",!1)}),a.modalObj.on("tdbModal.confirmed",function(){tdbModal.closeModal(a)}), a._is_initialized=!0)},_stringToBinary:function(a){for(var c=new Uint16Array(a.length),b=0;b'+f+""),c=!1)}});if(!c)return!1}return!0}}})();var tdbFilters={}; (function(){tdbFilters={items:[],init:function(){tdbFilters.items=[]},item:function(){this.jqueryObj=this.blockAtts=this.blockUid=void 0;this._is_initialized=this.enabled_on_mobiles=this.inComposer=!1},_initialize_item:function(a){if(!0!==a._is_initialized){if(!0===a.enabled_on_mobiles){a.jqueryObj.closest(".vc_column_container").addClass("tdb-filters-mobile");jQuery("body").addClass("tdb-filters");var c=jQuery(".tdb-filters-button-mobile"),b=c.get(0);b=jQuery._data(b,"events");if(void 0===b||void 0===b.click)c.on("click",function(){jQuery("body").toggleClass("tdb-filters-open")})}else a.jqueryObj.closest(".vc_column_container").removeClass("tdb-filters-mobile"),jQuery("body").removeClass("tdb-filters");!0!==a.inComposer&&(window.onpopstate=function(a){null!==a.state&&window.location.reload()},a.jqueryObj.on("click",".tdb-filters-clear-all",function(a){a.preventDefault();a.stopPropagation();a=new URLSearchParams(window.location.search);var b=window.location.href;a.forEach(function(a,c){-1!==c.indexOf("tdb_")&& (b=tdbFilters.removeQueryParam(b,c))});window.history.pushState({},"",b);window.location.reload()}),a.jqueryObj.on("click",".tdb-filter-item",function(a){var b=jQuery(this),c=b.parents("ul").data("taxonomy"),d=b.data("term-slug");b.data("term-name");b.hasClass("selected")||b.hasClass("tdb-filter-link")?(b.hasClass("selected")&&b.hasClass("tdb-filter-link")&&a.preventDefault(),window.location.href=tdbFilters.removeQueryParamValue(window.location.href,c,d)):-1!==c.indexOf("tdb_")?(a=tdbFilters.removeQueryParam(window.location.href, "tdb-loop-page"),window.location.href=tdbFilters.updateQuery(a,c,d)):console.log("invalid filter: "+c)}),a.jqueryObj.on("select2:select",".tdb-filter-item-dropdown",function(a){var b=jQuery(this),c=b.hasClass("multiple");b=b.data("taxonomy");var d=a.params.data,l="";"undefined"!==typeof d.element?(a=jQuery(d.element).data("term-slug"),l=jQuery(d.element).data("filter-link")):a=d.slug;-1!==b.indexOf("tdb_")?(d=tdbFilters.removeQueryParam(window.location.href,"tdb-loop-page"),window.location.href=c|| ""===l?"undefined"!==typeof a?tdbFilters.updateQuery(d,b,a):d:l):console.log("invalid filter: "+b)}),a.jqueryObj.on("select2:unselect",".tdb-filter-item-dropdown",function(a){var b=jQuery(this).data("taxonomy");a=a.params.data;a="undefined"!==typeof a.element?jQuery(a.element).data("term-slug"):a.slug;if(-1!==b.indexOf("tdb_")){var c=tdbFilters.removeQueryParam(window.location.href,"tdb-loop-page");window.location.href=a?tdbFilters.removeQueryParamValue(c,b,a):c}else console.log("invalid filter: "+ b)}),jQuery(document).on("tdb_filters_remove_filter",function(b,c){b=c.term;a.jqueryObj.find('[data-taxonomy="'+c.tax+'"]').find("li[data-term-slug="+b+"]").removeClass("selected")}),a._is_initialized=!0)}},addItem:function(a){if("undefined"===typeof a.blockUid)throw"item.blockUid is not defined";tdbFilters.items.push(a);tdbFilters._initialize_item(a)},deleteItem:function(a){for(var c=0;c .tdb-surl-review-right").append('
    "),c=d.find(".tdb-surl-review-reply-form"),jQuery("html, body").animate({scrollTop:c.offset().top-c.height()},200)):"cancel"===b&&(c.text(a.replyTxt),c.attr("data-action","reply"),d.find(".tdb-surl-review-reply-form").remove())}),a.blockObj.on("click",".tdb-surl-review-reply-cancel",function(c){var b=jQuery(this);c=b.closest(".tdb-surl-review").find(".tdb-surl-review-leave-reply"); b=b.closest(".tdb-surl-review-reply-form");c.text(a.replyTxt);c.attr("data-action","reply");b.remove()}),a.blockObj.on("click",".tdb-surl-review-reply-submit",function(c){c.preventDefault();var b=jQuery(this),d=b.closest(".tdb-surl-review");c=d.data("review-id");var e=d.find(".tdb-surl-review-leave-reply"),f=b.closest(".tdb-surl-review-reply-form"),h=f.find('[name="content"]'),l=f.find('[name="name"]'),k=f.find('[name="email"]'),m=0;f.find(".tdb-s-fg-error").removeClass(".tdb-s-fg-error");""===h.val()? (h.closest(".tdb-s-form-group").addClass("tdb-s-fg-error"),h.closest(".tdb-s-form-group").append(''+a.requiredTxt+""),m++):(h.closest(".tdb-s-form-group").removeClass("tdb-s-fg-error"),h.closest(".tdb-s-form-group").find(".tdb-s-fg-error-msg").remove());""!==l.val()||l.prop("disabled")?(l.closest(".tdb-s-form-group").removeClass("tdb-s-fg-error"),l.closest(".tdb-s-form-group").find(".tdb-s-fg-error-msg").remove()):(l.closest(".tdb-s-form-group").addClass("tdb-s-fg-error"), l.closest(".tdb-s-form-group").append(''+a.requiredTxt+""),m++);""!==k.val()||k.prop("disabled")?(k.closest(".tdb-s-form-group").removeClass("tdb-s-fg-error"),k.closest(".tdb-s-form-group").find(".tdb-s-fg-error-msg").remove()):(k.closest(".tdb-s-form-group").addClass("tdb-s-fg-error"),k.closest(".tdb-s-form-group").append(''+a.requiredTxt+""),k++);0===m&&(f.addClass("tdb-s-content-disabled"),b.addClass("tdb-s-btn-saving"), jQuery.ajax({type:"POST",url:td_ajax_url,data:{action:"tdb_review_reply_on_submit",_nonce:a._nonce,content:h.val(),name:l.val(),email:k.val(),reviewID:c,userID:a.currentUserID},success:function(c){c=jQuery.parseJSON(c);if(""!==c.reply_id){var k=d.find(".tdb-surl-review-replies"),m="",n=a.currentUserID==a.articleAuthorID,x="";n&&(x="tdb-surl-review-reply-article-author");b.addClass("tdb-s-btn-saved");m+='
    ';m+='
    ';m+="<"+a.titleTag+' class="tdb-surl-review-title" '+(n?'title="Article author"':"")+">";m+=l.val();n&&(m+=a.articleAuthorBadge);m+="";m+='
    '+h.val()+"
    ";0!=a.currentUserID&&(m+='
    ',m+=''+a.deleteTxt+"",m+="
    ");m+="
    ";m+="
    ";setTimeout(function(){k.length?k.append(m):d.find("> .tdb-surl-review-right").append('
    '+ m+"
    ");f.remove();e.text(a.replyTxt);e.attr("data-action","reply")},200)}}}))}),a.blockObj.on("click",".tdb-surl-review-reply-delete",function(c){c.preventDefault();var b=jQuery(this),d=b.closest(".tdb-surl-review:not(.tdb-surl-review-reply)");c=d.data("review-id");var e=b.closest(".tdb-surl-review-reply");b=e.data("review-reply-id");e.addClass("tdb-s-content-disabled");jQuery.ajax({type:"POST",url:td_ajax_url,data:{action:"tdb_review_reply_on_delete",_nonce:a._nonce,reviewID:c,reviewReplyID:b}, success:function(a){jQuery.parseJSON(a).success&&setTimeout(function(){e.remove();var a=d.find(".tdb-surl-review-replies");a.find(".tdb-surl-review-reply").length||a.remove()},200)}})}),a._is_initialized=!0)},addItem:function(a){if("undefined"===typeof a.uid)throw"item.uid is not defined";tdbReviewsList.items.push(a);tdbReviewsList._initialize_item(a)},deleteItem:function(a){for(var c=0;c
    '+a.blank_fields_msg+"
    ");else if(a.formData.append("formElements",JSON.stringify(d)), a.formData.append("enctype","multipart/form-data"),a.formData.append("_nonce",a._nonce),"user"===a.formType)a.formData.append("action","tdb_user_form_on_submit"),tdbCustomForms.userFormAjaxCall(a);else if("post"===a.formType)if(a.formData.append("action","tdb_posts_form_on_submit"),a.formData.append("enablePostCreate",a.enablePostCreate),a.formData.append("postID",a.postID),a.formData.append("authorID",a.currentUserID),a.formData.append("postType",a.postType),a.formData.append("postFormat",a.postFormat), a.formData.append("postStatus",a.postStatus),a.formData.append("linkToPostID",a.linkToPostID),a.formData.append("cfInputEmailList",a.cfInputEmailList),a.formData.append("emailList",a.emailList),a.formData.append("enableEmailSubmit",a.enableEmailSubmit),a.formData.append("sendEmailToAdmin",a.sendEmailToAdmin),a.formData.append("sendEmailToAuthor",a.sendEmailToAuthor),a.formData.append("sendEmailToCustomAddr",a.sendEmailToCustomAddr),a.formData.append("sendEmailToEmailFromField",a.sendEmailToEmailFromField), a.formData.append("emailSubject",a.emailSubject),a.formData.append("tpl_id",a.tpl_id),c=a.blockObj.find("#g-recaptcha"),c.length){var h=c.attr("data-sitekey"),l="";grecaptcha.ready(function(){grecaptcha.execute(h,{action:"submit"}).then(function(b){l=b;a.formData.append("captcha",l);tdbCustomForms.postFormAjaxCall(a)})})}else tdbCustomForms.postFormAjaxCall(a)}),a._is_initialized=!0)},getFormContentElements:function(a){var c=[],b=!1;jQuery(a.formGroupClass+".tdb_form_content").each(function(){var d= jQuery(this),e=d.data("required"),f=d.data("custom-field"),h=d.data("form-type"),l=d.find(".tdb-s-form-group"),k=d.find(".tdb-s-form-label").text().replace(" *",""),m=d.find("textarea");d=d.find(".wp-editor-wrap");var n="";h===a.formType&&(n=d.hasClass("tmce-active")?tinymce.get(m.attr("id")).getContent():m.val(),c.filter(function(a){return a.name===f}).length||(1===e&&""===n?(l.addClass("tdb-s-fg-error"),l.append(''+a.required_field_error+""),b=!0):(e=encodeURIComponent(n).replace(/%([0-9A-F]{2})/g, function(a,b){return String.fromCharCode("0x"+b)}),k={name:f,value:btoa(e),label:k},c.push(k))))});return{elements:c,hasErrors:b}},getFormFileElements:function(a){var c=[],b=!1;jQuery(a.formGroupClass+".tdb_form_file_upload").each(function(){var d=jQuery(this),e=d.data("form-type"),f=d.data("required"),h=d.data("no-save"),l=d.data("custom-field"),k=d.find(".tdb-s-form-group");d=d.find("input");var m=d.val();e===a.formType&&""!==l&&!1===h&&(1===f&&""===m?(k.addClass("tdb-s-fg-error"),k.append(''+ a.required_field_error+""),b=!0):(a.formData.append(l,d.prop("files")[0]),""===m&&c.push(l)))});return{deleteElements:c,hasErrors:b}},getFormACFElements:function(a){var c=[],b="",d=!1;jQuery(a.formGroupClass+".tdb-posts-form-acf-input").each(function(){var e=jQuery(this),f=e.data("form-type"),h=e.data("type"),l=e.data("required"),k=e.data("name"),m=e.find(".tdb-s-form-label").text().replace(" *",""),n=void 0;if(f===a.formType&&!c.filter(function(a){return a.name===k}).length)switch(h){case "text":case "textarea":case "url":case "select":n= e.find(".tdb-s-form-input");var q=n.val();1===l&&""===n.val()?(e.addClass("tdb-s-fg-error"),e.append(''+a.required_field_error+""),d=!0):(m={name:k,value:q,label:m,type:h},"select"===h?(jQuery.isArray(q)?(q.forEach(function(a,b){q[b]={value:a,label:n.find('option[value="'+a+'"]').text()}}),m.type=h+"_multiple"):(q={value:q,label:n.find('option[value="'+q+'"]').text()},"post"===a.formType&&k===a.customPostTitleField&&(b=q)),m.value=q):("textarea"===h&&(m.value= encodeURI(q)),"post"===a.formType&&k===a.customPostTitleField&&(b=q)),c.push(m));break;case "email":f=/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/;n=e.find(".tdb-s-form-input");1===l&&""===n.val()?(e.addClass("tdb-s-fg-error"),e.append(''+a.required_field_error+""),d=!0):n.val().match(f)||""===n.val()?(h={name:k,value:n.val(),label:m,type:h},c.push(h),"post"===a.formType&&k===a.customPostTitleField&&(b=n.val())):(e.addClass("tdb-s-fg-error"),e.append(''+ a.valid_email_msg+""),d=!0);break;case "number":n=e.find(".tdb-s-form-input");f=n.attr("min");var u=n.attr("max");1===l&&""===n.val()?(e.addClass("tdb-s-fg-error"),e.append(''+a.required_field_error+""),d=!0):n.val()'+a.lower_msg+f+"."),d=!0):n.val()>u&&""!==n.val()?(e.addClass("tdb-s-fg-error"),e.append(''+a.higher_msg+u+ "."),d=!0):(h={name:k,value:n.val(),label:m,type:h},c.push(h),"post"===a.formType&&k===a.customPostTitleField&&(b=n.val()));break;case "checkbox":if(1!==l||e.find("input:checked").length){var v=[];e.find("input:checked").each(function(){var a=jQuery(this);v.push({value:a.val(),label:a.siblings(".tdb-fi-check-label").text()})});c.push({name:k,value:v,label:m,type:h})}else e.addClass("tdb-s-fg-error"),e.append(''+a.required_field_error+""),d=!0;break;case "radio":case "button_group":1!==l||e.find("input:checked").length?(e=e.find("input:checked"),l={value:e.val(),label:e.siblings(".tdb-fi-check-label").text()},c.push({name:k,value:l,label:m,type:h}),"post"===a.formType&&k===a.customPostTitleField&&(b=e.siblings(".tdb-fi-check-label").text())):(e.addClass("tdb-s-fg-error"),e.append(''+a.required_field_error+""),d=!0)}});return{elements:c,postTitle:b,hasErrors:d}},getFormTaxonomyElements:function(a){var c=[],b=!1;jQuery(a.formGroupClass+".tdb_form_taxonomies").each(function(){var d= jQuery(this),e=d.data("tax-type"),f=d.data("required"),h=d.find('[data-term-hierarchy="parent"]'),l=h.data("display");d=d.find('[data-term-hierarchy="child"], [data-term-hierarchy="sub-child"]');var k=[];c.filter(function(a){return a.taxType===e}).length||("dropdown"===l?(l=h.find("select"),1===f&&""===l.val()?(h.addClass("tdb-s-fg-error"),h.append(''+a.required_field_error+""),b=!0):""!==l.val()&&k.push(parseInt(l.val()))):(l=h.find("input:checked"),1!==f|| l.length?l.each(function(){k.push(parseInt(jQuery(this).val()))}):(h.addClass("tdb-s-fg-error"),h.append(''+a.required_field_error+""),b=!0)),d.each(function(){var a=jQuery(this);"dropdown"===a.data("display")?(a=a.find("select"),""!==a.val()&&k.push(parseInt(a.val()))):a.find("input:checked").each(function(){k.push(parseInt(jQuery(this).val()))})}),k.length&&c.push({terms:k,taxType:e}))});return{elements:c,hasErrors:b}},getFormLocationElement:function(a){var c= jQuery(a.formGroupClass+".tdb_location_finder").first(),b={},d=!1;if(c.length){var e=c.data("tax-type"),f=c.data("required"),h=c.find(".tdb-s-form-group-lf-search input"),l=h.closest(".tdb-s-form-group"),k=c.find(".tdb-s-form-group-lf-address input"),m=c.find(".tdb-s-form-group-lf-postal-code input"),n=c.find(".tdb-s-form-group-lf-city input"),q=c.find(".tdb-s-form-group-lf-state input");c=c.find(".tdb-s-form-group-lf-country input");1===f&&""===h.val()?(l.addClass("tdb-s-fg-error"),l.append(''+ a.required_field_error+""),d=!0):""!==n.val()&&""!==q.val()&&""!==c.val()&&(b={address:k.val(),postalCode:m.val(),city:n.val(),state:q.val(),country:c.val(),taxType:e})}return{element:b,hasErrors:d}},getFormTitleElement:function(a){var c=jQuery(a.formGroupClass+".tdb_form_title input").first(),b="",d=!1;if(c.length){c=c.first();var e=c.closest(".tdb-s-form-group");""===c.val()?(e.addClass("tdb-s-fg-error"),e.append(''+a.required_field_error+""),d=!0): b=c.val()}return{postTitle:b,hasErrors:d}},getLinkToPostElement:function(a){var c=jQuery(a.formGroupClass+".tdb_form_link_post").first(),b="",d=!1;if(c.length){var e=c.find("select"),f=c.find(".tdb-s-form-group");1===c.data("required")&&""===e.val()?(f.addClass("tdb-s-fg-error"),f.append(''+a.required_field_error+""),d=!0):b=e.val()}return{linkToPostID:b,hasErrors:d}},userFormAjaxCall:function(a){var c=a.blockObj.find(".tdb-s-form"),b=jQuery(a.formGroupClass+ ".tdb-s-form-group"),d=a.blockObj.find(".tdb-s-btn");b.addClass("tdb-s-content-disabled");c.addClass("tdb-s-content-disabled");d.addClass("tdb-s-btn-saving");jQuery.ajax({method:"POST",url:td_ajax_url,data:a.formData,contentType:!1,processData:!1,success:function(e){e=jQuery.parseJSON(e);""!==e.success&&c.prepend('
    '+e.success+"
    ");if(e.errors.length){var f='
    '; f+='
      ';jQuery.each(e.errors,function(a,b){f+="
    • "+b+"
    • "});f+="
    ";f+="
    ";c.prepend(f)}d.addClass("tdb-s-btn-saved");c.removeClass("tdb-s-content-disabled");setTimeout(function(){b.removeClass("tdb-s-content-disabled");d.removeClass("tdb-s-btn-saving").removeClass("tdb-s-btn-saved");setTimeout(function(){a.blockObj.find(".tdb-s-notif-success").remove();a.blockObj.find(".tdb-s-notif-error").remove()},4E3)},200)}})},postFormAjaxCall:function(a){var c=a.blockObj.find(".tdb-s-form"), b=jQuery(a.formGroupClass+".tdb-s-form-group"),d=a.blockObj.find(".tdb-s-btn");b.addClass("tdb-s-content-disabled");c.addClass("tdb-s-content-disabled");d.addClass("tdb-s-btn-saving");jQuery.ajax({method:"POST",url:td_ajax_url,data:a.formData,contentType:!1,processData:!1,success:function(e){e=jQuery.parseJSON(e);if(""!==a.successURL&&""!==e.success.create_post&&""===a.postID)window.location.replace(a.successURL);else{if(""!==e.success.create_post||""!==e.success.email){var f='
      '; ""!==e.success.create_post&&(f+="
    • "+e.success.create_post+"
    • ");""!==e.success.email&&(f+="
    • "+e.success.email+"
    • ");c.prepend(f+"
    ")}if(""!==e.errors.create_post||""!==e.errors.email||""!==e.errors.permission)f='
      ',""!==e.errors.create_post&&(f+="
    • "+e.errors.create_post+"
    • "),""!==e.errors.email&&(f+="
    • "+e.errors.email+"
    • "),""!==e.errors.permission&&(f+="
    • "+e.errors.permission+ "
    • "),c.prepend(f+"
    ");d.addClass("tdb-s-btn-saved");c.removeClass("tdb-s-content-disabled");""!==e.success.create_post&&""===a.postID?setTimeout(function(){window.location.replace(window.location.pathname+window.location.search+window.location.hash)},1E3):setTimeout(function(){b.removeClass("tdb-s-content-disabled");d.removeClass("tdb-s-btn-saving").removeClass("tdb-s-btn-saved");setTimeout(function(){a.blockObj.find(".tdb-s-notif-success").remove();a.blockObj.find(".tdb-s-notif-error").remove()}, 4E3)},200)}}})},addItem:function(a){if("undefined"===typeof a.uid)throw"item.uid is not defined";tdbCustomForms.items.push(a);tdbCustomForms._initialize_item(a)},deleteItem:function(a){for(var c=0;c